OAuth/OpenID Single Sign On (SSO) into Crowd using Azure B2C


Crowd OAuth/OIDC app gives the ability to enable OAuth/OIDC Single Sign-On for JIRA, Confluence, Bitbucket, Bamboo, Fisheye, and other connected applications from any OAuth/OpenID Identity Providers. Here we will go through a guide to configure SSO between Crowd and Identity Provider. By the end of this guide, your IdP users should be able to log in and register to Crowd Software.

Pre-requisites

    To configure your Identity Provider integration with Crowd OAuth/OIDC SSO, you need the following items:

    • Crowd should be installed and configured.
    • Admin credentials are set up in Crowd.
    • Crowd Server is HTTPS enabled (optional).
    • Valid Crowd Server or Datacenter Licence.

Download And Installation

  • Log into your Crowd instance as an admin.
  • Navigate to the Administration menu and Click Manage Apps.
  • Click Find new apps or Find new add-ons from the left-hand side of the page.
  • Locate OAuth/OIDC SSO via search and click on install.
  • SAML Single Sign On (SSO) into Crowd, Install Crowd Add-On through manage apps menu
A. License and Plugin Download

  • Create an account with miniOrange.
  • Login to miniOrange Admin console.
  • Navigate to License > Manage License > Release and Download .
  • Download the jar file from the Download link.
  • Now, click on the View License button to get the license key.
B. Installation

  • Log in to the Crowd Admin console.
  • Navigate to Administration > Manage Apps.
  • Click on the Upload App and upload the jar file.
  • Now, click on the Configure button. You will be asked to verify the miniOrange credential and license key.
C. Plugin Activation

  • Navigate to Crowd Admin Console → Manage Apps.
  • Click on the Configure button of the miniOrange Crowd OAuth/OIDC SSO plugin.
  • Log in with your miniOrange account. Once authenticated, you will be prompted to enter the license key.
  • Enter the license key and click on the verify button.

Step 1: Setup Azure B2C as OAuth Provider

  • To perform SSO with Azure B2C as Provider, your application must be https enabled.
  • Sign in to Azure portal.
  • Go to Home and in the Azure services, select Azure AD B2C.
  • Configure Azure B2C SSO (Single Sign-On) - Select Azure AD B2C
  • Please make sure you are in the Azure AD B2C directory with an active subscription and if not, you can switch to the correct directory.
  • Configure Azure B2C SSO (Single Sign-On) - Login Applications
  • In the Essentials tab, you will find the Azure B2C domain name, keep it handy, you will need it later for configuring the Azure B2C tenant name under plugin.

  • Configure Azure B2C SSO (Single Sign-On) - Generate Key
  • Now, click on App registrations and then click on the New registration option to create a new Azure b2c application.
  • Configure Azure B2C SSO (Single Sign-On) - Login Applications
  • Configure the following options to create a new application.
    • Enter a name for your application under the Name text field.
    • In supported account types, select 3rd option ‘Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)’
    • In the Redirect URI section, select the Web application and enter the Callback URL from the plugin and save it under the Redirect URL textbox.
    • Click on the Register button to create your application.
    • Configure Azure B2C SSO (Single Sign-On) - Create
  • After successful application creation, you will be redirected to the newly created application’s overview page. If not, you can go to the app registrations and search the name of your application and you will find your application in the list.
  • Configure Azure B2C SSO (Single Sign-On) - Applications option
  • Copy your Application ID and keep it handy.
  • Configure Azure B2C SSO (Single Sign-On) - Application ID
  • Now, click on Certificates and secrets and then click on New Client Secret to generate a Client Secret. Enter a description and click on the Add button.
  • Configure Azure B2C SSO (Single Sign-On) - Generate Key
  • Copy the secret value from certificates & secrets page and keep it handy.
  • Configure Azure B2C SSO (Single Sign-On) - Generate Key

Step 1.1: Add Users in your b2c application

  • In home page, go to the Users tab in the left corner
  • Configure Azure B2C SSO (Single Sign-On) - user flow
  • Click on New user in the users page. Then click on Create new user option.
  • Configure Azure B2C SSO (Single Sign-On) - user flow
  • Select Create Azure AD B2C user. Then, scroll down and click on Email from sign in method and set your password and click create to save the user details to perform test connection.
  • Configure Azure B2C SSO (Single Sign-On) - user flow

Step 2: Setup Crowd as OAuth Client

  • Click on Add new Provider and select Azure B2C from the list.
  • Enter copied Client ID, Client Secret, and Tenant ID.
  • OAuth / OpenID Single Sign On (SSO) using ADFS Identity Provider, Configure OAuth
  • Add https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/logout?p={APP_NAME} in logout endpoint. This endpoint will logout you from Azure B2C when you logout from Crowd. logout_uri will redirect you to Crowd login Page.
  • The scope is required. Configure the Scope as openid.
  • Enter JWKS EndPoint URL or Public Key for signature validation. Eg.https://login.microsoftonline.com/common/discovery/keys
  • Click on Test Configuration for verifying the entered details.

Step 3.1: Configuring Multiple IDPs


  • If your use case requires multiple IDPs to be configured on your SP, the plugin supports that as well. You can add another IDP by going to the Configured Providers section andusing the Add New Provider button.
  •  OAuth / OpenID Single Sign On (SSO) into Crowd, Multiple IDP

Step 3.2: Managing SSO with multiple IDPs


  • If you have multiple IDPs configured, you will have to modify the custom login template by adding a new SSO button.
  • Go to the Look and Feel tab and paste the code given to add an SSO button.
  •  OAuth / OpenID Single Sign On (SSO) into Crowd, Multiple IDP

Step 4: User Profile

    We will be setting up user profile attributes for Crowd. If your users are stored in a Read-Only directory, please check Disable Attribute Mapping in theUser Profile tab and follow the steps given in Matching a User.

     OAuth / OpenID Single Sign On (SSO) into Crowd, Multiple IDP

    a. Finding correct attributes

    • Go to Configure OAuth tab. Scroll down and click on Test Configuration.
    • You will see all the values returned by your OAuth/OpenID Provider to Crowd in a table. If you don't see a value for First Name, Last Name, Email, or Username, make the required settings in your OAuth/OpenID Provider to return this information.
    • Once you see all the values in Test Configuration, keep the window open and go to the User Profile tab.

    b. Setting profile attributes

    • In this tab, fill the values by matching the name of the attribute. For instance, if the Attribute Name in the Test Configuration window is NameID, enter NameID against Username
    • Setting up both Username and Email is required if you want to let users register. If you want existing users to the only login, configure the attribute using which you will match the user in Crowd.

    c. Matching a User

    When the user logs into Crowd, one of the user's data/attributes coming in from the OAuth/OpenID Provider is used to search the user in Crowd. This is used to detect the user in Crowd and log in the user to the same account.

    • Go to the User Profile tab
    • Select Username or Email for Login/Search Crowd user account by
    • Enter the attribute name from OAuth/OpenID Provider which corresponds to Username or Email using Finding Correct Attributes

Step 5: User Groups

    We will be setting up user group attributes for Crowd. If your users are stored in a Read-Only directory, please select assign default groups to "None".

     Setting default group Setting default group

    • Select the users' Default Group in the tab User Groups. If no group is mapped, users are added by default to this group.
    • You can enable default groups for All Users or New Users using the option.Select None if you don't want to assign any default group to SSO users. Using the option Enable Default Groups for.
    •  OAuth / OpenID Single Sign On (SSO) into Crowd, Multiple IDP

Step 6: Sign In Settings

  • The settings in the SSO Settings tab define the user experience for Single Sign-On.
  • Enable Auto-redirect to OAuth/OpenId Provider if you want to allow users to log in only using OAuth/OpenId Provider. Enable backdoor for an emergency.
  •  OAuth / OpenID Single Sign On (SSO) into Crowd, Multiple IDP

Step 7: Advance SSO options

  • Set the Relay State to the URL to which the users would be redirected after login. Keep this empty to redirect users to the same page they started with.
  • Click on ACR Value Check checkbox if you want to add ACR Value parameter to the authorised server request. This setting is optional. The ACR value specifies the authentication method used by the Authorization Server and is used to enable the multi-factor authentication.
  • Click on Nonce checkbox if you want to add the nonce parameter to authorised server request. The nonce parameter is used to validate the tokens received from the provider. Its purpose is to mitigate the replay attack.
  • Select the Check State Parameter if required by your OAuth Provider. Using state parameter, a client application can validate that the response received from the provider is not altered in between.
  •  OAuth / OpenID Single Sign On (SSO) into Crowd, Multiple IDP