Guide for Drupal Single Sign On (SSO) using JBoss Keycloak as Identity Provider (IdP)

Jboss keycloak Single Sign On (SSO) For Drupal miniOrange provides a ready to use solution for Drupal. This solution ensures that you are ready to roll out secure access to your Drupal site using Jboss Keycloak within minutes.

Step 1: Configuring Jboss keycloak as Identity Provider (IdP)

  • In your Keycloak admin console, select the realm that you want to use.
  • Drupal Jboss Keycloak configuration
  • Click on the Clients from the left navigation bar.
  • Click on create button at the top right corner and enter the following values to create a new client/application.
  • Client ID SP-EntityID/Issuer from Service Provider Metadata
    Client protocol SAML
    Client SAML Endpoint (optional) The ACS (Assertion Consumer Service) URL from Service Provider Metadata
    Drupal Jboss Keycloak new client application Drupal Jboss Keycloak new client/application
  • Click on Save.
  • Configure the following:
  • Client ID The SP-EntityID / Issuer from Service Provider Metadata
    NameProvide a name for this client (Eg. Drupal)
    Description (optional)Provide a description
    EnabledON
    Consent RequiredOFF
    Client ProtocolSAML
    Include AuthnStatementNO
    Sign DocumentsNO
    Optimize Redirect signing key lookupOFF
    Sign AssertionsNO
    Signature AlgorithmRSA_SHA256
    Encrypt AssertionOFF
    Client Signature RequiredOFF
    Client Signature RequiredEXCLUSIVE
    Force Name ID FormatNO
    Name ID FormatEmail
    Root URLLeave empty or Base URL of Service Provider
    Valid Redirect URIsThe ACS (Assertion Consumer Service) URL from Service Provider Metadata
  • Under Fine Grain SAML Endpoint Configuration, configure the following:
  • Assertion Consumer Service POST Binding URLThe ACS (Assertion Consumer Service) URL from Service Provider Metadata
    Logout Service Redirect Binding URLThe Single Logout URL from Service Provider Metadata
  • Click on Save.

Drupal Jboss Keycloak Saml Endpoint Add Mappers

  • Add the following attributes in the Mappers tab.
  • Click on Add Built-in and add the following option.
  • Drupal Jboss Keycloak Mappers tab

miniorange  Add User

  • Click on the Users from the left nav bar.
  • Add a new user/view all users.
  • Drupal Jboss Keycloak user tab
  • Enter the username, valid email address and check on User Enabled.
  • Drupal Jboss Keycloak User Enabled
  • Click on Save.

Step 2: Configuring Drupal as Service Provider(SP)

  • Click on the Realm Settings from the left nav bar and open SAML 2.0 Identity Provider Metadata.
  • Jboss keycloak Realm Setting

    OR

  • Go to, https://<YOUR_DOMAIN>/auth/realms/{YOUR_REALM}/protocol/saml/descriptor.These will open an XML in the browser.
  • Jboss keycloak XML browser
  • In miniOrange’s Drupal SAML SP plugin, go to Service Provider Setup Tab. Enter the following values:
  • Identity Provider Name Provide an Identity Provider name (For Example: Keycloak).
    IdP Entity ID or IssuerSearch for the entityID from IDP Metadata.Enter the Value in the Entity ID textbox.
    SAML Login URLSearch for SingleSignOnService Binding ”urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect” from IDP Metadata.Enter the location value in the SAML Login URL textbox.
    SAML Logout URL (Optional)Search for SingleLogoutService Binding”urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect” from IDP Metadata.Enter the location value in the SAML Login URL textbox.
    X.509 Certificate (Optional)Search for the X.509 Certificate from IDP Metadata.Enter the tag value in Certificate textbox.
    Enable login with SAMLChecked
    Signed SSO and SLO RequestsUnchecked
    Jboss keycloak Certificate
  • Click on Save Configuration.
  • Test the configuration after successful saving.
  • Jboss keycloak Site login url

Step 3: Attribute Mapping (It is Optional to fill this.) This is a Premium feature.

  • Attributes are user details that are stored in your Identity Provider.
  • Attribute Mapping helps you to get user attributes from your Identity Provider(IdP) and map them to Drupal user attributes like firstname, lastname etc.
  • While auto registering the users in your Drupal site these attributes will automatically get mapped to your Drupal user details.
  • In miniOrange SAML Module, go to Mapping tab. Enter the following values:
  • Username: Name of the username attribute from IdP (Keep NameID by default)
    Email: Name of the email attribute from IdP (Keep NameID by default)
    Group/Role Key: Name of the Role attribute from Identity Provider (IdP)
    Unable to load Image
  • You can check the Test Configuration Results under Service Provider Setup tab to get a better idea of which values to map here.

Step 4: Role mapping (It is Optional to fill this). This is a Premium feature.

  • Drupal uses a concept of Roles, designed to give the site owner the ability to control what users can and cannot do within the site.
  • Role mapping helps you to assign specific roles to users of a certain group in your Identity Provider (IdP).
  • While auto registering, the users are assigned roles based on the group they are mapped to.
  • Under the Role Mapping section, configure which GROUP value coming in the SAML response needs to be mapped to which role in Drupal. The Group value coming in the SAML response will be mapped to the Role assigned here and the user will be assigned that role in Drupal.
  • Unable to load Image

Step 5: Sign In Setting. This is a Premium feature.

  • Go to SIGNIN Settings tab. There are multiple features availabe in this tab like Protect your whole site, Auto redirect the user to Identity Provider and Backdoor Login.To use these features, click on the respective checkboxes.
  • Unable to upload image

Free Trial

If you don't find what you are looking for, please contact us at info@xecurify.com or call us at +1 978 658 9387.