Skip to content

Set-HarborSsoConfig

Harbor OnboardNo sign-in neededGenerated from the codeDescribes Onboard 0.59.0

Enables CyberArk Identity SSO for the web UI: writes the appAuth block to environment.local.json. Backs the in-app “Set up SSO” wizard; usable from the CLI too.

Terminal window
Set-HarborSsoConfig [-ClientId] <string> [[-Issuer] <string>] [[-AdminUsers] <string[]>] [[-OperatorUsers] <string[]>] [[-ViewerUsers] <string[]>] [[-AllowedUsers] <string[]>] [[-ProfileName] <string>] [[-ConfigPath] <string>] [-Disable] [-WhatIf] [-Confirm]

One-time prerequisite (CyberArk requirement, no way around it): register an OIDC WEB APP in the Identity Admin portal with redirect URI https://localhost:8787/auth/callback (add the :8788 one for Harbor Health, and the http:// variants while a console still runs on http) and pass its client ID and its app-specific OpenID Connect issuer here. The issuer defaults to the profile’s identityUrl (a warning says so: CyberArk issuers are normally app-specific). The scope is ‘openid profile email’; refresh tokens come from the app’s “Issue refresh tokens” setting, never from an extra scope. Roles: an SSO user who is NOT in the role map signs in as a VIEWER. List the people who create safes, onboard accounts or run repairs under -OperatorUsers, and the people who change configuration under -AdminUsers. The break-glass account (Set-HarborWebLogin) is always admin. Every role list merges: one you do not pass keeps its current value.

Terminal window
Set-HarborSsoConfig -ClientId 'harbor-web@acme' -Issuer 'https://abc1234.id.cyberark.cloud/harbor' -AdminUsers '[email protected]'

First setup: SSO on, yourself as admin; everyone else who signs in is a viewer.

Terminal window
Set-HarborSsoConfig -ClientId 'harbor-web@acme' -Issuer 'https://abc1234.id.cyberark.cloud/harbor' -OperatorUsers '[email protected]', '[email protected]'

Sets the operator list. Admins, viewers and allowedUsers keep their current values.

Users (username or email) who get the ADMIN role. Seed yourself here. MERGED into the existing admin list (adding an admin never removes one; edit the file to remove an admin).

Type Required Position Pipeline input
String[] No 2 No

Default: @().

Who may sign in at all (empty = anyone the Identity app admits). Replaces the existing list ONLY when supplied.

Type Required Position Pipeline input
String[] No 5 No

Default: @().

Not described in the module help.

Type Required Position Pipeline input
String Yes 0 No

Not described in the module help.

Type Required Position Pipeline input
String No 7 No

Asks for confirmation before the command changes anything.

Type Required Position Pipeline input
SwitchParameter No Named No

Aliases: cf.

Not described in the module help.

Type Required Position Pipeline input
SwitchParameter No Named No

Not described in the module help.

Type Required Position Pipeline input
String No 1 No

The operator list (create, onboard, repair; no configuration writes). Replaces the existing list ONLY when supplied; an explicit empty array (-OperatorUsers @()) clears it. Not supplied = kept as it is.

Type Required Position Pipeline input
String[] No 3 No

Default: @().

Not described in the module help.

Type Required Position Pipeline input
String No 6 No

The viewer list. Replaces the existing list ONLY when supplied; an explicit empty array clears it. (Unlisted users are viewers anyway; a name listed under admin or operator too gets the higher role.)

Type Required Position Pipeline input
String[] No 4 No

Default: @().

Shows what the command would do, without doing it.

Type Required Position Pipeline input
SwitchParameter No Named No

Aliases: wi.

This command also accepts the PowerShell common parameters (-Verbose, -ErrorAction, and so on).

A re-save MERGES into the existing appAuth block – roles, allowedUsers, idle timeout and any other field survive unless explicitly supplied (it used to rebuild the block with empty lists). The issuer must be https. Every change is recorded in the config change history (document ‘sso’, the appAuth block only – never the rest of the file). That history is readable by every signed-in user, so it records the role lists and allowedUsers as COUNTS, never the names; the record carries the actor.

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