Policy Governance & Least Privilege

Audience: Security Guild, Policy Guild, Authority Core, auditors. Scope: Scopes, RBAC, approval controls, tenancy, auditing, and compliance requirements for Policy Engine v2.


1 · Governance Principles

  1. Least privilege by scope – API clients receive only the policy:* scopes required for their role; effective:write reserved for service identity.
  2. Immutable history – All policy changes, approvals, runs, and suppressions produce audit artefacts retrievable offline.
  3. Separation of duties – Authors cannot approve their own submissions; approvers require distinct scope and should not have deployment rights.
  4. Deterministic verification – Simulations, determinism checks, and incident replay bundles provide reproducible evidence for auditors.
  5. Tenant isolation – Policies, runs, and findings scoped to tenants; cross-tenant access requires explicit admin scopes and is logged.
  6. Offline parity – Air-gapped sites follow the same governance workflow with sealed-mode safeguards and signed bundles.

2 · Authority Scopes & Role Mapping

The canonical scope catalogue is StellaOpsScopes in src/Authority/StellaOps.Authority/StellaOps.Auth.Abstractions/StellaOpsScopes.cs. The Policy scopes below are real constants; the Enforced column records where the scope actually gates an endpoint today (verified against src/Policy/** route registrations). Scopes marked advertised only are issued and recognised by the Policy Gateway resource server but do not yet gate a server-side route handler — treat them as roadmap surface.

ScopeDescriptionEnforced (verified in src/Policy)Recommended role
policy:readView policies, packs, runs, conflicts, findings, attestation reports.Yes — read routes across Policy Engine + Gateway.Readers, auditors.
policy:writeCreate policy drafts; write attestation-report content.Yes — AttestationReportEndpoints.role/policy-author.
policy:editEdit policy configs, pack bundles, violations, conflicts; backwards-compat fallback for effective:write on materialisation routes.Yes.role/policy-author.
policy:authorAuthor Policy Studio workspaces, risk profiles, gates, exceptions.Yes — Gateway GovernanceEndpoints, GatesEndpoints, ExceptionEndpoints.role/policy-author.
policy:simulateRun simulations, coverage runs, batch evaluations, shadow toggles.Yes — ConsoleSimulationEndpoint, OverlaySimulationEndpoint, Gateway PolicySimulationEndpoints.Authors, reviewers, CI.
policy:reviewReserved for review / request-changes workflow.No — advertised in RequiredScopes and CLI stella policy review exists, but no server route gates on it.role/policy-reviewer.
policy:submitReserved for submit-for-review workflow.No — CLI stella policy submit exists; no server route gates on it.Authors.
policy:approveApprove / override the promotion gate.Partial — gates only the promotion-gate override route (audited as gate bypass).role/policy-approver.
policy:operateManage exception lifecycle and budget operations.Yes — Gateway ExceptionEndpoints, BudgetEndpoints.role/policy-operator, automation bots.
policy:auditAccess governance audit events and gate audit history.Yes — Gateway GovernanceEndpoints audit routes, GatesEndpoints.role/policy-auditor, compliance teams.
policy:runTrigger runs, deltas, gate evaluation, score gates.Yes — Gateway DeltasEndpoints, GateEndpoints, ScoreGateEndpoints.Operators, automation bots.
policy:activateActivate / deprecate risk profiles and policy revisions.Yes — Gateway GovernanceEndpoints activate/deprecate routes.Runtime operators / release managers.
policy:publishReserved: publish approved version with attested artefacts.No server route gates on it; CLI stella policy publish exists.Release managers.
policy:promoteReserved: promote attestations between environments.No server route gates on it; CLI stella policy promote exists.Release managers.
findings:readView effective findings / advisory source projections.Yes — Gateway AdvisorySourceEndpoints and effective-finding read routes.Analysts, auditors, CLI.
findings:writeAppend Findings ledger entries via public fixture/import APIs.Lives in the Findings module, not enforced inside src/Policy.Service / import tooling.
effective:writeService only (EffectivePolicyEndpoints) — materialise effective findings; policy:edit accepted as a temporary backwards-compat fallback.Yes.Policy Engine service principal.

Naming note: scope values are colon-form (policy:read, effective:write); ASP.NET policies are built via RequireStellaOpsScopes(...). Role names such as role/policy-author are illustrative RBAC labels, not Authority-defined objects. The Console role editor draws from authority.permissions (seeded by S002_seed_full_scope_permissions.sql), which is not consulted at token issuance — issuance filters requested scopes against authority.clients.allowed_scopes.

effective:write service-identity guard (verified): Authority rejects effective:write in the client-credentials grant unless the client document carries the serviceIdentity property set to policy-engine (ClientCredentialsHandlers.cs lines 1157–1164; constant StellaOpsServiceIdentities.PolicyEngine). The rejection is unauthorized_client: “Scope ‘effective:write’ is reserved for the Policy Engine service identity.” See Authority scopes for the full scope catalogue.


3 · Workflow Controls

Implementation note: the strongest, code-verified governance controls today live in the exception approval workflow, not a generic policy-submission pipeline. ExceptionApprovalRule (table policy.exception_approval_rules) carries per-gate-level minimum-approver counts, required approver roles, maximum TTL days, a self-approval flag, and evidence / compensating-control requirements; ApprovalWorkflowService and ExceptionService enforce them (e.g. SelfApprovalNotAllowed). The bullets below describe the intended end-to-end policy governance flow; treat items not tied to a concrete service/route as roadmap.


4 · Tenancy & Data Access


5 · Audit & Evidence


6 · Secrets & Configuration Hygiene


7 · Incident Response


8 · Offline / Air-Gapped Governance


9 · Compliance Checklist


Last updated: 2025-10-26 (Sprint 20). Reconciled against src/Policy and src/Authority (scope catalogue StellaOpsScopes.cs): scope table rebuilt with verified enforcement column; policy:tenant-admin marked not implemented; MongoDB-era “collections” replaced with the PostgreSQL policy.* schema; non-existent CLI commands (stella policy bundle export, stella policy run replay, stella profile set --secret) corrected.