Engineering guide · ICAM
Workflow Connections And Folder Authority
On this page
Connection ModelCreate And ActivateRotate, Deactivate, And TombstoneUse From A DefinitionFolder Hierarchy And RBACSafe Folder MovesRuntime EnforcementStorage And Tamper EvidenceError HandlingVerificationAtlas exposes connections and folder roles as first-class, tenant-scoped security authorities. This closes two dangerous implementation shortcuts:
-
a flow definition never carries a password, token, client secret, or direct Vault reference;
-
an ICAM bearer capability does not silently grant access to every workflow folder.
The useful compatibility targets are Okta Workflows' org- and folder-level connections, health indication, five-level folder hierarchy, and folder roles. Atlas adds reference-only secret generations, independent activation, bounded inheritance, exact compare-and-swap, actor-bound idempotency, signed state, append-only evidence, dependency-aware lifecycle changes, and database tamper guards.
See the current Okta primary documentation for the compatibility baseline:
Connection Model
A Connection is metadata. A ConnectionSecretGeneration contains a tenant-bound vault:// reference and no secret value. Atlas rejects query strings, fragments, traversal segments, references that omit the tenant identifier, and fields that look like raw secret material.
| State | Meaning |
|---|---|
|
A maker created generation 1. It cannot be used by a flow. |
|
An independent phishing-resistant AAL3 checker resolved and probed the exact Vault reference. One generation is active. |
|
An independently approved, dependency-safe deactivation completed. No action card can resolve it. |
|
An independently approved terminal transition revoked every dedicated Vault reference and retained signed history. |
Generation states are PENDING, ACTIVE, RETIRED, and REVOKED. Rotation first creates one pending successor. A different AAL3 checker probes that successor and atomically retires the predecessor, activates the successor, advances the connection generation, and appends both evidence events. There can be at most one active and one pending generation per connection.
Connection scope is explicit:
-
ORGallows use in any tenant folder. -
FOLDERallows use in the owning folder and, only when configured, up tomaxDescendantDepthchild levels.
There is no implicit cross-tenant resolution and no fallback from an invalid managed connection ID to a raw credential reference.
Create And Activate
Every mutation requires a 16-200 character Idempotency-Key header and an 8-1000 character operational reason. Reusing the key with identical canonical input and actor returns the committed response with Idempotency-Replayed: true. Reusing it for another actor or request returns 409.
POST /api/v1/icam/flow-connections HTTP/1.1
Authorization: Bearer <maker-token>
Idempotency-Key: mission-hris-create-20260726
Content-Type: application/json
{
"name": "Mission HRIS",
"connectorKey": "hris.scim",
"scope": "FOLDER",
"folderId": "wff-2ab7...",
"maxDescendantDepth": 1,
"secretRef": "vault://workflow-connections/11111111-1111-1111-1111-111111111111/mission-hris/generation-1",
"reason": "Register the approved HRIS credential reference"
}
The response is PENDING_ACTIVATION, version 1. It includes an ETag, evidence head, and P-384 authority seal.
POST /api/v1/icam/flow-connections/wfc-8f53.../lifecycle/activate HTTP/1.1
Authorization: Bearer <different-checker-token>
Idempotency-Key: mission-hris-activate-20260726
Content-Type: application/json
{
"expectedVersion": 1,
"reason": "Independently validate approved Vault custody"
}
Activation requires:
-
icam.flow.manageat the gateway and internalflow.connection.approve; -
fresh AAL3 authentication, no more than five minutes old;
-
a phishing-resistant factor;
-
a checker actor different from the maker;
-
exact connection and generation versions;
-
a successful real Vault read without exposing returned material;
-
valid scope and signed state.
Failure leaves the connection unusable. Explicit probes use POST /api/v1/icam/flow-connections/{connectionId}/probes and record HEALTHY or FAILED evidence without logging provider error details or secret values.
Rotate, Deactivate, And Tombstone
Propose a generation:
POST /api/v1/icam/flow-connections/wfc-8f53.../rotations HTTP/1.1
Authorization: Bearer <maker-token>
Idempotency-Key: mission-hris-rotate-20260726
Content-Type: application/json
{
"secretRef": "vault://workflow-connections/11111111-1111-1111-1111-111111111111/mission-hris/generation-2",
"expectedVersion": 2,
"reason": "Stage the approved successor credential reference"
}
Approve the exact generation:
POST /api/v1/icam/flow-connections/wfc-8f53.../generations/2/activate HTTP/1.1
Authorization: Bearer <different-checker-token>
Idempotency-Key: mission-hris-rotate-approve-20260726
Content-Type: application/json
{
"expectedConnectionVersion": 3,
"expectedGenerationVersion": 1,
"reason": "Validate generation 2 and retire generation 1"
}
Lifecycle actions use a proposal and a separate approval:
-
POST …/lifecycle/deactivate -
POST …/lifecycle/deactivate/approve -
POST …/lifecycle/tombstone -
POST …/lifecycle/tombstone/approve
Deactivation is rejected while an active signed definition references the connection. Tombstoning is rejected while any retained signed definition version references it. Inspect dependencies with:
GET /api/v1/icam/flow-connections/{connectionId}/dependencies
Disable every active dependent definition before retrying the same pending connection decision:
POST /api/v1/icam/flow-definitions/{flowId}/versions/{version}/deactivate HTTP/1.1
Authorization: Bearer <operator-token>
Content-Type: application/json
{}
Deactivation keeps the signed definition package available for audit and rollback, but removes it from event, schedule, API, delegated, and workload execution selection. It requires the definition activation capability, fresh AAL2, and write authority over the definition’s folder.
Atlas does not support physical deletion. A tombstone retains identity, revision, signatures, reason hashes, events, and replay bindings.
Use From A Definition
Action cards use a managed ID:
{
"id": "provision-account",
"type": "action",
"action": "scim.create-user",
"connectionRef": "wfc-8f53..."
}
Draft parsing still recognizes legacy reference syntax so old packages can be inspected, but activation rejects every non-managed connection reference. Activation verifies current connection and generation signatures, scope, status, and last successful custody probe. Execution repeats that resolution. The executor receives the active reference only in its in-process action context; definitions, executions, evidence events, and responses never contain resolved secret material.
Folder Hierarchy And RBAC
Folder depth is limited to five. Every folder is signed and has its own optimistic version, evidence head, and ETag. A creator receives one exact-folder MANAGER bootstrap grant. This is a resource permission, not permission to delegate authority.
| Role | Effective permissions |
|---|---|
|
Read, write, execute, inspect execution history, and administer resources in scope. |
|
Read, write, execute, and inspect execution history; cannot grant roles. |
|
Read, execute active flows, and inspect execution history. |
|
Read definitions and resources; cannot execute or inspect history. |
Grants target a USER, GROUP, or SERVICE_ACCOUNT. Inheritance is never unlimited: inheritToChildren must be explicit and maxDescendantDepth is bounded from 1 through 4. Atlas evaluates user and authoritative group principals on every request. Grant authority is non-transitive: a folder role never confers flow.folder.grant.
Create a pending grant:
POST /api/v1/icam/flow-folders/wff-2ab7.../grants HTTP/1.1
Authorization: Bearer <grant-maker-token>
Idempotency-Key: mission-folder-editors-20260726
Content-Type: application/json
{
"principalType": "GROUP",
"principalId": "mission-workflow-editors",
"role": "EDITOR",
"inheritToChildren": true,
"maxDescendantDepth": 1,
"reason": "Delegate editing to the approved mission group"
}
An independent phishing-resistant AAL3 checker activates it with:
POST /api/v1/icam/flow-folders/grants/wfg-47aa.../approve HTTP/1.1
Authorization: Bearer <different-checker-token>
Idempotency-Key: mission-folder-editors-approve-20260726
Content-Type: application/json
{
"expectedVersion": 1,
"reason": "Confirm group ownership and bounded scope"
}
Revocation also requires two steps: request-revoke, then approve-revoke. The result is an immutable TOMBSTONED grant.
Safe Folder Moves
POST /api/v1/icam/flow-folders/wff-2ab7.../move HTTP/1.1
Authorization: Bearer <folder-manager-token>
Idempotency-Key: move-mission-flows-20260726
Content-Type: application/json
{
"newParentId": "wff-bc10...",
"expectedVersion": 4,
"reason": "Move mission flows under the approved program boundary"
}
Atlas loads and verifies the complete tenant hierarchy, requires administration rights on the source and destination, rejects self-parenting and descendant cycles, computes the entire subtree depth change, and rejects a move if any descendant would exceed level five. It then advances and re-signs every affected folder in one serializable transaction. Flow, table, execution, and connection folder identifiers do not change, so references cannot silently drift.
Runtime Enforcement
Folder roles are enforced on:
-
definition create, import, read, export, activate, rollback, and helper resolution;
-
API, delegated, event, schedule, helper, and signed workload execution;
-
execution read, pause, resume, and evidence history;
-
encrypted table create, list, and row mutation;
-
folder-scoped connection administration and connection use.
Missing authority metadata, an invalid signature, a broken parent chain, an expired authentication context, or a group lookup failure denies access. The gateway no longer sets flow.folder.all for every caller. That bypass is reserved for explicitly trusted internal service actors.
Storage And Tamper Evidence
Migration 083_workflow_connection_folder_authority.sql adds:
-
icam_flow_folder_authority -
icam_flow_folder_grants -
icam_flow_connections -
icam_flow_connection_generations -
icam_flow_authority_events -
icam_flow_authority_replays
PostgreSQL rejects physical deletion, revision jumps, unchanged evidence heads, event or replay mutation, event-chain discontinuity, multiple active or pending generations, live duplicate principals, folder cycles, inconsistent depths, base-folder/signed-authority divergence, and state commits without an exact matching evidence event. Replay keys and operational reasons are stored only as SHA-256 references.
Application verification adds P-384 state signature validation and evidence-chain signature validation. Database constraints do not claim to replace key-based verification.
Error Handling
| Status | Meaning |
|---|---|
|
Malformed scope, reference, hierarchy, role, reason, or replay key. |
|
Capability, folder role, fresh assurance, phishing resistance, or maker-checker separation failed. |
|
The tenant-scoped authority object does not exist. |
|
CAS lost, replay input changed, a pending operation already exists, or dependencies block lifecycle change. |
|
Vault, durable storage, signature authority, or a custody probe is unavailable. |
Clients should reload after 409; they must never blindly increment expectedVersion.
Verification
Unit and race tests demonstrate:
-
creator bootstrap grants and denial without a signed grant;
-
bounded group inheritance and non-transitive delegation;
-
cycle and depth rejection for moves;
-
maker-checker separation for grant, activation, rotation, deactivation, and tombstone decisions;
-
exact idempotent replay and concurrent CAS convergence;
-
successful and failed custody probes;
-
predecessor retirement and terminal reference revocation;
-
dependency-blocked deactivation;
-
state and event tamper rejection.
The Docker proof runs the same authority against PostgreSQL and Vault, restarts the service, re-verifies signatures and evidence, inspects database JSON for forbidden material, and executes negative SQL tamper attempts. A successful local proof is not a production authorization or accreditation claim.