Before creating a new SAML configuration for SaltStack Config, read through these steps to ensure you are familiar with the configuration process.
Before configuring SAML in SaltStack Config:
- Install the SAML identity provider (IdP) and ensure it is running. This topic will not provide instructions for the installation of any IdP. Contact your IdP administrator for support.
- Ensure that you have access to the credentials and configuration data provided by the IdP. In addition, see the following section about Creating a service provider certificate.
Creating a service provider certificate
You need to generate a certificate to add SaltStack Config as an approved service provider with your IdP. Your SaltStack Config service provider needs an RSA key pair. You enter the private and public key values in several places when you configure SAML for SaltStack Config.
To create the certificate:
- Generate a private key, called cert.perm, using the following command:
openssl genrsa -out cert.pem 2048
- Create the public key associated with the private key you just created in the previous step. The following command walks you through the process:
openssl req -new -x509 -key cert.pem -out cert.pub -days 1825
- As this command runs, answer the prompts as needed, such as your:
- Country name
- State or province name
- Locality or city name
- Organization or company name
- Organizational unit name
- Server hostname
- Email address
You now have the public and private key pair that will be used in your SAML configuration. Record these public and private key pairs for easy access when working through the rest of the configuration process. Proceed to the next section for instructions about Setting up a SAML configuration.
Setting up a SAML configuration
Before completing the steps in this section, ensure you have generated the public and private keys for SaltStack Config as your service provider. For more instructions, see Creating a service provider certificate.
To set up SAML SSO using your organization’s preferred IdP in SaltStack Config:
- Click Administration > Authentication on the side menu.
- Click Create.
- From the Configuration Type menu, select SAML.
The workspace displays the supported settings for the SAML configuration type.
- In the Settings tab, complete the following fields with the information about your SaltStack Config installation:
Note: For descriptions of these fields, see SAML information fields.
- Base URI
- Entity ID
- Company Name
- Display Name
- In the Private Key field, copy the private key you generated when you created the service provider certificate for SaltStack Config. For more information, see Creating a service provider certificate.
- In the Public Key field, copy the public key you generated when you created the service provider certificate for SaltStack Config.
- Complete the fields with the relevant contact information for your:
- Technical contact
- Support contact
- In the Provider Information section, complete the following fields with the metadata about your identity provider (IdP):
Note: ADFS, Azure AD, and Google SAML are examples of common identity providers. You’ll fill in these fields with information provided by your IdP. For more information about these fields, see SAML information fields.
- Entity ID
- User ID
- x509 certificate
- OPTIONAL: Check the Attribute Statement Check box if you want SaltStack Config to check the SAML Attribute Statements for user profiles. This option is checked by default.
- Click Save.
The SAML configuration for SaltStack Config is now complete. Proceed to the next section for instructions about Configuring the IdP with service provider information.
Configuring the IdP with service provider information
Before completing the steps in this section, ensure you have configured SAML in SaltStack Config first. For more information, see the instructions about Setting up a SAML configuration.
To complete your SAML configuration, the identity provider needs two important pieces of data:
- The AssertionCustomerService URL
- The public (x509) certificate (public key) you generated when you created the service provider certificate for SaltStack Config. For more information, see Creating a service provider certificate.
The AssertionCustomerService URL is the web address your service provider uses to accept SAML messages and artifacts when establishing an identity assertion. In this case, SaltStack Config is the service provider.
The following is an example of the typical format for the AssertionCustomerService URL:
After you’ve provided this data to your IdP, proceed to the next section for instructions about Creating attribute mappings.
Creating attribute mappings
SaltStack Config pulls information about the user from the inbound SAML assertion. For that reason, the IdP must ensure that the required values are sent as additional attributes. The process for mapping these attributes is specific to each SAML identity provider. For assistance creating attribute mappings, refer to your IdP’s documentation or contact your administrator.
SaltStack Config needs to define the user’s following attributes:
- User ID
Many organizations will map all three of these values to a single attribute: the user’s email address. The user’s email address is often used because it is typically unique across an organization.
Configuring RBAC for SAML
SaltStack Config supports creating roles and permissions for users in various roles. RBAC for SAML is managed the same way you would manage users whose credentials are stored natively in SaltStack Config on the API (RaaS) server. For more on the Roles workspace, see Roles and permissions.
After creating roles, you can then add SAML users and assign them to roles. For more information, see the following section about Adding users.
By default, new users are registered in SaltStack Config only after a user’s first successful login with SAML. Alternatively, you can add users manually to pre-register these users in SaltStack Config.
To manually add users:
- In the Authentication workspace, select your SAML configuration from the list of Authentication Configs to open your configuration settings.
- In the configuration settings, click the User tab.
- Click the Create button.
- In the Username field, enter the credentials for the user you want to add. This username must be identical to their assigned SAML username.
Note: Ensure that this username is accurate. Once a user has been created, their username cannot be changed or renamed.
- In the Roles field, select any roles you want to add the user to. All new users are added to the User role by default. For more information, see Configuring RBAC for SAML.
- Click Save.
Note: After a user has been manually created, they can only be deleted before their first login. After the user has logged in initially, the delete button is still available in this workspace, but it no longer works.
Troubleshooting and validating the configuration
After you’ve configured SSO in SaltStack Config, try logging in as a typical user to ensure that the login process works as expected and that roles and permissions are correct.
To troubleshoot potential errors, try:
- Using the SAML tracer tool, which is available for Firefox and Chrome web browsers.
- Viewing the