Skip to content

Compare-PAMSafePermissions

Harbor OnboardNo sign-in neededGenerated from the codeDescribes Onboard 0.59.0

RBAC drift report: compares a safe’s ACTUAL members and permissions in the vault against what the rbac-map says they SHOULD be.

Parameter set One (default):

Terminal window
Compare-PAMSafePermissions [-SafeName] <string> [-IgnoreMembers <string[]>] [-ConfigPath <string>] [-ConfigProfile <string>]

Parameter set All:

Terminal window
Compare-PAMSafePermissions -All [-IgnoreMembers <string[]>] [-ConfigPath <string>] [-ConfigProfile <string>]

The expected state is derived the same way New-PAMSafe applies it: the safe type is resolved from the name, persona group names from the groupNaming pattern, permissions from rbac-map.json. Differences are reported as: MissingMembers expected on the safe but not present UnexpectedMembers present but not part of the standard (after the ignore list – built-in CyberArk users/groups and the connecting service user are always ignored) PermissionDrift per member: permissions to add / remove ‘OPT’ permissions (retrieveAccounts on managed types) are excluded from the strict diff because either value can be intentional; they are listed separately as OptPermissions for review. Personal safes compare the global admin groups only (the individual owner cannot be derived from the name). Governed naming exceptions: a TYPED exception (declared safeType in the register) is audited like any safe – expected group names derive from the raw name via the pattern’s {SafeName} token (rows carry NameException = true). UNTYPED exceptions are drift-exempt: skipped by -All, and an explicit -SafeName query returns an explanatory row.

Terminal window
Compare-PAMSafePermissions -SafeName AB-ABC-SRV-WIN-DA-I-M-P
Terminal window
Compare-PAMSafePermissions -All | Where-Object { -not $_.InCompliance }

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 No Named No

Not described in the module help.

Type Required Position Pipeline input
String No Named No

Not described in the module help.

Type Required Position Pipeline input
String[] No Named No

Default: @().

Not described in the module help.

Type Required Position Pipeline input
String Yes 0 No

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.