Engineering guide · ICAM

Custom Identity Sources And Import Authority

Status: currentReviewed: 2026-07-26Audience: ICAM architects, directory engineers, security engineers
On this pageAuthority boundarySource lifecycleProfile schema and mappingIncremental import sessionsCommit, leases, and restart recoveryDefense in depthValidation

Atlas custom identity sources provide the user, group, membership, and incremental import-session breadth expected from an enterprise Identity Sources API. They do not create a second directory authority. A source owns signed staging state and source anchors; successful commits reconcile through the existing Atlas user, group, mastering, and membership authorities.

The compatibility benchmark is the official Anything as a Source guide and Identity Sources API. Atlas preserves the useful resource model while adding explicit preview, quarantine, two-person commit, durable leases, and database-enforced evidence.

Authority boundary

Mode Canonical effect

OBSERVE

Retains staged source entities and signed evidence. It never changes a canonical user, group, or membership.

PROFILE_MASTER

Writes only attributes present in the source-to-Atlas mapping after the Universal Directory mastering decision. It cannot deactivate a canonical user.

AUTHORITATIVE

Writes governed mapped attributes and may terminate a source-owned user. Removal never deletes credentials, authenticators, sessions, OAuth grants, application assignments, roles, access policies, or records owned by another source.

External identifiers are source-local anchors, not Atlas user IDs. Each materialized source user or group records its canonical target ID, source generation, entity anchor, and content digest. A membership refers to source user and group external IDs and resolves them only inside the same tenant and source.

Atlas-native groups are protected. A custom source cannot create, rename, or change membership in a group such as an Atlas administrator or system group. Imported groups remain ordinary directory groups; authorization grants are never copied from an external source payload.

Source lifecycle

A source begins as PENDING_ACTIVATION. Creation requires identity.sources.manage at fresh AAL2. Activation requires identity.sources.activate, fresh phishing-resistant AAL3, and an actor other than the creator.

ACTIVE is the only state that accepts entity changes or import sessions. Deactivation is immediate and does not erase staged state. Deletion produces a signed TOMBSTONED record. PostgreSQL rejects physical deletion and any later change to a tombstoned source.

Connector state contains metadata and references only:

  • credentialRef, tlsKeyRef, tlsCertRef, and trustBundleRef accept vault://, kms://, or pkcs11:// authorities;

  • baseUrl, when present, must be credential-free HTTPS;

  • passwords, bearer tokens, private keys, client secrets, and API keys have no supported storage field and are rejected again by PostgreSQL;

  • only the DIRECT_API adapter is currently executable;

  • any other adapter is retained as UNSUPPORTED for planning visibility, and activation returns 501 without attempting a network connection.

This is deliberate truthfulness: registering a desired WORKDAY_PULL or similar adapter does not imply that Atlas has contacted or validated that external system.

Profile schema and mapping

The source profile contract supports scalar UTF-8 strings. Arrays and complex objects are not silently flattened. Attribute names are bounded and cannot look like credential or token fields.

Mappings bind a unique source attribute to a unique Atlas profile attribute. Required mappings are checked during preview. New canonical users require mapped username and email; existing users retain canonical values for unmapped fields.

Source configuration uses an exact ETag. Replacing schema, mappings, authority mode, or connector metadata on an active source requires fresh phishing-resistant AAL3. A stale ETag or reused idempotency key with different content returns 409.

Incremental import sessions

Only INCREMENTAL sessions are supported. The state machine is:

CREATED -> IN_PROGRESS -> PREVIEWED -> APPLYING -> COMPLETED
    |           |             |            |
    +-----------+-------------+----------> CLOSED
                                      \--> ERROR -> APPLYING

CREATED sessions expire after 24 hours. A source permits one non-terminal session, which removes ambiguous ordering. Uploading the first page moves the session to IN_PROGRESS.

Each upload is bounded to 200 entities and 200 KiB. A session accepts at most 50 immutable pages. The page sequence and canonical entity ordering feed the page content digest. Divergent reuse of an entity external ID across pages is quarantined.

Preview is a durable, signed operation. It:

  1. verifies the session’s captured source generation and anchor;

  2. orders users, then groups, then memberships deterministically;

  3. calculates before and after digests and changed attributes;

  4. resolves every membership against a staged or current source user and group;

  5. invokes the canonical directory preflight for protected groups, required attributes, lifecycle authority, and target collisions;

  6. stores conflicts rather than skipping them; and

  7. returns previewEvidenceHash, binding the pages, source generation, source anchor, diff, and quarantine set.

A session with any conflict cannot commit.

Commit, leases, and restart recovery

Commit requires:

  • identity.sources.commit;

  • fresh phishing-resistant AAL3;

  • an actor different from the session creator;

  • the current session ETag;

  • the exact X-Atlas-Preview-Evidence value; and

  • a request-bound idempotency key.

Atlas first commits an APPLYING operation with a deterministic operation ID and a two-minute lease. Canonical reconciliation then runs inside the identity database transaction. Users are processed before groups, and memberships are processed after both anchors exist. The operation has no fields for passwords, factors, tokens, grants, or application assignments.

If reconciliation fails, the session becomes ERROR with digest-only safe detail. Retry uses the same operation ID and a higher attempt number. A worker may also reclaim an expired APPLYING lease after restart. Canonical writes must be idempotent for the operation ID; membership upserts are idempotent and membership removal checks current membership first.

Completion advances the source generation once, derives a new source anchor, updates every staged entity anchor, marks every diff applied, and closes the lease. The session is then an immutable terminal tombstone.

Defense in depth

Every aggregate has:

  • tenant-partitioned storage under identity-source-authority:<tenant-id>;

  • an ECDSA P-384 state seal;

  • keyed ETags, anchors, request digests, reasons, diffs, conflicts, operations, and evidence links;

  • exact compare-and-swap revision advance;

  • actor- and request-bound idempotency receipts;

  • a contiguous append-only evidence trail; and

  • bounded maps, pages, entities, and leases.

Migration 078_create_identity_source_authority.sql independently rejects tenant or ID substitution, revision or generation rollback, removed entities or sessions, terminal-session reopening, malformed page bounds, secret-bearing keys, unsupported active adapters, removed or rewritten events, altered replay receipts, invalid seals, and physical deletion.

The public source response is a summary. Users, groups, memberships, and import pages are read through their dedicated endpoints so a source list cannot become an accidental bulk profile export.

Validation

The focused suites cover:

  • source creation, independent activation, session upload, preview, commit, and target materialization;

  • same-actor rejection and phishing-resistant assurance;

  • secret-profile rejection;

  • divergent duplicate and unresolved-membership quarantine;

  • failed apply, stable-operation retry, and restart recovery;

  • cross-tenant denial, signature tamper rejection, and concurrent CAS;

  • OpenAPI route coverage and truthful 501 adapter behavior; and

  • PostgreSQL restart durability plus direct SQL tamper refusal; and

  • gateway-to-canonical PostgreSQL materialization of a user, group, and MAC-protected membership, followed by proof that no application grant was copied and an authoritative leaver transition removed only the source-owned membership.

Run the bounded Docker scenario with:

ATLAS_ICAM_POSTGRES_TMPFS=true \
  ./scripts/test/run-identity-source-docker-validation.sh

The successful 2026-07-26 run produced a verified SHA-256 manifest under artifacts/identity-source-validation/20260726T173824Z.

See Identity Sources API for request contracts and examples.