Authentication
All APIs use OAuth 2.0 bearer tokens. System-to-system integrations use the client credentials grant. In agency deployments, user-facing applications and AI agents use the agency identity provider so calls carry the end user's identity.
Client credentials
- Create an application to get a
client_idandclient_secret. - POST to
/oauth/tokenwith HTTP Basic authentication andgrant_type=client_credentials. - Send the returned token as
Authorization: Bearer <token>. Tokens last one hour; request a new one when it expires rather than storing it long term.
curl -s -u "$CLIENT_ID:$CLIENT_SECRET" \
-d grant_type=client_credentials \
-d scope="cases:read" \
https://dev.ironbrick.us/oauth/tokenScopes
Each operation requires one scope, shown on its reference page. Applications are granted scopes when created; a token can request any subset with the scope parameter. Ask for the least you need.
Token validation
Sandbox tokens are signed JWTs (typ: at+jwt). Resource servers check:
- Signature from the trusted issuer (sandbox: HS256; agency: RS256 or ES256 with keys published by the IdP).
- Issuer
iss = https://dev.ironbrick.usand audienceaud = ironbrick-sandbox. - Time:
exp,nbf, andiatwith at most 30 seconds of clock skew. - Client status: the application is active, not revoked, and its secret has not been rotated since the token was issued.
- Scope includes what the operation requires.
Use the Auth Validator to run these checks interactively, or RFC 7662 introspection from code.
Secret handling
- Store secrets in a secrets manager or your platform's secure properties, never in source control.
- Rotate from Applications & keys. Rotation takes effect immediately and invalidates tokens issued with the old secret.
- Revoke any application you no longer use.
Agency deployments
In production, Iron Brick APIs sit behind the agency API gateway and trust the agency identity provider (for example Login.gov for the public, or Okta or Microsoft Entra ID with PIV/CAC for staff). Options include mutual TLS for system clients, token exchange so AI agents act on behalf of a user, and FIPS 140-validated cryptographic modules for TLS.