Lab 2.6: Federation Configuration
Purpose
The purpose of this module is to understand how to configure SAML IdPs as authentication methods. This will enable applications to accept SAML federated identities.
Requirements
Access to Microsoft Entra ID (formerly Azure AD) test tenant. The credentials will be provided by your instructor.
Overview
The user will access the SmartPlan application (SP B) but will log in to City Group Entra ID (IDP A) using credentials issued by IDP A.
Part 1: Configure Entra ID authentication method
Log in to the SSO admin console, go to Global Method Settings and click on "New Method". Enter the following data and click "Ok".
Obs: Every student must have a unique "Name" such as entra.saml.yournameTitle
City Group AD
Name*
entra.saml.yourname
Method Type
SAML
Directory
CustomerID Directory
Add the following configuration string in the "Compatibility Flags box": HttpPostResponseValidate AuthnRequestSign MetadataCertificate IdpProxyDelegate
Then tick the "Enabled" box, and press "Update"On the "SAML" tab, right-click the "Download Metadata" link and save the metadata to the file "smartplan-sp.xml" on the Desktop. We will upload the IdP metadata later when it is available.
Add the method entra.saml.yourname to sites eIDM Users and SmartPlan (use "Site Methods" tab)
Allow Entra ID authentication for SmartPlan Application: On the SmartPlan site, go to Applications → SmartPlan Application → Allowed Methods, select the method entra.saml.yourname and click on "Update".
Note: We allow access only to CustomerID users, so we don't add any new groups on the "Allowed To" tab. To access the SmartPlan Application, the user's Entra ID identity must be present in the CustomerID user directory.
Part 2: Configure Directory User Mapping
To link Entra ID identities to CustomerID user profiles, Directory User Mapping is configured as follows:
Go to Home → Directory User Mappings, click on "New Mapping..."
Enter "Entra-CID-Mapping" in the Name field and write a description, for example "Maps Entra identity to CID by using email address." Click the OK button.
Go to the "User Mappings" tab and click on "Add". Give following data:
Precondition
<empty>
Select
Ubilogin Directory
Server
<filled in automatically>
Distinguished Name
<filled in automatically>
Scope
sub
Filter
(&(objectclass=ubiloginUser)(mail={method:http://schemas.xmlsoap.org/ws/2005/05/identity/claims/}))
This mapping will search for a CustomerID user whose email address matches the "name" claim received from Entra ID.
On the Methods tab, select Citigroup AD (entra.saml.yourname) and Update.
Part 3: Register application in Entra ID
To access the SmartPlan application using Entra ID authentication, it must be added to the Entra ID tenant.
Go to http://portal.azure.com/ and log in with the credentials given by your instructor.
Go to "Microsoft Entra ID" → Manage → Enterprise Applications
Click "New Application" and then select "Create your own application".
Give a unique application name, for example "SmartPlan Application" followed by your name, and select "Create".
Select Manage → "Single sign-on" and "SAML".
Select "Upload metadata file" and select the file you saved in Part 1, step 3 of this lab ("metadata.xml" on Desktop). The Entity ID and Assertion Consumer Service URL will be displayed.
Save the changes.
Copy the App Federation metadata URL to the clipboard.
Go to "Users and Groups" and click on "Add user/group".
First click on "None selected." When you see "Users", search for Jeremy, select "Jeremy Mills" and click "Select". Then click "Assign". Entra ID configuration is now complete.
Part 4: Complete Entra ID authentication method configuration
To complete the federation configuration, upload the Entra ID metadata to the Entra ID authentication method in SSO. First, open the Entra ID metadata URL (copied to the clipboard in task 8 of step 3 above). Right-click and select "View Page Source". On the page source tab, copy the metadata to the clipboard (Ctrl+A, Ctrl+C).
Go to SSO admin console: Home → Global Method Settings → Citigroup AD. Then select SAML tab. Click "Upload" and paste the Entra ID metadata from the clipboard. Click the OK button.
Save the changes by clicking the Update button. You can see the SAML Identity Provider ID on the SAML tab.
Restart UbiloginServer now.
Part 5: Log in to SmartPlan application
To test the federation from City Group AD, we must have a test user in Entra ID and a user profile with a matching email address in CustomerID. To do this, log in as Scott Long (the superuser) and modify Jeremy Mills's email address in CustomerID to match the test user in Entra ID: jeremy.mills@iamacademy.ubisecure.com. This is how it will look once you save the new email address:
Log out of CustomerID and go to the SmartPlan application
Select "City Group AD" authentication method
Log in as Jeremy Mills:
User ID
Password
Will be given by the instructor
Note that in SmartPlan application you see Jeremy's attributes from CustomerID, not from Entra ID.
You have now completed the exercise.
Extra task 1
In addition to CustomerID user attributes, you may need user attributes from the federation source in your applications. In this exercise we will pass user's job title from Entra ID to SmartPlan Application.
First we need to configure Entra ID to include the job title in the SAML assertion. Open your application in Entra ID Portal: go to Entra ID → Enterprise Applications → "SmartPlan Application Yourname"
Select "Single sign-on" on the navigation pane
On section "3. User Attributes" check "View and edit all other user attributes"
Click on "Add attribute"
Enter following values and click on "OK". Then save the changes.
Name
title
Value
user.jobtitle
Namespace
Next we modify the Authorization Policy to include user's job title from Entra ID. Go to SSO admin UI (https://login.smartplan.com:8443/ubilogin/) and navigate to Authorization Policies of site SmartPlan.
Click on "SmartPlan policy" and select tab "Attributes".
Add new attribute as follows and click on "Update":
Group
eIDM Users
Name
title
Value
method:http://schemas.xmlsoap.org/ws/2005/05/identity/claims/title
Log on to SmartPlan Application (http://localhost:8090/smartplanapplication/) via City Group AD and verify that you now see Jeremy's job title:
Extra task 2
Sometimes it's useful to see all attributes received from a federation source e.g. for debugging purposes. This can be done by removing the Authorization Policy of SmartPlan Application.
Go to SSO admin UI (https://login.smartplan.com:8443/ubilogin/) and navigate to Authorzation Policies of site SmartPlan: Home - SmartPlan - Authorization Policies.
Select tab "Applications"
Remove SmartPlan Application.
Log on to SmartPlan Application (http://localhost:8090/smartplanapplication/) via City Group AD and you should see all attributes received from Azure AD: