Engineering guide · ICAM

Native Group Ownership And Application Reconciliation

Status: implemented; focused unit, gateway, OpenAPI, and PostgreSQL Docker restart/cycle/tamper tests passReviewed: 2026-07-25Audience: directory integrators, application connector developers, identity developers, governance engineers, security reviewers
On this pageCompatible Owner ShapeSource AssertionsDirectory assertionsApplication assertionsUnresolved Application PrincipalsTransaction And Concurrency ModelCycle PreventionStorage And IntegrityREST APIAssign A Directory OwnerList And Filter OwnersRemove A Directory OwnerReconcile An Application SourceError SemanticsSecurity PropertiesReal PostgreSQL ValidationClaim Boundary

Atlas native groups support accountable user and group owners through the same compatible route family as the Okta Group Owners API. Atlas implements the compatible list, assign, and delete operations and adds a governed reconciliation protocol for application-sourced ownership.

Ownership is not a writable metadata array on the group. It is a tenant-scoped set of independently attributable source assertions. This distinction prevents a local administrator from erasing connector-owned state and prevents a connector snapshot from erasing an independent directory assignment.

The model is intended for:

  • governance reviewer and approver routing;

  • lifecycle and access-request escalation;

  • certification ownership;

  • application-import accountability;

  • delegated operational responsibility;

  • ownership-aware policy and reporting.

Group ownership does not grant group membership, an administrator role, or an application entitlement. Those authorities remain in their existing services and policy boundaries.

Compatible Owner Shape

The primary list and create responses preserve these compatible fields:

id

The Atlas user or group ID for a resolved owner. For an unresolved application assertion, this is the source’s external owner ID so the record remains addressable without inventing an Atlas identity.

type

USER or GROUP.

resolved

Whether the source assertion is deliberately bound to a tenant-local Atlas principal.

originType

OKTA_DIRECTORY for a directly administered Atlas assertion or APPLICATION for an application-authoritative assertion. The compatibility name is retained at the API boundary. The implementation remains Atlas-owned.

originId

null for a directory assertion. For an application assertion, this is the deployed Atlas application ID.

displayName

The current canonical Atlas username or group name for a resolved owner. An unresolved assertion uses the source-supplied display name.

lastUpdated

The committed assertion timestamp in RFC 3339 format.

Atlas adds _atlas with the assertion ID, target group ID, external owner ID, source sequence, optimistic revision, evidence hash, integrity algorithm, key identifier, and non-secret actor identifiers. HAL links point to the target group.

Source Assertions

Atlas maintains two authority classes.

Directory assertions

A direct assignment creates one OKTA_DIRECTORY assertion. It must reference an existing principal in the same tenant. A user owner must be ACTIVE. A group owner must not be the target group and must not close a direct or transitive ownership cycle.

The tuple of target group, owner type, and owner ID is a natural replay boundary. An exact retry returns the existing verified assertion rather than creating a duplicate.

Only the compatible delete route can remove this assertion. Deletion requires its strong ETag.

Application assertions

An application assertion belongs to:

  • one tenant;

  • one native target group;

  • one deployed application originId;

  • one monotonically increasing source sequence;

  • one source revision or cursor;

  • one typed external owner ID.

Application assertions are replaced only through an authoritative source snapshot. The gateway verifies that originId resolves to an ACTIVE application in the same tenant before allowing reconciliation. The identity transaction then materializes all additions, changes, and removals or none of them.

The compatible delete route refuses application-managed owners with 409. The connector must remove the owner from its next source snapshot.

If the same effective principal has both directory and application assertions, the list may return both. That preserves provenance and permits each authority to revoke only its own assertion.

Unresolved Application Principals

Connector data often arrives before identity correlation is complete. Atlas does not guess by display name, email address, or group name.

An owner entry without id is persisted as resolved: false. It requires:

  • a stable externalId;

  • type set to USER or GROUP;

  • a bounded displayName.

The external assertion is visible and auditable, but it cannot participate as a local user or group principal. A later higher-sequence snapshot may provide id with the same externalId and type. Atlas resolves the local principal in the authenticated tenant, replaces the display name with the canonical directory value, and seals the new state.

This explicit two-stage model prevents confused-deputy ownership caused by ambiguous automatic matching.

Transaction And Concurrency Model

All group-owner graph mutations take a PostgreSQL advisory transaction lock for the tenant. The lock serializes graph changes that could otherwise pass independent cycle checks and jointly create a cycle. Tenants remain independent.

Application reconciliation has two versions:

sourceSequence

The connector’s positive, monotonically increasing snapshot number. Atlas rejects a lower number as stale.

revision

The Atlas source-state revision returned in the ETag. It protects replacement against another committed writer.

The first snapshot omits If-Match. Every higher-sequence replacement requires the current source-state ETag. A stale ETag returns 409; an omitted required ETag returns 428.

An exact replay has the same source sequence, source revision, and canonical content SHA-256. It is accepted even if the caller lost the earlier ETag. Reusing a source sequence with different content returns 409.

Canonical content is sorted by type and external owner ID after tenant-local principal resolution. The digest therefore covers the actual materialized meaning, not JSON member order.

Cycle Prevention

GROUP owners form directed edges from an owned group to its owning group. Before commit, Atlas traverses every resolved group-owner edge reachable from the changed target.

Atlas rejects:

  • direct self-ownership;

  • a two-group cycle;

  • a longer transitive cycle;

  • a complete application snapshot containing any cycle.

Unresolved external groups cannot participate in local graph traversal until they are explicitly resolved. When a later snapshot resolves one, the full transaction repeats the cycle check.

The tenant graph lock and transaction rollback make cycle prevention authoritative under concurrency, rather than a best-effort API validation.

Storage And Integrity

The identity PostgreSQL authority uses:

directory_group_owner_assertions

Current directory and application source assertions. Composite foreign keys bind the target group and every resolved user or group owner to the same tenant. A polymorphic database check ensures a USER assertion can never carry a group foreign key and a GROUP assertion can never carry a user foreign key.

directory_group_owner_source_states

The latest application cursor, source revision, canonical content digest, counts, Atlas revision, actor, and evidence for each group/application pair.

directory_group_owner_events

Append-only assignment, removal, and source-reconciliation evidence. PostgreSQL rejects event updates and deletes. Events form a previous-hash chain for the tenant and target group.

Every current assertion and source state is HMAC-SHA256 sealed over domain-separated canonical fields. Reads recompute the evidence and compare it in constant time. Direct database changes to the principal, origin, resolution state, sequence, display name, counts, digest, or revision cause the API to deny the state. Application reads also compare the complete verified assertion count, unresolved count, and sequence to the signed source state. Deleting one assertion or its source-state row directly therefore fails closed; keyed field integrity is not mistaken for proof that no row is missing.

The authority requires a directory HMAC key of at least 32 bytes:

ATLAS_MEMBERSHIP_MAC_KEY_B64=<base64-encoded-key>
ATLAS_MEMBERSHIP_MAC_KEY_PATH=/run/secrets/atlas-directory-mac-key

A missing or mismatched key never falls back to an unkeyed digest. The group-owner API returns 503 and withholds unverified state.

The earlier unscoped directory_group_owners table remains untouched only for safe rollback of old deployments. Current code neither reads nor writes it.

REST API

The complete OpenAPI 3.1 contract is published at /openapi.json. Swagger UI is available at /docs/.

Method Route Capability and assurance Purpose

GET

/api/v1/groups/{groupId}/owners

identity.users.read, AAL1

List verified user and group owner assertions.

POST

/api/v1/groups/{groupId}/owners

identity.roles.assign, fresh AAL2, Idempotency-Key

Assign a directory user or group owner.

DELETE

/api/v1/groups/{groupId}/owners/{ownerId}

identity.roles.assign, fresh AAL2, If-Match

Remove only the matching directory assertion.

GET

/api/v1/groups/{groupId}/owners/sources/{originId}

identity.users.read, AAL1

Read a verified application source cursor and its assertions.

PUT

/api/v1/groups/{groupId}/owners/sources/{originId}

identity.roles.assign, fresh AAL2, Idempotency-Key, conditional If-Match

Atomically reconcile an active application’s authoritative snapshot.

The compatible list accepts:

search

The SCIM expressions type eq "USER" and type eq "GROUP". Other expressions are rejected rather than partially interpreted.

limit

1 through 1,000; default 1,000.

after

An opaque cursor copied from the Link response header. The cursor is valid only for the same current collection and filter.

Assign A Directory Owner

curl --fail-with-body \
  -H "Authorization: Bearer ${AAL2_GROUP_ADMIN_TOKEN}" \
  -H "Idempotency-Key: finance-owner-20260725-0001" \
  -H "Content-Type: application/json" \
  -X POST \
  "https://id.atlas.example/api/v1/groups/${FINANCE_GROUP_ID}/owners" \
  --data "{
    \"id\": \"${FINANCE_OWNER_USER_ID}\",
    \"type\": \"USER\"
  }"

Creation returns 201, a strong ETag such as "v1", and X-Atlas-Evidence-Hash. An exact retry returns 200 with Idempotent-Replayed: true.

Assign a group owner with the same payload shape and "type": "GROUP". The owning group must be in the same tenant and the new edge must be acyclic.

List And Filter Owners

curl --fail-with-body \
  -H "Authorization: Bearer ${DIRECTORY_READER_TOKEN}" \
  --get \
  --data-urlencode 'search=type eq "GROUP"' \
  --data-urlencode 'limit=100' \
  "https://id.atlas.example/api/v1/groups/${FINANCE_GROUP_ID}/owners"

Example response:

[
  {
    "id": "5a94feaa-e083-4f23-b2e3-05c2a1b0766f",
    "type": "GROUP",
    "resolved": true,
    "originId": null,
    "originType": "OKTA_DIRECTORY",
    "displayName": "Finance Leadership",
    "lastUpdated": "2026-07-25T23:43:41.125Z",
    "_atlas": {
      "assertionId": "3c999ca8-f729-471e-bbad-923578049cc4",
      "groupId": "72c6e601-8423-45e8-b81f-44fe233c4cc1",
      "externalOwnerId": "5a94feaa-e083-4f23-b2e3-05c2a1b0766f",
      "revision": 1,
      "evidenceHash": "09d661...",
      "integrityMode": "HMAC-SHA256",
      "evidenceKeyId": "edc83f0b",
      "createdBy": "7b76e885-8a31-40f9-b742-eead4f12cfad",
      "updatedBy": "7b76e885-8a31-40f9-b742-eead4f12cfad"
    },
    "_links": {
      "group": {
        "href": "/api/v1/groups/72c6e601-8423-45e8-b81f-44fe233c4cc1"
      }
    }
  }
]

Remove A Directory Owner

Use the assertion revision returned in _atlas.revision:

curl --fail-with-body \
  -H "Authorization: Bearer ${AAL2_GROUP_ADMIN_TOKEN}" \
  -H 'If-Match: "v1"' \
  -X DELETE \
  "https://id.atlas.example/api/v1/groups/${FINANCE_GROUP_ID}/owners/${OWNER_ID}"

Success returns 204. Deleting an application-only owner returns 409. Resolve its originId, update the authoritative connector snapshot, and reconcile that source instead.

Reconcile An Application Source

The first snapshot can contain resolved and unresolved owners:

curl --fail-with-body \
  -H "Authorization: Bearer ${AAL2_CONNECTOR_OPERATOR_TOKEN}" \
  -H "Idempotency-Key: finance-owner-import-20260725-0001" \
  -H "Content-Type: application/json" \
  -X PUT \
  "https://id.atlas.example/api/v1/groups/${FINANCE_GROUP_ID}/owners/sources/${APPLICATION_ID}" \
  --data "{
    \"sourceSequence\": 41,
    \"sourceRevision\": \"scim-cursor-000041\",
    \"owners\": [
      {
        \"id\": \"${RESOLVED_OWNER_USER_ID}\",
        \"externalId\": \"workday-user-2041\",
        \"type\": \"USER\"
      },
      {
        \"externalId\": \"workday-group-703\",
        \"type\": \"GROUP\",
        \"displayName\": \"External Finance Stewards\"
      }
    ]
  }"

The active application is resolved through the application authority before the identity transaction begins. The response’s state.revision is also returned as its strong ETag. Save that ETag.

Resolve the external group in the next source snapshot:

curl --fail-with-body \
  -H "Authorization: Bearer ${AAL2_CONNECTOR_OPERATOR_TOKEN}" \
  -H "Idempotency-Key: finance-owner-import-20260725-0002" \
  -H 'If-Match: "v1"' \
  -H "Content-Type: application/json" \
  -X PUT \
  "https://id.atlas.example/api/v1/groups/${FINANCE_GROUP_ID}/owners/sources/${APPLICATION_ID}" \
  --data "{
    \"sourceSequence\": 42,
    \"sourceRevision\": \"scim-cursor-000042\",
    \"owners\": [
      {
        \"id\": \"${RESOLVED_OWNER_USER_ID}\",
        \"externalId\": \"workday-user-2041\",
        \"type\": \"USER\"
      },
      {
        \"id\": \"${ATLAS_FINANCE_STEWARDS_GROUP_ID}\",
        \"externalId\": \"workday-group-703\",
        \"type\": \"GROUP\"
      }
    ]
  }"

The response reports added, updated, removed, and unresolved. These counts describe source assertion materialization, not effective membership or authorization changes.

An empty owners array is a valid authoritative snapshot. It removes all assertions for that application and group while preserving directory assertions and assertions from other applications.

Error Semantics

Status Meaning

400

Malformed UUID, unsupported owner type or search expression, invalid cursor, duplicate external owner, missing unresolved display name, or invalid body.

401

Authentication context is absent or invalid.

403

The actor lacks capability, fresh assurance, or classification permission.

404

The target group, local owner, application, or source state does not exist in the authenticated tenant.

409

Revision conflict, stale source sequence, reused sequence with different content, inactive application source, application-managed delete, owner limit, inactive user owner, or ownership cycle.

428

If-Match is required for a directory delete or source replacement.

503

Identity, application, or keyed-integrity authority is unavailable. No unverified owner state is returned.

Security Properties

The implementation enforces:

  • tenant qualification at every read and mutation;

  • composite tenant foreign keys for resolved principals;

  • active-user validation for new user owners;

  • separate directory and application source authority;

  • active deployed-application validation at the gateway;

  • strict JSON bodies and bounded arrays and strings;

  • AAL2 mutation capability and request-time user classification enforcement;

  • idempotent direct assignment and exact snapshot replay;

  • optimistic deletion and source replacement;

  • monotonic source sequences;

  • transactional replace semantics;

  • tenant-serialized graph cycle prevention;

  • mandatory HMAC-SHA256 state evidence;

  • constant-time evidence comparison;

  • append-only, hash-chained mutation evidence;

  • no credentials, bearer tokens, application secrets, or raw connector payloads in state or events.

externalId, display name, source revision, and actor ID are identifiers. Do not place passwords, tokens, private keys, access-request justifications, or other secret values in them.

Real PostgreSQL Validation

Run:

scripts/test/run-group-owners-docker-validation.sh

The runner checks available memory before starting an isolated PostgreSQL container. It uses a unique Compose project, a dedicated port, bounded database connections, a six-minute timeout, and guaranteed volume cleanup.

The test proves:

  • directory user and group owner assignment and exact replay;

  • inactive, missing, and cross-tenant principal denial;

  • direct and transitive cycle rejection;

  • resolved and unresolved application assertions;

  • exact source snapshot replay;

  • different-content sequence reuse rejection;

  • required and stale source CAS handling;

  • monotonic stale-sequence rejection;

  • atomic snapshot replacement without deleting directory authority;

  • application-managed delete denial;

  • restart durability;

  • append-only event enforcement;

  • source-state and assertion-row tamper failure.

  • missing application assertion detection against signed source state.

Successful runs write logs and a SHA-256 manifest under artifacts/group-owners-docker-validation/.

Claim Boundary

This implementation establishes Atlas authority for native group ownership and application-source materialization. It does not claim that every external SaaS, HR, AD, LDAP, or SCIM connector emits correct source snapshots. Connector protocol conformance, credentials, reachability, upstream authorization, and business ownership semantics remain deployment acceptance responsibilities.

The group-owner API is also distinct from governance resource owners. Governance owners can carry reviewer and approver roles on applications, entitlements, bundles, and other resources. Native group owners are first-class directory accountability edges on the group itself.