Skip to content

Multiple OIDC login providers

Last updated: 2026-11-21T08:59:43-03:00 (UTC-3)

A separate federated MFA catalog can require signed context/method proof and authentication freshness for an existing profile. It does not add fields to the original five-field named-provider policy. Changes invalidate the affected MFA authority without granting a role or altering another provider.

Offer several corporate sign-in buttons on the console login screen. Each named provider has its own issuer, client, callback and explicit links to existing gateway users. Up to eight named profiles coexist with the existing single OIDC and SAML logins. Named OIDC is a separate, opt-in feature; an empty configuration changes no existing login.

This profile implements standard OpenID Connect. Its local qualification uses Keycloak 26.4.0 and PostgreSQL 16.15, two gateway processes and two real realms with deliberately equal subjects. The two isolated IdP instances are test infrastructure, not a deployment requirement: multiple realms on one IdP are supported with their own real subjects. Native Google/Microsoft profiles additionally have real Web-client/account qualification; this is separate evidence from Keycloak. GitHub user OAuth is not OIDC and is not supported by this native profile; the owner removed that separate delivery from the T085 requirement.

Setting Default Purpose
features.oidc_providers false Enable the configured named login profiles
features.oidc_provider_management false Permit global administrators to edit their access policies
features.google_oidc_login true Standby admission for official Google named profiles; parent/runtime and explicit local links still required
features.microsoft_oidc_login true Standby admission for official organizational-tenant Microsoft named profiles
admin.oidc_providers [] Boot-admitted provider trust and declared access policies

Named runtime also requires ui, console_users and oidc_login, the existing session signing key, PostgreSQL and the secret for each configured client. A named-only deployment needs no legacy admin.oidc. Management can stage a declared provider while named runtime is off. Flags enable behavior; they never grant a local role, membership or custom permission.

features:
ui: true
console_users: true
oidc_login: true
oidc_providers: true
oidc_provider_management: true
admin:
allow_insecure_http: false
oidc_providers:
- id: employees
label: Employee sign-in
disabled: true
issuer_url: https://identity.example.com/realms/employees
client_id: gateway-console
client_secret_env: GATEWAY_EMPLOYEE_OIDC_SECRET
redirect_url: https://gateway.example.com/api/v1/admin/auth/oidc/employees/callback
allowed_endpoint_origins: []
allow_loopback_http: false
post_logout_redirect_url: https://gateway.example.com/ui
session_epoch: initial-v1
subject_users: {}
group_policy: null

Each entry of admin.oidc_providers (at most 8) takes these keys. Trust keys are boot-only; the access policy keys (label, disabled, session_epoch, subject_users, group_policy) can also be replaced from the console or the API, see below.

Key Default What it does
id required Lower-case identifier of the profile; it is part of its callback path and never changes
issuer_url required The provider’s issuer, compared byte for byte with the token’s iss; HTTPS, at most 2048 bytes
client_id required The confidential client registered at the provider, at most 512 bytes; an active issuer/client pair may appear only once
client_secret_env required Name of the environment variable or Secret key that holds the client secret (at least 8 bytes)
redirect_url required The registered callback, exactly /api/v1/admin/auth/oidc/<id>/callback on the console origin
post_logout_redirect_url empty Where the provider returns the browser after an RP-initiated logout; must be on the console origin
allowed_endpoint_origins [] Up to 8 extra exact HTTPS origins (no path) for the provider’s token and JWKS endpoints
allow_loopback_http false http://localhost for local development only, together with admin.allow_insecure_http: true

The example stages a disabled provider without fabricating a user link. Create the confidential OIDC client, require Standard Flow and PKCE S256, and register the exact callback and optional post-logout URL. Put its secret in the referenced environment variable or an existing Kubernetes Secret. Create the local user in Console users, obtain its gateway-generated ID and the immutable sub from the trusted IdP. Add that exact subject→user link, then enable the provider. Do not use an email address as a substitute for sub.

Local HTTP is limited to explicit loopback development with both allow_loopback_http: true and admin.allow_insecure_http: true. It is not a private-network or production exception. Endpoint origins are exact HTTPS origins, not wildcard domains. Discovery, token and JWKS requests do not follow redirects.

Console users → Named OIDC providers and the administrative API expose the same declared/effective policy, override, source, current generation, version and base fingerprint.

Fields Change procedure
label, disabled, session_epoch, subject_users, group_policy Complete versioned policy replacement through console/API, or reviewed YAML baseline
ID, issuer, client ID, secret reference, redirect, endpoint origins, loopback and post-logout redirect Boot trust: edit YAML and restart; shown read-only/restart-required in the console/API
Secret value Operator-owned Secret/ENV; never returned by a read or export

A policy replacement supplies all five mutable fields. group_policy: null explicitly clears it; otherwise it contains claim, match (any or all) and required_groups. An enabled provider requires at least one valid explicit local-user link. With oidc_group_policy enabled, every active named provider also needs its explicit valid group restriction. Groups restrict sign-in; they do not assign access.

Only a builtin global administrator with current oidc_providers:manage authority may access the management API. Custom role ceilings and classified enterprise write restrictions still apply. An operator, viewer or team administrator does not inherit this authority. Mutations require CSRF and current version/base guards, validate the whole resulting configuration and record a correlated metadata-only audit event. A stale version or unreviewed baseline drift is a conflict. Validation, authorization and CAS failures change no policy. If the database commit succeeds but the local configuration refresh fails, 503 configuration_sync_pending explicitly means the policy was committed: read the catalog before attempting another mutation; do not replay the previous PUT blindly.

A console override takes precedence over the declared YAML policy. Revert removes an existing override and returns to the declared policy; it does not delete the boot provider or its users. Adopt base explicitly accepts a reviewed changed YAML baseline. Do not use adoption to bypass reviewing the complete declared provider set. A trust change or ID addition/removal uses a coordinated restart and reviewed base adoption; authentication remains closed while authority is unresolved.

Client secrets are captured by the named runtime generation. Replacing material under the same secret reference does not change a callback midway. Every secret-material rotation and rollback requires a deliberate session_epoch/security-generation change. Deliver the intended material and coordinate replicas so they use the same trust, epoch and current secret. A restart applies material but is never a substitute for durable revocation; restarting with an old secret and unchanged epoch is not a supported rotation/rollback procedure. A label edit does not recapture secret material or revoke sessions. Preserve recovery access through an authorized named administrator or the explicitly configured bootstrap flow.

All paths below have versioned canonical URLs. The API access menu contains runnable examples that discover the current ID and version rather than embedding a real secret or fictional user.

Method and path Result
GET /api/v1/admin/auth/providers Anonymous, minimal {id,label,login_url} list
GET /api/v1/admin/auth/oidc/{id}/start Browser redirect, with a provider-specific encrypted flow cookie
GET /api/v1/admin/auth/oidc/{id}/callback Same-browser code/state callback; verified local session
POST /api/v1/admin/auth/oidc/{id}/backchannel-logout Optional authentic IdP-signed logout, scoped to that provider
GET /api/v1/admin/oidc-providers Private administration catalog
GET /api/v1/admin/oidc-providers/{id} Declared/effective/override policy and boot trust detail
PUT /api/v1/admin/oidc-providers/{id} Complete mutable-policy replacement
DELETE /api/v1/admin/oidc-providers/{id} Remove an existing policy override
POST /api/v1/admin/oidc-providers/adopt-base Adopt the reviewed declared baseline

The PUT body is {version, expected_base_fingerprint, provider}. DELETE and adoption take {version, expected_base_fingerprint}. Successful writes return 204: fetch the current catalog afterward. Reads are private/no-store; public login metadata includes no issuer, client/secret reference, subject map or administration fetch. The browser renders labels as text and accepts only exact same-origin provider start paths.

The callback verifies the selected issuer, sole client audience, optional authorized-party claim, signature, expiry, nonce, PKCE, browser state and current durable provider generation. A present authorization-response iss must match that issuer before code exchange. If trusted discovery declares support for this parameter, a missing iss is also refused. Different providers have different callback paths, flow cookies and cryptographic binding domains; parallel browser flows cannot borrow another provider’s state.

Named identities resolve only through that provider’s current subject_users map. Two realms with the same subject or email can map to different local users. There is no email/domain merge, global SCIM externalId lookup, claim-to-role grant or automatic JIT creation on this path. An administrator may explicitly link an existing SCIM-created local user; that user’s current active state remains authoritative. The legacy JIT and singleton OIDC behavior are unchanged.

Security edits advance persistent generations. Disable/re-enable, flag off/on, removal/recreation, mapping or group changes and baseline security drift cannot revive old flows or sessions by restoring an earlier value. Local role, membership, disabled state and custom ceilings are checked against current storage. A delayed discovery or callback cannot issue authority after its generation is withdrawn. Label-only edits retain sessions.

Optional RP and backchannel logout select the authenticated named provider. Another provider and legacy/local-token sessions are independent. A logout token does not contain the gateway generation: a database-clock iat fence also considers the verifier’s existing 30-second positive clock-skew allowance. Consequently, backchannel tokens are conservatively refused for up to 31 seconds after a security-generation change. This is a timestamp/skew safeguard, not cryptographic proof of when the token was minted; an IdP retry is not promised. Configuration-triggered session invalidation is immediate, and local/RP sign-out remains available.

The tested Keycloak logout profiles distinguish session-specific notifications from subject-wide logout. Configure that distinction at the IdP; the gateway never guesses which unnotified sessions to revoke.

The named issued-at precheck matches the existing SQL five-minute-plus30second past and30second future fence; nonce/state freshness and durable authority remain independent checks. A failed new login preserves a valid earlier session, with an explicit console warning and finite diagnostics. A page that still opens under the earlier cookie is not evidence that the new provider succeeded.

  • At most eight named providers; IDs match [a-z][a-z0-9_-]{0,63} and cannot be oidc or saml. Reject duplicate IDs and duplicate active issuer/client pairs, including the legacy profile.
  • Labels: 80 UTF-8 bytes. Security epochs: 1–64 ASCII letters, digits, _ or -.
  • Up to 1,000 subject links per provider, each subject at most 255 UTF-8 bytes. Local user IDs are generated by the gateway.
  • Up to 20 required groups, 256 UTF-8 bytes each, with a top-level claim name at most 64 bytes; reserved identity/security claim names are refused.
  • At most eight extra trusted endpoint origins per provider. Management JSON is limited to 1 MiB. The API publishes the exact current limits.
  • Existing bounded OIDC discovery, JWKS, token, callback admission and cancellation rules apply. Discovery failure, malformed state, invalid local authority or PostgreSQL outage issues no session. A flag or hidden button is never the authorization boundary.

Request IDs and W3C trace context correlate safe start/callback activity, outbound calls and administrative audits. A newly issued named flow encrypts its origin IDs. After validating the callback flow, the contextual oidc_callback_origin event joins origin_request_id, origin_trace_id and origin_span_id to the callback’s own IDs. Existing JSON and OTLP log export carry these fields; this profile does not claim a separate OTLP span-link implementation. OAuth codes/state, verifiers, cookies, tokens, claims, secrets and subject maps are never telemetry payloads.

See OIDC, groups, logout, access control, configuration parity and the OpenAPI contract.

m7gtw[email protected]