Engineering guide · ICAM
PAM Secret Custody Authority
On this page
Data classificationCross-store state machineImmutable generation retention and destructionPolicy decision stagesReveal single-winner protocolMove transactionSQL defense in depthDeployment acceptance boundaryThe PAM secret authority composes three existing Atlas trust domains:
Universal Directory membership generation
|
migration-104 signed policy and hierarchy
|
migration-109 metadata, saga, operation, and evidence authority
|
privileged no-cache Vault KV v2 adapter
It never duplicates the team → resource group → project hierarchy and never copies policy subjects or grants into the secret schema.
Data classification
| Data | Authority | Exposure |
|---|---|---|
Folder, template, and secret metadata |
PostgreSQL, HMAC-sealed |
Authorized metadata APIs |
Actor and reason identities |
PostgreSQL HMAC references |
Never raw |
Values |
Vault KV v2 immutable generation path |
One response-wrapped read after two-person approval |
Custody commitment |
PostgreSQL state MAC and opaque Vault path |
Internal 256-bit HMAC reference |
Wrapping token |
Caller/Vault |
Returned once; only an HMAC reference is evidence |
Evidence |
PostgreSQL append-only chain |
Authorized audit path |
No Atlas table, JSON metadata column, OpenAPI response, log field, or evidence event accepts value material. The privileged Vault adapter has no offline cache dependency.
Cross-store state machine
create:
absent
-> PENDING_CREATE(vault generation 1, exact commitment)
-> create-only committed Vault path
-> READY
update:
READY(generation n)
-> PENDING_UPDATE(generation n+1, exact commitment)
-> create-only committed Vault generation path
-> READY(generation n+1)
PostgreSQL always transitions first. Non-READY records are not listable,
readable, movable, revealable, or retireable. This prevents a database failure
after Vault success from publishing an untracked or ambiguous generation.
Each Vault generation path includes:
-
a stable tenant and secret opaque-ID base;
-
a fixed-width logical generation; and
-
the HMAC of tenant, actor, safe metadata, field names, and value content.
The commitment is non-secret and computationally unguessable without the Atlas integrity key. It is part of the KV path selected by the create-only CAS, so the commitment and write target cannot diverge. Recovery reads only KV metadata. It accepts exactly Vault version one at the reserved path and a constant-time matching commitment. It never reads values.
An ambiguous successful write is safe: retry discovers the exact committed path and finalizes PostgreSQL. A foreign path, commitment, or logical generation is an integrity failure. A competing API request cannot replace a pending request reference because PostgreSQL locks the aggregate and its state MAC binds the reference.
Immutable generation retention and destruction
Old immutable credential generations remain at their create-only Vault paths. An update selects a new logical generation; it never overwrites, relocates, soft-deletes, or destroys an earlier generation. Moving or retiring Atlas metadata also does not delete Vault material.
Retention and destruction are therefore an explicit deployment control, not an incidental API side effect. The production Vault lifecycle authority must:
-
apply the organization’s retention schedule and legal-hold decisions;
-
require separately authorized operators for release and destruction;
-
retain tenant, secret, logical generation, commitment, authorization, and outcome evidence in the authoritative audit trail;
-
account for Vault replication, snapshots, and backup retention; and
-
distinguish recoverable KV deletion from irreversible KV version destruction.
Migration 109 and the Atlas API intentionally provide no credential-generation delete, purge, or destroy endpoint. A deployment is not accepted merely because an old path was removed from the primary Vault node; its governed destruction procedure and backup-expiry evidence must also pass review.
Policy decision stages
Metadata preflight verifies:
-
active signed policy and exact version;
-
exact project binding;
-
active migration-104 team, resource group, and project versions;
-
sealed, MAC-verified current directory membership;
-
PASSWORD_CHECKOUTmethod eligibility; -
measured AAL; and
-
measured phishing resistance.
An approval or recording requirement can remain pending during metadata preflight because no value access occurs.
Maker preflight performs the same checks and records an immutable operation. Checker execution supplies approval only because a distinct authenticated actor is approving that operation. It revalidates the full policy. Recording is false unless a measured recording authority is present. A required control that is not measured denies the operation.
Reveal single-winner protocol
PENDING
-- serializable compare-and-swap by distinct checker -->
ISSUING
-- exactly one Vault response-wrap request -->
APPLIED
ISSUING -- Vault failure --> DENIED
The checker identity, source policy version, secret version, and operation MAC
must match. Only the transaction that changes PENDING to ISSUING calls
Vault. PostgreSQL rejects a second transition from PENDING; therefore a
concurrent checker cannot mint a second wrapping token.
The wrapping request targets the exact committed generation path. Commitment
metadata is in the path rather than the KV data, so unwrapping exposes no
Atlas marker. The 60-second token is single-use. The database retains only an
HMAC of token plus accessor, never either value. A restart-safe reconciler
MAC-verifies and terminally denies a crash-stranded ISSUING reservation
after the wrapping window without calling Vault, so it cannot issue a
replacement token.
Move transaction
Movement is metadata-only. The maker operation binds:
-
secret ID and expected version;
-
source policy ID and version;
-
destination policy ID and version;
-
destination resource group and project; and
-
optional exact destination folder.
The checker uses serializable isolation and locks both hierarchy paths. Source and destination policy evaluations use current directory membership and measured controls. The update preserves the custody base, logical generation, current commitment, and Vault path. The evidence event binds before state, after state, and operation ID in a dedicated transition commitment while its state commitment remains independently verifiable.
SQL triggers require exactly one matching pending move for a scope update and reject any custody change during movement.
SQL defense in depth
Migration 109 enforces:
-
active migration-104 hierarchy types and exact parents;
-
folder depth, parent scope, canonical path, and active-name uniqueness;
-
sorted unique field-name arrays;
-
custody saga transition pairs;
-
immutable custody base and committed identity;
-
exact
version + 1and changed state/evidence MAC fields; -
active exact source/destination policy bindings on operation creation;
-
distinct maker and checker references;
-
restricted operation transitions;
-
tombstones instead of deletion; and
-
contiguous append-only evidence hashes.
Runtime reads independently verify every event sequence, previous-hash link, state commitment, transition commitment, and event HMAC through the aggregate head. This remains fail-closed even if a database owner bypasses the row trigger and rewrites historical evidence.
The root and embedded migrations are byte-identical and have an exact hardening test.
Deployment acceptance boundary
Application tests can prove Atlas’s request validation, transaction ordering, CAS semantics, evidence, response redaction, and interaction with a real PostgreSQL and Vault container. Production acceptance must additionally verify:
-
narrow Vault token policies for data, metadata, and response wrapping;
-
authenticated and verified TLS;
-
namespace and mount isolation;
-
HA storage and backup recovery;
-
unseal and root-token governance;
-
audit-device delivery and monitoring;
-
token renewal and revocation; and
-
destruction/retention policy for old immutable generations.
Passing the Atlas Docker validation does not claim those external controls.