This document describes how to configure the SAML integration to log in the platform with SAML SSO using SAML 2.0.
Please read all of this documentation before you start to configure your environment.
Configure enterprise and role binding
The first time a user logs in with SAML SSO, the Abiquo API will create the user’s account in the platform. Before the user can log in, the administrator must create an Abiquo enterprise and role for the user and define their SAML attributes. Then the API can get the user’s SAML attributes, select the correct role, and assign it to the user. This is called enterprise and role binding.
Here are some examples of how Abiquo can match SAML attributes for enterprises:
abiquo.saml.attributes.enterprise.claims = example
The API will get the value of the
example
attribute from the SAML Response. It will try to find an Abiquo enterprise with the same name. If it can't find an enterprise, it will look for an enterprise with an enterprise property key calledexample
that has a property value that matches the SAML Responseexample
attribute value.
abiquo.saml.attributes.enterprise.claims = organization,acc_id:account
The API will get the value of the
organization
andacc_id
attributes from the SAML Response. It will try to find an enterprise with a name that matches one of these values. If it can't find an enterprise, it will search the enterprise properties. It will return the enterprise that has the propertyorganization
with the value from the SAML Response andacc_id
property with the value ofaccount
from the SAML Response.
To configure the enterprise and role binding do these steps:
In Abiquo create enterprises for your users and assign Names or enterprise property Keys that will match the values of SAML attributes.
On the Abiquo Server, set the
abiquo.saml.attributes.enterprise.claims
property to specify the SAML attributes to match. Abiquo will get the values of these attributes and search for an enterprise name or enterprise property with this key to match the SAML values.In Abiquo create roles and set the External roles value to match the value of one or more SAML attributes. One Abiquo role can match multiple external roles, but each external role should only match one Abiquo role.
On the Abiquo Server, set the
abiquo.saml.attributes.role.claim
property to specify the SAML attribute to match the roles
Enable SAML authentication mode
Abiquo integrates different authentication options and the default authentication mode is abiquo
, which is basic authentication for users stored in the Abiquo database.
To enable SAML in Abiquo:
On the Abiquo Server, set the
abiquo.auth.module
property to a value ofsaml
.Before you start the Abiquo API again, complete the configuration in the follow sections to ensure that Abiquo API will start successfully.
Configure login modules in the UI
To enable users to log in with SAML, set the following UI configuration properties in client-config-custom.json. See Configure Abiquo UI for more details.
Property | Description |
---|---|
client.login.modules | Configure Abiquo modules to log in with Basic Auth (default), Open ID, SAML, or SAML + user. |
client.skip.login.view | By default, when in OpenID or SAML mode, Abiquo shows an initial screen with a link to the Authentication portal. |
Configure SameSite flag of login cookie
Optionally, on the Abiquo Server set the abiquo.login.samesite
property to control the value of the SameSite flag of the login cookie. See Abiquo configuration properties#samesite
Configure the maximum authentication age
On the Abiquo server set the abiquo.saml.authentication.maxage
property to control the maximum time in seconds that users can use SAML single sign-on after their initial authentication with the IDP. The default value is 2073600 seconds, which is 24 days.
Configure SAML identity provider
To enable Abiquo to identify and trust the SAML SSO Server, which is the identity provider (IdP):
Get the IdP metadata and save it on the Abiquo Server
On the Abiquo Server, set the following property pointing to this file:
abiquo.saml.metadata.identityprovider.path=/opt/abiquo/config/saml/identityprovider_metadata.xml
On the Abiquo Server, you must set the default IdP with the following property:
abiquo.saml.metadata.identityprovider.default.id
If you do not add this property, the Abiquo API will not start
Configure the Abiquo API as a SAML service provider
To configure Abiquo to act as a SAML service provider (SP) that can sign and encrypt SAML requests:
Create a dedicated keystore with the keys that Abiquo will need for signing and encrypting.
Configure the details of the keystore in Abiquo with the following properties:
abiquo.saml.keys.keystore.path=/op/abiquo/config/saml/saml_keystore.jks
abiquo.saml.keys.keystore.password=the_keystore_password
abiquo.saml.keys.metadata.sign=true
abiquo.saml.keys.signing.alias=alias_for_signing_key
abiquo.saml.keys.signing.password=password_for_signing_key
abiquo.saml.keys.encryption.alias=alias_for_encryption_key
abiquo.saml.keys.encryption.password=password_for_encryption_key
To configure the type of binding that the API will offer for the IdP, set the following property:
abiquo.saml.binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
We recommend that you use the same binding type as the IdP.
To configure the browser redirect to the Abiquo environment after a successful login, set the following property:
abiquo.saml.redirect.endpoint=https://<your-environment>/ui
Generate the service provider metadata
If you do not have a service provider (SP) metadata XML file, you can generate one using the Abiquo API.
Configure the SP properties as described in the above steps.
On the Abiquo Server, set the following properties with these values
abiquo.saml.metadata.mode=generated
abiquo.saml.metadata.serviceprovider.path=
# can be left empty because it is not usedabiquo.saml.mode=multi
Start the Abiquo API
Log in as an administrator user (with the
Manage datacenter
privilege)Perform an authenticated request to the path
/api/saml/metadata
Save the metadata response in a file
The API SAML metadata path is always enabled but it returns provided
or generated
metadata, depending on the value of the metadata.mode
property.
This path is protected, so the property abiquo.saml.mode=multi
allows the API to enable basic authentication and SAML SSO authentication.
This means that even if the SAML authentication is not already finished, you'll be able to perform the request with basic auth.
After you obtain the SP metadata, do these steps:
Add the metadata XML file to the IdP
Provide the SP metadata to the Abiquo API as described below
We also recommend that you do these additional steps
Disable basic authentication. To do this, set the
abiquo.saml.mode
property tosingle
(or just delete it becausesingle
is the default value).Configure the API to use the
provided
metadata file and stop the API from generating metadata each time you restart it. To do this, set theabiquo.saml.metadata.mode property
toprovided
Provide the SP metadata to the service provider and the identity provider
The Abiquo API (SP) and the SAML IdP require the SP metadata XML file. To configure the SP metadata XML file for the Abiquo API:
Save the SP metadata XML file on the Abiquo Server
Add the following properties:
abiquo.saml.metadata.serviceprovider.path=/opt/abiquo/config/saml/serviceprovider_metadata.xml
abiquo.saml.metadata.mode=provided
Your environment is now ready to use SAML SSO, just start the API and open the user interface in the browser.
Configure custom login error messages for SAML
By default, when there is a login error, the UI displays a generic error view and the user can return to the main login screen.
Optionally, to display custom error messages, configure the redirect to add an error parameter.
On the Abiquo API Server, set the abiquo.saml.redirect.error.endpoint
to point to your UI server and add an error code as follows:
abiquo.saml.redirect.error.endpoint = https://your.env.com/ui/?error=ERROR_CODE
Then for each error code, create a UI label with the error message text. For example, for US English, in lang_en_US_custom.json
, you could create a label as follows:
"login.error.SAMLERROR2": "Login failed!",
For details of more customizations, see Customize UI login errors.
Configure a SAML enterprise pool
Optionally, if you will only be using a single identity provider, you can enable users to log in to an enterprise pool of enterprises with the same enterprise claim value.
The login process will select the first matching enterprise from the pool.
To configure this option, set the following property.
abiquo.saml.login.allow.enterprise.pool = true
Add multiple identity providers for SAML
Abiquo 5.2.1 introduces multiple identity providers (IdPs) for the SAML integration.
When the user enters their email address to log in, Abiquo will select the IdP based on its domain name, or it will use the default IdP.
In this version, Abiquo will use the same IdP configuration for all providers, for example, it will search for the same abq-role
attribute to match an Abiquo role.
To configure an existing SAML integration with more IdPs, do these steps on the Abiquo Server:
Save the metadata for the new IdPs, as for the first IdP
For the default IdP, edit the metadata and set the Default attribute
Edit the
abiquo.properties
file to make these changes:Add the paths to the metadata of the new IdPs as a comma separated list to the
abiquo.saml.metadata.identityprovider.path
propertyTo set the default IdP, add the new
abiquo.saml.metadata.identityprovider.default.id
propertyTo map the user email domains to IdPs, set the new
abiquo.saml.metadata.identityprovider.userdomain.map
property with a comma separated list of keys and values. For example:abiquo.saml.metadata.identityprovider.userdomain.map = example.com=https://sts.example.com/ffff2108-833e-4940-87e6-3d39ce9adb70/,abiquo.com=https://idp.example.com
Do not use a comma
,
in a key or a value
Do not use use an equals sign=
in the key
Share the Abiquo SP data with the new IdPs
On the UI server, edit the
client-config-custom.json
file and change theclient.login.module
property fromSAML
toSAML + user
.
For more details, see the examples inclient-config-default.json
file.
For this feature, there is a new /saml/idp
endpoint in the Abiquo API where the UI will send a GET request with the user domain. This endpoint will return a redirect to the usual /saml/login
endpoint with the appropriate IdP. Then the login will continue as for a single IdP.
When you enable this feature, Abiquo will change the XML security metadata of the Abiquo application. It will add the beans for new IdPs and mark the default IdP in the metadata configuration of security-saml-generated-beans.xml
and security-saml-provided-beans.xml
.
Before you upgrade Abiquo, you must back up the security beans configuration.
After you upgrade Abiquo, when there is a new version of the security beans files, you must add the default IdP and the IdP beans again
Table of Abiquo configuration properties for SAML
Key | Description | Required | Role |
---|---|---|---|
abiquo.auth.module | Sets the authentication module to use in the Abiquo Platform. | Yes | ADMIN |
abiquo.saml.authentication.maxage | New in Abiquo 6.0.0 Maximum time in seconds the system allows users to use SAML single sign-on after their initial authentication with the IDP. | Required to start SAML | ADMIN |
abiquo.saml.mode | Indicates the SAML mode to use.
| No | ADMIN |
abiquo.saml.redirect.endpoint | URI redirect for a successful Abiquo login using SAML SSO. | Yes | ADMIN |
abiquo.saml.redirect.error.endpoint | URI redirect for an unsuccessful Abiquo login using SAML SSO. This has to be set to a query parameter, " | No | ADMIN |
abiquo.saml.metadata.mode = provided | Indicates if the SP metadata is provided or must be generated by the API.
| No | ADMIN |
abiquo.saml.metadata.serviceprovider.path | Indicates the location of the SP metadata to load. | Only if | ADMIN |
abiquo.saml.metadata.identityprovider.path | Indicates the location of the IdP metadata to load. | Yes | ADMIN |
abiquo.saml.metadata.generator.bindingSSO | If | No | ADMIN |
abiquo.saml.keys.keystore.path | Indicates the location of the Java keystore from which to extract the keys to sign and/or encrypt the SAML requests. | Yes | ADMIN |
abiquo.saml.keys.keystore.password | The password to unlock the Java keystore from location indicated by | Yes | ADMIN |
abiquo.saml.keys.signing.alias | The alias of the key to use for signing SAML Requests | Yes | ADMIN |
abiquo.saml.keys.signing.password | The password of the key to use for signing SAML Requests | Yes | ADMIN |
abiquo.saml.keys.encryption.alias | The alias of the key to use for encryption of SAML Requests | Yes | ADMIN |
abiquo.saml.keys.encryption.password | The password of the key to use for encryption of SAML Requests | Yes | ADMIN |
abiquo.saml.keys.metadata.sign | Indicates if the SAML Requests must be signed. | No | ADMIN |
abiquo.saml.binding | Indicates the binding profile to allow. | Yes | SAML ADMIN |
Indicates which SAML Response attribute must identify a unique user; if not set up, the principal will be used. | No | SAML ADMIN | |
abiquo.saml.attributes.role.claim | Indicates which SAML Response attribute must be read to find the role to assign to the user during a successful login. | Yes | SAML ADMIN |
abiquo.saml.attributes.enterprise.claims | Indicates which SAML Response attributes must be read to find the enterprise to assign to the user during a successful login. Matches an enterprise name or an enterprise property key. | Yes | SAML ADMIN |
abiquo.saml.attributes.user.firstname.claim | Indicates which attribute must be read to find the user name. | No | SAML ADMIN |
abiquo.saml.attributes.user.lastname.claim | Indicates which attribute must be read to find the user last name. | No | SAML ADMIN |
abiquo.saml.attributes.user.email.claim | Indicates which attribute must be read in order to find the user email. | No | SAML ADMIN |
abiquo.saml.login.allow.enterprise.pool | Allow the use of multiple enterprises with the same enterprise claim property as a pool. Will assign the user to the first enterprise match. Only valid for | No | SAML ADMIN |
abiquo.saml.metadata.identityprovider.default.id | Sets the default SAML IdP | Yes | ABIQUO ADMIN |
abiquo.saml.metadata.identityprovider.userdomain.map | For multiple IdPs, map the user domains to the IdPs | Yes, for multiple IdPs | ABIQUO ADMIN |