Skip to content

Set-HarborSecretVault

Harbor OnboardNo sign-in neededGenerated from the codeDescribes Onboard 0.59.0

Points a profile’s OAuth secret at a SecretManagement vault: writes the per-profile secretManagement { vault, secret } block to the local-override config. -Remove takes the profile back off the vault.

Parameter set Set:

Terminal window
Set-HarborSecretVault -ProfileName <string> -SecretName <string> [-Vault <string>] [-ConfigPath <string>] [-WhatIf] [-Confirm]

Parameter set Remove:

Terminal window
Set-HarborSecretVault -ProfileName <string> -Remove [-ConfigPath <string>] [-WhatIf] [-Confirm]

With the block set, Connect-PAMSession pulls the client secret from Microsoft.PowerShell.SecretManagement (Get-Secret -Name <secret> [-Vault <vault>]) BEFORE the DPAPI machine cache – so the secret can live in SecretStore, KeePass, Azure Key Vault or any other vault extension instead of on this machine. The module stays optional: Harbor warns and falls back when it (or the secret) is unavailable. Store the secret itself with, e.g.: Set-Secret -Name HarborOAuth-prod -Secret ‘<client secret>’ -Vault SecretStore

Terminal window
Set-HarborSecretVault -ProfileName prod -Vault SecretStore -SecretName HarborOAuth-prod
Terminal window
Set-HarborSecretVault -ProfileName prod -Remove

Not described in the module help.

Type Required Position Pipeline input
String No Named 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
String Yes Named No

Not described in the module help.

Type Required Position Pipeline input
SwitchParameter Yes Named No

Not described in the module help.

Type Required Position Pipeline input
String Yes Named No

Not described in the module help.

Type Required Position Pipeline input
String No Named No

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).

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