Setting Up Federated Identity Management for VMC on AWS – Authentication with Azure AD

The Federated Identity feature of VMware Cloud on AWS can be integrated with Microsoft Azure AD as well. In this integration model, the customer dedicated vIDM tenant will work as the SAML Service Provider and the Azure AD will work as the IdP.

Disclaimer:

The Azure AD settings in this blog are to demo the integration for vIDM, which may not be the best practise for your environment or meet your business and security requirements.

Note: please complete the vIDM connector installation and the vIDM tenant basic setup as per my first blog of this series (https://davidwzhang.com/2019/07/31/setting-up-federated-identity-management-for-vmc-on-aws-install-and-setup-vidm-connector/) before continuing.

The AD domain name for this blog is davidwzhang.com.

Prerequisite

  • The on-prem domain has been added as a custom domain under your default Azure AD.
  • Azure AD PREMIUM (P1 or P2) feature is enabled.
  • On-prem AD users/groups are synced with Azure AD.

Step 1: Add Azure AD as an IdP

First, login to your Azure Portal https://portal.azure.com and select Azure Active Directory.

Find “Enterprise Applications” in the list under my default Azure Active Directory (vmconaws) and then create a “New Application”. In the “Add your own app” window, select “Non-gallery application” and input the application name “csp-vidm” and click the “Add” button as below.

In the popped up “Enterprise Application” window, select “Set up single sign-on” under “Getting Started”.

In the pop-up “Select a single sign-on method” window, select SAML.

Next, click the Download hyperlink to download the Azure AD federation metadata XML file or copy the App Federation Metadata URL.

Now we have to pause here. You may have noticed that we still have two pending SAML configuration items: Identifier (Entity ID) and Reply URL (Assertion Consumer Service URL). We will come back to complete these items once we get the required SAML Service Provider metadata from the vIDM tenant.

Step 2: Create an Identity Provider in vIDM Tenant

Go to the vIDM tenant administrator console and click “Add Identity Provider” and select “Create Third Party IDP” within the “Identity & Access Management” tab.

Input the parameters as below:

  • Identity Provider Name: AzureAD
  • SAML AuthN Request Binding: HTTP Redirect

In the SAML Metadata section, copy the content of downloaded Azure AD federation metadata XML file to the text box of Identity Provider Metadata(URL or XML) then click the button “Process IdP Metadata”.

Next, add two Name ID format mappings as the below:

  • urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress = emails
  • urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified = uerName

Then from the dropdown of the “Name ID policy in SAML request (Optional)”, select “urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress”

The rest of the settings are as below:

  • Just-in-Time User Provisioning: Disabled
  • Users: davidwzhang.com
  • Network: ALL Ranges
  • Authentication Methods
    • Authentication Methods: AzureADPassword
    • SAML Context: urn:oasis:names:tc:SAML:2.0:ac:classes:Password 
  • Single Sign-Out Configuration: Disabled

Then click the hyperlink of “Service Provider (SP) Metadata” to open the SAML Service Provider metadata in a browser. Then you can find the Identifier (Entity ID) and Reply URL (Assertion Consumer Service URL) which are required to complete the Azure AD IdP SAML setup.

Now, click the “Save” button to save the IdP setup.

Step 3: Add SAML Information for Azure AD

Go back to Azure Portal and continue the Single Sign-on SAML setup.

Edit the basic SAML configuration.

Copy the Identifier (Entity ID) and Reply URL (Assertion Consumer Service URL) which we got in the last step, to the corresponding text box and save the configuration.

Next, add user groups which are granted access to the VMware Cloud service console to this newly created application. Here two groups (sddc-admins and sddc-operators) are added.

Now we have finished the configuration of Azure AD IdP.

Step 4: Update Authentication Policy

Update the vIDM tenant’s default access policy to include AzureADPassword as the first authentication method.

Now, when you try to log into the VMware Cloud service console with your AD account, your login session will be redirected to the Azure AD as below, which authenticates your session.

Setting Up Federated Identity Management for VMC on AWS – Authentication with ADFS

The Federated Identity feature of VMware Cloud on AWS can be integrated with Microsoft Active Directory Federation Services (ADFS). In this integration model, the customer dedicated vIDM tenant will work as the SAML Service Provider and the ADFS will work as the IdP.

Disclaimer:

The ADFS settings in this blog are to demo the integration for vIDM, which may not be the best practise for your environment or meet your business and security requirements.

Note: please complete the vIDM connector installation and the vIDM tenant basic setup as per my first blog of this series (https://davidwzhang.com/2019/07/31/setting-up-federated-identity-management-for-vmc-on-aws-install-and-setup-vidm-connector/) before continuing.

The AD domain name for this blog is davidwzhang.com.

The ADFS is installed on a Windows 2016 standard server. The DNS name for ADFS service is adfs1.davidwzhang.com.

Step 1: Get the ADFS Metadata Information.

The URL to this ADFS metadata is https://adfs1.davidwzhang.com/FederationMetadata/2007-06/FederationMetadata.xml. Click the URL to download the metadata XML file.

Step 2: Create an Identity Provider in vIDM Tenant

Go to the vIDM tenant administrator console and click “Add Identity Provider” and select “Create Third Party IDP” within the “Identity & Access Management” tab.

Input the parameters as below:

  • Identity Provider Name: ADFS01
  • SAML AuthN Request Binding: HTTP Redirect

In the SAML Metadata section, copy the content of XML file FederationMetadata.xml to the text box of the Identity Provider Metadata (URL or XML) then click the button “Process IdP Metadata”. The Name ID Format section will have 3 entries popped up.

Now, click the green plus icon to add a new mapping as the below:

urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified – userName.

Then from the dropdown of the “Name ID policy in SAML request (Optional)”, select “urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified”

The rest of the settings are as below:

  • Just-in-Time User Provisioning: Disabled
  • Users: davidwzhang.com
  • Network: ALL Ranges
  • Authentication Methods
    • Authentication Methods: ADFS Password
    • SAML Context: urn:oasis:names:tc:SAML:2.0:ac:classes:Password 
  • Single Sign-Out Configuration: Disabled

Then click the hyperlink of “Service Provider (SP) Metadata” to download the Service Provider metadata and upload it to the ADFS server.

Step 3: Update Authentication Policy

Update the vIDM tenant’s default access policy to include ADFS as the first authentication method.

Step 4: Configure ADFS Relying Party

Now it is time to setup the ADFS. First, start the ADFS Management tool from Server Manager and add a Relying Party Trust as the below.

In the welcome screen of “Add Relying Party Trust” wizard, select “Claim aware” and click the Start button.

Select the uploaded sp.xml file in step 2 to import data about the relying party and then click the Next button.

Input “vmccsa-demo” as the relying party display name, then click the Next button.

Choose “Permit everyone” as the Access Control Policy and click the Next button. Note: please select different access control policies for your use case.

Click the Next button.

Now, click the Close button to finish the wizard.

Step 5: Create ADFS Relying Party Claim Rules

Select the newly created relying party, right click and select “Edit Claim Issue Policy…”.

Click the “Add Rule…” button to add a new Transform rule.

In the “Choose Rule Type” step of the “Add Transform Claim Rule” wizard, select “Select LDAP Attributes as Claims” and click the Next button.

Input the following parameters:

  • Claim rule name: Get Attribute Email Address
  • Attribute store: Active Directory
  • Mapping of LDAP attributes to outgoing claim types:
    • LDAP Attribute: E-Mail-Addresses
    • Outgoing Claim Type: E-Mail Addresses

Click the Finish button. Then add the second new rule. The new rule will use “Send Claims Using a Custom Rule” as its rule template.

Next, input the name and custom rule:

The content of the “Custom rule” is as below. Please replace “xxxxx.vidmreview.com” with your own vIDM tenant URL.

c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"]
 => issue(Type = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", Issuer = c.Issuer, OriginalIssuer = c.OriginalIssuer, Value = c.Value, ValueType = c.ValueType, Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/format"] = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/spnamequalifier"] = "xxxxx.vidmreview.com");

Now, when you try to log into the VMware Cloud service console with your AD account, your login session will be redirected to the ADFS as below, which authenticates your session.