Tutorial: Azure Active Directory (AD) single sign-on (SSO) integration with F5

In this tutorial, you'll learn how to integrate F5 with Azure Active Directory (Azure AD). When you integrate F5 with Azure AD, you can:

  • Control in Azure AD who has access to F5.
  • Enable your users to be automatically signed-in to F5 with their Azure AD accounts.
  • Manage your accounts in one central location - the Azure portal.

To learn more about SaaS app integration with Azure AD, see What is application access and single sign-on with Azure Active Directory.

Prerequisites

To get started, you need the following items:

  • An Azure AD subscription. If you don't have a subscription, you can get a free account.
  • F5 single sign-on (SSO) enabled subscription.

Scenario description

In this tutorial, you configure and test Azure AD SSO in a test environment.

F5 supports SP and IDP initiated SSO.

F5 SSO can be configured in three different ways:

To configure the integration of F5 into Azure AD, you need to add F5 from the gallery to your list of managed SaaS apps.

  1. Sign in to the Azure portal using either a work or school account, or a personal Microsoft account.
  2. On the left navigation pane, select the Azure Active Directory service.
  3. Navigate to Enterprise Applications and then select All Applications.
  4. To add new application, select New application.
  5. In the Add from the gallery section, type F5 in the search box.
  6. Select F5 from results panel and then add the app. Wait a few seconds while the app is added to your tenant.

Alternatively, you can also use the Enterprise App Configuration Wizard. In this wizard, you can add an application to your tenant, add users/groups to the app, assign roles, as well as walk through the SSO configuration as well. Learn more about Microsoft 365 wizards.

Configure and test Azure AD single sign-on for F5

Configure and test Azure AD SSO with F5 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 F5.

To configure and test Azure AD SSO with F5, complete the following building blocks:

  1. Configure Azure AD SSO - to enable your users to use this feature.
    1. Create an Azure AD test user - to test Azure AD single sign-on with B.Simon.
    2. Assign the Azure AD test user - to enable B.Simon to use Azure AD single sign-on.
  2. Configure F5-SSO - to configure the single sign-on settings on application side.
    1. Create F5 test user - to have a counterpart of B.Simon in F5 that is linked to the Azure AD representation of user.
  3. Test SSO - to verify whether the configuration works.

Configure Azure AD SSO

Follow these steps to enable Azure AD SSO in the Azure portal.

  1. In the Azure portal, on the F5 application integration page, find the Manage section and select single sign-on.

  2. On the Select a single sign-on method page, select SAML.

  3. On the Set up single sign-on with SAML page, click the edit/pen icon for Basic SAML Configuration to edit the settings.

    Edit Basic SAML Configuration

  4. On the Basic SAML Configuration section, if you wish to configure the application in IDP initiated mode, enter the values for the following fields:

    a. In the Identifier text box, type a URL using the following pattern: https://<YourCustomFQDN>.f5.com/

    b. In the Reply URL text box, type a URL using the following pattern: https://<YourCustomFQDN>.f5.com/

  5. Click Set additional URLs and perform the following step if you wish to configure the application in SP initiated mode:

    In the Sign-on URL text box, type a URL using the following pattern: https://<YourCustomFQDN>.f5.com/

    Note

    These values are not real. Update these values with the actual Identifier, Reply URL and Sign-on URL. Contact F5 Client support team to get these values. You can also refer to the patterns shown in the Basic SAML Configuration section in the Azure portal.

  6. On the Set up single sign-on with SAML page, in the SAML Signing Certificate section, find Federation Metadata XML and select Download to download the certificate and save it on your computer.

    The Certificate download link

  7. On the Set up F5 section, copy the appropriate URL(s) based on your requirement.

    Copy configuration URLs

Create an Azure AD test user

In this section, you'll create a test user in the Azure portal called B.Simon.

  1. From the left pane in the Azure portal, select Azure Active Directory, select Users, and then select All users.
  2. Select New user at the top of the screen.
  3. In the User properties, follow these steps:
    1. In the Name field, enter B.Simon.
    2. In the User name field, enter the username@companydomain.extension. For example, B.Simon@contoso.com.
    3. Select the Show password check box, and then write down the value that's displayed in the Password box.
    4. Click Create.

Assign the Azure AD test user

In this section, you'll enable B.Simon to use Azure single sign-on by granting access to F5.

  1. In the Azure portal, select Enterprise Applications, and then select All applications.

  2. In the applications list, select F5.

  3. In the app's overview page, find the Manage section and select Users and groups.

    The "Users and groups" link

  4. Select Add user, then select Users and groups in the Add Assignment dialog.

    The Add User link

  5. In the Users and groups dialog, select B.Simon from the Users list, then click the Select button at the bottom of the screen.

  6. 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.

  7. In the Add Assignment dialog, click the Assign button.

Configure F5 SSO

Configure F5 single sign-on for Advanced Kerberos application

  1. Open a new web browser window and sign into your F5 (Advanced Kerberos) company site as an administrator and perform the following steps:

  2. You need to import the Metadata Certificate into the F5 (Advanced Kerberos) which will be used later in the setup process. Go to System > Certificate Management > Traffic Certificate Management >> SSL Certificate List. Click on Import of the right-hand corner.

    Screenshot that highlights the Import button for importing the Metadata Certificate.

  3. To setup the SAML IDP, go to Access > Federation > SAML Service Provider > Create > From Metadata.

    Screenshot that highlights how to create the SAML IDP from metadata.

    Screenshot that shows the Create New SAML IdP Connector screen.

    F5 (Advanced Kerberos) configuration

    Screenshot that shows the Single Sign On Service Settings screen.

  4. Specify the Certificate uploaded from Task 3

    Screenshot that shows the Edit SAML IdP Connector screen.

    Screenshot that shows the Single Logout Service Settings screen.

  5. To setup the SAML SP, go to Access > Federation > SAML Service Federation > Local SP Services > Create.

    Screenshot that shows the screen where you create a local SP service.

  6. Click OK.

  7. Select the SP Configuration and Click Bind/UnBind IdP Connectors.

    Screenshot that shows the SAML Service Provider.

  8. Click on Add New Row and Select the External IdP connector created in previous step.

    Screenshot that highlights the Add New Row button.

  9. For configuring Kerberos SSO, Access > Single Sign-on > Kerberos

    Note

    You will need the Kerberos Delegation Account to be created and specified. Refer KCD Section ( Refer Appendix for Variable References)

    • Username Source session.saml.last.attr.name.http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname

    • User Realm Source session.logon.last.domain

    Screenshot that highlights Access > Single Sign On.

  10. For configuring Access Profile, Access > Profile/Policies > Access Profile (per session policies).

    Screenshot that highlights the Properties tab under the Profiles/Policies menu option.

    Screenshot that shows the SSO/Auth Domains tab.

    Screenshot that shows the Access Policy tab.

    Screenshot that shows the Properties tab on the Access Policy.

    Screenshot that shows the properties for Variable Assign.

    • session.logon.last.usernameUPN expr {[mcget {session.saml.last.identity}]}

    • session.ad.lastactualdomain TEXT superdemo.live

    Screenshot that shows the AD Query properties.

    • (userPrincipalName=%{session.logon.last.usernameUPN})

    Screenshot that shows the Branch Rules tab and the Check Account rule.

    Screenshot that shows the custom variable and custom expression text boxes.

    • session.logon.last.username expr { "[mcget {session.ad.last.attr.sAMAccountName}]" }

    Screenshot that shows the values in the SSO Token Name and SSO Token Password fields.

    • mcget {session.logon.last.username}
    • mcget {session.logon.last.password}
  11. For adding new node, go to Local Traffic > Nodes > Node List > +.

    Screenshot that highlights Local Traffic > Nodes.

  12. To create a new Pool, go to Local Traffic > Pools > Pool List > Create.

    Screenshot that highlights Local Traffic > Pools.

  13. To create a new virtual server, go to Local Traffic > Virtual Servers > Virtual Server List > +.

    Screenshot that highlights Local Traffic > Virtual Servers.

  14. Specify the Access Profile Created in Previous Step.

    Screenshot that shows where you specify the access profile that you created.

Setting up Kerberos Delegation

Note

For more details refer here

  • Step 1: Create a Delegation Account

    • Example
    Domain Name : superdemo.live
    Sam Account Name : big-ipuser
    
    New-ADUser -Name "APM Delegation Account" -UserPrincipalName host/big-ipuser.superdemo.live@superdemo.live -SamAccountName "big-ipuser" -PasswordNeverExpires $true -Enabled $true -AccountPassword (Read-Host -AsSecureString "Password!1234")
    
  • Step 2: Set SPN (on the APM Delegation Account)

    • Example
    setspn –A host/big-ipuser.superdemo.live big-ipuser
    
  • Step 3: SPN Delegation ( for the App Service Account)

    • Setup the appropriate Delegation for the F5 Delegation Account.

    • In the example below, APM Delegation account is being configured for KCD for FRP-App1.superdemo.live app.

      Screenshot that shows the APM Delegatio Account Properties > Delegation tab.

  1. Provide the details as mentioned in the above reference document under this

  2. Appendix- SAML – F5 BIG-IP Variable mappings shown below:

    Screenshot that shows the Overview > Active Sessions tab.

    Screenshot that shows the variables and session keys.

  3. Below is the whole list of default SAML Attributes. GivenName is represented using the following string. session.saml.last.attr.name.http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname

Session Attribute
eb46b6b6.session.saml.last.assertionID <TENANT ID>
eb46b6b6.session.saml.last.assertionIssueInstant <ID>
eb46b6b6.session.saml.last.assertionIssuer https://sts.windows.net/<TENANT ID>/
eb46b6b6.session.saml.last.attr.name.http://schemas.microsoft.com/claims/authnmethodsreferences http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password
eb46b6b6.session.saml.last.attr.name.http://schemas.microsoft.com/identity/claims/displayname user0
eb46b6b6.session.saml.last.attr.name.http://schemas.microsoft.com/identity/claims/identityprovider https://sts.windows.net/<TENANT ID>/
eb46b6b6.session.saml.last.attr.name.http://schemas.microsoft.com/identity/claims/objectidentifier <TENANT ID>
eb46b6b6.session.saml.last.attr.name.http://schemas.microsoft.com/identity/claims/tenantid <TENANT ID>
eb46b6b6.session.saml.last.attr.name.http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress user0@superdemo.live
eb46b6b6.session.saml.last.attr.name.http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname user0
eb46b6b6.session.saml.last.attr.name.http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name user0@superdemo.live
eb46b6b6.session.saml.last.attr.name.http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname 0
eb46b6b6.session.saml.last.audience https://kerbapp.superdemo.live
eb46b6b6.session.saml.last.authNContextClassRef urn:oasis:names:tc:SAML:2.0:ac:classes:Password
eb46b6b6.session.saml.last.authNInstant <ID>
eb46b6b6.session.saml.last.identity user0@superdemo.live
eb46b6b6.session.saml.last.inResponseTo <TENANT ID>
eb46b6b6.session.saml.last.nameIDValue user0@superdemo.live
eb46b6b6.session.saml.last.nameIdFormat urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
eb46b6b6.session.saml.last.responseDestination https://kerbapp.superdemo.live/saml/sp/profile/post/acs
eb46b6b6.session.saml.last.responseId <TENANT ID>
eb46b6b6.session.saml.last.responseIssueInstant <ID>
eb46b6b6.session.saml.last.responseIssuer https://sts.windows.net/<TENANT ID>/
eb46b6b6.session.saml.last.result 1
eb46b6b6.session.saml.last.samlVersion 2.0
eb46b6b6.session.saml.last.sessionIndex <TENANT ID>
eb46b6b6.session.saml.last.statusValue urn:oasis:names:tc:SAML:2.0:status:Success
eb46b6b6.session.saml.last.subjectConfirmDataNotOnOrAfter <ID>
eb46b6b6.session.saml.last.subjectConfirmDataRecipient https://kerbapp.superdemo.live/saml/sp/profile/post/acs
eb46b6b6.session.saml.last.subjectConfirmMethod urn:oasis:names:tc:SAML:2.0:cm:bearer
eb46b6b6.session.saml.last.validityNotBefore <ID>
eb46b6b6.session.saml.last.validityNotOnOrAfter <ID>

Create F5 test user

In this section, you create a user called B.Simon in F5. Work with F5 Client support team to add the users in the F5 platform. Users must be created and activated before you use single sign-on.

Test SSO

In this section, you test your Azure AD single sign-on configuration using the Access Panel.

When you click the F5 tile in the Access Panel, you should be automatically signed in to the F5 for which you set up SSO. For more information about the Access Panel, see Introduction to the Access Panel.

Additional resources