Help Center

Setting up SAML SSO integration with Keycloak

Cloud Pyrus
Cloudless Pyrus

General information

Keycloak is an open-source authentication system that allows controlling user access to applications and data, providing a single sign-on (SSO) entry point.

SSO (Single Sign-On) is the technology used in Keycloak that allows users to authenticate in multiple applications with a single set of credentials.

Realm is an area for clients (applications) where user, application, role, and group management is configured. Each Realm has its own set of security policies, configurations, and authentication mechanisms.

Clients are applications and services that use Keycloak for user authentication and authorization.

Attributes are data from the user profile. Access to attributes and their management is performed through special operations. By default, attributes such as first name, last name, and email address are available for each user in Keycloak.

Mappers allow including user data (email, roles, groups they belong to) in the SAML attributes issued to clients during authentication.

Requirements

To set up Pyrus integration with Keycloak using SAML technology, you will need to:

  • install the Keycloak solution - the recommended version is 26 and above; technically, version 17 and above SAML technology is supported in Keycloak;
  • create an organization in Pyrus.

Note: this instruction is intended for Keycloak 26.3. The UI may differ for other versions.

Setting up the integration in Pyrus

Before proceeding to Pyrus, create a Realm in the Keycloak system.

  1. Log in to Pyrus.

  2. Click the gear icon in the lower left corner of the screen to access general settings.

  3. In the SAML Settings block, click Configure.

  4. Fill in the SAML settings:

-----BEGIN CERTIFICATE-----

Certificate

-----END CERTIFICATE-----

Setting up the integration in Keycloak

Creating a client

  1. Create a Client:

    • get the client configuration from a link of the form: https://pyrus.com/auth/saml/metadata/{ORG_ID}
    • import the client from the configuration obtained.

  2. In the client settings, in the SAML capabilities section, set the value of the Name ID format field to email.

Setting up data exchange between Pyrus and Keycloak

To automatically load user data (first name, last name, phone) into Pyrus from the Keycloak service, you need to configure the information exchange between Pyrus and user attributes in Keycloak. Follow these steps:

  1. Create a client scope — Client Scope.

  2. In the Client Scope, create mappers of User Attribute type with the field SAML Attribute NameFormat set to URI Reference for the following attributes:

    Tip: if the phone attribute is missing, it can be created. To do this, go to the Realm settings section, then to User profile.

  3. Go to the Clients section, open the Client Name tab, and then Client Scopes. Add the Client scope you created earlier in Default status.

Restrictions

Was this article helpful?