- Identity provider (on the customer side)
- Authentication backend in xorlab Security Platform
- Certificate in a trust store
saml2BackendName.
SAML app from Azure Active DirectoryFor SAML authentication using Azure Active Directory services, please refer to SAML Authentication Using AAD Services.
Identity provider configuration
There are many different identity providers and we are only going to point out the cornerstones of the required configuration. On the identity provider side, you have to set up a new application for xorlab Security Platform with the following properties:- SSO URL:
https://<XSPDomain>/auth/saml2/sso/<saml2BackendName> - Audience URI (SP Entity ID):
https://<XSPDomain>/auth/saml2/service-provider-metadata/<saml2BackendName> - The SAML2 response needs to be signed
- The SAML2 assertion needs to be signed
- username (required; a list of one element)
- roles (required; a list of many elements)
- display name (optional; a list of one element)
- emails (optional; a list of many elements)
nameIDclaim (required)
Before you start configuring this backend in XSP, please read the Authentication article, if you haven’t already.
xorlab Security Platform configuration
The configuration on the xorlab Security Platform side is in theauth.yml file under the saml2AuthBackends: section. It is important that you use the same name for the SAML2 backend within XSP as it is named on the identity provider side.
Also, the identity provider needs to provide the metadata for the application configuration either via an URL or in a file.
Basic configuration
All basic settings are configured under theidp: subsection of the SAML backend section—in the example below we used mySamlProvider as the backend name:
metadataFile attribute. Otherwise, point to this metadata available over a HTTP(S) endpoint by providing its URL address as a value for the metadataUrl attribute. Note that only one metadata location can be specified so, in the above example, the metadataUrl key is commented out and XSP will use the metadata file.
Attribute mapping
In the next step, you have to map (assign) attributes from the SAML assertion to the user model in xorlab Security Platform. The mapping is described using Spring expression language and is configured under theattributeMapping: subsection.
You can use these methods:
attr('<name>'): retrieve the attribute with the'<name>'name from attributes in the source authorization system.replace(<string or list of strings>, '<pattern>', 'replace'): replace every occurrence of'<pattern>'with'replace'in an input string or a list of input strings.azureAdEmails(): read all email addresses from the Azure Active DirectoryproxyAddressesattribute.
key: 'literal value'.
A sample configuration for attribute mapping which simply retrieves attributes from the auth system (MS AAD in this case) would look like this:
Role mapping
The last step is to configure role mapping. You must map all roles served by the SAML identity provider to the corresponding XSP roles under theroleMapping: subsection. Roles that are not mapped are ignored by default. Multiple XSP roles can be mapped to the same identity provider role, e.g., xcc_login → company1-group1, xcc_admin → company1-group1.
If the SAML identity provider already serves roles compatible with xorlab Security Platform (see Users, Roles, and Permissions), you can also specify a “pass-through” role-mapping mode using roleMappingMode: PASS_THROUGH (note that this was the default behavior before XSP 7.0).
Please be aware that in the pass-through role-mapping mode, all roles served by the SAML identity provider are added to the XSP authorization context. If this context is becoming too large, i.e., too many irrelevant roles are added, then it might lead to errors and users being unable to access XCC. Therefore, it is advisable to only map the roles that are relevant to XSP.
Multi-Tenant Configuration
Please follow the instructions on this page to setup SAML-based Authentication in a multi-tenancy deployment. Make to include thetenant property in the Attribute Mapping configuration and that its value is a one-on-one match with the authTenantId property specified in the Multi-Tenancy Configuration. For roleMapping, make sure to map to a tenant-restricted user roles.
Example configuration
The final configuration for a SAML backend—Azure in this example—should look like this:Shared mailboxes and aliasesThe configuration from the above example will not support shared mailboxes or aliases obtained with the
proxyAddresses attribute.