Keycloak as IDP for WordPress SSO

WordPress SAML SP Single Sign-On plugin gives the ability to enable SAML Single Sign-On for your Wordpress sites. Our plugin is compatible with all the SAML compliant Identity providers. Here we will go through a step-by-step guide to configure SSO between Wordpress site and Keycloak by considering Keycloak as IdP.

miniorange img Pre-requisites : Download And Installation

To configure Keycloak with Wordpress, you will need to install the miniOrange WP SAML SP SSO plugin:

Step-by-step Video to Setup SSO between WordPress and Keycloak

Step 1: Configure Keycloak as IDP

Follow the steps below to configure Keyclock as an Identity Provider

miniorange img Setup IDP

  • In the miniOrange SAML SP SSO plugin, navigate to Service Provider Metadata tab. Here, you can find the SP metadata such as SP Entity ID and ACS (AssertionConsumerService) URL which are required to configure the Identity Provider.
  • wordpress saml upload metadata
  • In your Keycloak admin console, select the realm that you want to use.
  • Click on Clients from the left menu and then click on Create button to create a new client/application.
  • JBoss Keycloak SSO-1
  • Enter Client ID as the SP-EntityID / Issuer from the Service Provider Metadata and select SAML as the Client Protocol.
  • JBoss Keycloak SSO-2
  • Now click on Save.
  • Configure the following in Keycloak:
  • Client ID The SP-EntityID / Issuer from the plugin's Service Provider Metadata tab
    Name Provide a name for this client
    Description Provide a description
    Name ID Format Email
    Root URL Leave empty or Base URL of Service Provider
    Valid Redirect URIs The ACS (Assertion Consumer Service) URL from the plugin's Service Provider Metadata tab
    JBoss Keycloak SSO-3
  • Under Fine Grain SAML Endpoint Configuration, configure the following:
  • Assertion Consumer Service POST Binding URL The ACS (Assertion Consumer Service) URL from the plugin's Service Provider Metadata tab
    Logout Service Redirect Binding URL (Optional) The Single Logout URL from the plugin's Service Provider Metadata tab
    JBoss Keycloak SSO-4
  • Click on Save.

 Add Mappers

  • Go to Mappers tab and click on Add Builtin button.
  • JBoss Keycloak SSO-5
  • Check the boxes of X500 givenName, X500 surname and X500 email attributes.
  • JBoss Keycloak SSO-6
  • Click on Add Selected button. You will see the mappings as shown in the photo below.
  • JBoss Keycloak SSO-7

miniorange img Download setup file

  • Go to Realm Settings, click on SAML 2.0 Identity Provider Metadata mentioned as endpoints in the General Tab.
  • JBoss Keycloak SSO-7
  • Note the URL and keep it handy. Here you can find the information which will be used to configure the plugin.