Planning Équipes

Search Français Let’s talk

Connect your corporate directory (OIDC)

For your organisers to sign in with their company account and the second factor of your identity provider (Keycloak, Zitadel, ADFS 2016 or later, any OpenID Connect provider), declare the application with it, set a few variables, then create the accounts. It is optional: with no configuration, the configuration’s admin account opens the administration.

What the provider does, what the application does

  • The provider says who signs in (a stable subject, an address) and carries the second factor.
  • The application decides what the person can do: the compte table (the person) and the habilitation table (their rights: ADMIN, ORGANISATEUR or RESPONSABLE_STAND). With no active account carrying a right in force, the session opens nothing, whatever roles the provider’s token holds. Signing in creates no account.
  • Staff members have no account: their space opens through the personal link and the code received by e-mail, with or without a provider.

Declare the application with the provider

For Keycloak, the step-by-step is in Connect Keycloak. Create a confidential client (“authorization code” flow with PKCE), then declare these two addresses, exact and with no wildcard (the redirect_uri follows the request’s Host header: a wildcard would let an unexpected host receive the code):

Address Value
Redirect after sign-in <PUBLIC_URL>/api/auth/oidc/login (the sign-in route also serves as the return of the authorization code)
Redirect after sign-out <PUBLIC_URL>/login

The provider must be able to announce the user’s address: the scopes requested by default are profile and email.

Set the variables

Variable Role Default
OIDC_ENABLED Connects the provider false
OIDC_AUTH_SERVER_URL The issuer, the same URL seen from the browser and the container (empty)
OIDC_CLIENT_ID Client identifier planning-app
OIDC_CLIENT_SECRET Confidential client secret, 32 characters at least: startup is refused otherwise, Quarkus encrypting the PKCE state with it (empty)
OIDC_REQUIRE_EMAIL_VERIFIED Links an account by address only if the provider declares it verified. false for a directory (ADFS) that never sends email_verified; never for a provider where anyone registers an address true
OIDC_SCOPES Scopes requested profile,email
OIDC_PRINCIPAL_CLAIM Claim carrying the person’s address email
OIDC_FORCE_HTTPS https redirects behind a proxy that terminates TLS false
OIDC_POST_LOGOUT_PATH Page the person lands on after sign-out /login
OIDC_SESSION_AGE_EXTENSION Session extension when the token is refreshed 30M
OIDC_CONNECTION_DELAY How long provider discovery is retried at startup, the application possibly being ready before it 30S
OIDC_MCP_AUDIENCE Audience required of an OAuth token presented to the MCP server (mcp-connexion.md) planning-mcp
ADMIN_LOCAL_SECOURS Opens (true) or closes (false) the emergency account. Absent: closed behind a provider, open without (empty)

Behind a proxy that terminates TLS, set OIDC_FORCE_HTTPS=true; if the proxy does not forward the scheme, add QUARKUS_OIDC_AUTHENTICATION_COOKIE_FORCE_SECURE=true.

Create the first account and sign in

Do it before leaving the emergency account closed: otherwise nobody gets in the day the provider forgets you.

  1. Sign in as admin (ADMIN_PASSWORD), open Settings › Accounts, create your account (your address) and grant it the ADMIN right.
  2. Sign in through the provider with that address. If the provider declares it verified, the account binds to the issuer + subject pair: from then on only that subject designates it (another person taking the same address gets nothing, an address change does not block the owner).
  3. Check that the administration opens, then leave ADMIN_LOCAL_SECOURS absent (or false).

After that, an administrator creates the account (address, name) and grants a right; the person binds on their first sign-in the same way. Deactivating an account cuts its access at the next request, without touching the provider. The Settings › Accounts screen, visible only to administrators (an organiser does not see it and the server refuses it with 403), lets you add, deactivate and reactivate an account, grant and withdraw a right by role and edition; the refusal to deactivate the last administrator, or to deactivate yourself, is shown as the server says it. What each role opens: Knowing what each role can call.

Change the provider’s URL

The account being bound to the issuer + subject pair, if the issuer’s URL changes (migration, new domain), no subject matches any more and nobody can sign in, administrators included:

  1. Reopen the fallback: ADMIN_LOCAL_SECOURS=true, then restart (the emergency account).

  2. Unlink the accounts in the database, so they relink at their next sign-in (verified address):

    UPDATE compte SET oidc_sujet = NULL;
    
  3. Change OIDC_AUTH_SERVER_URL, restart, sign in again through the provider.

  4. Close the fallback again: remove the variable and restart.

What the provider does not cover

  • The configuration’s admin account (ADMIN_PASSWORD) is the emergency door, closed by default behind a provider; the threat, the preparation and what to do are in Choose and protect the admin login.
  • Local accounts with a password stay open behind a provider (local accounts).
  • The MCP server also accepts an OAuth token from the provider, under the same rights; its API key remains usable. The responsable_stand role opens only /api/responsable/* and organisateur only the editions its rights name: the instance routes reserved to administrators are in Knowing what each role can call.

A mistake, an omission? Fix this page on GitHub. (external site)

A question no guide answers?

Let’s talk See hosting