Integrating with Keycloak
Keycloak is a powerful tool that helps to implement authentication and authorization in applications quickly and efficiently.
To integrate Instana with Keycloak, follow the steps:
Prerequisites
Before you integrate Keycloak with Instana, you require administrator privileges in Keycloak.
Downloading the service provider metadata
To configure Keycloak in Instana, a Service Provider Metadata XML file is provided. To download the file, click METADATA DOWNLOAD from the SAML settings dialog:
To save the file for later use, click METADATA DOWNLOAD.
For more information about configuring a service provider, see Configuring Service Provider.
Using an existing Realm
You must have an existing Realm in Keycloak. The following example uses SAML-DEMO.
Creating the SAML client in Keycloak
To create the SAML client in Keyclock, complete the following steps:
-
Go to Configure > Clients, and click Create.
-
Click Select file, and choose the previous downloaded service provider metadata.xml.
-
Click Save. You return to the newly imported client edit page.
-
Go to Realm Settings, and click SAML 2.0 Identity Provider Metadata to download the SAML 2.0 IdP metadata.
-
Save the content as descriptor.xml.
-
Go to the Instana-SAML setup page and upload the
descriptor.xmlfile.
-
Click Save to activate the SAML client configuration.
Adding users to Instana
To add users to the SAML client configured for Instana, you must assign users their appropriate client roles. To add users to the SAML client configured for Instana in Keycloak, follow this overview:
-
Navigate to the SAML client configured for Instana in the respective realm (eg. SAML – DEMO).
-
Assign users appropriate client roles to add them to the SAML client.
-
Roles determine what permissions and access control users will receive in Instana.
-
If your realm or client has a default role configured, new users will automatically receive that role upon login.
-
For more details on assigning roles in Keycloak, refer to, Keycloak Server Administration Guide.
You are also encouraged to assign role mappings in Instana to help ensure that it correctly reads SAML assertions and applies the appropriate permissions to users. If you don’t configure role mappings, Instana assigns users a default role, if one is set. For more details, see IdP Role Mapping.