SAML SSO Service Provider
Version 5.2.8
Security release. Update REQUIRED. Craft 4 sites: the same fixes are in 4.3.3.
Fixed
- GHSA-mm3h-q67x-4779 (high): login Responses were accepted without checking the assertion's
AudienceRestrictionor the Response'sInResponseTo, and RelayState could redirect users off-site.- An assertion the IdP issued for another service provider could log a user in when its
SubjectConfirmationDatahad noRecipient, or when both service providers share an ACS URL. Assertions must now be audience-restricted to this site's Entity ID; one with noAudienceRestrictionis rejected. - A captured Response could be replayed, and a Response from one login could be used in another browser. A Response (or
SubjectConfirmationData) withInResponseTomust now answer an AuthnRequest from this site, sent within the last hour, from the same browser session when its cookie is present, and each one can be used only once. - After login, users were redirected to any URL in
RelayState, an unsigned form field, which allowed phishing via links like/actions/saml-sp/login/request?RelayState=https://evil.example. RelayState is now only followed to a path or a URL on this site's hosts; anything else goes to Craft's default post-login URL.
- An assertion the IdP issued for another service provider could log a user in when its
Added
allowIdpInitiatedLoginsetting (defaulttrue). Set it tofalseto reject unsolicited (IdP-initiated) Responses.allowedRedirectHostssetting (default[]): extra hosts RelayState may redirect to, for frontends on a different domain from Craft.
Changed
- Assertions without an
AudienceRestrictionfor this site are rejected. If logins fail with "not a valid audience" or "no AudienceRestriction": set the IdP's audience to this site's Entity ID. See Settings. flipbox\saml\sp\validators\ResponseandAssertionnow reject anyInResponseTonot issued throughLoginController::actionRequest. Code that validates solicited Responses directly must record each AuthnRequest withflipbox\saml\sp\validators\InResponseTo::remember().- RelayState redirects to other domains are ignored. Sites whose frontend is on another domain must list its hosts in
allowedRedirectHosts. See Settings.
Version 5.2.7
Fixed
- Saving the plugin settings page no longer removes the plugin's other settings from project config on Craft 5.8.22+. Settings such as
enableUsers,createUserandsyncGroupswent back to their defaults when the page was saved (saml-sp#262). Requiresflipboxfactory/saml-core^5.0.13.
Version 5.2.6
Security
- Requires
flipboxfactory/keychain^5.0.3 to fix GHSA-346v-p9mw-hc87. Earlier KeyChain versions stored the private key of key pairs created with "bring your own key" unencrypted in thekeychain.settingscolumn, even with "Encrypt at Rest" on, and showed decrypted private keys on the key pair edit page. KeyChain 5.0.3 removes the stored copies on update and hides private keys behind a password-confirmed Reveal button. If you used a pasted (BYOK) key pair, consider rotating it: database backups made before the update may contain the plaintext key.
Changed
- Requires
flipboxfactory/saml-core^5.0.12, whose control panel pages use Craft's own markup and styles.
Version 5.2.5
Fixed
- With
mergeExistingGroupson (the default), group sync now merges with the user's stored groups, not just the groups cached on the user element. Previously, if the user's groups had already been loaded earlier in the login (e.g. by another listener or plugin), groups assigned after that withoutsetGroups()(e.g. byUsers::assignUserToGroups()inLogin::EVENT_AFTER_RESPONSE_TO_USER) were removed. Default group assignment uses the same list.
Changed
UserGroupAssign::$existingGroupsnow holds the user's stored groups plus any set on the element but not saved yet, instead of only$user->getGroups().
Version 5.2.4
Fixed
- With
syncGroupsset tofalse, logins no longer remove a user's groups. Previously, ifmergeExistingGroupswas alsofalse, every SAML login removed all of the user's groups exceptdefaultGroupAssignments, including groups assigned earlier in the same login (e.g. inLogin::EVENT_AFTER_RESPONSE_TO_USER).UserGroups::EVENT_BEFORE_USER_GROUP_ASSIGNstill fires and can change the assignment.
Version 5.2.3
Fixed
- SSO login now runs Craft's own login checks (
craft\helpers\User::getAuthStatus(), as Craft's built-in SSO does) and refuses users who are locked out, suspended, pending or inactive, or who lack control panel or offline access where the request needs it. Previously the login step reactivated any non-active user itself. - Locked-out users are no longer signed in while their lockout is active.
UserHelper::isUserLocked()now reads Craft 5'slockedflag (Craft 5 never reports alockedstatus, so it always returned false).
Changed
- New users created at login (
createUser) are created active, instead of being activated by the login step afterwards. - Reactivating existing users is handled only by the
enableUserssetting.UserHelper::enableUser()no longer clears a lockout on a user who is otherwise active.
Version 5.2.2
Fixed
- SSO and SLO endpoints now also respond on control panel requests, so SAML login works for headless installs and control panels on their own domain (
baseCpUrlwithout acpTrigger). Previously they returned 404 there. Thanks to @kabel (#233).
Version 5.2.1
Fixed
- On PostgreSQL, matching the NameID to an existing user's username or email is now case-insensitive, like Craft. Before, an IdP sending different casing (e.g. Azure AD sending
Jane.Doe@example.comforjane.doe@example.com) created a duplicate user and failed withEmail "…" has already been taken.(#242)
Changed
- If more than one user matches the NameID, a user whose username or email matches exactly is used; otherwise the login is now rejected ("Multiple users match this login.") instead of picking one arbitrarily. The matching user IDs are logged.
Version 5.2.0
Added
requireSsoLoginsetting: only allow sign-in through SAML. Craft password and passkey sign-in is rejected for every user, and the control panel login page and the session-expired and identity modals show only the IdP buttons (#52).
Version 5.1.4
Security release. Update REQUIRED. Run composer update flipboxfactory/saml-sp -W (see the Upgrading notes under Changed).
Fixed
- Requires
flipboxfactory/saml-core^5.0.11, which movessimplesamlphp/saml2to 4.19.4 androbrichards/xmlseclibsto 3.1.5. Fixes:- GHSA-6vhm-xfmv-94pj (high): unauthenticated denial of service; a small compressed HTTP-Redirect message could exhaust PHP memory.
- GHSA-5cjr-mxj5-wmrx / CVE-2026-49289 (high): denial of service via XPath Transform.
- GHSA-6929-8p9f-26jx / CVE-2026-49283 (high): HTTP-Artifact cross-IdP authentication bypass.
- GHSA-4v26-v6cg-g6f9 / CVE-2026-32313 (high): xmlseclibs did not validate the AES-GCM authentication tag on encrypted assertions.
- GHSA-c4cc-x928-vjw9 / CVE-2025-66578 (medium): xmlseclibs canonicalization error could bypass digest/signature validation.
- saml-core now enforces decryption algorithm blacklists that were previously ignored.
- Requires Craft CMS ^5.10.8, so saml-sp no longer installs alongside Craft releases with published advisories, including:
- GHSA-wg23-69c2-gjc8 (critical): passkey login accepted replayed WebAuthn assertions.
- GHSA-p8x7-9vfw-p7vc (high): arbitrary user password reset leading to admin account takeover.
- GHSA-265m-7826-wjqm / CVE-2026-72778 and GHSA-f5wm-88jv-g5hx / CVE-2026-72781 (high): authenticated remote code execution.
- GHSA-v64r-7wg9-23pr / CVE-2025-68456 (high): unauthenticated database backup.
- GHSA-f3gw-9ww9-jmc3 / CVE-2025-32432 (critical): remote code execution.
- saml-sp 5.1.3 and earlier could resolve to saml-core 5.0.10 with saml2 4.20.x on
composer update, which fails to install (blocked Composer plugin) or breaks SAML at runtime. 5.1.4 prevents that combination.
Changed
- Requires
flipboxfactory/keychain^5.0.1 directly (previously only through saml-core). - Upgrading: update Craft CMS to 5.10.8 or later first if you're on an older 5.x release.
- Upgrading: saml2 4.19.x needs
webmozart/assert1.x, while recent Craft projects lock 2.x. If Composer reports awebmozart/assertconflict, add-W:composer update flipboxfactory/saml-sp -W.
Added
- Test suite with 97% line coverage, coding standards (craftcms/ecs) and static analysis (craftcms/phpstan) in CI
- Merging a version bump to master now tags and publishes the GitHub release automatically
Version 5.1.3
Fixed
- admin login screen buttons kicking off sso
Version 5.1.2
Fixed
- SECURITY PATCH with saml-core/saml2 dependencies. Update REQUIRED! More info can be found here: https://github.com/simplesamlphp/saml2/security/advisories/GHSA-pxm4-r5ph-q2m2#event-375127
Version 5.0.0
Fixed
- Craft 5.0 compatibility
Version 4.1.1
Feature
- Add
samlSpLogoutUrlfor easier logout url generation
Version 4.1.0
Fixed
- Fixing issue with multi-site linking for the external id field
Version 4.0.7
Fixed
- bumping saml-core to use pinned psr/log at 1.1.4
Version 4.0.6.1
Fixed
- revert: issue with logger interface compatibility #197
Version 4.0.6
Fixed
- issue with logger interface compatibility #197
Version 4.0.5
Fixed
- issue with ui https://github.com/flipboxfactory/saml-sp/issues/182
Version 4.0.4
Fixed
- issue with craft version being off compared to the composer version 🤪. fixes #179
Version 4.0.3
Fixed
- issue with custom attributes not being picked up by the validation #177
Version 4.0.2
Fixed
- excluding disabled IdPs in login controller findByEntityId() closing #175
Version 2.7.4
Fixed
- issue with using the default settings for entity id instead of the provider entity id, closing #171
Version 2.7.5
Fixed
- excluding disabled IdPs in login controller findByEntityId() closing #175
Version 2.7.3
Fixed
- updated saml-core: When "This site has it's own base URL" isn't checked but the site is selected. ref: https://github.com/flipboxfactory/saml-sp/issues/139
Version 2.7.2
Fixed
- fixed missing config being passed to the validator for controls on assertions being signed (thanks @lindseydiloreto for catching this and PR). Ref: https://github.com/flipboxfactory/saml-sp/issues/126
Version 2.7.1
Encrypted Assertions are now set to be decrypted before events may interact with them. If you currently decrypt assertions in an custom event, verify the assertion is an instance of
\SAML2\EncryptedAssertionbefore decryption.
Added
- Event
\flipbox\saml\sp\events\UserGroupAssignand\flipbox\saml\sp\services\login\UserGroups::EVENT_BEFORE_USER_GROUP_ASSIGNmanipulate groups to be assigned before assignment #133 - Config (which can be added in
config/saml-sp.php)mergeExistingGroupsto opt-in to merging groups if desired. Default is true, the groups will be merged. #133
Changed
- Add decrypted assertions to Response after assertions are initially decrypted. See above warning.
Version 2.7.0
Setting have been added to improve security (requireResponseToBeSigned and requireAssertionToBeSigned). It's recommend to update ASAP and leave these enabled. Test login before deploying.
Fixed
- Adding controls to require Response and assertions to be signed. Ref: https://github.com/flipboxfactory/saml-sp/issues/126
Added
\flipbox\saml\sp\validators\Response\flipbox\saml\sp\validators\Assertion\flipbox\saml\sp\validators\SignedElement\flipbox\saml\sp\models\Settings::$requireResponseToBeSigned\flipbox\saml\sp\models\Settings::$requireAssertionToBeSigned
Version 2.6.10
Fixed
- Fixing validation errors that don't throw exceptions: https://github.com/flipboxfactory/saml-sp/issues/126
Version 2.6.9
Fixed
- Issue with clipboard (using navigator.clipboard with a fallback of the previous method) #113
- Disallow viewing to settings when allowAdminChanges is false #114
Version 2.6.8
Fixed
- Possible issue with SP initiated SSO. Result from 2.6.7 controller changes.
Version 2.6.7
Added
- Ability to be explicit with internal provider when passing a request url.
- docs updates
Version 2.6.5
Fixed
- adding support for when there is not NameID sent and admin is using nameIDOverride.
Version 2.6.4
Fixed
- Fixing migration issue with duplicate metadataOptions error.
Version 2.6.3
Fixed
- Forcing core update for those updating to Craft CMS 3.6 (from a lower version).
Version 2.6.2
Fixed
- Fixing latest login page.
dashboardisn't a variable, it's the destination (string).
Version 2.6.1
Fixed
- Updated login for Craft version 3.5.18 and greater.
Version 2.6.0
Breaking changes: There are significant endpoint and metadata changes with this release. Please make sure you have a testing site and test this upgrade with your code when you apply this change.
Added
- Better multisite support.
- EntityID is is now editible
Version 2.5.3
Added
- Github Actions CICD! 🚀
Version 2.5.2
Fixed
- Issue where SP and IdP plugin couldn't be installed on the same craft db due to table conflicts.
Version 2.5.1
Fixed
- Issue with EntityID override (added in 2.5.0), fixing https://github.com/flipboxfactory/saml-sp/issues/84
Version 2.5.0
Breaking changes
Changed
- Breaking change: Changed
\flipbox\saml\sp\services\login\User::getByResponseparameters.
Added
- Added ability to set NameId Override per IdP provider in the backend.
- Added event for before user save,
\flipbox\saml\sp\services\login\User::EVENT_BEFORE_USER_SAVE.
Version 2.4.1
Fixed
- Missing event
EVENT_AFTER_RESPONSE_TO_USER. Event was added back in.
Version 2.4.0
Breaking changes: Changed
\flipbox\saml\sp\services\messages\AuthnRequest::EVENT_AFTER_MESSAGE_CREATEDevent to use new class\flipbox\saml\sp\events\AuthnRequestinstead of\yii\base\Event
Changed
- Changed the event object used from
\flipbox\saml\sp\services\messages\AuthnRequest::EVENT_AFTER_MESSAGE_CREATEDevent to use new class\flipbox\saml\sp\events\AuthnRequestinstead of\yii\base\Event. AuthnRequest message is now in the$messageproperty instead of$data.
Version 2.3.1
Fixed
- Issue with constraint on the Provider Identity table when the user's NameID changes.
Version 2.3.0
autoCreateGroupsfunctionality has been removed. Automatic creation of user groups, has been removed. This is due to the project >config changes in Craft CMS 3.5. Users are still assigned to a user group when the group >match one existing within Craft. If a user group is not in Craft, the group is logged (as a warning) >and no error is thrown.
responseAttributeMapfunctionality has been removed. Please use the admin panel interface.
Added
- Added
nameIdAttributeOverridesetting. This is a system level setting override allowing you to map a username to a different assertion attribute, besides the NameID.
Fixed
- Issue with the
createUsersetting which allowed the user to be created but not login. The user will no longer be created.
Removed / Deprecated
- The following settings have been deprecated while the functionality of the those
settings have been removed:
mergeLocalUsersautoCreateGroupsresponseAttributeMap
Version 2.2.0
Added
- More unit testing!
Changed
- Updated saml-core which upgraded the
simplesamlphp/saml2library. \flipbox\saml\sp\services\login\UserGroups::assignDefaultGroupsto a protected method\flipbox\saml\sp\services\login\UserGroups::syncByAssertionto a protected method\flipbox\saml\sp\services\login\UserGroups::getDefaultGroupsto a protected method
Removed
\flipbox\saml\sp\services\Login::login
Version 2.1.12
Fixed
- Issue with diabled provider (My Provider) being picked as own provider when there's an enabled and disable provider with the same EntityId #68
Version 2.1.11
Fixed
- Issue with
autoCreateGroupsplugin setting not doing what it's supposed to do. #65
Version 2.1.10
Fixed
- Issue with saving groups with non-ascii conforming groups.
Version 2.1.9
Added
- Adding Yii events to allow devs to modify RelayState
Version 2.1.8
Added
- Adding setting to turn off base64 encoding of the RelayState:
encodeRelayState.
Version 2.1.7
Fixed
- Missed a spot with https://github.com/flipboxfactory/saml-sp/issues/57
Version 2.1.6
Fixed
- Issue with missing Assertion Consumer Service URL: Fixing https://github.com/flipboxfactory/saml-sp/issues/58
- Issue CP panel presenting the SLO endpoint, fixing: https://github.com/flipboxfactory/saml-sp/issues/57
Version 2.1.5
Fixed
- Fixed issue with Metadata URL not overwriting the metadata correctly via the control panel and cli.
Added
- CLI command for listing all providers. See
./craft saml-sp/metadata.
Version 2.1.4
Fixed
- Fixed issue introduced in 2.1.3 Fixes: https://github.com/flipboxfactory/saml-sp/issues/53
- Fixed issue with attributes statements with one attribute (they'd be skipped over). Fixes: https://github.com/flipboxfactory/saml-sp/issues/54
Version 2.1.3
Fixed
- Fixes issue with
GeneralConfig::headlessModeby explicitly setting response to HTML. Fixes: https://github.com/flipboxfactory/saml-sp/issues/53 - Fixed issue with setting custom fields in Craft 3.4. Now using
setFieldValue. Fixes: https://github.com/flipboxfactory/saml-sp/issues/53
Version 2.1.2
Fixed
- Fixing issue with migration from 1.x to 2.x. Fixes: https://github.com/flipboxfactory/saml-sp/issues/51
Version 2.1.1.2
Fixed
- Fixing issue with Craft 3.2 twig error within the editableTable
Version 2.1.1.1
Fixed
- Fixing table name for craft installs with prefixes.
Version 2.1.1
Fixed
- Fixing issue with postgres uid - https://github.com/flipboxfactory/saml-sp/issues/49
Version 2.1.0
Fixed
- Fixing issue with requiring admin when project config when
allowAdminChangesgeneral config is set. - Duplicate
metadatahtml attribute id on the edit page - Fixed issue with large Metadata too big for the db metadata column (requires migration) https://github.com/flipboxfactory/saml-sp/issues/48
Added
- Support for Saving Metadata via url (requires migration) https://github.com/flipboxfactory/saml-sp/issues/47
- Support for 3.4 login page
Version 2.0.15
Fixed
- RelayState when going directly to
/admin/login. If the siteUrl matches the returnUrl, the user will now be redirected to the dashboard (cpUrl('dashboard')).
Version 2.0.14
Added
- Fixed admin login
Via <IdP>button relay state, redirecting properly now.
Version 2.0.13
Added
- Added support for HTTP-Redirect https://github.com/flipboxfactory/saml-sp/issues/41
Version 2.0.12
Fixed
- Fixed issue with too many redirects when the site is set to offline. https://github.com/flipboxfactory/saml-sp/issues/42
Version 2.0.11
Added
- Added support for parsing multiple assertions. Possibly related to https://github.com/flipboxfactory/saml-sp/issues/40
Version 2.0.9
Removed
- Removed flipboxfactory/craft-ember package for easier updates with dependancies.
Version 2.0.7
Fixed
- Fixed issue with decrypting assertions
Version 2.0.6
Fixed
- Fixing more xsd schema compatibility. Changed message ids to be compatible.
- Fixed exception when the user tries to logout (SLO) when they are already logged out.
Version 2.0.5
THE 2.0 UPGRADE HAS BREAKING CHANGES. All existing events have changed. Please reference: https://saml-sp.flipboxfactory.com/installation.html#upgrading-to-2-0
Fixed
- Added protocolSupportEnumeration in the metadata. That is required by SAML and stricter IdPs will complain.
Version 2.0.4
THE 2.0 UPGRADE HAS BREAKING CHANGES. All existing events have changed. Please reference: https://saml-sp.flipboxfactory.com/installation.html#upgrading-to-2-0
Fixed
- Fixed AssertionConsumerServiceIndex type. Made it an int like it's intended to be.
Added
- More friendly exceptions when there are configuration issues with IdP or SP, therefore not being found.
Version 2.0.3
THE 2.0 UPGRADE HAS BREAKING CHANGES. All existing events have changed. Please reference: https://saml-sp.flipboxfactory.com/installation.html#upgrading-to-2-0
Fixed
- Issue with the
Viabuttons on the login page pointing to the incorrect endpoint. https://github.com/flipboxfactory/saml-sp/issues/31
Version 2.0.2
THE 2.0 UPGRADE HAS BREAKING CHANGES. All existing events have changed. Please reference: https://saml-sp.flipboxfactory.com/installation.html#upgrading-to-2-0
Version 2.0.1
THE 2.0 UPGRADE HAS BREAKING CHANGES. All existing events have changed. Please reference: https://saml-sp.flipboxfactory.com/installation.html#upgrading-to-2-0
Version 2.0.0
THE 2.0 UPGRADE HAS BREAKING CHANGES. All existing events have changed. If you have hooked or have a custom
attributeMap(withinconfig/saml-sp.php), please test the upgrade and sso login completely. Changes will most likely be needed.
Any references to the LightSaml php package need to be changed. LightSAML has been swapped out for the simplesamlphp core package simplesamlphp
Removed
- Remove static method and associated (deprecated) constants:
\flipbox\saml\sp\services\messages\Metadata::getLoginLocation. Get this from the settings model now. - Remove static method and associated (deprecated) constants:
\flipbox\saml\sp\services\messages\Metadata::getLogoutRequestLocation. Get this from the settings model now. - Remove static method and associated (deprecated) constants:
\flipbox\saml\sp\services\messages\Metadata::getLogoutResponseLocation. Get this from the settings model now. - Removed the LightSaml package
Changed
- Switched from the php LightSaml package to the simplesamlphp core lib
Fixed
- Typo in attribute map in the provider table (requires migration)
Added
- Support for environmental variables in the plugin settings. Works better with the project config.
Version 1.0.6
Fixed
- Fixed issues with
\flipbox\saml\sp\services\login\UserGroups::syncByAssertiondeleting existing user groups
Version 1.0.4
Added
- Added config
defaultGroupAssignmentsto give the ability to add users by default to certain groups.
Version 1.0.3.1
Fixed
- issue with ACS within the auth and request presented in 1.0.3
Version 1.0.3
Changed
- Broke/cleaned up the Login service
Version 1.0.0
Added
- New Docs! and Tests!