Skip to content

Identity providers

An identity provider record connects Magento to one SAML 2.0 IdP. Each record is a separate service provider at the IdP, with its own SP entity ID and ACS URL.

To open the list of providers, go to System > Permissions > Visus Single Sign-On > Identity Providers.

The SSO Identity Providers grid with two providers. The grid shows the code, the name, the active status and the row actions.

You can save an inactive provider without the IdP details. Use this draft to get the service provider values for the IdP.

  1. Click Add New Provider.

  2. Fill in the General fieldset. Keep Active off.

  3. In Your Password, enter your current admin password.

  4. Click Save and Continue Edit.

  5. Give the SP Entity ID and the ACS URL to the IdP. You can also click Download SP Metadata and give the file to the IdP.

  6. Click Import Metadata, and select the metadata XML file of the IdP.

  7. Examine the imported values. Then complete the other fieldsets.

  8. Test the provider.

  9. Turn on Active, and save the provider again.

Field Description
Code A unique code with 1 to 64 characters: lowercase letters, digits, _ and -. The SSO URLs contain the code, so you cannot change it after you create the provider.
Name The name of the provider. The login page shows this name on the sign-in button.
Active Only an active provider can log users in. An active provider must have the IdP details.

This fieldset shows the values that the IdP must know. A new provider shows them after its first save, because the URLs contain the code. Each field has a Copy button.

Field Description
SP Entity ID The identifier of Magento at the IdP. The IdP can call it the audience or the identifier.
ACS URL The assertion consumer service URL. The IdP posts its SAML responses to this URL. The IdP can call it the reply URL.

The SP entity ID and the ACS URL are admin URLs that contain the code of the provider. Example values:

SP Entity ID: https://shop.example.com/admin/visus_sso/saml/metadata/code/entra/
ACS URL: https://shop.example.com/admin/visus_sso/saml/acs/code/entra/
Field Description
IdP Entity ID The entity ID (issuer) of the IdP. An active provider must have this value.
IdP Single Sign-On URL The HTTPS URL that receives the authentication requests. The module sends requests only with the HTTP-Redirect binding.
IdP Signing Certificates One or more X.509 certificates in PEM format. The module accepts a signature from any of these certificates. The certificates must be RSA certificates. The module does not support ECDSA.
Current Certificates Read-only. Shows the SHA-256 fingerprint and the expiry date of each saved certificate.
Requested NameID Format The NameID format that Magento requests: Email Address, Persistent Identifier or Unspecified. Select Let the IdP choose to send no format.

Before the IdP changes its signing key, add the new certificate to IdP Signing Certificates. Keep the old certificate. Then both certificates are valid during the change. After the IdP uses the new key, remove the old certificate.

The import reads a SAML 2.0 metadata XML file and fills in the form. The import saves nothing.

  1. Click Import Metadata.

  2. In Metadata File, select the metadata XML file of the IdP.

  3. If the file describes more than one IdP, enter the IdP Entity ID of the IdP to import. Then import the file again.

  4. Examine the values and the warnings that the import shows.

  5. Click Save and Continue Edit.

The import fills in these values:

  • The IdP entity ID.
  • The single sign-on URL with the HTTP-Redirect binding.
  • The signing certificates.
  • The NameID format: the email address format if the IdP supports it, or else the only format that the IdP supports.
  • The attribute mapping, from the attributes that the metadata lists. If the metadata lists no attributes, the import uses the preset of the IdP, when the module recognizes the entity ID.
  • The Sign Authentication Requests option, when the IdP wants signed requests.

The import refuses a file with a document type declaration, and a file that is not SAML 2.0 metadata. It also refuses an IdP without a signing certificate or an HTTP-Redirect single sign-on URL. The import shows a warning for an expired certificate. It also shows a warning when the IdP wants signed requests and no service provider key can sign.

Field Description
Create Admin User On First Login When on, the first login of an unknown user creates an admin user. When off, an admin user with the email address from the IdP must exist.
Role For Provisioned Users The role of the users that the provider creates. It is also the role of a user that matches no role rule. This field is necessary when the provider creates users, unless the role rules deny the users that match no rule.

For the rules that link and create admin users, refer to How the module finds the admin user.

These fieldsets tell the module which SAML attributes give the email address, the names, the role and other values. Refer to Attribute and role mapping.

Field Default Description
Require Signed Assertions On The assertion must have a valid signature. Turn off only if the IdP signs the whole response instead.
Require Signed Response Off The response must have a valid signature.
Require Encrypted Assertions Off The module refuses an assertion that is not encrypted. The IdP encrypts each assertion for the service provider certificate of the SP metadata. An active service provider key is necessary. Refer to Encrypted assertions.
Sign Authentication Requests Off Magento signs each AuthnRequest with the active service provider key. An active key that has not expired is necessary.
Signature Algorithm RSA-SHA256 The algorithm that signs the authentication requests: RSA-SHA256, RSA-SHA384 or RSA-SHA512. The module accepts each of these algorithms in the responses of the IdP.
Digest Algorithm SHA-256 The module does not use this setting yet. It accepts SHA-256, SHA-384 and SHA-512 digests in the responses of the IdP.
Requested Authentication Context Empty The authentication context classes that Magento requests. Leave empty to let the IdP choose how the user authenticates.
Authentication Context Comparison Exact How the IdP compares the context: Exact, Minimum or Better.

The provider must require a signed response, a signed assertion, or both. The module does not support SHA-1 or ECDSA algorithms.

The module decrypts an encrypted assertion with the active service provider keys. Then the decrypted assertion passes the same checks as an unencrypted assertion, its signature included. If the response is signed, the module verifies this signature before it decrypts.

The module accepts an encrypted assertion also when Require Encrypted Assertions is off. Turn the option on to refuse the assertions that are not encrypted.

  1. Make sure that a service provider key is active.

  2. Turn on Require Encrypted Assertions.

  3. In Your Password, enter your current admin password.

  4. Click Save and Continue Edit.

  5. Click Download SP Metadata. The metadata now contains the encryption certificate.

  6. Give the new metadata, or the certificate, to the IdP.

  7. At the IdP, turn on the encryption of the assertions.

  8. Test the provider.

The module supports these algorithms:

Use Algorithms
Content encryption AES-128-GCM, AES-192-GCM, AES-256-GCM, AES-128-CBC, AES-192-CBC, AES-256-CBC
Key transport RSA-OAEP (rsa-oaep-mgf1p and xmlenc11#rsa-oaep), with SHA-1 as the OAEP digest

The SP metadata offers AES-GCM first. The module refuses RSA PKCS #1 v1.5 key transport, because it allows a padding oracle attack.

You can request one or more of these classes: Password Over Protected Transport, Kerberos, Mobile Two-Factor, Smartcard PKI, Software PKI, Time-Synchronized Token, TLS Client Certificate and X.509 Certificate. Each authentication statement of the assertion must satisfy the request.

The test sends a real authentication request to the IdP. It runs all the checks of a login. It then shows the data that the IdP sent and what a login would do. The test also works for an inactive provider.

  1. Open a saved provider.

  2. Click Test Connection. A popup window opens the IdP.

  3. If the browser blocks the popup, allow popups for the admin site. Then click Test Connection again.

  4. Sign in at the IdP.

  5. Examine the result in the provider form.

The result shows:

  • The status: a login would succeed, the response is valid but a login would be refused, or the test failed.
  • The issuer, the NameID and its format, the attributes and the authentication context.
  • The authentication methods, and if the method is phishing-resistant. Refer to Two-factor authentication.
  • The result of the mapping: the email address, the names and the role.
  • The admin user that a login would link, create or refuse.
  • The SAML response XML.

When the response fails its checks, the result marks the data as Unverified. This data may not come from the IdP.

The test logs nobody in, and changes no admin user. The login log records each test.

The test result in the provider form for a valid response. It shows the status, the NameID, the attribute table, the Phishing-Resistant Method row and the admin user that a login would link.

To stop SSO logins through a provider, turn off Active. You can always deactivate a provider, also without an active service provider key.

You cannot delete a provider that has domains. First delete the domains of the provider, or move them to another provider.

To delete one provider, open it and click Delete. To delete or deactivate more than one provider, select them in the grid, and use the mass actions.

You cannot change, deactivate or delete the provider that controls your own SSO login. The form opens in a read-only mode. Ask another admin user to make the change. Without this rule, an admin user can remove their own SSO, and then set a password.

Each save and each delete of a provider asks for Your Password. An admin user that SSO manages has no password. This user verifies their identity at the IdP instead. Refer to Identity verification.