Skip to content

policy-rules.json

Harbor OnboardRole: adminDescribes Onboard 0.58.0

Config/policy-rules.json holds your own guardrails for safes, as data. Harbor Onboard checks them:

  • before a safe is created, before any call to CyberArk, dry runs included: a block rule stops the create, a warn rule logs and continues;
  • over the whole register in every compliance scan, where each broken rule is a finding of kind policy:<id> (and a new finding raises the scheduled scan’s compliance-new-drift alert).

Edit them under Standards (validated, Preview impact, backup, change history). Check the register offline at any time with Test-PAMPolicy.

Id Rule Enabled Enforce
cpm-required Managed safes (shared-managed, svc-managed, personal) must carry a managing CPM. Yes block
owner-required Every safe records a human owner. No warn
cmdb-ref-required Safes link to a CMDB configuration item. No warn
ticket-ref-required Safes are created under a change ticket. No warn

The three disabled rules are ready-made examples: set enabled to true.

{
"enabled": true,
"rules": [
{
"id": "cpm-required",
"description": "Managed safes must carry a managing CPM (no CPM means no rotation)",
"enabled": true,
"enforce": "block",
"type": "require-field",
"field": "managingCpm",
"appliesTo": ["shared-managed", "svc-managed", "personal"]
}
]
}
Field Meaning
enabled (top level) Turns every rule on or off.
id A short, unique id. Findings are reported as policy:<id>.
description Shown with the finding.
enabled Turns this rule on or off.
enforce block stops a create; warn logs and lets it continue. Both are reported by the compliance scan.
type require-field, name-pattern or field-in-list (below).
appliesTo The safe types the rule covers. Empty: every type.
Type Extra fields Passes when
require-field field: one of managingCpm, owner, cmdbRef, ticketRef, description The field is not empty.
name-pattern pattern: a regular expression The safe name matches it.
field-in-list field, allowed: a list of values The field’s value is one of them.

A policy rule can stop even a governed naming exception: exceptions are about the name, not about the guardrails.

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