Setup SSO with Okta
On Okta side
- Entity ID = Audience URI (SP Entity ID)
- Assertion Consumer Service URL = Single sign on URL
- Name ID format should be set to `EmailAddress`
- Application username should be set to `email`.
On Mailtrap side
- IdP Entity ID (Identity Provider Issuer) = Identity Provider Issuer
- Single Sign-on URL = Identity Provider Single Sign-On URL
- X509 Certificate = X509 Certificate
SAML role mapping
There are different ways how you can configure your Okta to provide needed attribute
to Mailtrap.
Mailtrap allows you to configure role attributes mapping (it's name and value). So you can configure will Mailtrap receive a role name from Okta or true|false
as a value .
There are several ways to do it in Okta. The best way is to consult with your team with help with configuration.
Map Okta group names to Mailtrap permissions
Create groups in Okta
- “MT Admin Group”
- “MT Viewer Group”
- Add users to groups
- Update Okta application SAML attributes mapping
Update attribute statements to return new SAML attributes:
isMailtrapAdmin
with valueisMemberOfGroupName("MT Admin Group")
isMailtrapViewer
with valueisMemberOfGroup("00ggiqham4LuYTBPL5d7")
isMemberOfGroup
accepts group id. Group id can be taken from URL when visiting group page
- more about Okta expressions language here
- Add SAML attributes mapping in Mailtrap with same attribute names
Debugging Okta integration
You can use SAML tracer to debug your SAML integration with Mailtrap.
You need to see a proper Attribute Name and Attribute Value in SAML request from Okta and they should matched to the ones you specified in Mailtrap SSO settings.