Engineering guide · ICAM
Universal Directory Linked Objects
On this page
Relationship ModelAuthority And StorageRequired Integrity KeyREST APICreate A DefinitionAssign And TraverseReplace A PrimaryDelete BehaviorFailure ContractDocker VerificationAtlas Universal Directory supports first-class named relationships between users, such as manager/subordinate, case-worker/client, or sales-representative/customer. This surface follows the Okta Linked Objects API shape while retaining Atlas authority, authorization, concurrency, and integrity controls.
A linked object is not a pair of loosely related profile fields. It is a typed definition plus a materialized, tenant-scoped graph edge. That distinction lets lifecycle workflows, governance, and authorization code read one authoritative relationship rather than interpret application-specific attributes.
Relationship Model
Each definition contains two named USER sides:
-
primaryis the one side, such asmanager; -
associatedis the many side, such assubordinate.
For one definition, a primary user can have many associated users. An associated user can have at most one primary. Assigning a different primary replaces the old edge only through optimistic concurrency.
Atlas intentionally supports relationship chains and self-links. A manager may itself have a manager, and a terminal user may be both the primary and associated user. These are valid linked-object semantics, not graph cycles to reject.
Both names are unique across the tenant’s complete relationship-name
namespace.
For example, another definition cannot use manager as either its primary or
associated name.
Atlas supports at most 200 definitions per tenant and reserves both names in
one transaction.
Authority And Storage
The identity service and identity PostgreSQL database own this state. The schema uses three authorities:
linked_object_definitions-
Stores the typed relationship pair, revision, actor, and HMAC evidence.
linked_object_definition_names-
Atomically maps either name to one definition and records whether it is the primary or associated side. This table prevents cross-side name races that two independent unique indexes would not prevent.
linked_object_assignments-
Stores the current edge. Its tenant, definition, and associated-user uniqueness constraint enforces one primary per associated user at the database boundary. Composite foreign keys require the definition and both users to belong to the same tenant.
Every definition and edge mutation appends a linked_object_events row in the
same transaction.
PostgreSQL rejects updates and deletes of those events.
Replacement preserves the assignment identifier, increments its revision, and
records the new keyed state without erasing the prior event.
Required Integrity Key
Linked-object authority is unavailable unless Atlas has a directory HMAC key of at least 32 bytes. Configure one of:
ATLAS_MEMBERSHIP_MAC_KEY_B64=<base64-encoded-key>
ATLAS_MEMBERSHIP_MAC_KEY_PATH=/run/secrets/atlas-directory-mac-key
The inline value or referenced file contains standard base64. Production secret injection should use the file form or the deployment’s secret manager. Do not put the key in source control, images, logs, API requests, or configuration documents.
Definitions, assignments, and mutation events use HMAC-SHA256 over
domain-separated canonical state.
Reads recompute the evidence and use constant-time comparison.
A missing key, key mismatch, unsupported integrity algorithm, or changed
authoritative row fails closed; the API returns 503 and does not return the
untrusted relationship.
The evidenceKeyId response is only a short SHA-256-derived key identifier.
It is safe rotation metadata, not key material.
REST API
The gateway publishes the full OpenAPI 3.1 contract at /openapi.json and
interactive Swagger UI at /docs/.
The Okta-friendly surface is the primary compatibility API:
| Method | Route | Capability and assurance | Purpose |
|---|---|---|---|
|
|
|
List or create definitions. |
|
|
|
Resolve by either name, or delete an empty definition. |
|
|
|
Traverse either side, or remove an associated user’s primary edge. |
|
|
|
Create, replay, or replace an assignment. |
userId, associatedUserId, and primaryUserId accept an Atlas user ID or
login.
userId and associatedUserId also accept me.
All resolution and final foreign-key validation occur inside the authenticated
tenant.
The canonical Atlas alias
/api/v1/identity/linked-object-definitions exposes the same definition
authority for Atlas-native clients.
Create A Definition
Names use lower-case letters, digits, and underscore, begin with a letter, and
contain at most 64 characters.
Titles contain 1 through 128 characters.
Descriptions contain at most 1,024 characters.
The only current object type is USER.
curl --fail-with-body \
-H "Authorization: Bearer ${AAL2_OPERATOR_TOKEN}" \
-H "Idempotency-Key: manager-definition-20260725-0001" \
-H "Content-Type: application/json" \
-X POST \
"https://id.atlas.example/api/v1/meta/schemas/user/linkedObjects" \
--data '{
"primary": {
"name": "manager",
"title": "Manager",
"description": "Authoritative manager relationship",
"type": "USER"
},
"associated": {
"name": "subordinate",
"title": "Subordinate",
"description": "Authoritative direct-report relationship",
"type": "USER"
}
}'
Creation returns 201.
An exact retry returns the existing definition with 200 and
Idempotent-Replayed: true.
The two names are the natural idempotency boundary, so a retry cannot create a
second definition even after a client loses the first response.
Reusing either name for different semantics returns 409.
A response includes the compatible primary, associated, and _links
members plus Atlas extensions:
{
"id": "7e716b57-f607-47f4-91ae-40a3a5a5b231",
"tenantId": "7f56c696-df68-4513-a5ac-4dcab31be357",
"primary": {
"name": "manager",
"title": "Manager",
"description": "Authoritative manager relationship",
"type": "USER"
},
"associated": {
"name": "subordinate",
"title": "Subordinate",
"description": "Authoritative direct-report relationship",
"type": "USER"
},
"revision": 1,
"evidenceHash": "b2f51c...",
"integrityMode": "HMAC-SHA256",
"evidenceKeyId": "1f51a27c",
"_links": {
"self": {
"href": "/api/v1/meta/schemas/user/linkedObjects/manager"
}
}
}
Capture the strong ETag response header, formatted as "v1".
Assign And Traverse
Create the first edge:
curl --fail-with-body \
-H "Authorization: Bearer ${AAL2_OPERATOR_TOKEN}" \
-H "Idempotency-Key: manager-edge-frank-20260725-0001" \
-X PUT \
"https://id.atlas.example/api/v1/users/${FRANK_ID}/linkedObjects/manager/${JOE_ID}"
Success returns 204, the current ETag, the
X-Atlas-Evidence-Hash, and a Location.
An exact replay returns the same revision and
Idempotent-Replayed: true.
No request body is required.
From the associated user, ask for the primary name:
curl --fail-with-body \
-H "Authorization: Bearer ${READER_TOKEN}" \
"https://id.atlas.example/api/v1/users/${FRANK_ID}/linkedObjects/manager"
This returns at most one user. From the primary user, ask for the associated name:
curl --fail-with-body \
-H "Authorization: Bearer ${READER_TOKEN}" \
"https://id.atlas.example/api/v1/users/${JOE_ID}/linkedObjects/subordinate"
This returns every associated user in deterministic username and ID order.
Each element contains the compatible _links.self relation and an _atlas
object with the edge identifier, revision, primary and associated user IDs,
integrity mode, evidence hash, and non-secret actor metadata.
It does not expose profile attributes or credentials.
Replace A Primary
If Frank already reports to Joe, assigning Bob without a precondition returns
428 Precondition Required.
Use the ETag from the current edge:
curl --fail-with-body \
-H "Authorization: Bearer ${AAL2_OPERATOR_TOKEN}" \
-H "Idempotency-Key: manager-edge-frank-replace-0001" \
-H 'If-Match: "v1"' \
-X PUT \
"https://id.atlas.example/api/v1/users/${FRANK_ID}/linkedObjects/manager/${BOB_ID}"
The winning replacement returns revision 2.
A concurrent request using the old revision returns 409.
The transaction locks the definition and current associated edge, validates
both tenant-qualified users, updates the edge, and appends replacement evidence
before commit.
Delete Behavior
Delete one edge by primary relationship name and current ETag:
curl --fail-with-body \
-H "Authorization: Bearer ${AAL2_OPERATOR_TOKEN}" \
-H 'If-Match: "v2"' \
-X DELETE \
"https://id.atlas.example/api/v1/users/${FRANK_ID}/linkedObjects/manager"
Delete a definition using either relationship name:
curl --fail-with-body \
-H "Authorization: Bearer ${AAL2_OPERATOR_TOKEN}" \
-H 'If-Match: "v1"' \
-X DELETE \
"https://id.atlas.example/api/v1/meta/schemas/user/linkedObjects/manager"
Atlas deliberately refuses definition deletion while assignments exist. This differs from an API that silently removes an entire relationship graph. Delete or migrate edges explicitly, then retry with the current definition ETag.
Failure Contract
| Status | Meaning |
|---|---|
|
Invalid name, title, description, object type, identifier, JSON, or
|
|
The authenticated principal lacks the required RBAC/ABAC capability, assurance, or fresh authentication. |
|
The relationship or tenant-qualified user does not exist. Cross-tenant identifiers are not disclosed. |
|
A name is reserved, the definition limit was reached, a definition still has edges, or the supplied revision is stale. |
|
A destructive or replacement mutation requires |
|
The identity authority or HMAC integrity verification is unavailable. Atlas does not downgrade to unkeyed relationship authority. |
Terminated users cannot receive new assignments. Existing edges should be removed by the leaver workflow as part of explicit directory remediation; they are not silently redirected.
Docker Verification
Run the focused unit and OpenAPI tests:
Internal implementation checks are omitted from this public guide.
Run the isolated PostgreSQL acceptance test:
scripts/test/run-linked-objects-docker-validation.sh
The Docker test creates a tenant and three real users, creates and naturally
replays a definition, rejects a cross-side name collision, creates and replays
an edge, verifies self-link and both traversal directions, rejects an unsafe
replacement, performs a compare-and-swap replacement, restarts the database
client, verifies durable state, proves event updates are rejected, directly
tampers with the current edge, and proves the next authoritative read fails
closed.
The runner writes logs and a SHA-256 manifest beneath
artifacts/linked-objects-docker-validation/.