AD FS
Use a relying party trust in AD FS. AD FS sends only the claims that the claim rules of the trust issue.
Preset values
Section titled “Preset values”The AD FS preset fills in these attributes:
| Field | Attribute |
|---|---|
| Email Attribute | http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress |
| First Name Attribute | http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname |
| Last Name Attribute | http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname |
| Group Attribute | http://schemas.xmlsoap.org/claims/Group |
The import selects this preset when the IdP entity ID ends with /adfs/services/trust.
Before you start
Section titled “Before you start”Create the provider in Magento, and save it as inactive. Copy the SP Entity ID and the ACS URL from the Service Provider fieldset.
Configure AD FS
Section titled “Configure AD FS”-
In the AD FS Management console, add a Relying Party Trust that is claims aware.
-
Select Import data about the relying party from a file, and select the file from Download SP Metadata. Or enter the data manually.
-
If you enter the data manually, use the SP Entity ID as the relying party trust identifier.
-
If you enter the data manually, add a SAML assertion consumer endpoint with the POST binding and the ACS URL.
-
Select an access control policy for the users that can sign in to Magento.
-
Add a claim rule of the type Send LDAP Attributes as Claims.
-
In this rule, map E-Mail-Addresses to E-Mail Address, Given-Name to Given Name and Surname to Surname.
-
Optional: in the same rule, map Token-Groups - Unqualified Names to Group.
-
Download the federation metadata of AD FS. The usual path is
/FederationMetadata/2007-06/FederationMetadata.xml.
AD FS settings at a glance
Section titled “AD FS settings at a glance”| AD FS setting | Value |
|---|---|
| Relying party trust identifier | SP Entity ID |
| SAML Assertion Consumer Endpoint (POST binding) | ACS URL |
| Federation metadata | /FederationMetadata/2007-06/FederationMetadata.xml. Import this file in Magento. |
| Attribute name | Source at AD FS | Note |
|---|---|---|
| E-Mail Address | E-Mail-Addresses | Send LDAP Attributes as Claims |
| Given Name | Given-Name | Send LDAP Attributes as Claims |
| Surname | Surname | Send LDAP Attributes as Claims |
| Group | Token-Groups - Unqualified Names | Optional |
| Authentication method references | Pass through | Optional. For phishing-resistant sign-ins. |
The attribute names must be exactly the same as in the Magento attribute mapping. To see the names that AD FS sends, test the provider.
Configure Magento
Section titled “Configure Magento”-
Open the provider in Magento.
-
Click Import Metadata, and select the metadata file of AD FS.
-
In Attribute Mapping > Load Preset, select AD FS, if the import did not select it.
-
Examine the imported values, and the note of the preset.
-
In Your Password, enter your current admin password.
-
Click Save and Continue Edit.
-
Click Test Connection, and sign in with a test user.
-
If the test succeeds, turn on Active, and save the provider again.
-
Add and verify the domain of the users.
Groups and roles
Section titled “Groups and roles”With Token-Groups - Unqualified Names, AD FS sends the names of the Active Directory groups. For the role rules, refer to Role mapping.
Two-factor authentication
Section titled “Two-factor authentication”To let a certificate and multifactor sign-in replace the two-factor authentication of Magento, add a claim rule that passes the authentication method claims through. The module reads the claim types http://schemas.microsoft.com/claims/authnmethodsreferences and http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod.
A certificate is phishing-resistant only in a multifactor authentication. Alone, it can be the certificate of a device.
Common problems
Section titled “Common problems”| Problem | Solution |
|---|---|
| The login fails with “The login has no email address.” | The claim rule does not send the email address, or the user has no email address in Active Directory. |
| You cannot import the SP metadata from a URL. | The SP metadata download needs an admin session. Download the file in Magento, and import the file into AD FS. |
For more problems, refer to Troubleshooting.