Prepare and enable a policy for a tenant

Propose a change, obtain independent approval and correlate each decision with its exact policy version.

Roles: author and reviewer are two different administrators with individual IAM.Identity sign-in. Viewers read history; a shared administrative token cannot submit or review proposals. A hosted tenant owner proposes their own policy from /customer and cannot approve it.

Before you start

This guide applies to the profile with required change history and independent review. Policies must show Policy change review. For an older self-hosted deployment, the operator first runs the compatible migration and enables this profile on every replica; a new console alone does not enable it.

Prepare a specific tenant, positive/negative educational requests and the intended action. scope.tenant: "*" covers everyone. Do not rely on groups/apps as a verified isolation boundary in this release. Tenant authority comes from the trusted identity or API key.

Click path

  1. Policies → New policy. Enter ID, Name, Owner, description and the specific Tenant. Keep Draft while preparing.
  2. Define conditions and canonical actions: block, mask, reroute, flag or allow. Check compound conditions and point in JSON. Preview does not apply enforcement.
  3. Click Create policy or Save. 202 pending_review freezes a proposal only. Retain its PCR-… ID; the previous policy still applies.
  4. Give the ID to a different administrator. To enable an approved draft, open Edit document, set status: "active" and submit a new independently reviewed change.

The editor retains canonical actions (block, not blocked), rule IDs and additional predicates through JSON → Form → JSON. Set explicit true or false for injection_detected and provider_unlisted; verify compound conditions, including point, in JSON. The server rejects non-empty scope.apps and scope.groups with 422; use a specific tenant. In the independent-review profile these checks do not replace approval by another administrator.

Interface controls

  1. Check all predicates
  2. Status
  3. Tenant
  4. true / false
  5. Action
  6. Save policy

Independent review

  1. Another administrator selects Sign in with corporate SSO, then Policies → Policy change review → Refresh proposals.
  2. Select Open document for the intended proposal. Compare Current document with Proposed document, especially tenant, status, conditions and actions. The proposed document is frozen; a review comment cannot edit it.
  3. Enter Reviewer comment, choose Approve and apply or Reject, and confirm the chosen action.
  4. After approval, verify Approved and Applied version #…. Only completed approval applies the document. Rejection leaves the serving policy unchanged.

The author cannot review their proposal after signing in again or changing sessions: the server compares the individual issuer/subject. The UI states The author cannot review their own proposal; the API returns 403 independent_reviewer_required. A shared token cannot stand in for another person.

Illustrative example: Refresh proposals
Illustrative example: Refresh proposals
Illustrative data. Available controls depend on your edition and permissions.
  1. Refresh proposals
  2. Frozen proposed document
  3. New applied version after rollback

History and rollback

The document, its version binding and approval outcome commit in one transaction. Version history retains earlier documents, actors and notes; CURRENT identifies the exact serving history row.

  1. In your policy card, choose an earlier row → Roll back.
  2. Confirm submission. Rollback also creates a proposal; it does not immediately replace the policy.
  3. A different administrator compares and approves the frozen older document. This creates a new version; old rows and decisions remain intact. In the educational example, rolling back to39 after42 created43.

Retire a rule using independently approved Pause. Deletion is unavailable in this profile so history remains. Pausing one policy leaves other protection intact. Rollback also restores the older tenant/status: inspect both before approval.

Verify the result

  • Read GET /admin/policies/{id}?format=document and GET /admin/policies/{id}/versions again: the document and current_version_id must match the approved proposal.
  • Send a new educational /v1/inspect using the same client key through your environment’s API domain. Check decision.action, policy_id, rule_id, policy_version_id and policy_set_sha256.
  • For MCP secure.check_policy, these fields are in structuredContent.decision; Request ID is in structuredContent.verdict.request_id. HTTP/MCP normalize context consistently: agent → subagent, code → dev, and empty/unknown values → unknown. Text and tenant authority are preserved.
  • Open Audit and forensics for the Request ID. The decision binds the policy set frozen at inspection time; later edits cannot relabel that evidence. Private policy-set documents are not disclosed to inference clients.

If no rule wins, the selected version ID is absent while the set hash remains available. Never substitute the latest similar history row for a missing ID. Events predating current-policy enrollment are not assigned invented historical versions.

Replica consistency

In the required-version profile, the serving replica reads the current persisted snapshot. After approval, verify the document/version on every replica and through the shared address. Manual POST /admin/reload does not replace history transactions or independent review. Do not overwrite stored documents with shared YAML or use bulk reload to bypass a refusal.

Hosted tenant owner

Open /customer → Policies. The owner enters a name/rules and clicks Submit for review, then Refresh proposal status. Previous rules apply until approval. The server forces ID CUSTOMER-<your tenant> and your tenant scope; JSON fields cannot replace either. Ordinary members cannot submit or read proposal drafts. Another tenant cannot read the receipt; owners do not receive private reviewer identities or internal comments.

Recover from an error

  • 400/422: correct syntax, enums or conditions; do not substitute tenant: "*" to bypass an error. If the editor could not load the document, choose Cancel and do not save an empty form.
  • 409 policy_review_conflict: the proposal is already reviewed or its base version is stale. Read the exact proposal/current document; submit a new proposal for a new change.
  • 503 policy_store_unavailable: persistence is unconfirmed. Do not disable required history or expand runtime SQL privileges. The operator checks and restores the store.
  • Lost network acknowledgement: first read GET /admin/policy-proposals/{proposal_id}, the document and history. A client error proves no rollback and does not authorize blind replay.
  • Expired sign-in: select corporate SSO again. A new session for the same person still cannot approve their own proposal.

Verified example

Policy fields and JSON · Audit · FAQ