Search Results :

×

DNN OAuth Single Sign-On (SSO) using Keycloak As OAuth Provider


DNN OAuth Single Sign-On (SSO) authentication provider gives the ability to enable OAuth Single Sign-On for your DotNetNuke site. Using Single Sign-On you can use only one password to access your DotNetNuke site and services. Our authentication provider is compatible with all the OAuth compliant identity providers. Here we will go through a step-by-step guide to configure Single Sign-On (SSO) between DNN and Keyclock considering Keyclcok as OAuth Provider. To know more about the other features we provide for DNN OAuth Single Sign-On (SSO), click here.

Pre-requisites: Download and Installation

  • Download the DNN Oauth Single Sign On authentication provider with above link.
  • Upload the installation package dnn-oauth-single-sign-on_xxx_Install by going in Settings > Extension > Install Extension.
  • Now under the Installed extensions tab select Authentication Systems. Here you can see the miniOrange DNN OAuth Authentication Provider.
  • DNN OAuth SSO - Authentication Provider
  • Just click on the pencil icon as mentioned in the image below to configure the DNN OAuth Authentication Provider.
  • DNN OAuth SSO - Authentication Provider pencil icon
  • You have finished with the installation of the Authentication Provider on your DNN site.

Steps to configure DNN Single Sign-On (SSO) using Keyclock as IDP

1. Configure Authentication Provider for Setting up OAuth Single Sign-On (SSO)

  • For configuring application in the authentication provider, click on the Add New Provider button in the Identity Provider Settings tab.
  • DNN OAuth SSO - add new IDP

    Select your Identity Provider

  • Select Keyclock as Identity Provider from the list. You can also search for your Identity Provider using the search box.
  • DNN OAuth SSO - Select identity provider

2. Configure Keycloak as OAuth Provider

  • First of all, Download Keycloak and install it.
  • Start Server: Start the keycloak server by running the _standalone.sh_ file.
  • Root Directory of keycloak bin standalone.sh

  • Add Realm : Now login to keycloak administration console and navigate to your desired realm. You can add new realm by selecting Add Realm option.
  • DNN Keycloak OAuth SSO - add realm
  • Create realm: Enter Realm Name and keep the realm name handy as it will required later to configure the Realm under the DNN OAuth plugin. Click on CREATE to add realm.
  • DNN Keycloak OAuth SSO - add realm
  • Create OpenID client: Click on the Clients and choose create to create a new client. Enter client id and select client protocol openeid-connect and select Save.
  • DNN Keycloak OAuth SSO - client id
  • Change Access type: After client is created change its access type to confidential.
  • DNN Keycloak OAuth SSO - change access type
  • Enter Valid Redirect URIs: Copy Callback URL from plugin and then click on SAVE. Ex -- https:///oauth/callback
  • DNN Keycloak OAuth SSO - change access type
  • Get Client Secret: Now we need to get client secret. So select Clients and select credentials and copy your secret from here.
  • DNN Keycloak OAuth SSO - client id client secret
  • Plugin Configuration: Enter copied Client Secret under Client secret field in the DNN OAuth plugin, and enter the Client Name under the Client ID field.
  • Add User: We need to add users to realm who will be able to access the resources of realm. Click on the Users and choose to Add a new User.
  • DNN Keycloak OAuth SSO - add user
  • User Configuration: After user is created following action needs to be performed on it.
    • 1) Setting a password for it so click on Credentials and set a new Password for the user.

    DNN Keycloak OAuth SSO - set password

    NOTE : Disabling Temporary will make user password permanent.

  • Map User: We need to map user to a role. Click on Role Mappings and assign the user desired role from available roles and clicking on add selected.
  • DNN Keycloak OAuth SSO - map user
  • Create ROLE: The Role will be used by your applications to define which users will be authorized to access the application. Click on the Roles and choose Add Role.
  • DNN Keycloak OAuth SSO - add role

    Step 2.1: Steps to fetch Keycloak Groups

    • Create groups: Click on the Groups and choose New to create a new group.
    • DNN Keycloak OAuth SSO - create group
    • Assign user to group: Select the user whom you want to add in group. Choose Groups option from tab and then select the group-name and click on join.
    • DNN Keycloak OAuth SSO - assign group
    • Keycloak Group Mapper: Now to get group details we need to perform its client mapping with group membership else group details will not be fetched. So in Client section, select your client and then click on mapper->create.
    • DNN Keycloak OAuth SSO - group mapper DNN Keycloak OAuth SSO - group mapper
    • Now, select mapper type as Group Membership and enter the name and token claim name i.e the attribute name corresponding to which groups will be fetched. Turn Off the full group path, Add to ID token and Add to access token options, and click on Save.
    • DNN Keycloak OAuth SSO - group mapper

      Note: -- If full path is on group path will be fetched else group name will be fetched.

    Step 2.2: Steps to fetch Keycloak Roles

    • Keycloak Role Mapper: Now to get role details we need to perform its client mapping with role membership else role details will not be fetched. So in Client section, select your client and then click on mapper->create.
    • DNN Keycloak OAuth SSO - group mapper DNN Keycloak OAuth SSO - group mapper
    • Now, select mapper type as user realm Role Membership and enter the name. and token claim name i.e the attribute name corresponding to which groups will be fetched. Add to ID token and Add to access token options, and click on Save.
    • DNN Keycloak OAuth SSO - group mapper
  • Add Realm : Now login to keycloak administration console and navigate to your desired realm. You can add new realm by selecting Create Realm option.
  • DNN Keycloak OAuth SSO - Add realm
  • Create realm: Enter Realm Name and keep the realm name handy as it will required later to configure the Realm under the DNN OAuth plugin. Click on CREATE to add realm.
  • DNN Keycloak OAuth SSO - Create realm
  • Create OpenID client: Click on the Clients and choose Create Client to create a new client. Enter Client ID and select client protocol openid-connect and Click Next.
  • DNN Keycloak OAuth SSO - Create client DNN Keycloak OAuth SSO - Add client id
  • Enable the Client Authentication and Authorization toggle.
  • DNN Keycloak OAuth SSO - Enable toggle
  • Scroll down to the Access settings and enter your Callback/Redirect URL which you will get from your miniOrange plugin present on your Client side under the CallBack URLs text-field.
  • DNN Keycloak OAuth SSO - callback url
  • Go to the Credentials tab, copy the Client Secret and keep it handy as we will require it later while configuring DNN OAuth Single Sign-On plugin.
  • DNN Keycloak OAuth SSO - Copy client secret
  • Plugin Configuration: Enter copied Client Secret under Client secret field in the DNN OAuth plugin, and enter the Client ID under the Client ID field.
  • Add User: We need to add users to realm who will be able to access the resources of realm. Click on the Users and Click on Create new user to Add a new User.
  • DNN Keycloak OAuth SSO - Add user
  • User Configuration: After user is created following action needs to be performed on it.
    • 1) Setting a password for it so click on Credentials and set a new Password for the user.

    DNN Keycloak OAuth SSO - set password

    NOTE : Disabling Temporary will make user password permanent.

  • Map User: We need to map user to a role. Click on Role Mappings and assign the user desired role from available roles.
  • DNN Keycloak OAuth SSO - map user
  • Create ROLE: The Role will be used by your applications to define which users will be authorized to access the application. Click on the Roles and choose Create Role.
  • DNN Keycloak OAuth SSO - add role

3. Configuring OAuth Provider

  • Copy the Redirect/Callback URL and provide it to your OAuth provider.
  • DNN OAuth SSO - DNN OAuth Redirect URL

4. Configuring OAuth Client

  • Configure Client ID, Client Secret, update the endpoints if required and save the settings.
  • DNN OAuth SSO - Configuration DNN OAuth SSO - Configuration

5. Test Configuration

  • Now go to the Identity Provider Settings tab.
  • Under the select actions click on the Test Configuration button to verify if you have configured the authentication provider correctly.
  • DNN OAuth SSO - Testing OAuth SSO
  • On successful configuration, you will get Attribute Name and Attribute Values in the Test Configuration window.
  • DNN OAuth SSO - Testing OAuth SSO

6. Attribute Mapping

  • For attribute mapping select the Edit Configuration from the select actions dropdown.
  • Map email and username with Attribute Name you can see in Test Configuration window and save the settings.
  • DNN OAuth SSO - DNN OAuth Attribute Mapping

You can even configure the ASP.NET SAML Single Sign-On (SSO) module with any identity provider such as ADFS, Azure AD, Bitium, Centrify, G Suite, JBoss Keycloak, Okta, OneLogin, Salesforce, AWS Cognito, OpenAM, Oracle, PingFederate, PingOne, RSA SecureID, Shibboleth-2, Shibboleth-3, SimpleSAML, WSO2 or even with your own custom identity provider. To check other identity providers, click here.

Additional Resources

Need Help?

Not able to find your identity provider? Mail us on dnnsupport@xecurify.com and we'll help you set up SSO with your IDP and for quick guidance (via email/meeting) on your requirement and our team will help you to select the best suitable solution/plan as per your requirement.

Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com