Skip to content

Identity layer, part 2: OpenID Connect sign-in and just-in-time provisioning (Phase 1) #459

Open

Description

@caseysoftware

Intent: sign in with any OpenID Connect identity provider, and create or update users from what it sends.

Steps

  • w2p_Auth_Provider_Oidc on league/oauth2-client + firebase/php-jwt: discovery, authorization code with PKCE (S256), state/nonce, ID-token validation (signature against cached JWKS, iss, aud, azp, exp/iat, allowed algorithms), optional userinfo, RP-initiated logout.
  • Front controller auth.php (/login/{slug}, /callback/{slug}) using PATH_INFO.
  • Several providers at once; "Sign in with …" buttons on style/bootstrap/login.php.
  • Account resolution: linked identity → link policy (How are existing users linked to their IdP identities on rollout? #447) → JIT → reject. Username mapping per Which claim becomes the web2project username for SSO users? #446.
  • JIT: create and update user and contact from claims (Should contacts created for SSO users be private by default? #456), default role, group claim → role mapping with grant provenance (external_groups, external_group_roles, user_role_grants; Should IdP groups add to manually assigned roles or replace them? #448).
  • Login policy: local login for everyone, break-glass users only (?login=local), or off; self-registration and lost password refused for SSO-only users.
  • Admin: System Admin › Identity & Single Sign-On (providers with "Test sign-in", provisioning, groups → roles, login policy); user Sign-in tab (source, status, linked identities, sign out everywhere, disable/enable).
  • Keycloak in CI.

Goal: sign-in works with Keycloak (CI), Entra ID, Okta and Google Workspace, and a first sign-in creates a usable account with the mapped roles.

Depends on #458. Spec: Identity Layer proposal (#435).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions