Set Up MS Azure as the Identity Provider Using SAML 2.0 - Administrator Guide - 6.8 - Cortex XSOAR - Cortex - Security Operations

Cortex XSOAR Administrator Guide

Product
Cortex XSOAR
Version
6.8
Creation date
2022-09-28
Last date published
2024-04-08
End_of_Life
EoL
Category
Administrator Guide
Abstract

Set up Microsoft Azure in Cortex XSOAR as the identity provider for Cortex XSOAR users. SAML 2.0.

You can authenticate your Cortex XSOAR users using SAML 2.0 authentication and Microsoft Azure (Azure) as the identity provider. To set up Azure, you need to do the following:

Troubleshooting (generic - known errors)

The following are known issues when using Single sign on in Azure:

  • Method Not Allowed: Ensure the endpoint is used for the Service Provider Entity ID and Reply URL for the IdP and Service provider, in the format: https://demisto-dns/saml.

  • "{"id":"errSAMLLogin","status":400,"title":"Failed to login via SAML","detail":"Failed to login via SAML","error":"","encrypted":false,"multires":null}": Most likely an attribute mapping issue. Ensure that all attributes that appear in Cortex XSOAR SAML 2.0 configuration are reflected in Azure claims and its associated SAML assertion. Attributes are case sensitive.

    You may also receive this message, if you select the Don’t map SAML groups to Demisto Roles checkbox and you do not define a role in Default role (for IdP users without groups) in the SAML 2.0 configuration.

  • After connecting through SSO, a user may temporarily see the home screen, but immediately returns to the login page. The user does not have any group assigned, so he cannot login.

    Check the group mapping and see whether the memberOf attribute is correct. As a workaround, if you did not set the group mapping, you can use the Default role (for IdP users without groups) in the SAML 2.0 configuration.

  • If a user belongs to many groups, the identity provide may return an attribute: https://graph.windows.net/{tenantID}/users/{userID}/getMemberObjects and not the actual roles, causing Cortex XSOAR authentication to fail.

    In this case, you can configure Azure AD to return groups assigned to the application, with source attribute Group ID. Note that this option is not officially supported by Cortex XSOAR.

Configure Microsoft Azure to Authenticate Cortex XSOAR
Abstract

Set up your Microsoft Azure account to authenticate Cortex XSOAR users. Create groups, configure application. SAML 2.0.

You need to authenticate Cortex XSOAR in your Azure account and then create a SAML 2.0 instance in Cortex XSOAR.

  1. In the Azure Portal, create new groups to match the Cortex XSOAR roles.

    For example, Cortex XSOAR comes out of the box with the Administrator, Analyst, and Read-Only roles. We need to add these roles to Azure.

    1. From the home page, select Azure Active DirectoryGroupsNew group.

    2. Add the Administrator group.

      azure-group.png

      You can add existing users to this group now or at a later stage.

      You can also allow Azure AD Group Owners to add or modify users in the group. Groups can be manually or dynamically populated by user or a device (see the options under Membership type) and defer to the Azure Administrator. One option is for Cortex XSOAR to populate the group membership as part of a custom playbook for bulk user provisioning.

    3. Click Create.

    4. Repeat these steps for each group required. For example, analyst, read-only user, etc. It is recommended, as a minimum, to create a group for each role.

  2. Create a Non-Gallery application.

    1. From the home page, select Enterprise applicationsNew Application.

      azure_app.png
    2. Select Non-gallery application.

    3. Type the name of your application and click Add

      azure_add_app.png

      The page redirects to the Overview page. Copy the Object ID for future reference.

      azure-obid.png
  3. Assign Groups to the new application.

    1. In the Getting Started section, click Assign users and groups.

      azure_gs.png
    2. Click Add user/groupUsers and groups.

    3. Select the groups that you created in step Step 1.

      azure-assignment.png
    4. Repeat for all other groups created.

  4. Set up SSO configuration for the application.

    1. In the Set up single sign on field, click Get started.

    2. Click SAML.

      azure-saml.png
    3. In the Basic SAML Configuration section, add the Identifier (Entity ID) and Reply URL (Assertion Consumer Service URL).

      Use the format https://<XSOAR Server FQDN>/saml

      azure_sso_s1.png
    4. To use SP initiated SSO, in the Sign on URL field, add the URL in the format:

      https://<XSOAR Server FDQN>/#/login

      Users can sign into the Cortex XSOAR login page, an authorization request is sent to Azure, and after authentication, the user is logged in to Cortex XSOAR.

    5. In the User Attributes & Claims section, click the edit icon and add the following attributes and values as required.

      azure_sso_s2.png

      Ensure the attribute names match the names in Cortex XSOAR, when defining the instance.

    6. Add a new group, click Add a group claim.

    7. In the Group Claims (Preview) window, select Security groups.

    8. In the Advanced options section, select the Customize the name of the group claim and Emit groups as role claims check boxes.

      azure-gpclaims.png
    9. Click Save.

    10. Copy the additional claims details in text format as these are added when you Configure the SAML 2.0 Integration for Azure.

      azure-addcl.png

      If you are setting up an SMS integration (such as Twilio) add a new phone attribute new claim to reference users directory phone numbers.

    11. Copy the App Federation Metadata Url, Login URL and Logout URL fields, which are needed to configure the instance in Cortex XSOAR.

      azure_sso_s3.png
  5. (Optional) Add a new certificate.

    1. In the SAML Signing Certificate section, click the edit button.

    2. Click New Certificate.

    3. In the Signing Option field, from the drop down list, select Sign SAML response and assertion.

      azure-signing.png
    4. Click Save.

      Ensure the status is active in Section 3.

    5. In section 3, download the Certificate (Base 64) for future use.

      azure-sign.png
    6. Generate a private key for assertion signing. For example type the following command:

      openssl genrsa -out saml.key 2048

      Save the private key to notepad for later configuration.

  6. You can now add an instance in Cortex XSOAR, as described in Configure the SAML 2.0 Integration for Azure.

Configure the SAML 2.0 Integration for Azure
Abstract

Configure an instance of SAML 2.0 integration for Microsoft Azure in Cortex XSOAR.

After you have configured Azure to authenticate on Cortex XSOAR, you can then configure an integration instance for SAML 2.0 in Cortex XSOAR.

  1. Create a SAML 2.0 integration instance.

    1. Go to SettingsIntegrationsInstances.

    2. Search for SAML 2.0 and click Add instance to configure a new integration.

    3. Add the metadata/URL parameters from Azure to Cortex XSOAR.

      Cortex XSOAR field

      Azure Portal field

      Service Provider Entity ID

      Identifier (Entity ID) (Basic SAML Configuration Section)

      IdP metadata URL

      App Federation Metadata URL (SAML Signing Certificate Section)

      Idp SSO URL

      Login URL (SAML Signing Certificate section)

      The following Azure metadata/URL information has been added to the SAML 2.0 attributes in Cortex XSOAR:

      azure-login.png
    4. In the following fields, copy the Azure attributes exactly how they appear in Azure (in Azure, go to User Attributes & ClaimsEdit). For example, in the Attribute to get email field, type http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress.

      In this example, we have the following Claim Names:

      azure-addclaims.png

      Cortex XSOAR SAML 2.0 field

      Azure Portal Claim Name Examples

      Attribute to get username

      http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname

      Attribute to get email

      http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress

      Attribute to get first name

      http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name

      Attribute to get last name

      http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname

      Attribute to get groups

      http://schemas.microsoft.com/ws/2008/06/identity/claims/role

      Add the phone attribute, if required.

    5. Select the Verify the Idp response signature and add the Idp Public certificate, which you downloaded in step 5.5 in Configure Microsoft Azure to Authenticate Cortex XSOAR).

      If your Identity Provider requires signed authentication requests, select Sign request and input the public/private certificate pair generated for Cortex XSOAR.

    6. Select the ADFS and Compress encode URL (ADFS) checkboxes.

    7. In the Service Identifier (ADFS) field, copy the characters after the appid value, which can be found at the end of the App Federation Metadata URL (section 3 in SAML Certificate).

    8. In the IdP Single Logout URL, from Azure, copy the Logout URL (section 4).

    9. In the Single Logout Service Endpoint add the details in the following format:

      https://<cortex xsoar-url>/saml-logout

    10. To verify that the settings are successful, in the instance settings, click Get service provider metadata.

      For a full list and descriptions of the fields, see SAML 2.0 Azure Parameters.

      If you click Test a bug is issued similar to this:

      azure-bug.png

      You need to login with a user to test the instance. It is recommended to test this also on the Azure app, as there are detailed error reports and troubleshooting.

  2. Map the Azure groups to Cortex XSOAR roles.

    1. In Microsoft Azure, select Azure Active DirectoryEnterprise applications name of your application Assign users and groups Name of your group .

    2. Copy the Object ID.

      For example, we created a group, called XSOAR Administrator.

      azure-admin.png
    3. In Cortex XSOAR, go to SettingsUsers and RolesRoles.

    4. Create or edit an existing role, as described in Define a Role.

    5. In the SAML Roles Mapping field, type the Object ID that you copied in step Step 2.b

      azure-saml2.0.png
  3. Click Save.

SAML 2.0 Azure Parameters
Abstract

Describes the SAML 2.0 parameters for Microsoft Azure as an identity provider.

The following table describes the SAML 2.0 parameters for Azure, when adding a new instance in Cortex XSOAR:

Attribute

Description

Name

A name for the integration instance.

Service Provider Entity ID

The URL of your Cortex XSOAR server (also known as an ACS URL). In the format: https://yourdomain.com/saml

IdP metadata URL

The URL of your organization’s IdP metadata file. Copy this from the App Federation Metadata URL in the SAML Signing Certificate in Azure.

azure_sso_s3a.png

IdP metadata file

Your organization’s IdP metadata file. You either need to add the IdP metadata URL or the file.

IdP SSO URL

The URL of the IdP application that corresponds to Cortex XSOAR. Copy this from the Login URL field in the SAML Signing Certificate section.

azure_sso_s4.png

Attribute to get username

Attribute in your IdP for the user name. Copy this URL from the User Attributes & Claims section. See step 4.10 (additional claim details) in Configure Microsoft Azure to Authenticate Cortex XSOAR. For example, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname.

Attribute to get email

Attribute in your IdP for the user's email address. Copy this URL from the User Attributes & Claims section. See step 4.10 (additional claim details) in Configure Microsoft Azure to Authenticate Cortex XSOAR. For example, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress.

Attribute to get first name

Attribute in your IdP for the user's first name. Copy this URL from the User Attributes & Claims section. See step 4.10 (additional claim details) in Configure Microsoft Azure to Authenticate Cortex XSOAR. For example, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name.

Attribute to get last name

Attribute in your IdP for the user's last name. Copy this URL from the User Attributes & Claims section. See step 4.10 (additional claim details) in Configure Microsoft Azure to Authenticate Cortex XSOAR. For example, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name.

Attribute to get phone

(Optional) Attribute in your IdP for the user's phone number, if available. Copy this URL from the User Attributes & Claims section. See step 4.10 (additional claim details) in Configure Microsoft Azure to Authenticate Cortex XSOAR. For example, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/phone.

Attribute to get groups

Attribute in your IdP for the groups of which the user is a member. Copy this URL from the User Attributes & Claims section. See step 4.10 (additional claim details) in Configure Microsoft Azure to Authenticate Cortex XSOAR. For example, http://schemas.microsoft.com/ws/2008/06/identity/claims/role.

Groups delimiter

Groups list separator. Value: “,”

Default role (for IdP users without groups)

Role to assign to the user when they are not a member of any group. For example, Analyst.

RelayState

Only used by certain IdPs. If your IdP uses relay state, you need to supply the relay state.

Verify IDP public certificate

The Certificate (Base64) you downloaded in step 5.5 in Configure Microsoft Azure to Authenticate Cortex XSOAR.

Sign Request

Method for the IdP to verify the user sign-in request using the IdP vendor certificate.

Service Provider Private key (pem format)

Private key for your IdP, in PEM format. Created locally by the user who wants to use SAML. The public key is uploaded to Azure.

Do not validate server certificate (insecure)

If you are use a self-signed certificate for the Azure server you can use this checkbox.

Use system proxy settings

Select the check box to use proxy settings.

ADFS

Whether the server uses ADFS.

Compress encode URL (AFDS)

(Manadatory) Select the check box to compress encode URL (AFDS). If not, you may receive a Decoding Flat error during connection.

Service identifier (AFDS)

Add the characters after the appid value, which can be found at the end of the App Federation Metadata URL. For example, https://login.microsoftonline.com/934a6d32-9550be/federationmetadata/2007-06/federationmetadata.xml?appid=b0331331-f15b-4a32-9f48-19158beb0340. Add b0331331-f15b-4a32-9f48-19158beb0340

Don’t map SAML groups to Demisto roles

SAML groups are not mapped to Cortex XSOAR roles. Default roles are assigned and you can select them later.

Get service provider metadata

Enables you to verify that the settings are successful.

IdP Single Logout URL

This functionality ends the user's session in Azure when logging out.

Single Logout Service Endpoint

The URL of the single logout Endpoint.

Use this instance for external authentication only

Limits this instance to authenticate external (non-Cortex XSOAR) users when they answer a survey sent via a communication task in a playbook.