Okta
Use a SAML 2.0 app integration in Okta. Okta sends only the attribute statements of the app.
Preset values
Section titled “Preset values”The Okta preset fills in these attributes:
| Field | Attribute |
|---|---|
| Email Attribute | email |
| First Name Attribute | firstName |
| Last Name Attribute | lastName |
| Group Attribute | groups |
The import selects this preset when the IdP entity ID starts with http://www.okta.com/ or https://www.okta.com/.
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 Okta
Section titled “Configure Okta”-
In the Okta Admin Console, go to Applications > Applications.
-
Create a new app integration of the type SAML 2.0.
-
In Single sign-on URL, enter the ACS URL of Magento.
-
In Audience URI (SP Entity ID), enter the SP Entity ID of Magento.
-
In Name ID format, select EmailAddress.
-
In Application username, select Email.
-
Add the attribute statements
email,firstNameandlastName, with the valuesuser.email,user.firstNameanduser.lastName. -
Optional: add a group attribute statement with the name
groupsand a filter for the groups to send. -
On the Sign On tab, copy the metadata URL, and download the IdP metadata file.
-
On the Assignments tab, assign the users or the groups that can sign in to Magento.
Okta settings at a glance
Section titled “Okta settings at a glance”| Okta setting | Value |
|---|---|
| Single sign-on URL | ACS URL |
| Audience URI (SP Entity ID) | SP Entity ID |
| Name ID format | EmailAddress |
| Application username | |
| IdP metadata | On the Sign On tab. Import this file in Magento. |
| Attribute name | Source at Okta | Note |
|---|---|---|
email |
user.email |
Attribute statement |
firstName |
user.firstName |
Attribute statement |
lastName |
user.lastName |
Attribute statement |
groups |
A filter, such as Matches regex .* |
Group attribute statement. Optional. |
amr |
session.amr |
Attribute statement. Optional. |
The attribute names must be exactly the same as in the Magento attribute mapping. To see the names that Okta sends, test the provider.
Configure Magento
Section titled “Configure Magento”-
Open the provider in Magento.
-
Click Import Metadata, and select the metadata file of Okta.
-
In Attribute Mapping > Load Preset, select Okta, 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”Okta sends the names of the groups that the filter of the group attribute statement matches. For the role rules, refer to Role mapping.
Two-factor authentication
Section titled “Two-factor authentication”An Okta FastPass or a security key sign-in can replace the two-factor authentication of Magento. For this, add an attribute statement with the name amr and the value session.amr.
Common problems
Section titled “Common problems”| Problem | Solution |
|---|---|
| The mapping fields are empty after the import. | The Okta metadata lists no attributes. Select the Okta preset in Load Preset. |
For more problems, refer to Troubleshooting.