Identity and accessPrincipal identity and authorization

Principal identity and authorization

Authenticate peers and authorize application-defined actions with bounded capability chains.

Authenticate a peer's signer, then authorize each action on its resource. A verified identity alone grants no read or write access.

Persist the identity

A principal holds signing keys and derives a did:key identifier from its public key. Your host application owns secure persistence and recovery. Load the same private key on restart. A newly generated principal represents a different identity.

An Atlas peer uses its principal DID as its identity. Low-level transport APIs can represent that identity as the public key's 32 bytes instead of the DID string. These are representations of the same identity, not separate application and network accounts.

Use the OS keychain, keystore, or your approved service secret store. Keep database encryption keys separate from signing keys. Do not log secret keys, recovery phrases, access tokens, or signed delegation strings. A public peer identifier is not a secret credential.

The principal primitive reference defines signing, verification, key import, and recovery value types. Host secure storage remains outside that primitive.

Define application authority

The application defines capability commands, resource constraints, trusted roots, and verification policy. A command string alone establishes no authority.

A signed delegation names the audience, capability, policy, validity bounds, and parent evidence. A child delegation can narrow authority. It cannot expand its parent's resource or action set.

Verify at each receive boundary

Derive the actor from verified signing evidence. Check the chain to an accepted root, audience, action, resource policy, time bounds, and revocation state. Bind producer to the verified signer before accepting it.

Apply checks independently to record writes, record reads, event publication, event receipt, and stream subscription. An authorized notification can refer to a record that its consumer cannot read. A stream reference does not carry the producer's or another consumer's authority.

The authorization reference defines exact builders. A signed grant supplies evidence, not a completed receive check against the actual invocation context.

Revocation and offline verification

Offline verification uses locally available proof and revocation information. A disconnected peer cannot know about a revocation it has not received. Choose validity bounds and reconciliation rules for your application's risk. Persist revocation state if it must survive restart.

Unauthorized means the request lacks accepted authority. Revoked means the relevant authority is no longer accepted. Neither is a reason to retry continuously. Stop affected delivery, request new authority through the application's enrollment path, and retain unrelated locally valid work.