- Identity provider (on the customer side)
- Authentication backend in xorlab
- Certificate in a trust store
saml2BackendName.
Identity provider configuration
On the identity provider side, you have to set up a new application for xorlab with the following properties:- SSO URL:
https://<xorlabDomain>/auth/saml2/sso/<saml2BackendName> - Audience URI (SP Entity ID):
https://<xorlabDomain>/auth/saml2/service-provider-metadata/<saml2BackendName> - The SAML response needs to be signed
- The SAML assertion needs to be signed
Authentication request signing is now supportedIf your IdP requires authentication request signing, this optional feature is supported in xorlab. For more information, please refer to Authentication request signing.
- 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 xorlab, please read the Authentication article, if you haven’t already.
xorlab configuration
The configuration on the xorlab side is in theauth.yml file under the saml2AuthBackends: section. It is important that you use the same name for the SAML backend within xorlab 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:
auth.yml
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 xorlab 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. 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 (Entra ID in this case) would look like this:
auth.yml
Role mapping
The last step is to configure role mapping. You must map all roles served by the SAML identity provider to the corresponding xorlab roles under theroleMapping: subsection. Roles that are not mapped are ignored by default. Multiple xorlab 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 (see Built-in Roles), you can also specify a “pass-through” role-mapping mode using roleMappingMode: PASS_THROUGH.
Please be aware that in the pass-through role-mapping mode, all roles served by the SAML identity provider are added to the xorlab 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 xorlab.
auth.yml
auth.yml
Activate the configuration
After updatingauth/auth/auth.yml, click Publish. The authentication configuration becomes active within about one minute.
Multi-Tenancy
The setup on this page applies unchanged in a multi-tenant deployment. Two things are added on top: atenant entry in the Attribute mapping that matches the tenant name in guarded_tenants.yml, and a tenant-restricted user role in the Role mapping.
Enable Tenant Login
Complete per-tenant SAML example, and the other login options available to tenants.
Example configuration
The final configuration for a SAML backend—Azure in this example—should look like this:auth.yml
Shared mailboxes and aliasesThe configuration from the above example will not support shared mailboxes or aliases obtained with the
proxyAddresses attribute.