External authentication model

This page is the ONE authoritative statement of how DotID authenticates callers that arrive from outside the cluster. Every other page points here instead of restating it.

FGAI-HMAC-SHA256 is the external programmatic credential. A caller that wants DotID’s public capability APIs signs its request with an AKIA service-user key, or with temporary ASIA STS credentials plus the signed X-FGAI-Security-Token. Keycloak/OIDC bearer tokens are admitted only on the surfaces and routes declared below: browser applications and explicit workload-audience contracts. A human bearer token, including a platform-admin token, is never a CLI or public-API credential.

The machine-readable declaration lives in gateways/edge/dotid-routes.json under _meta._external_auth_model and the per-capability audiences maps. That file also assembles the public edge, so the route table the edge enforces and the route table the docs describe are the same bytes.

Surfaces

Public host

Surface

Admitted credentials

Refused credentials

api.flexgalaxy.ai, api.staging.flexgalaxy.ai

machine

FGAI-HMAC-SHA256 on every declared route; OIDC bearer only on the routes listed under Bearer-admitting routes; workload JWT on its declared routes; nothing on anonymous routes

OIDC bearer on an HMAC-only route → 401 external-auth-scheme-mismatch; FGAI* on a bearer-only route → 401 external-auth-scheme-mismatch

console.flexgalaxy.ai, console.staging.flexgalaxy.ai, admin-console.flexgalaxy.ai, admin-console.staging.flexgalaxy.ai, iam.flexgalaxy.ai

browser

Keycloak/OIDC bearer

FGAI* → 401 browser-auth-scheme-mismatch

passport.flexgalaxy.ai, passport.staging.flexgalaxy.ai

dual

both, on the routes that declare them

the scheme a route declares it does not take

authz-internal.flexgalaxy.ai

internal, not public

internal token or workload JWT

not a public surface

A request that reaches a service without a declared public host (direct service DNS, a smoke-test pod, a cluster-local caller) is unclassified: the two external-scheme rules do not apply, and the service’s normal authentication chain decides. The model governs external surfaces; it does not invent a refusal for traffic that never crossed one.

iam.flexgalaxy.ai is a BROWSER host. It is served by the browser edge — the same edge and the same addresses as console.flexgalaxy.ai — so it answers with the console application, not the machine API. Measured the same day: GET https://iam.flexgalaxy.ai/identity/v1/self returns the console page, while the SAME path on api.flexgalaxy.ai returns 401 FGAI-HMAC-SHA256 realm="dotid". The machine surface is api.flexgalaxy.ai (and api.staging.flexgalaxy.ai); integrations authenticating with AK/SK must target that host. The declaration now states which edge actually serves the host, which is the rule this page applies to every other mismatch.

An undeclared path on a declared machine host is likewise unclassified: the model classifies the routes it declares, and a path it does not declare keeps the service’s normal authentication chain (the in-cluster provisioning lane is the live case — a direct service caller on a path with no public route). The guarantee is therefore: a declared route always has a family, and a route declared with no family is refused by the generator (none is an explicit family, not an absent one) — not “every request to a declared host is classified”.

Where the model is enforced. Every service that serves a declared route carries its own generated projection of this model (external-auth-model.json, derived from the same fragment by scripts/generate-external-auth-model.py) and refuses the credential family a route does not admit before its authentication chain, so a Bearer token is never handed to the JWT decoder on an HMAC-only route and a refusal never advertises an OAuth discovery document for a route that refuses bearer tokens. A service with no declared public route carries no projection and polices nothing. The projection is per service because each service sees only its own backend paths; --check fails when any hosting service’s file is stale or missing, or when a projection exists for a service that hosts no declared route (DotID#2343).

Route classes

The declaration uses five credential families (the 212-W4 fgai-hmac+workload-jwt combined family was WITHDRAWN by fgai-dev’s edge-auth ruling of 2026-11-26: the edge only classifies, so a two-mechanism route declares a canonical token and the second family’s admission is recorded where its own filter declares it — WorkloadJwtPlatformScopeAssignmentAuthFilter, GET-only, aud dotid-platform-scope-assignments-read (the filter’s own lane constant), identity_class=workload):

Family

Meaning

fgai-hmac

FGAI-HMAC-SHA256 only. This is the default for a declared route.

fgai-hmac+bearer

Either family is admitted; the route is dual.

bearer

OIDC bearer only. An HMAC-signed request is refused.

workload-jwt

An audience-scoped DotID workload bearer is the sole credential; HMAC is refused.

none

Anonymous by design; no credential is required and neither family is policed.

Bearer-admitting routes

These are the only routes on the machine surface that accept an OIDC bearer token. They are declared as fgai-hmac+bearer, bearer, workload-jwt or none in the route table:

Route

Family

Why

POST /identity/v1/sts/assume-role, POST /identity/v1/sts/get-session-token, GET /identity/v1/sts/sessions, POST /identity/v1/sts/revoke-session, POST /identity/v1/sts/revoke-all-sessions

fgai-hmac+bearer

STS resolves either an OIDC bearer or an AK/SK caller before minting credentials.

POST /identity/v1/workforce-invites, POST /identity/v1/workforce-invites/{inviteId}/resend

fgai-hmac+bearer

Both a console session and a service user may issue or resend invites.

POST /identity/v1/workforce-invites/accept

bearer

The accepting user is an authenticated workforce human; there is no machine caller.

POST /identity/v1/workforce-invites/inspect

none

Pre-credential invite discovery.

POST /identity/v1/workload/sts/assume-role

workload-jwt

Federated workload identities present an audience-scoped workload bearer.

GET /quota/v1/runtime/{serviceCode}/{quotaCode}/applied, `GET

PUT …/usage`

workload-jwt

POST /passport/v1/app-entry/resolve, POST /passport/v1/app-entry/orgs, POST /passport/v1/launches/redeem

fgai-hmac+bearer

A workforce STS key or a user session may enter an application.

POST /passport/v1/launch-links, POST /passport/v1/launch-tickets/validate

bearer

Caller is a registered application backend acting on an authenticated user session.

GET /passport/v1/applications/{appId}, GET /passport/v1/app-entry/orgs/{org_id}

none

Public app metadata and login-realm discovery.

POST /oauth2/token, GET /.well-known/jwks.json, GET /.well-known/oauth-protected-resource, POST /identity/v1/realm-discovery

none

Protocol discovery and the pre-credential RFC 8693 exchange.

POST /registration/v1/submit

none

The anonymous signup door (194-W6 / DotID#2064). A prospective customer has no account and therefore no credential at the moment they ask for one, so this is the machine surface’s only anonymous WRITE. The call is relayed internally to the owner’s non-public route, so the internal token never leaves the cluster and an anonymous caller never reaches the owning service directly. The submission is never decided by the platform: it lands PENDING on the operator review queue (194-W3) and an undecided one becomes REFUSED at its TTL (194-W4). The registration-init route is deliberately NOT published — the owner’s initRegistration has no caller at all.

GET /identity/v1/accounts/{account_id}/root-access-key/metadata, GET /identity/v1/accounts/{account_id}/root-access-key/audit

bearer

The root-access-key read pair has no AK/SK arm. AccountRootCredentialController binds @AuthenticationPrincipal Jwt and authorizeRootCredentialView() refuses a null JWT with 403 root-access-key-view-denied; a bearer was separately refused 401 external-auth-scheme-mismatch because /identity/v1 declared fgai-hmac. Both facts described a door only one credential family could open, so the declaration was corrected to the handler and the handler was not widened (DotID#1920).

GET /identity/v1/accounts/{account_id}/permission-sets

bearer

The root’s permission-set discovery read has no AK/SK arm (fgai-cli#71). fgai auth workforce login takes a --permission-set-id, and the caller who needs that id is an account root who has not logged in yet — there is no service principal at that moment. The handler binds the signed session (the account_id claim) and requires the path account to be the caller’s own, so an FGAI-HMAC caller has nothing to present. What it answers is what the STS root-ownership mint accepts: both read the same permission-set projection, filtered to the root’s own account. The organization-wide listing (GET /identity/v1/organizations/{org_id}/permission-sets) is unchanged and still answers a management AK/SK caller.

GET /identity/v1/self/security, GET /identity/v1/self/sessions, GET /identity/v1/contexts

bearer

Realm-keyed self-service reads. ProfileSelfController.security/.sessions take a JwtAuthenticationToken and SessionContextController.contexts takes one too; a service principal has no realm, so there is no profile or session list to answer for it. Declared bearer under DotID#1920 (review correction C-L2-3). GET /identity/v1/self deliberately stays fgai-hmac — it answers an AK/SK caller its own identity (DotID#1061).

GET|POST|PUT|DELETE /identity/v1/self/access-keys*

fgai-hmac+bearer

The GET serves both credential families (DotID#2973). An AK/SK caller is answered with exactly the ONE key it is presenting — that row’s created_at is the issuer-side age — and is refused (presenting-credential-unresolved / presenting-credential-not-found) rather than shown any other key; a bearer keeps the list of its own keys. The four mutation verbs on this prefix remain bearer-only. The public audience stays tenant-external.

GET /organizations/v1/{org_id}/tree

bearer

The one organization route with no machine caller. 175-W2 ruling A (DotID#1762, 3533aa0f21, 2026-10-21) made this door user-session-only: it accepts no AK/SK credentials by design, because the flat account-lifecycle read already serves service users and adding one here would widen the tree surface — so an FGAI-HMAC caller receives 401 unauthorized from the handler. Until 2026-10-27 this table (and the route catalog) still declared it fgai-hmac, which advertised a door service users cannot use (DotID#1899). Service users that need organization structure read it through GET /organizations/v1/{org_id}/ous instead (fgai org ou-list --parent-id <ou> / fgai org ou-get on the CLI; there is deliberately no tree verb, DotID#1899).

Every other declared route on this page’s tenant-external population is fgai-hmac. The bearer-only exceptions outside the table’s workload-jwt and none rows are GET /directory/v1/accounts, the root-access-key read pair, the root’s permission-set discovery read, the realm-keyed self-service reads, the self-service access-key family and GET /organizations/v1/{org_id}/tree.

GET /directory/v1/accounts is bearer: the cross-org account-directory selector resolves a workforce user from the JWT and denies an AK/SK caller by design (DotID#159), so its declaration now states what the handler enforces — the Production Battery skips the capability with that reason instead of reporting a 403 it cannot attribute (DotID#1839). GET /organizations/v1/{org_id}/tree is bearer for the reason in the table above: it is the single organization route with no machine caller.

The rule those four corrections share is the one to apply to the next mismatch. A route’s declared family is an advertisement: it says which credential a caller may present. When the handler binds only a Jwt (or only JwtAuthenticationToken), the declaration is what is wrong, and the fix moves the DECLARATION to the handler. Widening the handler so the advertisement becomes true would publish authority nobody asked for. In particular the Identity Center directory, IAM policy/role/credential authoring, the PDP, accounts, the rest of organizations (OUs, SCPs, member-account invitations, service-installations), service catalog, developer and audit capabilities are HMAC-only on the machine surface. The browser console reaches its own copies of those operations on the browser surface, where the bearer session is the credential.

Account-scoped Identity Center

A standalone account — an account that belongs to no organization — runs its own ACCOUNT-type Identity Center instance, the same standing AWS gives a standalone account. It is administered through account-scoped doors on the machine surface, with no organization anywhere in the path:

Route prefix

Operations

Audience

Family

/identity/v1/accounts/{account_id}/identity-center/

Identity Center users (users, users/{user_id}) and account assignments (assignments, assignments/{assignment_id})

tenant-external

fgai-hmac+bearer

/identity/v1/accounts/{account_id}/permission-sets

Permission-set definitions on the account’s own instance: create, read one, update, delete, and its attached-policy list/attach/detach

tenant-external

fgai-hmac+bearer

Both credential families are admitted on these doors: a service user signs with FGAI-HMAC-SHA256, and a workforce session may present its bearer. The {account_id} in the path must be the caller’s own account — a request naming another account is refused — and an identity that belongs to another account’s directory is indistinguishable from an absent one (the same 404). The account-wide discovery read of permission-set ids (GET /identity/v1/accounts/{account_id}/permission-sets) is the bearer-only row recorded in the table above; the definition verbs on that prefix are the dual-family doors described here.

Refusal behaviour

A refusal is a real answer, not a fallthrough to another authenticator:

Situation

Status

Body error

WWW-Authenticate

Bearer on an fgai-hmac route (machine surface)

401

external-auth-scheme-mismatch

FGAI-HMAC-SHA256 realm="dotid"

FGAI* on a bearer or workload-jwt route (machine surface)

401

external-auth-scheme-mismatch

Bearer resource_metadata="https://<public-host>/.well-known/oauth-protected-resource"

FGAI* on a browser surface

401

browser-auth-scheme-mismatch

Bearer resource_metadata="https://<public-host>/.well-known/oauth-protected-resource"

No credential on an HMAC-only machine route

401

external-auth-scheme-mismatch

FGAI-HMAC-SHA256 realm="dotid"

Invalid HMAC on an HMAC-only machine route

401

Unauthorized, with the verifier’s reason in message

FGAI-HMAC-SHA256 realm="dotid"

Invalid bearer on a bearer-admitting or browser route

401

Spring resource-server error

Bearer resource_metadata="https://<public-host>/.well-known/oauth-protected-resource"

The challenge always names the credential the surface actually accepts. An HMAC-only route does not advertise OAuth discovery: a client that follows a Bearer resource_metadata pointer from a route that never accepts a bearer is being told to do the one thing that will fail.

/oauth2/token and /.well-known/** are anonymous, so they carry no challenge of their own.

Enforcement points

Layer

Artifact

What it enforces

Public API edge

The edge’s credential check, rendered from the pinned DotID route fragment

Refuses a bearer credential on fgai-hmac routes and an FGAI* credential on bearer/workload-jwt routes before the request reaches any upstream. The check is active only once the edge is pinned to a fragment that carries _meta._external_auth_model; until that pin advances the check is not enforced there and the service below is the only enforcing half

Browser gateway

gateways/account/nginx.conf, gateways/admin/nginx.conf

Routes the browser host to the service and does not inspect the credential scheme. The FGAI* refusal on a browser host is the service’s writeBrowserRefusal (same row as the authorization service)

Authorization service

ExternalAuthModel, ExternalAuthSchemeFilter, SurfaceAwareAuthenticationEntryPoint

Classifies the surface, applies the same rule to direct callers, and makes the 401 challenge match the surface

Gate

scripts/generate-external-auth-model.py --check

Fails when the projection is stale, or a non-default family prefix is not named on this page

See also