Engineering guide · ICAM
Governance And Entitlements
On this page
Architecture And AuthorityAccess RequestCertificationEntitlementsDomain TypesGovernance Resource And CollectionReusable LabelResource OwnerGovernance GrantPrincipal EntitlementGovernance OperationOrganization Governance SettingsREST APICreate A GrantRevoke A GrantUpdate SettingsgRPC APIConcurrency, Audit, And Failure BehaviorVerificationExplainable InsightsGovernance owns resources, entitlements, bundles/packages, policy-driven assignment, access requests, approval tasks and delegates, certification templates and campaigns, SoD policies and violations, fulfillment actions, and evidence exports.
Automatic application entitlement assignment is a dedicated authority with live-source previews, exact digest activation, runtime generation revalidation, and transactional assignment intent. See Entitlement Policy Preview And Activation.
The public domain also includes reusable labels, resource-owner assignments, acyclic resource collections, grants, computed principal entitlements, immutable entitlement-change history, operation status, and organization governance settings.
Architecture And Authority
atlas-governance is the authority for governance catalog and assignment
state. PostgreSQL owns production state through the tenant-qualified
governance_control_records aggregate and the dedicated entitlement,
package, request, campaign, fulfillment, application-account, and SoD tables.
The in-memory implementation is a development and unit-test adapter, not a
production authority.
The assignment model has four invariants:
-
A mutation and its
GovernanceOperationcommit in one store transaction. -
Existing objects use exact compare-and-swap revisions. The REST API requires
If-Matchon existing labels, resource assignments, grants, and persisted settings. -
Effective
PrincipalEntitlementobjects are computed from authoritative grants and application accounts. They are never persisted as a second entitlement authority. -
Every grant or revoke writes a
PrincipalEntitlementChangein the same transaction. Migration051_governance_assignments.sqlrejects database updates and deletes of those history records.
All records are tenant-qualified before they reach the store. A cross-tenant identifier is returned as not found.
Access Request
Requests bind requester, subject, resource, entitlements, duration, justification, policy result, risk context, approval route, SoD result, and fulfillment state. Self-approval is denied where policy requires independent approval.
Certification
Campaigns define identity or resource scope, reviewers, decisions, and remediation. Tenant-scoped templates add civil-time recurrence, independent activation, bounded catch-up, duplicate-fire prevention, and durable scheduler evidence. See Certification Templates And Recurrence for the API and recovery contract.
Standing delegate authority is bounded, non-transitive, and resolved from current state for open tasks and reviews. The original approver or reviewer remains accountable, while a completed decision records the acting delegate and exact authority evidence. See Governance Delegates for the lifecycle, API, storage, and separation-of-duties contract.
A scheduler fire creates pending review items only. A reviewer decision is not fulfillment; the durable fulfillment action and downstream evidence close the item.
Entitlements
Entitlements and bundles are application-scoped. Policies may stage attribute- and group-based assignment. Preview and impact results are required before activating policy changes.
Domain Types
Governance Resource And Collection
A GovernanceResource represents an application, group, entitlement, bundle,
or collection. Collections can contain at most 1,000 resource identifiers.
Atlas verifies that every member exists in the same tenant and rejects direct
self-membership and transitive collection cycles.
Resources can have at most 32 label assignments and 16 owner-role
assignments. A resource carries its current optimistic revision, evidence
hash, and lastOperationId.
Reusable Label
A GovernanceLabel is a key/value taxonomy object, not an arbitrary map.
Keys match ^[a-z][a-z0-9_.-]{0,63}$; values are 1 through 256 characters;
descriptions are at most 1,024 characters. A tenant can have at most 200
labels. Active keys are unique. Labels transition between active and
retired; a retired label cannot be newly assigned.
Credential-looking keys or descriptions are rejected. Labels must not be used as a secret store.
Resource Owner
A ResourceOwner binds one USER or GROUP to a resource with one of these
roles:
-
OWNERidentifies accountable ownership; -
REVIEWERidentifies a certification reviewer; -
APPROVERidentifies an access-decision participant.
The principal type and identifier come from the URL for assignment
operations. The request body supplies displayName and role, preventing a
body from redirecting the mutation to another principal.
Governance Grant
A GovernanceGrant binds a USER, GROUP, or SERVICE_ACCOUNT to one
resource or collection and one or more entitlements or access packages.
Packages expand through their live entitlement definitions. Collections
expand through their live member-resource graph.
Grant controls are stricter than a compatibility-only API:
-
fresh AAL2 and an explicit governance-administrator role are required;
-
an administrator cannot directly grant access to its own user principal; self-access must use an independently approved request;
-
every grant has
expiresAt, and its duration cannot exceed the tenantmaximumGrantDays; -
source is one of
direct,access_request,certification,workflow, orimport; non-direct sources requiresourceId; -
principal, resource, collection, entitlements, packages, source, start, and expiry are immutable after creation;
-
the only update is
active → revoked, with a bounded, non-secret reason.
Principal Entitlement
GET /api/v1/governance/control/principal-entitlements computes effective
access at read time from:
-
active, started, unexpired grants;
-
current access-package entitlement membership;
-
current collection resource membership; and
-
active authoritative application-account assignments.
Items with the same principal, resource, and entitlement are collapsed while
preserving every supplying grantId, accountId, and source. A grant to a
group is returned for the group principal. A user item represents materialized
user access or a user grant; Atlas does not pretend that an unfulfilled group
grant is already a user application-account assignment.
Non-operators can read only their own USER grants, principal entitlements,
and change history.
Governance Operation
Every assignment-domain mutation returns lastOperationId and an
Operation-Location response header. Read it at
GET /api/v1/governance/control/operations/{operationId}.
Operation reads require governance operator scope because actor and target
metadata are administrative evidence.
Current mutations are synchronous and return SUCCEEDED only after the target
object, evidence, history when applicable, and operation commit. The contract
also reserves PENDING, RUNNING, and FAILED for future asynchronous
connectors. Clients must inspect status instead of inferring completion from
the existence of an operation identifier.
Organization Governance Settings
GET /api/v1/governance/control/settings returns secure defaults before a
tenant has persisted an override. PATCH uses an explicit updateFields
allowlist and protects these values:
| Field | Meaning | Enforced range |
|---|---|---|
|
Whether end users may configure their own governance delegate. |
Boolean; default |
|
Maximum delegated-review interval. |
1 through 90. |
|
Maximum grant lifetime. |
1 through 365. |
|
Default certification schedule. |
|
|
Time before an incomplete task escalates. |
15 through 43,200. |
|
Escalation behavior. |
|
|
Governance intelligence authority. |
|
|
Mutation assurance floor. |
Always |
|
Delegation scope allowlist. |
At most 64 values. |
|
Principals excluded from ordinary delegation or automation. |
At most 500 values. |
REST API
Browser-facing routes use /api/v1/governance/. Internal RPCs are defined in
service contract. The gateway publishes the complete
OpenAPI 3.1 contract at /openapi.json and Swagger UI at /docs/.
| Method | Route | Minimum authority | Purpose |
|---|---|---|---|
|
|
authenticated read; fresh AAL2 catalog administration for mutation |
List or upsert acyclic resource collections. |
|
|
authenticated read; fresh AAL2 catalog administration for mutation |
List or create reusable labels. |
|
|
fresh AAL2 catalog administration plus |
Update or retire a label. |
|
|
fresh AAL2 catalog administration plus |
Assign or unassign one label. |
|
|
fresh AAL2 catalog administration plus |
Assign or unassign an owner role. |
|
|
subject-scoped read; fresh AAL2 governance administrator for create |
List or create bounded grants. |
|
|
subject-scoped read; fresh AAL2 governance administrator and |
Read or revoke an immutable-scope grant. |
|
|
subject-scoped authenticated read |
Compute effective principal entitlements. |
|
|
subject-scoped authenticated read |
Read append-only grant and revoke history. |
|
|
governance operator read |
Read mutation status and target revision. |
|
|
governance administration; fresh AAL2 and exact revision for mutation |
Read or update organization governance settings. |
Collection responses use pageSize from 1 through 200 and pageToken.
Create A Grant
POST /api/v1/governance/control/grants HTTP/1.1
Authorization: Bearer <fresh-aal2-token>
Content-Type: application/json
{
"principalType": "USER",
"principalId": "user-42",
"collectionId": "res-mission-applications",
"entitlementIds": ["ent-mission-operator"],
"sourceType": "access_request",
"sourceId": "req-741",
"reason": "Approved mission rotation",
"expiresAt": "2026-08-24T12:00:00Z"
}
A successful 201 response contains revision: "1",
lastOperationId, and evidenceHash. The Operation-Location header points
to the coupled operation.
Revoke A Grant
Send the complete current grant with status: "revoked" and a new reason.
The scope must match the stored record exactly.
PUT /api/v1/governance/control/grants/grt-741 HTTP/1.1
Authorization: Bearer <fresh-aal2-token>
If-Match: "1"
Content-Type: application/json
{
"principalType": "USER",
"principalId": "user-42",
"collectionId": "res-mission-applications",
"entitlementIds": ["ent-mission-operator"],
"status": "revoked",
"sourceType": "access_request",
"sourceId": "req-741",
"reason": "Mission rotation completed",
"expiresAt": "2026-08-24T12:00:00Z"
}
The transaction updates the grant, appends a REVOKE change, and creates the
operation. A stale If-Match returns 409.
Update Settings
The initial secure-default settings object has revision zero, so the first
patch may omit If-Match. Every later patch supplies the current revision.
PATCH /api/v1/governance/control/settings HTTP/1.1
Authorization: Bearer <fresh-aal2-token>
If-Match: "3"
Content-Type: application/json
{
"settings": {
"maximumGrantDays": 90,
"recommendationMode": "recommend_only"
},
"updateFields": [
"maximumGrantDays",
"recommendationMode"
]
}
gRPC API
The same service and storage authority back local and remote gateway deployments. Assignment-domain RPCs are:
-
UpsertGovernanceLabel,ListGovernanceLabels, andSetResourceLabel; -
SetResourceOwner; -
UpsertGovernanceGrant,ListGovernanceGrants, andGetGovernanceGrant; -
ListPrincipalEntitlementsandListPrincipalEntitlementChanges; -
GetGovernanceOperation; -
GetGovernanceSettingsandUpdateGovernanceSettings.
The gateway derives Actor from authenticated request context. Clients cannot
choose actor, tenant, AAL, roles, session, or authentication time in a REST
body.
Concurrency, Audit, And Failure Behavior
All mutations validate before entering the store transaction. The transaction locks the current target revision and fails entirely on any mismatch; the operation or change record cannot commit without its target mutation.
| Status | Meaning |
|---|---|
|
Malformed, unbounded, unsupported, secret-looking, cyclic, or incomplete input. |
|
Missing role, insufficient or stale assurance, cross-subject read, or prohibited self-grant. |
|
The object is absent from the authenticated tenant. |
|
Optimistic revision, immutable scope, uniqueness, lifecycle, or referenced-state conflict. |
|
|
|
The governance authority or durable store is unavailable. The gateway does not substitute successful local state. |
Audit events record the authenticated action and target. Resource and operation responses carry SHA-256 evidence hashes. Principal-entitlement change rows receive an additional database immutability guard.
Verification
Run the focused service, HTTP, OpenAPI, documentation, and parity checks:
Internal implementation checks are omitted from this public guide.
Compile the Docker-tagged PostgreSQL restart and immutability test without starting infrastructure:
Internal implementation checks are omitted from this public guide.
When the validation host has enough available memory, run the full Docker profile:
scripts/test/run-governance-assignments-docker-validation.sh
# Broader ICAM regression profile:
scripts/test/run-icam-workflow-docker-validation.sh
The focused runner requires at least 1 GiB available memory, starts an isolated
PostgreSQL container, executes the restart and append-only history test, and
writes logs and a SHA-256 manifest under
artifacts/governance-assignments-docker-validation/<timestamp>/.
The broader runner requires at least 3 GiB and also starts Vault.
The focused runtime validation passed on 2026-07-25. Its local evidence bundle
is
artifacts/governance-assignments-docker-validation/20260725T215119Z/.
This demonstrates the repository’s Docker path; it is not a production
authorization or an external target-system acceptance result.
Explainable Insights
GET /api/v1/governance/insights returns deterministic, recommend-only observations.
The engine evaluates authoritative account graph and SoD task state for orphan ownership, unlinked secondary accounts, high entitlement concentration, stale active-account evidence, source review annotations, unresolved SoD conflicts, and expired SoD exceptions.
Every item returns:
-
weighted factors and plain-language explanations;
-
source resource identifiers and their evidence hashes;
-
score, severity, confidence, and model version;
-
tenant and subject boundary;
-
a stable evidence hash;
-
authorityMode: recommend-only.
An insight cannot grant, revoke, disable, or fulfill access. Remediation must enter the existing request, independent approval, certification, or SoD workflow. Non-operators can query only their own subject identifier.