Engineering guide · ICAM
MCP And API Resource Servers
On this page
Authority ModelManagement APIConfigure Secure Resource-Client AuthenticationReadiness And ActivationFulfillment Receipt And ID-JAG ConsumptionRegister An MCP ResourceBind An Authorization ServerReadiness ValidationBind Token Exchange To The ResourceFailure And Evidence SemanticsVerificationAtlas registers MCP and conventional API servers as first-class protected resources. A token-exchange connection can no longer rely only on caller-supplied audience text: a first-class AI connection must bind one active resource server and one currently ready authorization-server configuration.
The protocol baselines are OAuth 2.0 Protected Resource Metadata, OAuth 2.0 Authorization Server Metadata, OpenID Connect Discovery, OAuth 2.0 Token Exchange, and the Okta MCP and API resource-server lifecycle.
Authority Model
The API-access service owns one tenant-scoped compare-and-swap aggregate for:
-
resource identity, ownership, exact token audience, protected-resource URI, endpoint, and metadata URI;
-
exact supported scopes;
-
typed MCP tools, prompts, and resources;
-
one or more authorization-server bindings;
-
short-lived discovery evidence and lifecycle state;
-
the activation and deactivation actors and hash-linked evidence.
The server derives the resource identifier from tenant, type, and exact token
audience.
Registration uses an atomic create-only write, so concurrent requests cannot
create two authorities for the same audience.
The audience and resource URI are immutable.
Configuration and authorization bindings can change only while the resource
is not active, using the parent aggregate’s current ETag.
PENDING
| validate protected-resource and authorization metadata
+---- mismatch or no usable binding ----> INVALID
|
+---- current readiness evidence ------> INACTIVE
|
independent AAL3 activation
|
v
ACTIVE
|
AAL3 deactivation
|
v
INACTIVE
Validation evidence expires after the validator-provided interval, bounded to
one minute through 24 hours and normally 15 minutes.
Expiry immediately removes the resource from potential-connection discovery
and makes new token exchange fail closed even if the stored lifecycle state
still says ACTIVE.
Revalidation that detects a mismatch records INVALID.
An infrastructure failure to run the validator returns an evidence error and
does not overwrite the last completed observation.
Management API
Use mcp-servers for an MCP endpoint and api-servers for a conventional
API.
Both collections have the same contract.
| Route | Purpose | Capability | Assurance |
|---|---|---|---|
|
List or register resources. |
|
AAL1 or fresh AAL2 |
|
Read, update a non-active resource, or delete a non-active resource. |
read, manage, or approve capability |
AAL1, fresh AAL2, or fresh AAL3 |
|
List or add an authorization authority. |
read or manage capability |
AAL1 or fresh AAL2 |
|
Read, replace, or remove a binding. |
read or manage capability |
AAL1 or fresh AAL2 |
|
Perform hardened protected-resource and authorization metadata discovery. |
|
fresh AAL2 |
|
Independently approve a ready resource or remove it from service. |
|
fresh AAL3 |
|
List active, unexpired, directly actionable Atlas XAA connection targets. |
|
AAL1 |
|
List safe views or create an inactive, generation-bound resource-client credential configuration. |
read or manage capability |
AAL1 or fresh AAL2 |
|
Read, replace with the next inactive generation, or tombstone a client-auth generation. |
read or manage capability |
AAL1 or fresh AAL2 |
|
Run challenge-bound TLS 1.3 mutual-TLS readiness and signature verification. |
|
fresh AAL2 |
|
Independently activate a current ready generation. |
|
fresh phishing-resistant AAL3 |
Collection reads accept status and q.
Potential-connection discovery accepts type=MCP|API and q.
Every mutation after registration requires the current parent ETag in
If-Match; lifecycle and binding bodies also require a nonempty reason.
Every client-auth mutation also requires a 16–256 character
Idempotency-Key.
Atlas stores only a tenant-keyed HMAC of that key, a keyed request
commitment, and a sealed exact-response receipt.
A retry returns the original response even after the aggregate advances.
Reuse for another operation or payload returns 409.
Configure Secure Resource-Client Authentication
The collection follows the Okta Secure AI Resource Server Client Auth
Settings shape while narrowing unsafe choices.
purpose contains exactly one of STS or AGENT_IMPORT, protocol is
OAUTH2, and the authentication method is either private_key_jwt or
tls_client_auth.
Shared-secret authentication is not accepted.
Create a private_key_jwt generation only after its parent
authorization-server binding has current readiness evidence:
curl --fail-with-body \
-H "Authorization: Bearer ${AAL2_OPERATOR_TOKEN}" \
-H 'If-Match: "CURRENT_RESOURCE_EVIDENCE_SHA256"' \
-H 'Idempotency-Key: client-auth-create-mission-0001' \
-H "Content-Type: application/json" \
-X POST \
https://id.atlas.example/resource-servers/api/v1/client-auth-settings \
--data '{
"resourceServerId": "RESOURCE_SERVER_ID",
"authorizationServerId": "AUTHORIZATION_SERVER_ID",
"settings": {
"name": "Mission resource STS",
"purpose": ["STS"],
"protocol": "OAUTH2",
"authenticationMethod": "private_key_jwt",
"clientId": "mission-resource-client",
"scopes": ["mission.read", "mission.execute"],
"credentialRef": "vault://api-access/tenants/tenant-a/resource-client-auth/mission-credential",
"mtlsIdentityRef": "vault://api-access/tenants/tenant-a/resource-client-auth/readiness-client",
"trustBundleRef": "vault://api-access/tenants/tenant-a/resource-client-auth/readiness-roots",
"readinessSigningKeyRef": "vault://api-access/tenants/tenant-a/resource-client-auth/readiness-signing",
"fulfillmentSigningKeyRef": "vault://api-access/tenants/tenant-a/resource-client-auth/fulfillment-signing",
"jwksUri": "https://id.atlas.example/oauth2/tenant-a/v1/keys",
"jwksGeneration": 7,
"keySpkiSha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"serverSpkiSha256": "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789",
"readinessEndpoint": "https://broker.example.mil/atlas/client-auth/readiness"
}
}'
The clientId must equal the parent authorization binding’s resource client.
Issuer, audience, and token endpoint are copied from that ready binding rather
than accepted from the caller.
Scopes must be an exact subset of the resource server.
For tls_client_auth, omit the JWKS fields and provide
certificateGeneration plus certificateSpkiSha256.
All five custody references are write-only.
The production boundary accepts only the canonical form
vault://api-access/tenants/{tenantId}/resource-client-auth/{material}.
It rejects a different tenant, user information, another authority, opaque
URI syntax, encoded characters, . or .., empty or doubled path segments,
queries, fragments, and control characters.
Neither references nor credential bytes enter PostgreSQL or a response.
During creation, Atlas reads each Vault KV value without offline-cache fallback and seals:
-
the exact tenant, resource server, authorization server, settings ID, and generation;
-
the exact Vault version and SHA-256 content commitment of the credential, readiness client identity, trust bundle, readiness verification key, and fulfillment verification key;
-
the P-384 credential-key SPKI for
private_key_jwt, or the key-matched certificate SPKI fortls_client_auth; -
exact issuer, audience, token endpoint, client, and authentication method.
The immutable Vault binding uses create-if-absent semantics.
Every aggregate read, readiness attempt, and fulfillment verification rereads
the material and requires the current version and content to equal the sealed
generation.
Replacing bytes at the same Vault path therefore fails closed.
Rotation requires PATCH, which tombstones the old generation and creates the
next INACTIVE generation.
Only the newest non-retired, non-active generation can be replaced; a
tombstone cannot be resurrected.
Public responses contain only public protocol values, public SPKI hashes,
generation and lifecycle metadata, blinded actor references, evidence, and
custodyConfigured or mutualTlsConfigured booleans.
They cannot represent custody references, raw actor IDs, idempotency
commitments, state MACs, aggregate MACs, secrets, private keys, or tokens.
Readiness And Activation
INACTIVE -- signed readiness succeeds --> READY -- independent AAL3 --> ACTIVE
| |
+-- failed verification --> INVALID <-+
INACTIVE | INVALID | READY | ACTIVE -- retire --> RETIRED
Readiness generates a fresh 256-bit base64url challenge and sends the exact settings ID and generation to the configured public HTTPS endpoint. The network verifier:
-
permits TLS 1.3 only and requires a Vault-resolved client certificate;
-
uses the pinned trust bundle and exact hostname;
-
disables proxies and redirects;
-
rejects private, loopback, link-local, multicast, unspecified, and metadata egress addresses after DNS resolution;
-
requires the peer leaf SPKI to equal
serverSpkiSha256; -
accepts at most 32 KiB of strict JSON; and
-
verifies a P-384/SHA-384 signature over the echoed challenge, ID, generation, readiness result, code, and 60–900 second validity.
A mismatch records INVALID evidence.
Activation requires a different actor from the generation creator, fresh
phishing-resistant AAL3, unexpired readiness, the current parent ETag, and
an unused idempotency key.
The parent resource server cannot activate until a matching client-auth
generation is active.
An active parent cannot mutate its client-auth generations.
Fulfillment Receipt And ID-JAG Consumption
Atlas does not export a credential or claim that it performed an external token request. The downstream broker performs the exact active generation and signs a secret-free fulfillment receipt. The receipt binds the settings ID and generation, method, client, audience, token endpoint, ID-JAG JTI and evidence hash, connection ID, exact resource and scopes, token SHA-256, observed server TLS SPKI, random receipt JTI, and a lifetime of at most 60 seconds.
For private_key_jwt, it additionally proves ES384, iss == sub == clientId,
an assertion audience equal to the exact token endpoint, a random durable
one-use assertion JTI, assertion SHA-256, key SPKI, and JWKS generation.
For tls_client_auth, it proves the exact certificate SPKI and certificate
generation.
The broker signs the complete canonical receipt with the generation-pinned
fulfillment key.
The API-access authority verifies that signature and all live resource, authorization, connection, scope, client, and evidence bindings. It then atomically creates the HMAC-sealed replay record and compare-and-swap marks the ID-JAG consumed in one PostgreSQL statement. Two receipts racing for one ID-JAG cannot both commit. A bad signature, stale Vault material, wrong server SPKI, changed resource evidence, or replay leaves an issued ID-JAG unconsumed unless another valid consumer won.
Register An MCP Resource
curl --fail-with-body \
-H "Authorization: Bearer ${AAL2_OPERATOR_TOKEN}" \
-H "Content-Type: application/json" \
-X POST https://id.atlas.example/resource-servers/api/v1/mcp-servers \
--data '{
"name": "Mission planning MCP",
"description": "Bounded planning tools and resources",
"ownerId": "team-mission-platform",
"resourceUri": "https://mcp.mission.example.mil",
"audience": "atlas-agent:mission-planning",
"endpointUri": "https://mcp.mission.example.mil/mcp",
"metadataUri": "https://mcp.mission.example.mil/.well-known/oauth-protected-resource",
"supportedScopes": ["mission.read", "mission.execute"],
"capabilities": [
{
"kind": "RESOURCE",
"name": "mission_plan",
"requiredScopes": ["mission.read"],
"risk": "READ",
"requiresHumanApproval": false
},
{
"kind": "TOOL",
"name": "execute_mission_plan",
"requiredScopes": ["mission.execute"],
"risk": "DESTRUCTIVE",
"requiresHumanApproval": true
}
]
}'
audience is a bounded, nonempty exact identifier and may be a free-form
agent string. It defaults to resourceUri for existing URL-shaped
integrations. This flexibility does not relax network security:
resourceUri, endpointUri, and metadataUri remain public HTTPS URLs, and
metadata discovery retains DNS, address, TLS, redirect, and size defenses.
Atlas compares the audience byte-for-byte at authorization, ID-JAG
registration, and consumption; a different active resource or look-alike
string does not satisfy the binding.
Capabilities are TOOL, PROMPT, or RESOURCE.
Risk is READ, WRITE, or DESTRUCTIVE.
Each capability must require an exact subset of the server’s scopes.
Wildcards and offline_access are prohibited.
Atlas refuses to register a destructive capability unless
requiresHumanApproval is true.
This inventory is an authorization input; an MCP runtime must still enforce
the selected tool, its scopes, and its human-approval decision at invocation.
Bind An Authorization Server
ATLAS_XAA binds an enabled, approved Atlas resource OAuth client that
supports token exchange or JWT bearer:
curl --fail-with-body \
-H "Authorization: Bearer ${AAL2_OPERATOR_TOKEN}" \
-H 'If-Match: "CURRENT_RESOURCE_EVIDENCE_SHA256"' \
-H "Content-Type: application/json" \
-X POST \
"https://id.atlas.example/resource-servers/api/v1/mcp-servers/${RESOURCE_SERVER_ID}/authorization-servers" \
--data '{
"authorizationServer": {
"mode": "ATLAS_XAA",
"issuer": "https://id.atlas.example/oauth2/tenant-a",
"metadataUri": "https://id.atlas.example/oauth2/tenant-a/.well-known/openid-configuration",
"resourceClientId": "mission-resource-client",
"scopes": ["mission.read", "mission.execute"]
},
"reason": "bind the independently governed Atlas resource client"
}'
EXTERNAL_STS records an external authorization-code authority:
{
"authorizationServer": {
"mode": "EXTERNAL_STS",
"issuer": "https://sts.partner.example.mil",
"metadataUri": "https://sts.partner.example.mil/.well-known/openid-configuration",
"externalClientId": "atlas-mission-broker",
"credentialRef": "vault://atlas/icam/sts/mission",
"scopes": ["mission.read"]
},
"reason": "register partner authority using reference-only custody"
}
Only vault://, kms://, and pkcs11:// references are accepted.
Raw secrets are invalid.
The API-access authority persists the reference for a future provider adapter,
but every public REST response removes credentialRef.
An external binding can become ready inventory, but it is not advertised as
an actionable potential connection and cannot satisfy Atlas XAA token
exchange until that provider’s broker and consent flow are implemented and
tested.
Readiness Validation
The protected-resource document must:
-
return
application/jsonwith at most 1 MiB; -
bind
resourceto the registered resource URI; -
include every configured scope in
scopes_supported; -
list at least one configured issuer in
authorization_servers.
Each authorization metadata document must bind the exact issuer and expose
public HTTPS token and JWKS endpoints.
ATLAS_XAA requires RFC 8693 token exchange or JWT bearer.
EXTERNAL_STS requires authorization code plus private_key_jwt or
client_secret_basic.
Atlas stores SHA-256 metadata evidence, discovered public endpoints, protocol
capabilities, validation actor, timestamps, and expiry.
Discovery is deliberately hostile-network safe:
-
HTTPS and port 443 only, with no URL credentials, query, fragment, or redirect;
-
no proxy inheritance;
-
localhost, private, loopback, link-local, multicast, unspecified, and metadata-service addresses rejected;
-
every DNS answer checked before a checked public address is dialed, preventing mixed-answer and rebinding pivots;
-
TLS 1.2 or newer, five-second bounded network stages, one response per host, and bounded bodies.
Activate with a different fresh-AAL3 actor after validation returns
INACTIVE and validationCode: READY.
The creator cannot self-activate.
Bind Token Exchange To The Resource
An AI resource connection includes both durable authority identifiers:
{
"name": "mission agent to planning MCP",
"agentId": "agent_...",
"delegationLinkId": "delegation_...",
"resourceServerId": "RESOURCE_SERVER_ID",
"resourceAuthorizationServerId": "AUTHORIZATION_SERVER_ID",
"connectionType": "IDENTITY_ASSERTION_APP_INSTANCE",
"tokenType": "urn:ietf:params:oauth:token-type:id_token",
"agentClientId": "mission-agent-client",
"subjectClientId": "mission-portal-client",
"resourceClientId": "mission-resource-client",
"audience": "atlas-agent:mission-planning",
"allowedScopes": ["mission.read"],
"idJagTtlSeconds": 120
}
Creation and independent activation require an exact token audience, connection type, token type, scope subset, XAA binding, and resource client match. Authorization, ID-JAG registration, and ID-JAG consumption repeat the same check. A resource deactivation, client revocation, metadata invalidation, readiness expiry, connection revocation, agent deactivation, or delegation revocation therefore stops the exchange without waiting for copied policy or a cache TTL. ID-JAG registration also binds the current connection, resource aggregate, and authorization-binding evidence hashes. A resource lifecycle or revalidation epoch change permanently invalidates that in-flight ID-JAG; later reactivation cannot revive it.
GET /workload-principals/api/v1/potential-connections is a derived read
model, not stored configuration.
It returns only active, unexpired ATLAS_XAA bindings and includes the exact
resource, audience, authorization binding, client, scopes, capability
inventory, IDENTITY_ASSERTION_APP_INSTANCE connection type, ID-token token
type, and readiness expiry needed to draft a connection.
Failure And Evidence Semantics
| Result | Meaning |
|---|---|
|
The bounded URL, scope, capability, binding, or JSON contract is invalid. |
|
Capability, role, assurance, freshness, or underlying resource-client authority failed. |
|
The tenant-scoped resource, type-specific parent, or binding does not exist. |
|
The ETag is stale, the resource is active during mutation, the resource audience already exists, or a lifecycle transition is invalid. |
|
|
Validation mismatch is durable evidence and normally returns a resource in
INVALID.
A validator dependency outage fails the request and preserves the previous
completed evidence.
Credential references are never returned by the REST management plane.
Verification
Run the authority, gRPC, gateway, token-exchange, and OpenAPI tests:
Internal implementation checks are omitted from this public guide.
Compile the PostgreSQL path without starting containers:
Internal implementation checks are omitted from this public guide.
The Docker-tagged API-access scenario persists and restores the active resource, authorization binding, client-auth generation, AI principal, delegation, connection, readiness evidence, and one-time assertion state before authorizing the restored graph. The platform-state integration test proves that replay creation and ID-JAG consumption share one PostgreSQL commit point and that a stale CAS cannot leave an orphan replay marker. When host memory is available, run the bounded tmpfs PostgreSQL proof with:
scripts/test/run-resource-client-auth-docker-validation.sh
The runner refuses to start below its memory floor and, after a successful
run, writes logs and a verified SHA-256 manifest under
artifacts/resource-client-auth-validation/{run-id}/.
Runtime Docker execution remains deferred while unrelated workloads hold host
memory; a compiled integration test is not presented as executed evidence.