Skip to content

SSO (OIDC)

Harbor suiteRole: adminDescribes Onboard 0.58.0 / Health 0.21.0

With single sign-on, operators sign in to Harbor with their own CyberArk Identity account. It is the recommended way in: there is no Harbor password to manage, and operators can work in the vault under their own CyberArk permissions.

Threat Control
Shared or reused local passwords People sign in with their own Identity account, with your Identity policies (MFA included) applied.
Everyone acting as one powerful vault identity An operator whose token the vault accepts works under their own CyberArk identity, so CyberArk’s own audit names them.
Forged or replayed sign-ins Authorization code flow with PKCE; the sign-in state is bound to the browser by a short-lived cookie; the ID token’s signature is verified against the tenant’s published keys (RS256 only, failing closed); exp is required and azp is checked; every endpoint must be https.
Too much access by default Anyone not listed in the role map is a viewer. Write access is an explicit grant.

In the Identity Admin portal: Apps, Add Web App, OIDC.

  1. Application type: OpenID Connect. A confidential client is not required: Harbor uses PKCE.

  2. Redirect URIs, exactly, for each console you use:

    https://localhost:8787/auth/callback
    https://localhost:8788/auth/callback

    Use http:// instead while a console still runs without HTTPS, and keep both during the switch. A console served to other machines uses its own name: https://<hostname>:8787/auth/callback. The console shows its exact redirect URI in the setup wizard, with a copy link.

  3. Assign the CyberArk users or roles who may use Harbor to the app.

  4. From the app’s settings, copy two values:

    • the Client ID: a short identifier, not the secret;
    • the OpenID Connect Issuer URL: it is specific to the app, for example https://<tenant>.id.cyberark.cloud/<app>. Pasting the /.well-known/openid-configuration link is fine; Harbor trims it.
  5. Optional: to let Harbor refresh the vault session silently, enable Issue refresh tokens on the app’s tokens settings.

Gear menu, CyberArk SSO setup (or Set up CyberArk SSO… on Tenant & service account). In Set up CyberArk SSO (one time):

  1. Client ID.
  2. OpenID Connect Issuer URL.
  3. Admins, Operators and Viewers: comma-separated usernames or emails. The three fields are filled in from the current role map and stay disabled until it has loaded, so nothing typed early can replace a list. Admins are only ever added here; to remove one, edit appAuth.roles.admin in the profile. If the role map cannot be read, the fields stay disabled with a note and the save leaves the role lists as they are.
  4. Save & sign in.

Before it saves anything, Harbor fetches the issuer’s discovery document, and the document’s issuer must be exactly the issuer you entered. On success it redirects you to the CyberArk login. The setup wizard’s Step 2 · Single sign-on (recommended) has the same fields (Client ID, Issuer URL, Admins, Operators, Viewers) and button Save SSO.

Because this fetch is made by the Harbor server on a request from the browser, it is fenced, so the wizard cannot be used to probe the Harbor machine’s network: https only; every address the issuer’s name resolves to must be public (loopback, link-local including the cloud metadata address, private, carrier-grade NAT, IPv6 unique-local and multicast addresses are refused); no redirects; at most 64 KB and 10 seconds. A failure shows one of five fixed reasons and saves nothing: “issuer unreachable”, “not an OIDC discovery document”, “issuer mismatch”, “internal address refused” or “redirect refused”. The wizard never shows the response body or the connection error. A vanity host name for the issuer (one that differs from the issuer the discovery document declares) is refused as “issuer mismatch”: enter the issuer exactly as the app’s settings show it.

Terminal window
# First setup: single sign-on on, yourself as admin; everyone else is a viewer
Set-HarborSsoConfig -ClientId <client id> -Issuer https://<tenant>.id.cyberark.cloud/<app> -AdminUsers admin.user@example.com
# Set the operator list; admins, viewers and allowedUsers keep their values
Set-HarborSsoConfig -ClientId <client id> -Issuer https://<tenant>.id.cyberark.cloud/<app> -OperatorUsers operator.one@example.com, operator.two@example.com
Parameter Effect
-ClientId The app’s OpenID Connect client ID. A value that looks like a secret is refused.
-Issuer The app’s issuer URL (https only). Without it, the profile’s Identity URL is used, with a warning. Unlike the console, the command does not fence the issuer’s address, so an identity provider on your internal network can be configured from the machine.
-AdminUsers Added to the admin list. Adding never removes an admin.
-OperatorUsers Replaces the operator list, only when given. -OperatorUsers @() clears it.
-ViewerUsers Replaces the viewer list, only when given. -ViewerUsers @() clears it.
-AllowedUsers Replaces the list of who may sign in at all, only when given. Empty means anyone the Identity app admits.
-Disable Turns single sign-on off.

Every role list merges: a list you do not pass keeps its current value, so re-running the setup never drops your operators or viewers. The command returns the number of people in each role as RoleCounts.

Either way, the change lands in the profile’s appAuth block in the shared configuration, applies to both consoles and needs no restart. It is an admin action with an identity re-check.

Record Content
Configuration change history (Standards, Change history; Get-PAMConfigHistory) Who changed single sign-on and when, with the role lists and allowedUsers shown as counts, never names. Every signed-in user can read this history, so it never lists who holds which role; records saved by earlier builds are shown the same way.
Activity log One line per save: the actor and the count per role (admin n, operator n, viewer n), never the names.
"appAuth": {
"enabled": true,
"oidcClientId": "<client id>",
"issuer": "https://<tenant>.id.cyberark.cloud/<app>",
"scope": "openid profile email",
"allowedUsers": [],
"roles": {
"admin": ["admin.user@example.com"],
"operator": ["operator.one@example.com", "operator.two@example.com"],
"viewer": []
},
"idleTimeoutMinutes": 20
}
  • Entries match the signed-in username or email, ignoring case.
  • A person listed under several roles gets the highest: admin, then operator, then viewer.
  • Anyone who signs in but is not listed is a viewer. List operators and admins explicitly.
  • allowedUsers, when not empty, is who may sign in at all.

Maintain the lists in the setup dialog (Admins, Operators, Viewers) or with Set-HarborSsoConfig. Only removing an admin needs a hand edit of appAuth.roles.admin in %ProgramData%\Harbor\environment.local.json, as an administrator of the machine.

The sign-in page leads with Sign in with CyberArk. After the CyberArk login, you land on Harbor Home.

  • Inside Harbor Home, the Harbor Health console never starts a sign-in of its own (identity providers refuse to be shown in a frame). It shows Sign in at Harbor Home, and Home’s sign-in covers it.
  • Opened on its own, Harbor Health has the full sign-in, which needs its redirect URI on port 8788.
  • A demo profile never runs single sign-on.
Case Vault identity Audit records read
The vault accepts the operator’s own token The operator’s own CyberArk identity <operator>
The vault refuses it (some tenants do not accept tokens from a custom app) The console’s service account, if one is configured <operator> (vault: <service identity>)
Refused, and no service account None: the operator can sign in but not reach the vault

An operator whose own token expires and cannot refresh falls back to the service account and is told once.

Before a destructive action, a single sign-on user whose last sign-in is older than the re-check window selects Sign in again with CyberArk. The emergency account’s password cannot vouch for an SSO session.

Symptom Fix
Sign-in loops, or a signature error The redirect URI in the Identity app must match the console URL exactly: scheme, host and port. Check that the operator is assigned to the app.
Sign-in fails right after switching to HTTPS Add the https:// redirect URIs to the app.
“That Client ID contains characters like …” You pasted the app’s secret. Paste the Client ID.
“Something went wrong” at the CyberArk login Use the app-specific issuer URL, not the tenant root.
An operator can read but not create They are not in the operator list. Add them under Operators in the setup dialog, or with Set-HarborSsoConfig -OperatorUsers.
“issuer mismatch” when saving The discovery document names another issuer: copy the app’s OpenID Connect Issuer URL exactly.
“internal address refused” when saving The issuer resolves to a private or local address. Use your public CyberArk Identity URL, or configure an internal identity provider with Set-HarborSsoConfig on the machine.
The CyberArk sign-in cannot start The console shows an error page with the identity provider’s HTTP status and a link back. Check the issuer URL and that the Harbor machine can reach your Identity tenant.
  • Turning single sign-on off does not end the SSO sessions the console already issued. They last until idle or 12 hours. Restart the console to end them at once. Sessions shared from the other console are treated as viewers.
  • Roles come only from Harbor’s role map. Roles or groups in your identity provider are not read.

See Known limitations.

Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.