Harbor
Sign in to the Harbor container registry with Pocket ID.
Create the client in Pocket ID
Section titled “Create the client in Pocket ID”- In Pocket ID, open Administration → OIDC Clients and click Add OIDC Client.
- Enter a name such as
Harborand add the callback URLhttps://harbor.example.com/c/oidc/callback. - Click Create and copy the Client ID and the Client secret. The client secret is only shown once.
- On the client’s General tab, set Client Launch URL to
https://harbor.example.comand turn on PKCE, then click Save. - On the client’s Access tab, select the groups that may sign in under Allowed User Groups, or choose All Users.
Configure Harbor
Section titled “Configure Harbor”- Log in to Harbor as the admin user.
- Open Administration → Configuration and select Authentication.
- Fill in the fields:
- Auth Mode:
OIDC - Primary Auth Mode: checked if Pocket ID should be the primary authentication.
- OIDC Provider Name:
Pocket IDor something similar. - OIDC Endpoint:
https://id.example.com - OIDC Client ID: the Client ID from Pocket ID.
- OIDC Client Secret: the Client secret from Pocket ID.
- OIDC Group Filter: leave blank.
- Group Claim Name:
groups - OIDC Admin Group: a Pocket ID group for administrators (e.g.
admin), or leave blank. - OIDC Scope:
openid,offline_access,email,profile,groups - Verify Certificate: checked.
- Automatic onboarding: checked (or unchecked if you want users to change their username).
- OIDC Session Logout: checked.
- Username Claim:
email
- Auth Mode:
- Save the settings.
- Test the OIDC server.
- Log out and sign in with Pocket ID to test it.
- Username Claim can be any other claim (e.g. leave it empty for
name, or setsub,email, …), depending on how your users should be named. - Use OIDC Group Filter if not all of your Pocket ID users should access the registry.
- See Configure OIDC Provider Authentication for further help.
Common problems
Section titled “Common problems”- If you set the primary authentication mode to
OIDCand can’t log in, avoid the redirect by usinghttps://harbor.example.com/account/sign-into log in as the local system administrator. - See the warning in the Harbor documentation: You can change the authentication mode from database to OIDC only if no local users have been added to the database. If there is at least one user other than admin in the Harbor database, you cannot change the authentication mode.