Set-HarborSsoConfig
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.
Syntax
Section titled “Syntax”Set-HarborSsoConfig [-ClientId] <string> [[-Issuer] <string>] [[-AdminUsers] <string[]>] [[-OperatorUsers] <string[]>] [[-ViewerUsers] <string[]>] [[-AllowedUsers] <string[]>] [[-ProfileName] <string>] [[-ConfigPath] <string>] [-Disable] [-WhatIf] [-Confirm]Description
Section titled “Description”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.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”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.
Example 2
Section titled “Example 2”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.
Parameters
Section titled “Parameters”-AdminUsers
Section titled “-AdminUsers”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: @().
-AllowedUsers
Section titled “-AllowedUsers”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: @().
-ClientId
Section titled “-ClientId”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
Yes | 0 | No |
-ConfigPath
Section titled “-ConfigPath”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 7 | No |
-Confirm
Section titled “-Confirm”Asks for confirmation before the command changes anything.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
SwitchParameter |
No | Named | No |
Aliases: cf.
-Disable
Section titled “-Disable”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
SwitchParameter |
No | Named | No |
-Issuer
Section titled “-Issuer”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 1 | No |
-OperatorUsers
Section titled “-OperatorUsers”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: @().
-ProfileName
Section titled “-ProfileName”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 6 | No |
-ViewerUsers
Section titled “-ViewerUsers”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: @().
-WhatIf
Section titled “-WhatIf”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.
See also
Section titled “See also”- All Harbor Onboard cmdlets
- In PowerShell:
Get-Help Set-HarborSsoConfig -Full
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
