Zum Inhalt springen

Generic OIDC

The Generic OIDC template is for any application that can sign users in with an OpenID Connect provider (authorization code flow) and has no template of its own. OkYouIn is the provider; the application is the relying party. The protocol details — endpoints, tokens, key rotation, logout semantics — are in OpenID Connect.

TestVersionModesResult
OpenID Foundation conformance suite, plan Basic OP (client_secret_basic and client_secret_post)5.3.4passwordNo failures; 5 warnings, all by design (below)
OpenID Foundation conformance suite, plan Config OP5.3.4passwordPassed

The warnings are deliberate behaviour:

  • scope claims are sent in the id_token as well as from userinfo;
  • email_verified is not sent (OkYouIn does not verify e-mail addresses);
  • no acr claim — amr tells whether MFA happened;
  • the claims request parameter is not supported.

(given_name and family_name, which the first run warned about, are sent since.)

ItemValue
Discovery URLhttps://mfa.example.com/oidc/.well-known/openid-configuration
Issuerhttps://mfa.example.com/oidc
Flowauthorization code (response_type=code)
Client authenticationclient_secret_basic, client_secret_post, or none (public client with PKCE)
PKCES256 only; required for a public client
Scopesopenid, profile, email, groups
Claimspreferred_username, name, given_name, family_name (profile); email when the user has one (email); groups (groups)
Token signingRS256
LogoutRP-initiated, at the end-session URL
  • The application must be served over HTTPS. OkYouIn accepts only https redirect URIs — http only for localhost, 127.0.0.1 and [::1].
  • OkYouIn’s public URL (Settings ▸ General) must be an https:// address: without it there is no issuer and every /oidc/ endpoint answers 503.
  • Create the application in Access ▸ Applications ▸ Add application ▸ Generic OIDC:
    • Client type — Confidential (a server-side application that keeps the client secret) or Public (a browser or mobile application that cannot keep a secret; it must use PKCE).
    • Redirect URIs — one per line, exactly as the application sends them; no wildcards.
    • Post-logout redirect URIs — where the application may send the browser after signing out of OkYouIn; empty means OkYouIn’s “Signed out” page.
    • Session lifetime (hours) — how long one MFA serves this application.
  1. In the application, add an OpenID Connect provider.

  2. Point it at OkYouIn: the discovery URL above (or the endpoints by hand: /oidc/authorize, /oidc/token, /oidc/userinfo, /oidc/jwks, /oidc/end_session under https://mfa.example.com), the Client ID and Client secret from the Connect tab, and the scopes openid profile email groups.

  3. Match the callback. The application’s callback must equal one of the Redirect URIs exactly.

  4. Sign-out (recommended). Point the application’s logout to the end-session URL with id_token_hint and a post_logout_redirect_uri from the list. Without an id_token_hint OkYouIn asks “Sign out?” first.

  5. Allow the application in the policy and sign in with a test user.

On the application’s Rules tab, a rule can add claims — for example role=Admin for one group. Rule claims are added to every id_token and userinfo answer, whatever scopes the client asks for. Protocol and standard claims, groups and names starting with okyouin: are reserved.

  • An end-session request ends the OkYouIn session and the tokens it issued. The application’s own session is the application’s business: OkYouIn does not notify other applications (no front-channel or back-channel logout).
  • Revoking a session in Logging ▸ SSO sessions has the same reach: the next sign-in asks for the password, but applications that are already signed in stay signed in until their own session ends.
  1. Sign in through the application with a test user: OkYouIn’s sign-in page asks for the password and the second factor, then returns to the application.
  2. Logging ▸ SSO sign-in log shows each step; refused requests carry a reason such as “Redirect URI not registered”, “PKCE required” or “Wrong client secret”.
SSO sign-in log reasonFix
Redirect URI not registeredAdd the exact callback URL to Redirect URIs.
PKCE requiredA public client must send a code_challenge (S256).
Wrong client secret / Invalid client authenticationCopy the secret again from the Connect tab; send it either as Basic auth or in the body, not both.
Invalid scope (no openid)Add openid to the requested scopes.
Post-logout redirect URI not registeredAdd the URL to Post-logout redirect URIs.
HTTPS requiredThe application or a proxy reached OkYouIn over plain HTTP.