visus / module-admin-sso-login
Magento module providing SAML single sign-on for admin users
Package info
github.com/visus-io/magento2-module-admin-sso-login
Type:magento2-module
pkg:composer/visus/module-admin-sso-login
Requires
- php: ~8.4.0 || ~8.5.0
- ext-dom: *
- ext-libxml: *
- ext-openssl: *
- magento/framework: >=103.0.8
- magento/module-authorization: >=100.4.8
- magento/module-backend: >=102.0.8
- magento/module-config: >=101.2.8
- magento/module-cron: >=100.4.8
- magento/module-email: >=101.1.8
- magento/module-integration: >=100.4.8
- magento/module-security: >=100.4.8
- magento/module-store: >=101.1.8
- magento/module-two-factor-auth: >=1.1.7
- magento/module-ui: >=101.2.8
- magento/module-user: >=101.2.8
- magento/module-webapi: >=100.4.7
- php-standard-library/dns: ^6.4
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
The Visus Admin SSO Login module (Visus_AdminSsoLogin) adds SAML 2.0 single sign-on (SSO) to the Magento admin. An identity provider (IdP), such as Microsoft Entra ID or Okta, authenticates the admin users. Magento is the service provider (SP).
For the full documentation, go to m2-admin-sso-login.projects.visus.io.
Table of Contents
Features
- Multiple identity providers: Connect more than one IdP. Each identity provider has its own SP entity ID and its own ACS URL.
- Domain routing: Admin users with an email address of a verified domain must sign in through the identity provider of that domain. A DNS TXT record proves the ownership of each domain.
- Strict response validation: The module checks the signature, the issuer, the audience, the destination and the validity period of each SAML response. It also refuses an assertion that it accepted before.
- Service provider keys: Magento signs authentication requests and decrypts encrypted assertions with its own keys. You can rotate the keys. The module sends an email before a certificate expires.
- User provisioning: The first SSO login links an existing admin user, or creates a new admin user. Attribute mapping and role mapping keep the user data and the role up to date.
- Two-factor authentication: A phishing-resistant sign-in at the IdP, such as a passkey or a security key, replaces the 2FA of Magento. All other logins still use the 2FA of Magento.
- API tokens: Admin users that SSO manages can get admin API tokens for the REST, SOAP and GraphQL APIs.
- Logs and auditing: The module records each login attempt. Database triggers record all changes to identity providers, domains and service provider keys.
- Extensibility: Service contracts and events let other modules extend the SSO login.
Requirements
The badges at the top of this file show the supported PHP and Magento versions. The module operates with Magento Open Source and Adobe Commerce.
Make sure that:
- The admin uses HTTPS.
- The database user of Magento has the
TRIGGERprivilege.
Installation
-
Go to the root directory of your Magento installation.
-
Add the module with Composer:
composer require visus/module-admin-sso-login
-
Enable the module and update the database:
bin/magento module:enable Visus_AdminSsoLogin bin/magento setup:upgrade
-
In production mode, compile the code and deploy the static content:
bin/magento setup:di:compile bin/magento setup:static-content:deploy
-
Clean the cache:
bin/magento cache:flush
To set up your first SSO login, refer to the Quick start.
Supported Identity Providers
The module operates with all SAML 2.0 identity providers. The documentation has setup instructions for these identity providers:
- Microsoft Entra ID
- Okta
- Google Workspace
- AD FS
- Auth0
- AWS IAM Identity Center
- Keycloak
- PingOne
- Shibboleth
- Other SAML 2.0 identity providers
Documentation
| Section | Content |
|---|---|
| Getting started | Overview, installation and quick start |
| Configuration | Identity providers, domains, service provider keys, attribute and role mapping, permissions |
| Operations | Logs, API tokens, two-factor authentication, email templates, troubleshooting |
| Developer reference | Service contracts, events, cron jobs, database schema |
Removal
Caution
Admin users that SSO manages do not know their password. After you remove the module, these users cannot sign in until they set a new password. Tell them to use the forgotten password page.
For the removal procedure, refer to Remove the module.
Contributing
To ask a question, use Discussions. To report a problem or to ask for a feature, open an issue. To send a change, open a pull request.
Do not report a security vulnerability in a public issue. Follow the instructions in SECURITY.md.
Before you send a change, read CONTRIBUTING.md. It tells you how to set up the module, run the tests and write commit messages. This project follows the Conventional Commits standard.
License
This module is available under the MIT license. For more information, refer to LICENSE.