Skip to content

Bring your identity provider

Plat5 accepts signed JWT access tokens (RFC 9068) from any provider that publishes its signing keys (JWKS). OpenID Connect providers issue them, but OpenID Connect isn’t required: the gateway reads only the access token. Your services never see the token, so the provider you choose doesn’t change them.

Locally, the CLI runs Plat5 Auth for you. To use your own provider locally too, turn modules.auth off in plat5.local.yml and fill in idp: (issuer, JWKS URL, audiences, subject claim, name claims). In production, use Plat5 Auth or point the gateway at your own provider.

Configure the gateway with AUTH_ISSUER, AUTH_JWKS_URI (optional when OIDC discovery is enabled), AUTH_ALLOWED_AUDIENCES, AUTH_SUBJECT_CLAIM, and AUTH_NAME_CLAIMS — see identity providers and environment for the full contract and defaults.

Tokens must be signed with a key from the JWKS, have an exp, carry a kid header and an audience you allow, and a non-empty subject claim.

Auth0
AUTH_ISSUER=https://acme.us.auth0.com/
AUTH_JWKS_URI=https://acme.us.auth0.com/.well-known/jwks.json
AUTH_SUBJECT_CLAIM=sub
AUTH_ALLOWED_AUDIENCES=https://api.acme.com
Keycloak
AUTH_ISSUER=https://id.acme.com/realms/acme
AUTH_JWKS_URI=https://id.acme.com/realms/acme/protocol/openid-connect/certs
AUTH_SUBJECT_CLAIM=sub
AUTH_ALLOWED_AUDIENCES=acme-api
Plat5 Auth
AUTH_ISSUER=https://auth.acme.com
AUTH_JWKS_URI=https://auth.acme.com/.well-known/jwks.json
AUTH_SUBJECT_CLAIM=sub
AUTH_ALLOWED_AUDIENCES=plat5

The first time someone signs in, Plat5 creates a user and links them to the provider’s issuer and subject. Your services hold Plat5’s ids, never the provider’s subject.

A user has one name in every organization. On sign-in, if their name is still empty, the gateway checks AUTH_NAME_CLAIMS in order (default name,preferred_username) and seeds the first non-empty claim. Once set, the user (PATCH /user) or your team can change or clear it at any time. Many providers leave names out of access tokens, and Plat5 Auth’s carry none, so a user can start with no name. More: a user’s name.

Most users join by invite. To add someone before they’ve signed in, by issuer and subject, use identity’s service API (POST /nodes/{root_id}/members, identity’s API) from your admin console or provisioning. It isn’t a customer route: it trusts the caller to name a user by their provider’s subject. A deployment that wants it at the gateway adds the route.

  • The issuer must match exactly. http://localhost:5401 and http://127.0.0.1:5401 are different issuers.
  • The JWKS URL must be reachable from the gateway, usually the provider’s public URL.
  • Sign-in options are the provider’s. Single sign-on, social login and MFA all come from your provider.
  • Choose the subject claim before the first sign-in. Changing it later signs everyone in as a new user.
  • Moving users between providers means linking their new subject to their existing user, which is a database change, not an API call. A sign-in from a new provider creates a new user.

More: identity providers.