SAML integration
- 1 Configure your SAML identity provider
- 2 Create enterprises and roles for SAML
- 3 Configure SAML on Abiquo server
- 4 Configure Abiquo as the service provider
- 5 Additional configuration
- 6 Configure custom login error messages for SAML
- 7 Configure a SAML enterprise pool
- 8 Add multiple identity providers for SAML
- 9 About enterprise and role binding
- 10 Table of Abiquo configuration properties for SAML
- 11 Table of UI properties for SAML
Â
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 your SAML identity provider
We assume that you are already using SAML and that you already have your own IdP configuration.
We provide some basic instructions to illustrate our example with IdP claims and to give a better picture of our SAML configuration.
Do not use these instructions to configure your production environment
We do not maintain these instructions
To configure Azure Active Directory as an IdP for Abiquo testing:
Go to Azure portal (https://portal.azure.com)
Create an Azure Active Directory
For the Organization use
Default Directory
For the Domain use
MY_ORG.onmicrosoft.com
and replace MY_ORG with your organization name
Switch to the directory and create an Application
Go to Enterprise applications
Click Create your own application
Select the Integrate any other application you don't find in the gallery (Non-gallery) option
For the Name enter
samlidp
and click Create. Then wait for it to complete.
Go to Single sign-on, for the Authentication method, select SAML, and set the following values.
Basic SAML Configuration: add Abiquo URLs to authorize it as a client that can use this SAML IDP.
Identifier (Entity ID):
https://ABIQUO_FQDN:443/api/saml/metadata
ReplaceABIQUO_FQDN
with the domain name of your Abiquo serverReply URL (Assertion Consumer Service or ACS URL):
https://ABIQUO_FQDN:443/api/saml/SSO
ReplaceABIQUO_FQDN
with the domain name of your Abiquo serverSign on URL: Set an empty value
SAML Claims: create and set the claims you want to retrieve from AAD users in Abiquo.
For example:abq-enterprise:
user.department
abq-role:
user.jobtitle
user.userprincipalname
user.givenname
user.surname
user.mail
Go to the AAD organization main page and create SAML users.
Name: This will set the username in Abiquo
First Name
Last Name
Job title: This will set the user role in Abiquo, e.g.,
CLOUD_ADMIN_EXTERNAL
Department: This will set the enterprise in Abiquo, e.g.,
Abiquo
Add the users to the SAML IDP application we created before in order to authorize it to log in with SAML.
Â
Create enterprises and roles for SAML
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.
Log in to Abiquo as cloud admin
Go to Users
Create enterprises with Names or Properties to match the value of a SAML attribute. From our example above, we will match the SAML Department attribute
Enterprise Name:
Abiquo
OR if your enterprise names do not match SAML attributes, create or edit an enterprise, go to Properties and create a property to match.
Edit an enterprise (for example, Name =
My favorite enterprise
)Create an Enterprise property
Key:
department
Value:
Abiquo
Go to Roles
Create roles with External roles to match the value of a SAML attribute. From our example above, we will match Job title:
Role Name:
CLOUD_ADMIN_EXTERNAL
External roles:
CLOUD_ADMIN_EXTERNAL
Â
Configure SAML on Abiquo server
To configure SAML on the Abiquo server:
Log in to the Abiquo server as the system administrator
Create a folder to store the configuration
mkdir /opt/abiquo/config/saml
Download the federation metadata XML file for your configuration. This may be from a link like:
https://login.microsoftonline.com/<TenantDomainName>/FederationMetadata/2007-06/FederationMetadata.xml
See https://learn.microsoft.com/en-us/azure/active-directory/azuread-dev/azure-ad-federation-metadata#federation-metadata-endpointsCreate a metadata file for the identity provider, for example, at
/opt/abiquo/config/saml/idp_metadata.xml
and edit this file.Open the metadata XML file, and copy theÂ
EntityDescriptor
 bracket with only theIDPSSODescriptor
bracket inside it. Paste it in your metadata file for the entity provider.
It should look something like this but with different values for your identity provider.<?xml version="1.0" encoding="utf-8"?> <EntityDescriptor ID="_d75abe92_blah" entityID="https://sts.windows.net/d123456-blah/" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"> <IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"> ... </IDPSSODescriptor> </EntityDescriptor>
The
entityID
should be the value from your file. It may be something like this:https://sts.windows.net/d12345678-123e-49321-1234-1234abcd567890/
The
EntityDescriptor ID
should also be the value from your file.
Edit
/var/www/html/ui/config/client-config-custom.json
and add the following configuration to allow SAML login."client.login.modules": [ { "label": "Basic Auth", "description": "Basic Auth login", "templateUrl": "modules/login/authenticationmodules/basicauthentication/partials/basicauthenticationloginview.html", "cookieName": "" }, { "label": "SAML", "description": "SAML login", "templateUrl": "modules/login/authenticationmodules/saml/partials/samlloginview.html", "cookieName": "ABQSAMLTOKENS" } ]
Â
Edit
/opt/abiquo/config/abiquo.properties
and configure the following properties.Â
The
#abiquo.saml.metadata.serviceprovider.path
property should be commented out because first you can generate the metadata and later provide it with the file saved at this pathReplace the following values with the values for your environment:
ABIQUO_FQDN
MY_SAML_KEYSTORE
MY_SAML_KEYSTORE_PASSWORD
MY_SAML_APP_NAME
MY_SAML_KEY_PASSWORD
MY_SAML_APP
MY_SAML_KEY_PASSWORD
MY_ENTITY_ID
: you can get this from the Azure federation XML. It may be something likehttps://sts.windows.net/d12345678-123e-49321-1234-1234abcd567890/Â
Create a keystore with the above keystore values.
(In our test system we are used the one value for the signing and encryption password as
MY_SAML_KEY_PASSWORD)
Restart the Abiquo API
Check that the API works and has started successfully by logging in to Abiquo with basic auth as
admin
Â
Configure Abiquo as the service provider
To configure Abiquo as a service provider, obtain the metadata, save it to a file, and then enable the use of provided data.
Log in the Abiquo API server as an administrator
Generate the SP metadata:
Replace
ADMIN_USER
,ADMIN_PASSWORD
, andABIQUO_FQDN
with values for your environmentSave it to your SAML configuration folder
Edit the
abiquo.properties
file and set the values as followsRestart the Abiquo API
Check that the API works and has started successfully by logging in with SAML
Username:
USER_NAME@MY_ORG.onmicrosoft.com
Â
Additional configuration
We recommend that you do these additional steps
Add the metadata XML file to the IdP
Disable basic authentication. To do this, set theÂ
abiquo.saml.mode
 property toÂsingle
 (or just delete it becauseÂsingle
 is the default value).
Â
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:
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:
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.
Â
Add multiple identity providers for SAML
You can configure more than one identity provider for SAML. With the configuration, 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.Â
Abiquo still uses 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: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 in client-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. Abiquo 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
Â
Â
About enterprise and role binding
The Abiquo 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
 andÂacc_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 ofÂaccount
from the SAML Response.
Â
Table of Abiquo configuration properties for SAML
Â
Key | Description | Required | Role |
---|---|---|---|
| Sets the authentication module to use in the Abiquo Platform. | Yes | admin |
| Control the value of the SameSite flag of the login cookie. | No | admin |
| Required to start SAML and Abiquo 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 |
| Indicates the SAML mode to use.
| No | admin |
| URI redirect for a successful Abiquo login using SAML SSO. | Yes | admin |
| URI redirect for an unsuccessful Abiquo login using SAML SSO. This has to be set to a query parameter, " | No | admin |
| Indicates if the SP metadata is provided or must be generated by the API.
| No | admin |
| Indicates the location of the SP metadata to load. | Only if | admin |
| Indicates the location of the IdP metadata to load. | Yes | admin |
| If | No | admin |
| Indicates the location of the Java keystore from which to extract the keys to sign and/or encrypt the SAML requests. | Yes | admin |
| The password to unlock the Java keystore from location indicated by | Yes | admin |
| The alias of the key to use for signing SAML Requests | Yes | admin |
| The password of the key to use for signing SAML Requests | Yes | admin |
| The alias of the key to use for encryption of SAML Requests | Yes | admin |
| The password of the key to use for encryption of SAML Requests | Yes | admin |
| Indicates if the SAML Requests must be signed. | No | admin |
| 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 |
| Indicates which SAML Response attribute must be read to find the role to assign to the user during a successful login. | Yes | saml admin |
| 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 |
| Indicates which attribute must be read to find the user name. | No | saml admin |
| Indicates which attribute must be read to find the user last name. | No | saml admin |
| Indicates which attribute must be read in order to find the user email. | No | saml admin |
| 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 |
| Sets the default SAML IdP | Yes | abiquo admin |
| For multiple IdPs, map the user domains to the IdPs | Yes, for multiple IdPs | abiquo admin |
Â
Table of UI properties for SAML
For SAML, you can configure the following UI configuration properties in client-config-custom.json
. See Configure Abiquo UI for more details.Â
Property | Description |
---|---|
| Configure Abiquo modules to log in with
You can copy the options from |
| By default, when in |
Â
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved