Skip to content

v0.13.0

Choose a tag to compare

@Islamawad132 Islamawad132 released this 18 Nov 07:53
· 104 commits to dev since this release
aac2b2e

Sign in through SAML, and finishing what 0.12.0 started. Users can now sign in through a SAML 2.0 identity provider (Entra ID, Okta, ADFS, Google Workspace, Keycloak). Ending a session now tells the apps through OpenID Connect Back-Channel Logout, wherever the session ends. SCIM covers what Entra ID and Okta send, passwords included, and an admin's MFA reset now removes passkeys too. Authentik has a migration guide and a CLI command.

Before you upgrade

  • Database migrations run at startup. They add password_histories.password_algorithm, users.scim_external_id, users.scim_profile and groups.scim_external_id (all nullable, with an index on each externalId column), and the tables saml_broker_requests and saml_broker_assertion_ids. Two rewrite identity provider types stored as a supported type in another case (OIDC, OAuth2, SAML) to oidc / oauth2 / saml. No other existing data changes, and no one is signed out by the upgrade.
  • Check GET /admin/upgrade/health after the upgrade for the new identity_provider_types warning: SAML providers stored before 0.13.0 have no SAML configuration yet, and other types the broker does not use are listed (below).
  • Behaviour you may notice:
    • an admin's full MFA reset (DELETE .../users/{id}/mfa) now also removes the user's passkeys, unless ?keepPasskeys=true;
    • wrong current passwords in the account console now count toward the account lock;
    • apps with a backchannelLogoutUri now get a logout token whenever Idenplane ends a session (admin sign-out, password or MFA reset, disabling, session limits, refresh-token reuse, the idle timeout), not only on the user's own sign-out, and only the apps the session was used with; logout tokens carry typ: logout+jwt; a backchannelLogoutUri on a link-local or cloud-metadata address is refused (BACKCHANNEL_LOGOUT_ALLOW_LINK_LOCAL=true allows link-local);
    • a logout that names only the user (sub without sid) no longer ends their offline sessions.
  • If you provision users with SCIM (see Changed below):
    • PATCH /Groups/{id} answers 204 No Content unless the request has an attributes or excludedAttributes query parameter;
    • PUT /Users/{id} clears the stored attributes the body leaves out, and PUT /Groups/{id} without members leaves the group empty, as RFC 7644 replaces;
    • SCIM userName, email and group names are unique case-insensitively, so a create that differs only in case from an existing one is a 409;
    • a password sent through SCIM is now set, checked against the realm's password policy, and signs the user out everywhere.

Security

  • An admin's "Reset MFA" now removes the user's passkeys too. DELETE /admin/realms/{realm}/users/{id}/mfa removed the authenticator app, the SMS phone and the recovery codes, but left every WebAuthn credential. A passkey signs in on its own, without the password, so a passkey registered by whoever took an account over kept working after the reset meant to recover it. The full reset now removes the user's passkeys as well, and still signs the user out everywhere. Passkeys carry no flag saying whether they are used passwordless or as a step-up, so the reset cannot tell an attacker's from the user's own: an admin who knows they are the user's passes ?keepPasskeys=true (or ticks Keep the user's passkeys in the console), and any other value than true/false is refused with 400. New routes list a user's passkeys (GET .../users/{id}/mfa/passkeys) and remove one (DELETE .../users/{id}/mfa/passkeys/{credentialId}, with the same MFA step-up as the other MFA routes, and signing the user out everywhere). GET .../mfa/status also returns passkeys, the number of the user's passkeys; enabled and methods are unchanged. The console's user Security tab lists the passkeys with a Remove button each, and offers Reset MFA for a user whose only credentials are passkeys. A user who signs in with passkeys only cannot sign in after a full reset until an admin sets a password or the user resets it.
  • A migrated user's imported password is now part of the password history. Password history only held hashes Idenplane wrote itself, so a user imported from Keycloak, Auth0, Authentik or Zitadel (or whose password was set while passwordHistoryCount was 0) could "change" their password to the same one. The user's current password now always counts as used, checked in its own format (Argon2, bcrypt, PBKDF2, and the unlabelled PBKDF2 rows imported before 0.11.0, with the user's passwordAlgorithm). When a password is replaced, the old hash is added to the history if it was not there yet, with its algorithm, so it stays refused for the next changes too. Migration: adds the nullable password_histories.password_algorithm.
  • Wrong current passwords in the account console now count toward the account lock. The account console asks for the current password before changing the password, adding or removing an SMS phone, turning off the authenticator app, and requesting or cancelling account deletion. Those checks were only rate-limited per IP, so someone holding a user's session (a shared computer, a stolen cookie) could keep guessing the password from several addresses without ever locking the account. A wrong password there is now a login failure, with the same limits as the sign-in page (maxLoginFailures within failureResetTime locks the account for lockoutDuration, and permanentLockoutAfter applies); while the account is locked these forms are refused without checking the password; the right password clears the failures, as a sign-in does. An empty password field is not counted.
  • SCIM sets passwords, with the realm's password policy and the usual sign-out. SCIM accepted password and silently dropped it, so an IdP that synced passwords (Okta's Sync Password) left users with no password or an old one. A password sent on POST /Users, PUT /Users/{id} or PATCH (path password, the URN-prefixed path, or a path-less {"password": ...}) is now checked against the realm's policy and password history, refused with 400 invalidValue naming the rule (nothing in the request is applied), hashed with Argon2id, and never returned or logged. Setting it is a credential reset, as when an admin sets it: the user's sessions and refresh tokens (offline ones included) and proxy sessions end, brute-force failures are cleared, and the history is updated. Re-sending the user's current password is not a change, so Okta's updates do not sign users out or trip the history check. ServiceProviderConfig now reports changePassword.supported: true. A user federated from LDAP never gets a local password through SCIM, which would silently move them from LDAP to local password sign-in: a PATCH setting their password is refused with 400 mutability (nothing in the request is applied), and the password in a PUT is dropped while the rest applies, so Okta's password-synced profile updates keep working.
  • SCIM phoneNumbers are stored apart from the SMS MFA number. The new SCIM profile keeps phone numbers as provisioning data only; users.phone_number (the verified SMS factor) is never written by SCIM. The user's own data export (account console) includes the SCIM externalId and profile; realm exports leave them out, since the IdP writes them again on its next sync.
  • Ending a user's sessions now tells the apps (OpenID Connect Back-Channel Logout). When Idenplane ended sessions itself, clients with a backchannelLogoutUri were not told and kept the user signed in: only the user's own sign-out sent logout tokens. Now every OAuth session that ends sends one to each client it was used with: an admin ending one session (DELETE /admin/realms/{realm}/sessions/{id}, and continuous verification ending a risky session) or all of a user's (DELETE /admin/realms/{realm}/users/{id}/sessions), disabling or deleting a user, SCIM deactivation, every credential change that signs the user out everywhere (a password set, reset or changed, second factors removed), a new sign-in evicting the oldest session at maxSessionsPerUser, a reused refresh token ending its session (a sign of token theft, so the app must drop the session too), and an authorization code replayed by its client ending the session issued from it. Offline sessions are included: these sign-outs revoke offline tokens too, so a client holding one is told its session (sid) is gone. Sending happens after the sign-out has committed, in the background (10-second timeout, no redirects, at most 8 in flight per server); a client that is slow or down never delays or fails the sign-out, and a failed delivery is logged as a warning, not retried. A browser SSO session ending, and a session reaching its maximum lifetime, send nothing. See the authentication guide, "Back-Channel Logout".
  • The SSO idle timeout now ends idle OAuth sessions and tells their apps. An OAuth session whose refresh token went unused past ssoSessionIdleTimeout could no longer be refreshed but stayed listed, and its clients were not told, until its maximum lifetime. Idle OAuth sessions are now deleted by the hourly clean-up, which corrects the 0.12.0 note that such a session "stays listed until its maximum lifetime"; the clean-up also sends its clients a logout token. Offline sessions are still exempt. Only realms with an idle timeout set are affected.
  • Logout tokens are never sent to link-local or cloud-metadata addresses. A backchannelLogoutUri that is, or resolves to, 169.254.0.0/16 (the 169.254.169.254 metadata service), fe80::/10, AWS's fd00:ec2::254, Alibaba's 100.100.100.200 or Oracle's 192.0.0.192 (also embedded in IPv6) is refused at each delivery and the refusal logged, so a realm admin cannot point Idenplane's POSTs at the cloud credentials endpoint. Private and loopback addresses stay allowed, since an app on the operator's network is a normal back-channel target. BACKCHANNEL_LOGOUT_ALLOW_LINK_LOCAL=true lifts the check. The check is not DNS-pinned (see the threat model).

Added

  • Upgrade health check 12, identity_provider_types. GET /admin/upgrade/health warns about identity providers the broker cannot sign in with, each as realm/alias (type, enabled|disabled). A SAML provider without a valid SAML configuration is listed as needing configuration review: every saml row stored before 0.13.0, when Idenplane had no SAML broker, has none, and samlp / adfs rows (Auth0 exports) also need their type set to saml. Any type other than oidc, oauth2 and saml is listed as unsupported. An enabled one shows a login button that cannot complete a sign-in. A warning only, it never blocks an upgrade.
  • SCIM externalId is stored, returned and filterable for users and groups (filter=externalId eq "...", case-sensitive as RFC 7643 defines it), so Entra ID and OneLogin can match on it and get it back.
  • SCIM stores and returns the rest of the User schema. displayName, nickName, profileUrl, title, userType, preferredLanguage, locale, timezone, name.formatted/middleName/honorificPrefix/honorificSuffix, phoneNumbers, addresses and the enterprise extension (employeeNumber, costCenter, organization, division, department, manager) were accepted and dropped; they are now kept in a per-user SCIM profile and returned, so what an IdP writes reads back the same. Entra ID's forms are understood: phoneNumbers[type eq "work"].value and addresses[type eq "work"].locality create the typed value when it is missing, and manager may be a bare id. Users with enterprise attributes list the extension URN in schemas. ims, photos, entitlements, roles and x509Certificates are still accepted and dropped.
  • SCIM filters join comparisons with and and or (and binds tighter, up to 20 comparisons), and Groups filter on members/members.value and externalId, which covers Entra ID's membership check id eq "<group>" and members eq "<user>". Parentheses, not and value-path filters are still refused with 400 invalidFilter.
  • SCIM attributes and excludedAttributes work everywhere: on every list, search and single read of users and groups (user reads ignored excludedAttributes, and group reads ignored attributes), and on PUT and PATCH responses. Names are case-insensitive and may be dotted or URN-prefixed. A group read with excludedAttributes=members no longer loads its members.
  • SCIM Bulk resolves bulkId references (RFC 7644 §3.7.2): "bulkId:<id>" in an operation's data or path becomes the id the referenced POST created, in whatever order the operations are listed. An unresolvable (unknown, failed or circular) reference fails that operation with 409 invalidValue; before, the literal string was used.
  • Docs: configuring Entra ID and Okta. The SCIM guide has step-by-step setup for Microsoft Entra ID and Okta (and OneLogin) with the exact base URL and bearer token, what each client sends, and sections on passwords, discovery, replace semantics and attribute selection.
  • Docs: Migrating from Authentik. The Authentik importer (POST /admin/migration/authentik, the console's Migration Wizard and now the CLI) had no guide. The new page covers creating an API token, fetching every page of users, groups, OAuth2 providers and OAuth sources, reading password hashes from Authentik's database (the REST API does not return them) and putting it all in one file, then the dry run, the import, the report and every warning it can contain, which Django hashers carry over, the mapping from Authentik concepts, and the steps after the import: PKCE for public clients, web origins and grant types, e-mail verification, identity provider URLs and trustEmail, the issuer and sub change, MFA re-enrolment, testing, cut-over and rollback. Linked from the sidebar, the Keycloak and Auth0 guides, the CLI page, the docs home page and the README.
  • idenplane migrate authentik. The CLI imports an Authentik file like the other importers: idenplane migrate authentik --file <path> --realm <name> [--dry-run] [--add-memberships-to-existing-users] [--json]. The four migrate subcommands now share one implementation.
  • Sign in through a SAML 2.0 identity provider. A realm can add Microsoft Entra ID (Azure AD), Okta, ADFS, Google Workspace, Keycloak or any SAML 2.0 IdP as an identity provider (providerType: "saml"), with Idenplane as the SAML service provider. It shows on the login page and in a custom flow's social step like an OIDC provider, and the external account is linked to, or creates, a local one through the same first-login and account-linking path (trustEmail, link-only, profile sync); the realm's MFA policy then applies as usual. See the new guide Sign in with a SAML identity provider.
    • Settings (samlConfig): IdP entity ID, SSO URL with the HTTP-Redirect or HTTP-POST binding, up to five IdP signing certificates (any of them verifies, for rollover), NameID format, signed AuthnRequests (RSA-SHA256, with the realm's signing key), require signed assertions (default on) and/or responses, SHA-1 opt-in (default off), clock skew (default 60 s), an SLO URL (stored only), the subject attribute and the email, first name, last name and username attribute mapping (the usual Entra ID, ADFS, Okta and LDAP names are tried when none is set).
    • SP metadata per realm and provider at /realms/{realm}/broker/{alias}/saml/metadata (its URL is the SP entity ID); the ACS is /realms/{realm}/broker/{alias}/saml/acs. The signing certificate is a stable self-signed certificate for the realm's signing key.
    • Response checks: strict parsing (no DTD or entities, comments, processing instructions, CDATA or duplicate IDs; schema-shaped Response and Assertion); signatures checked against the configured certificates only, RSA-SHA256/512 only unless SHA-1 is allowed, never HMAC; every value read from the bytes the signature covers (XML signature wrapping); InResponseTo bound to this sign-in's AuthnRequest; Destination, Recipient, Audience, Issuer, NotBefore/NotOnOrAfter with skew, bearer confirmation and NameID format checked; each assertion ID and each sign-in accepted once across all processes; the sign-in bound to the browser that started it (an HttpOnly cookie), so a response cannot be finished in someone else's browser. The RelayState is a short random value; the state stays on the server.
    • Admin API and console: providerType: "saml" is accepted with samlConfig validated in full; POST /admin/realms/{realm}/identity-providers/saml-metadata reads IdP metadata (pasted, or from an https URL fetched with the SSRF-safe client) into settings; a SAML provider's representation carries samlSp (entity ID, ACS URL, metadata URL). The console's identity provider form has a SAML variant with a metadata import box and the SP values to copy; the "(not supported)" label for SAML is gone.
    • Imports: the Keycloak importer brings SAML identity providers over (idpEntityId, SSO URL and binding, certificates, NameID format, signing flags, SLO URL, clock skew, principal attribute, attribute mappers); Auth0 samlp connections and Zitadel SAML IdPs are imported when the export carries the IdP metadata; realm import v1/v2 keeps samlConfig. An incomplete SAML provider is still skipped, now with every missing setting in the report, and an imported one comes with a reminder to give the IdP Idenplane's SP metadata.
    • Not supported: encrypted assertions (refused, with a message to turn encryption off at the IdP), IdP-initiated sign-in, SAML single logout, the artifact binding, and non-RSA keys.
    • The ACS accepts a form body up to 600 KB (a SAMLResponse up to 512 KB, for IdPs that send many group claims); every other endpoint keeps the 100 KB limit.
    • Migration: adds saml_broker_requests (sign-ins in progress) and saml_broker_assertion_ids (the replay check), both cleaned up every five minutes; identity_providers.saml_config, unused until now, holds the settings.

Changed

  • npm packages are published with trusted publishing. The publish workflows for idenplane-sdk, idenplane-angular, idenplane-nextjs, idenplane-vue, idenplane-mcp and the new idenplane-cli workflow authenticate to npm with the job's GitHub OIDC token (npm trusted publishing) and attach provenance, so no long-lived npm token is needed once each package names its workflow as a trusted publisher. NPM_TOKEN remains a fallback. idenplane-mcp now publishes with provenance too.
  • idenplane-cli is published from CI. A new publish-cli.yml publishes packages/idenplane-cli on cli-v* tags, after a typecheck, tests and a tag/version check. idenplane-cli 1.1.0 adds idenplane plugins hash.
  • SCIM discovery claims only what works. /ServiceProviderConfig no longer lists an apiKey authentication scheme the server never accepted, its Bulk maxPayloadSize (10 MB) now matches the real limit (1 MiB), and it links to the SCIM guide. /Schemas describes password (writeOnly, returned: never), drops the attributes that are not stored, gives every attribute the characteristics RFC 7643 §7 lists, and fixes returned flags that contradicted the responses (groups and emails.primary were never but returned; phoneNumbers and addresses were always but never returned). Schemas, resource types and the configuration carry meta, and are found case-insensitively.
  • SCIM request bodies may be up to 1 MiB (other endpoints keep 100 KB), so Okta can PUT a group with thousands of members; the limit is the Bulk maxPayloadSize advertised.
  • SCIM PUT replaces (RFC 7644 §3.5.1): a stored attribute left out of the body is cleared, except active and password, which are kept. PUT /Users/{id} kept the old name and email when the body left them out, and PUT /Groups/{id} kept the old members when the body had no members. id, meta and groups in a PUT or POST body are ignored rather than refused.
  • SCIM PATCH /Groups/{id} is one transaction and answers 204 unless the request asks for attributes/excludedAttributes, then 200 with the group: returning the whole member list after each of Entra ID's member batches cost more than the change. Bulk reports group PATCHes as 204 and every DELETE with its location.
  • SCIM uniqueness is case-insensitive. userName, email and group displayName are checked the way the eq lookup compares them, so a client can no longer create Ada next to ada and then get two results from its userName eq lookup, which Entra ID and Okta treat as an error.
  • SCIM list pages are ordered by name, then id, so pages never overlap or skip a resource.
  • Logout tokens go only to the clients the session was used with. The user's own sign-out sent a logout token, carrying the user's id, to every client of the realm with a backchannelLogoutUri, including apps the user had never signed in to. It now sends one only to the clients holding the session's refresh tokens (falling back to the client of the authorization code the session came from, and, when neither is recorded, as for refresh tokens issued before they recorded their client, to every client with a backchannelLogoutUri as before), and always names the session (sid): a client with backchannelLogoutSessionRequired: false used to get a sub-only token, which tells it to end all of the user's sessions, when only one had ended. It still gets a single sub-only token when the user is signed out everywhere.
  • A logout naming only the user no longer ends their offline sessions. RP-initiated logout with an ID token that has sub but no sid, and an inbound logout token with sub only, ended every session of the user, offline ones included, which Back-Channel Logout 1.0 §2.7 says normally should not happen. They now end the user's sessions and leave offline sessions alone (they are also limited to the realm's own users). Signing out with the offline sign-in's own ID token or refresh token still ends that offline session.
  • Logout tokens are explicitly typed with the typ header logout+jwt, as Back-Channel Logout 1.0 §2.4 recommends (it was JWT), and the token is sent form-encoded with URLSearchParams. RP libraries that follow the specification accept both; one that compares typ to JWT must accept logout+jwt.

Fixed

  • Identity provider types stored in another case are normalized. Since 0.12.0 the admin API stores providerType in lower case, but rows saved earlier could read OIDC, OAuth2 or SAML, which the console showed as an unsupported type that had to be changed before saving. Migrations rewrite them to the canonical value.
  • A password reset by email now applies the password history. passwordHistoryCount was enforced in the account console, on the expired-password page and for admins, but the reset-by-email page accepted any password, the current one included. It now refuses a recent password with "Password was used recently" before the reset link is used up, so the user can choose another password with the same link.
  • The Authentik importer takes what Authentik's API returns. Before, the file had to be reshaped by hand, and the shapes Authentik actually returns failed:
    • a section given as a whole paginated response ({pagination, results}), or anything else that is not a list, made the endpoint answer 500. Paginated responses are now unwrapped, and any other shape is refused with 400 naming the section;
    • a user's groups lists group pks (UUIDs); memberships now resolve by pk or by name;
    • Authentik's email: "" for users without an address was stored as an address, so the second such user failed on the one-address-per-realm rule. It is now stored as no address. A user whose address is already taken (in the realm, or earlier in the file) is imported without it, with a warning naming the other user, in dry runs too;
    • redirect_uris in Authentik's own shapes (a newline-separated string before 2024.10, a list of {matching_mode, url} since) broke the client. All three shapes are read; strict entries are kept, and regex entries, which Idenplane cannot match, are left out with a warning naming the client;
    • service accounts and outpost accounts (service_account, internal_service_account) were imported as people. They are now skipped, each with a warning;
    • a source's display name became the identity provider alias as is (spaces and capitals included, unlike the admin API's rule). The alias is now the source's slug, or its slugified name, checked against the same rule; a source with neither is skipped with a warning, and so is a source whose alias an earlier source in the file already uses (the warning names both). Its profile_url, oidc_jwks_url and the issuer from oidc_well_known_url are now carried over;
    • Django bcrypt$$2b$... hashes were dropped; they are now carried over and verified (and moved to Argon2id on first sign-in). bcrypt_sha256 is still dropped, with a warning that says why, and Django's unusable-password marker gets its own warning instead of being printed as a hasher name;
    • a failed group membership counted a created user as failed too; it is now reported on its own (group_membership). Users that already exist keep their memberships unchanged by default, and the report says how many were left out; the new request option addMembershipsToExistingUsers (--add-memberships-to-existing-users in the CLI) adds the memberships they are missing, matched by username, never removing any, with a line per user. It is opt-in because a local account that only shares a username would get the Authentik user's groups and their roles;
    • a confidential provider without a secret became an enabled client that could not authenticate; it is now imported disabled, with a warning;
    • sub-groups were flattened; they are now imported under their parent. Group is_superuser, RBAC roles and attributes, user attributes, MFA devices and user-source links were dropped without a word; each is now reported. User attributes that match a custom attribute defined in the realm are imported.
  • Migration guides gave the wrong request size and password-grant behaviour. The Keycloak and Auth0 guides said the import endpoints accept 100 KB; since 0.11.0 they accept 10 MB. They also said migrated users fail the password grant until a first browser sign-in; the password grant checks imported hashes like the login page and upgrades them the same way.
  • A federated sign-in for an account already linked to the provider through another external account no longer fails with a server error. When an OpenID Connect (or SAML) provider vouched for a new subject whose trusted, verified email belonged to a local account already linked to that provider, the sign-in hit a database constraint and returned 500 (in a custom flow, the login transaction ended). It is now refused with a clear message (HTTP 409; in a flow the social step fails and its fallback can run) and recorded as a LOGIN_ERROR login event with error federated_identity_conflict, naming the provider and both subjects. The account is never relinked to the new external account.