Platform discovery & health (gateway / ops)
PlatformNot user flows — these serve the gateway (token validation) and the orchestrator (liveness/readiness). All return RAW bodies, not the { data } envelope.
- GET /.well-known/openid-configuration → the gateway discovers the issuer, JWKS URI, and endpoints
- GET /.well-known/jwks.json → the public keys used to validate access tokens
- GET /healthz → liveness (the orchestrator restarts the pod if this stops returning 200)
- GET /readyz → readiness (DB + Redis; 503 while draining so traffic is held back)
- POST /internal/validate → the gateway forward-auths here on a decision-cache miss
/.well-known/openid-configurationpublicOIDC discovery metadataRaw response (not enveloped). The gateway discovers the issuer, JWKS URI, and endpoints.
Field guide — what each value means & where it comes fromno inputs
No request body, path params, query params, or required headers. This is a public OIDC discovery endpoint that needs no authentication (no Authorization header, no x-gateway-context); it returns raw OIDC metadata (issuer, jwks_uri, token_endpoint, supported signing algs).
GET https://api.kerja.team/.well-known/openid-configurationResponse guide — what comes back & what each value means4 fields
200 OK with a RAW JSON body (NOT wrapped in the { data } envelope); standard OIDC discovery metadata. No notable response headers (public endpoint, no Set-Cookie or no-store).
issuerstringalwaysjwks_uristringalwaystoken_endpointstringalwaysid_token_signing_alg_values_supportedarrayalwaysES256— ECDSA using P-256 and SHA-256 — the only signing algorithm this IAM uses for its tokens.
/.well-known/jwks.jsonpublicPublic signing keys (JWKS)Raw JWKS (the shared issuer's keys — operator access tokens are verified against these too). Honor Cache-Control: key rotation is a two-key overlap so cached keys keep validating across a rotation.
Field guide — what each value means & where it comes fromno inputs
No request body, path params, query params, or required caller headers. This is a public endpoint (no authentication required); it returns the shared issuer's public JWKS signing keys as a raw, unwrapped JSON response used to verify tokens this service issues.
GET https://api.kerja.team/.well-known/jwks.jsonResponse guide — what comes back & what each value means8 fields
200 OK with a RAW body (NOT wrapped in the { data } envelope) — a standard JWKS document with a single top-level "keys" array of public signing JWKs used to verify tokens this service's shared issuer signs. No notable Set-Cookie/Cache-Control headers documented.
keys[]arrayalwayskeys[].ktyenumalwaysEC— Elliptic-curve key (the issuer uses EC/ES256 signing keys).
keys[].crvenumalwaysP-256— NIST P-256 curve used for ES256 signatures.
keys[].kidstringalwayskeys[].xstringalwayskeys[].ystringalwayskeys[].algenumalwaysES256— ECDSA using P-256 and SHA-256 — the issuer's token signing algorithm.
keys[].useenumalwayssig— Signature key — used to verify token signatures.
/healthzpublicLiveness probeRaw { status: ok } while the process is up.
Field guide — what each value means & where it comes fromno inputs
No request body, no path/query params, and no required caller headers. Public liveness probe — no authentication needed; always returns 200 { "status": "ok" } while the process is up.
GET https://api.kerja.team/healthzResponse guide — what comes back & what each value means1 field
200 OK liveness probe. The body is a RAW JSON object, NOT wrapped in the { data } envelope. Returns { "status": "ok" } whenever the process is up; no notable response headers.
statusenumalwaysok— The process is up and serving; the only value ever returned by this liveness probe (it does not check downstream dependencies).
/readyzpublicReadiness probeChecks DB + Redis. Returns 503 while draining for shutdown or when a dependency is down — a 503 during graceful shutdown is EXPECTED, not a fault.
Field guide — what each value means & where it comes fromno inputs
No request body, path params, query params, or required caller headers. This is a public readiness probe (no Authorization or x-gateway-context needed); it returns 200 {"status":"ok"} when DB and Redis respond within the timeout, or 503 when the service is draining ("shutting_down") or a dependency failed/timed out ("unavailable").
GET https://api.kerja.team/readyzResponse guide — what comes back & what each value means1 field
200 OK on a healthy service. The body is a RAW JSON object, NOT wrapped in the { data } envelope. On success only one field is returned: { "status": "ok" }. (Failure is 503 with status "shutting_down" or "unavailable" plus a traceId — not part of the success shape.)
statusenumalwaysok— Service is ready: DB and Redis healthy within timeout and not shutting down. Only value returned on a 200 success.
/internal/validatepublicGateway forward-auth checkInternal (server-to-server) only — never routed through the public gateway in production. On a DECISION-CACHE MISS the gateway forward-auths here for an authoritative live revocation/membership/role check before admitting the request, returning the current { sub, tenant_id, roles, sid }. A warm decision cache lets the gateway admit requests without this hop; it fails closed if IAM is unreachable.
Field guide — what each value means & where it comes from1 field
Internal forward-auth endpoint for the API gateway — no request body, no query/path params. The subject is the bearer access token to be validated (the tester/gateway supply Authorization; you do not type it). Beyond that, the only caller-supplied header is x-internal-key, a shared secret required only when INTERNAL_API_KEY is configured (skipped in local dev).
x-internal-keyheaderstringconditionalout-of-bandPOST https://api.kerja.team/internal/validateResponse guide — what comes back & what each value means4 fields
Success is 200 OK returning the { data } envelope with the authoritative live principal { sub, tenant_id, roles, sid }; roles are read from the live membership, not the token claim. Read-only (no audit row, no state change) and always sent with Cache-Control: no-store; no Set-Cookie. The gateway caches a successful result briefly, but 401/403 denials are never cached.
data.subUUIDalwaysdata.tenant_idUUIDalwaysdata.roles[]arrayalwaysdata.sidstringalways