OIDC Authentication
Use OIDC auth when your identity provider issues access tokens and Zerq should validate them against issuer and audience settings.
What this method does
Authorization: Bearer <oidc_access_token>X-Client-IDX-Profile-ID
When to use
- Enterprise SSO / IdP-managed identity architecture
- Centralized token governance and rotation
- Teams needing issuer/audience-based trust controls
How to configure
- Set profile auth type to
oidc. - Configure issuer, audience, and JWKS validation settings.
- Confirm role/scope expectations for caller tokens.
- Bind profile to collections and policies, then publish.
Example
curl -i https://gateway.example.com/orders/123 \
-H "Authorization: Bearer $TOKEN" \
-H "X-Client-ID: acme-mobile" \
-H "X-Profile-ID: partner-prod" \
-H "Accept: application/json"
Verify
- Token from configured issuer/audience ->
200. - Wrong issuer/audience ->
401. - Valid token with wrong profile binding ->
403. - Burst traffic above policy ->
429.
Troubleshoot
401on every request: issuer/audience/JWKS mismatch.- Intermittent
401: token expiry/clock skew. 403: profile scope or policy constraints block access.
Certificate-bound tokens (RFC 8705)
An OIDC profile can additionally require that the bearer token itself be cryptographically bound to the caller's mTLS client certificate, per RFC 8705. This is a stronger property than ordinary bearer-token validation above: a token that is stolen (leaked in a log, intercepted, copied off a compromised server) is useless to an attacker unless they also hold the exact private certificate it was bound to at issuance.
This is different from the mtls auth type (mTLS), which authenticates the TLS connection itself but is unrelated to any bearer token. Certificate-bound tokens combine both: a normal OIDC bearer token, plus a check that the certificate presented on this specific connection matches the certificate the token was issued for.
To enable it:
- Set the profile's auth type to
oidc(this option is not available on other auth types). - Set
requireCertificateBoundToken: trueon the profile, via the management API or an MCP management tool (update_profile/create_profile). There is no dashboard toggle for this yet. - Configure your authorization server to issue certificate-bound tokens for this client. For Keycloak, enable "OAuth Mutual TLS Certificate Bound Access Tokens" on the client's Advanced settings — without this, tokens will never carry the confirmation claim the gateway checks for, and every request will be rejected.
- If TLS terminates at a reverse proxy in front of the gateway (the default production topology), the proxy must be configured to forward the client certificate to the gateway. See Forwarding mTLS client certificates through Nginx Proxy Manager for the exact configuration.
Once enabled, a request with a valid bearer token but no matching certificate (or no certificate at all) is rejected with 401, even though the same token would otherwise pass ordinary OIDC validation.
Scope note: this covers the mTLS certificate-binding half of FAPI 2.0's sender-constrained-token requirement. DPoP (the non-mTLS alternative) is not currently supported.