Search Results :

×

Odoo OAuth / OIDC Single Sign-On using KeyCloak as IDP


Configure secure Single Sign-On(SSO) login into Odoo with Keycloak using our Odoo OAuth Single Sign-On(SSO) module. The Odoo OAuth SSO plugin allows users to use their Keycloak credentials for a seamless Odoo Keycloak Login via SSO. Facilitating Keycloak SSO enables users to authenticate against their Keycloak credentials and securely access your Odoo site. This step-by-step setup guide will help you configure Keycloak as Identity Provider (IDP) and Odoo as Service Provider (SP) to achieve Keycloak Odoo SSO. To know more about other features we provide in Odoo OAuth Single Sign-On (SSO) plugin, you can click here.


Prerequisites: Download and Installation

  • An Odoo installation on your environment.
  • Installed miniOrange OAuth SSO module for Odoo.

Steps to configure KeyCloak as Identity Provider

Steps to configure KeyCloak

  • Add Realm: Login to KeyCloak administration console and navigate to your desired realm. You can add new realm by selecting Create Realm option.
  • add new realm create Odoo keycloak OAuth Single Sign-On (SSO)
  • Create realm: Enter Realm Name and keep the realm name handy as it will required later to configure the Realm under the OAuth Client plugin. Click on CREATE to add realm.
  • create to add realm Odoo keycloak OAuth Single Sign-On (SSO)
  • 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.
  • create openid client protocol Odoo keycloak OAuth Single Sign-On (SSO) gerenal-setting-next-save4
  • Enable the Client Authentication and Authorization toggle.
  • client authentication toggle Odoo keycloak OAuth Single Sign-On (SSO)
  • 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.
  • callback-redirect url access settings Odoo keycloak OAuth Single Sign-On (SSO)
  • Go to the Credentials tab, copy the Client Secret and keep it handy as we will require it later while configuring WordPress OAuth Single Sign-On plugin.
  • credentials tab client secret Odoo keycloak OAuth Single Sign-On (SSO)
  • Plugin Configuration: Enter copied Client Secret under Client secret field in the OAuth Client 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.
  • resource create new user Odoo keycloak OAuth Single Sign-On (SSO)
  • User Configuration: After user is created following action needs to be performed on it.
  • Setting a password for it so click on Credentials and set a new Password for the user.
  • credentials set new password Odoo keycloak OAuth Single Sign-On (SSO)

Configure the Odoo Application as Service Provider

  • Navigate to Odoo Homepage and Click on the menu button.
  • odoo homepage menu button Odoo keycloak OAuth Single Sign-On (SSO)
  • Click on miniOrange OAuth 2.0.
  • miniOrange oauth realm module Odoo keycloak OAuth Single Sign-On (SSO)
  • Click on Create button to configure your OAuth Provider.
  • create configure oauth provider Odoo keycloak OAuth Single Sign-On (SSO)
  • You will see the following Screen.
  • gerenal following screen Odoo keycloak OAuth Single Sign-On (SSO)
  • In General Configuration, fill in the name of the Identity Provider (eg, WordPress). You will also need to fill the following fields which you will get from your IdP.
  • Client ID: as provided by keycloak
    Client Secret: as provided by keycloak
    Scope: email profile openid
    Authorize Endpoint: <keycloak domain>/auth/realms/{realm-name}/protocol/openid-connect/auth
    Access Token Endpoint: <keycloak domain>/auth/realms/{realm-name}/protocol/openid-connect/token
    Get User Info Endpoint: <keycloak domain>/auth/realms/{realm-name}/protocol/openid-connect/userinfo
  • In the Attribute Mapping section, you can map the attributes from your IdP to users on the Odoo ERP system as desired.
  • In the Mapping section, you can map the groups from IdP to your Odoo system. After filling in the required fields, you can click on the save button.
  • attribute mapping section download Odoo keycloak OAuth Single Sign-On (SSO)
  • We are done with setting up SSO using miniOrange OAuth SSO module for Odoo.

Test the configuration by following there steps

  • Go to Odoo Login page. You will see an extra button with same name as configured in the module.
  • odoo login page keycloak button Odoo keycloak OAuth Single Sign-On (SSO)
  • Click on the button and you will be directed to you IdP login page. Enter your IdP credentials and click Login.
  • After successful authentication, you will be logged into Odoo.
  • successful logged into odoo Odoo keycloak OAuth Single Sign-On (SSO)

In this Guide, you have successfully configured miniOrange OAuth SSO module for Odoo to Login using Keycloak credentials. Now your users can log in into Odoo using your Keycloak IdP credentials.

Feel free to reach out to us at odoosupport@xecurify.com with your questions and queries.

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