|
| 1 | +--- |
| 2 | +title: 'Tutorial: Azure Active Directory single sign-on (SSO) integration with Sonarqube | Microsoft Docs' |
| 3 | +description: Learn how to configure single sign-on between Azure Active Directory and Sonarqube. |
| 4 | +services: active-directory |
| 5 | +documentationCenter: na |
| 6 | +author: jeevansd |
| 7 | +manager: mtillman |
| 8 | +ms.reviewer: barbkess |
| 9 | + |
| 10 | +ms.assetid: b01665e7-c3d0-4393-9286-d5bcf8cf6add |
| 11 | +ms.service: active-directory |
| 12 | +ms.subservice: saas-app-tutorial |
| 13 | +ms.workload: identity |
| 14 | +ms.tgt_pltfrm: na |
| 15 | +ms.devlang: na |
| 16 | +ms.topic: tutorial |
| 17 | +ms.date: 09/18/2019 |
| 18 | +ms.author: jeedes |
| 19 | + |
| 20 | +ms.collection: M365-identity-device-management |
| 21 | +--- |
| 22 | + |
| 23 | +# Tutorial: Azure Active Directory single sign-on (SSO) integration with Sonarqube |
| 24 | + |
| 25 | +In this tutorial, you'll learn how to integrate Sonarqube with Azure Active Directory (Azure AD). When you integrate Sonarqube with Azure AD, you can: |
| 26 | + |
| 27 | +* Control in Azure AD who has access to Sonarqube. |
| 28 | +* Enable your users to be automatically signed-in to Sonarqube with their Azure AD accounts. |
| 29 | +* Manage your accounts in one central location - the Azure portal. |
| 30 | + |
| 31 | +To learn more about SaaS app integration with Azure AD, see [What is application access and single sign-on with Azure Active Directory](https://docs.microsoft.com/azure/active-directory/active-directory-appssoaccess-whatis). |
| 32 | + |
| 33 | +## Prerequisites |
| 34 | + |
| 35 | +To get started, you need the following items: |
| 36 | + |
| 37 | +* An Azure AD subscription. If you don't have a subscription, you can get a [free account](https://azure.microsoft.com/free/). |
| 38 | +* Sonarqube single sign-on (SSO) enabled subscription. |
| 39 | + |
| 40 | +## Scenario description |
| 41 | + |
| 42 | +In this tutorial, you configure and test Azure AD SSO in a test environment. |
| 43 | + |
| 44 | +* Sonarqube supports **SP** initiated SSO |
| 45 | + |
| 46 | +> [!NOTE] |
| 47 | +> Identifier of this application is a fixed string value so only one instance can be configured in one tenant. |
| 48 | +
|
| 49 | +## Adding Sonarqube from the gallery |
| 50 | + |
| 51 | +To configure the integration of Sonarqube into Azure AD, you need to add Sonarqube from the gallery to your list of managed SaaS apps. |
| 52 | + |
| 53 | +1. Sign in to the [Azure portal](https://portal.azure.com) using either a work or school account, or a personal Microsoft account. |
| 54 | +1. On the left navigation pane, select the **Azure Active Directory** service. |
| 55 | +1. Navigate to **Enterprise Applications** and then select **All Applications**. |
| 56 | +1. To add new application, select **New application**. |
| 57 | +1. In the **Add from the gallery** section, type **Sonarqube** in the search box. |
| 58 | +1. Select **Sonarqube** from results panel and then add the app. Wait a few seconds while the app is added to your tenant. |
| 59 | + |
| 60 | +## Configure and test Azure AD single sign-on for Sonarqube |
| 61 | + |
| 62 | +Configure and test Azure AD SSO with Sonarqube using a test user called **B.Simon**. For SSO to work, you need to establish a link relationship between an Azure AD user and the related user in Sonarqube. |
| 63 | + |
| 64 | +To configure and test Azure AD SSO with Sonarqube, complete the following building blocks: |
| 65 | + |
| 66 | +1. **[Configure Azure AD SSO](#configure-azure-ad-sso)** - to enable your users to use this feature. |
| 67 | + 1. **[Create an Azure AD test user](#create-an-azure-ad-test-user)** - to test Azure AD single sign-on with B.Simon. |
| 68 | + 1. **[Assign the Azure AD test user](#assign-the-azure-ad-test-user)** - to enable B.Simon to use Azure AD single sign-on. |
| 69 | +1. **[Configure Sonarqube SSO](#configure-sonarqube-sso)** - to configure the single sign-on settings on application side. |
| 70 | + 1. **[Create Sonarqube test user](#create-sonarqube-test-user)** - to have a counterpart of B.Simon in Sonarqube that is linked to the Azure AD representation of user. |
| 71 | +1. **[Test SSO](#test-sso)** - to verify whether the configuration works. |
| 72 | + |
| 73 | +## Configure Azure AD SSO |
| 74 | + |
| 75 | +Follow these steps to enable Azure AD SSO in the Azure portal. |
| 76 | + |
| 77 | +1. In the [Azure portal](https://portal.azure.com/), on the **Sonarqube** application integration page, find the **Manage** section and select **single sign-on**. |
| 78 | +1. On the **Select a single sign-on method** page, select **SAML**. |
| 79 | +1. On the **Set up single sign-on with SAML** page, click the edit/pen icon for **Basic SAML Configuration** to edit the settings. |
| 80 | + |
| 81 | +  |
| 82 | + |
| 83 | +1. On the **Basic SAML Configuration** section, enter the values for the following fields: |
| 84 | + |
| 85 | + In the **Sign-on URL** text box, type a URL: |
| 86 | + |
| 87 | + * **For Production Environment** |
| 88 | + |
| 89 | + `https://servicessonar.corp.microsoft.com/` |
| 90 | + |
| 91 | + * **For Dev Environment** |
| 92 | + |
| 93 | + `https://servicescode-dev.westus.cloudapp.azure.com` |
| 94 | + |
| 95 | +1. On the **Set up single sign-on with SAML** page, in the **SAML Signing Certificate** section, find **Certificate (Base64)** and select **Download** to download the certificate and save it on your computer. |
| 96 | + |
| 97 | +  |
| 98 | + |
| 99 | +1. On the **Set up Sonarqube** section, copy the appropriate URL(s) based on your requirement. |
| 100 | + |
| 101 | +  |
| 102 | + |
| 103 | +### Create an Azure AD test user |
| 104 | + |
| 105 | +In this section, you'll create a test user in the Azure portal called B.Simon. |
| 106 | + |
| 107 | +1. From the left pane in the Azure portal, select **Azure Active Directory**, select **Users**, and then select **All users**. |
| 108 | +1. Select **New user** at the top of the screen. |
| 109 | +1. In the **User** properties, follow these steps: |
| 110 | + 1. In the **Name** field, enter `B.Simon`. |
| 111 | + 1. In the **User name ** field, enter the [email protected]. For example, `[email protected]`. |
| 112 | + 1. Select the **Show password** check box, and then write down the value that's displayed in the **Password** box. |
| 113 | + 1. Click **Create**. |
| 114 | + |
| 115 | +### Assign the Azure AD test user |
| 116 | + |
| 117 | +In this section, you'll enable B.Simon to use Azure single sign-on by granting access to Sonarqube. |
| 118 | + |
| 119 | +1. In the Azure portal, select **Enterprise Applications**, and then select **All applications**. |
| 120 | +1. In the applications list, select **Sonarqube**. |
| 121 | +1. In the app's overview page, find the **Manage** section and select **Users and groups**. |
| 122 | + |
| 123 | +  |
| 124 | + |
| 125 | +1. Select **Add user**, then select **Users and groups** in the **Add Assignment** dialog. |
| 126 | + |
| 127 | +  |
| 128 | + |
| 129 | +1. In the **Users and groups** dialog, select **B.Simon** from the Users list, then click the **Select** button at the bottom of the screen. |
| 130 | +1. If you're expecting any role value in the SAML assertion, in the **Select Role** dialog, select the appropriate role for the user from the list and then click the **Select** button at the bottom of the screen. |
| 131 | +1. In the **Add Assignment** dialog, click the **Assign** button. |
| 132 | + |
| 133 | +## Configure Sonarqube SSO |
| 134 | + |
| 135 | +1. Open a new web browser window and sign into your Sonarqube company site as an administrator. |
| 136 | + |
| 137 | +2. Install the SAML plugin from the sonarqube market place. |
| 138 | + |
| 139 | +3. On the top left of the page, click on **ADMIN** and then navigate to **SAML**. |
| 140 | + |
| 141 | +4. On the **SAML** page, perform the following steps: |
| 142 | + |
| 143 | +  |
| 144 | + |
| 145 | + a. Toggle the **Enabled** option to **yes**. |
| 146 | + |
| 147 | + b. In **Application ID** text box, enter the name like **sonarqube**. |
| 148 | + |
| 149 | + c. In **Provider Name** text box, enter the name like **SAML**. |
| 150 | + |
| 151 | + d. In **Provider ID** text box, paste the value of **Azure AD Identifier**, which you have copied from Azure portal. |
| 152 | + |
| 153 | + e. In **SAML login url** text box, paste the value of **Login URL**, which you have copied from Azure portal. |
| 154 | + |
| 155 | + f. Open the Base64 encoded certificate in notepad, copy its content and paste it into the **Provider certificate** text box. |
| 156 | + |
| 157 | + g. In **SAML user login attribute** text box, enter the value `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name`. |
| 158 | + |
| 159 | + h. In **SAML user name attribute** text box, enter the value `http://schemas.microsoft.com/identity/claims/displayname`. |
| 160 | + |
| 161 | + i. In **SAML user email attribute** text box, enter the value `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name`. |
| 162 | + |
| 163 | + j. Click **Save**. |
| 164 | + |
| 165 | +### Create Sonarqube test user |
| 166 | + |
| 167 | +In this section, you create a user called B.Simon in Sonarqube. Work with [Sonarqube Client support team](https://www.sonarsource.com/support/) to add the users in the Sonarqube platform. Users must be created and activated before you use single sign-on. |
| 168 | + |
| 169 | +## Test SSO |
| 170 | + |
| 171 | +In this section, you test your Azure AD single sign-on configuration using the Access Panel. |
| 172 | + |
| 173 | +When you click the Sonarqube tile in the Access Panel, you should be automatically signed in to the Sonarqube for which you set up SSO. For more information about the Access Panel, see [Introduction to the Access Panel](https://docs.microsoft.com/azure/active-directory/active-directory-saas-access-panel-introduction). |
| 174 | + |
| 175 | +## Additional resources |
| 176 | + |
| 177 | +- [ List of Tutorials on How to Integrate SaaS Apps with Azure Active Directory ](https://docs.microsoft.com/azure/active-directory/active-directory-saas-tutorial-list) |
| 178 | + |
| 179 | +- [What is application access and single sign-on with Azure Active Directory? ](https://docs.microsoft.com/azure/active-directory/active-directory-appssoaccess-whatis) |
| 180 | + |
| 181 | +- [What is conditional access in Azure Active Directory?](https://docs.microsoft.com/azure/active-directory/conditional-access/overview) |
| 182 | + |
| 183 | +- [Try Sonarqube with Azure AD](https://aad.portal.azure.com/) |
| 184 | + |
0 commit comments