Tutorial: Configure F5 BIG-IP Easy Button for header-based SSO
Learn to secure header-based applications with Microsoft Entra ID, with F5 BIG-IP Easy Button Guided Configuration v16.1.
Integrating a BIG-IP with Microsoft Entra ID provides many benefits, including:
- Improved Zero Trust governance through Microsoft Entra preauthentication and Conditional Access
- Full SSO between Microsoft Entra ID and BIG-IP published services
- Managed identities and access from one control plane
- See, the Microsoft Entra admin center
Learn more:
Scenario description
This scenario covers the legacy application using HTTP authorization headers to manage access to protected content. Legacy lacks modern protocols to support direct integration with Microsoft Entra ID. Modernization is costly, time consuming, and introduces downtime risk. Instead, use an F5 BIG-IP Application Delivery Controller (ADC) to bridge the gap between the legacy application and the modern ID control plane, with protocol transitioning.
A BIG-IP in front of the application enables overlay of the service with Microsoft Entra preauthentication and headers-based SSO. This configuration improves overall application security posture.
Note
Organizations can have remote access to this application type with Microsoft Entra application proxy. Learn more: Remote access to on-premises applications through Microsoft Entra application proxy
Scenario architecture
The SHA solution contains:
- Application - BIG-IP published service protected by Microsoft Entra SHA
- Microsoft Entra ID - Security Assertion Markup Language (SAML) identity provider (IdP) that verifies user credentials, Conditional Access, and SAML-based SSO to the BIG-IP. With SSO, Microsoft Entra ID provides the BIG-IP with session attributes.
- BIG-IP - reverse-proxy and SAML service provider (SP) to the application, delegating authentication to the SAML IdP before performing header-based SSO to the backend application.
For this scenario, SHA supports SP- and IdP-initiated flows. The following diagram illustrates the SP-initiated flow.
- User connects to application endpoint (BIG-IP).
- BIG-IP APM access policy redirects user to Microsoft Entra ID (SAML IdP).
- Microsoft Entra preauthenticates user and applies Conditional Access policies.
- User is redirected to BIG-IP (SAML SP) and SSO occurs using issued SAML token.
- BIG-IP injects Microsoft Entra attributes as headers in application request.
- Application authorizes request and returns payload.
Prerequisites
For the scenario you need:
- An Azure subscription
- If you don't have one, get an Azure free account
- One of the following roles: Cloud Application Administrator, or Application Administrator
- A BIG-IP or deploy a BIG-IP Virtual Edition (VE) in Azure
- Any of the following F5 BIG-IP licenses:
- F5 BIG-IP® Best bundle
- F5 BIG-IP Access Policy Manager™ (APM) standalone license
- F5 BIG-IP Access Policy Manager™ (APM) add-on license on a BIG-IP F5 BIG-IP® Local Traffic Manager™ (LTM)
- 90-day BIG-IP full feature trial. See, Free Trials
- User identities synchronized from an on-premises directory to Microsoft Entra ID
- An SSL web certificate to publish services over HTTPS, or use default BIG-IP certs for testing
- See, SSL profile
- A header-based application or set up an IIS header app for testing
BIG-IP configuration
This tutorial uses Guided Configuration v16.1 with an Easy button template. With the Easy Button, admins no longer go back and forth to enable SHA services. The Guided Configuration wizard and Microsoft Graph handle deployment and policy management. The BIG-IP APM and Microsoft Entra integration ensures applications support identity federation, SSO, and Conditional Access.
Note
Replace example strings or values with those in your environment.
Register Easy Button
Tip
Steps in this article might vary slightly based on the portal you start from.
Before a client or service accesses Microsoft Graph, the Microsoft identity platform must trust it.
Learn more: Quickstart: Register an application with the Microsoft identity platform.
Create a tenant app registration to authorize the Easy Button access to Graph. With these permissions, the BIG-IP pushes the configurations to establish a trust between a SAML SP instance for published application, and Microsoft Entra ID as the SAML IdP.
Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
Browse to Identity > Applications > App registrations > New registration.
Under Manage, select App registrations > New registration.
Enter an application Name.
Specify who uses the application.
Select Accounts in this organizational directory only.
Select Register.
Navigate to API permissions.
Authorize the following Microsoft Graph Application permissions:
- Application.Read.All
- Application.ReadWrite.All
- Application.ReadWrite.OwnedBy
- Directory.Read.All
- Group.Read.All
- IdentityRiskyUser.Read.All
- Policy.Read.All
- Policy.ReadWrite.ApplicationConfiguration
- Policy.ReadWrite.ConditionalAccess
- User.Read.All
Grant admin consent for your organization.
On Certificates & Secrets, generate a new Client Secret. Make a note of the Client Secret.
On Overview, note the Client ID and Tenant ID.
Configure Easy Button
Start the APM Guided Configuration.
Start the Easy Button template.
Navigate to Access > Guided Configuration.
Select Microsoft Integration
Select Microsoft Entra Application.
Review the configuration steps.
Select Next.
Use the illustrated steps sequence to publish your application.
Configuration Properties
Use the Configuration Properties tab to create a BIG-IP application config and SSO object. Azure Service Account Details represent the client you registered in the Microsoft Entra tenant. Use the settings for BIG-IP OAuth client to register a SAML SP in your tenant, with SSO properties. Easy Button performs this action for BIG-IP services published and enabled for SHA.
You can reuse settings to publish more applications.
- Enter a Configuration Name.
- For Single Sign-On (SSO) & HTTP Headers, select On.
- For Tenant ID, Client ID, and Client Secret, enter what you noted.
- Confirm the BIG-IP connects to your tenant.
- Select Next
Service Provider
In Service Provider settings, define SAML SP instance settings for the SHA-protected application.
Enter a Host, the application public FQDN.
Enter an Entity ID, the identifier Microsoft Entra ID uses to identify the SAML SP requesting a token.
(Optional) In Security Settings, select Enable Encryption Assertion to enable Microsoft Entra ID to encrypt issued SAML assertions. Microsoft Entra ID and BIG-IP APM encryption assertions help assure content tokens aren't intercepted, nor personal or corporate data compromised.
In Security Settings, from the Assertion Decryption Private Key list, select Create New.
Select OK.
The Import SSL Certificate and Keys dialog appears.
For Import Type, select PKCS 12 (IIS). This action imports the certificate and private key.
For Certificate and Key Name, select New and enter the input.
Enter the Password.
Select Import.
Close the browser tab to return to the main tab.
- Check the box for Enable Encrypted Assertion.
- If you enabled encryption, from the Assertion Decryption Private Key list, select the certificate. BIG-IP APM uses this certificate private key to decrypt Microsoft Entra assertions.
- If you enabled encryption, from the Assertion Decryption Certificate list, select the certificate. BIG-IP uploads this certificate to Microsoft Entra ID to encrypt the issued SAML assertions.
Microsoft Entra ID
Use the following instructions to configure a new BIG-IP SAML application in your Microsoft Entra tenant. Easy Button has application templates for Oracle PeopleSoft, Oracle E-Business Suite, Oracle JD Edwards, SAP ERP, and a generic SHA template.
- In Azure Configuration, under Configuration Properties, select F5 BIG-IP APM Microsoft Entra ID Integration.
- Select Add.
Azure Configuration
Enter an app Display Name BIG-IP creates in the Microsoft Entra tenant. Users see the name, with an icon, on Microsoft My Apps.
Skip Sign On URL (optional).
Next to Signing Key and Signing Certificate, select refresh to locate the certificate you imported.
In Signing Key Passphrase, enter the certificate password.
(Optional) Enable Signing Option to ensure BIG-IP accepts tokens and claims signed by Microsoft Entra ID.
Input for User And User Groups is dynamically queried.
Important
Add a user or group for testing, otherwise all access is denied. On User And User Groups, select + Add.
User Attributes & Claims
When a user authenticates, Microsoft Entra ID issues a SAML token with claims and attributes that identify the user. The User Attributes & Claims tab has default claims for the application. Use the tab to configure more claims.
Include one more attribute:
For Header Name, enter employeeid.
For Source Attribute, enter user.employeeid.
Additional User Attributes
In the Additional User Attributes tab, enable session augmentation. Use this feature for distributed systems such as Oracle, SAP, and other JAVA implementations that require attributes to be stored in other directories. Attributes fetched from a Lightweight Directory Access Protocol (LDAP) source are injected as more SSO headers. This action helps control access based on roles, Partner IDs, and so on.
Note
This feature has no correlation to Microsoft Entra ID. It's an attribute source.
Conditional Access Policy
Conditional Access policies control access based on device, application, location, and risk signals.
- In Available Policies, find Conditional Access policies with no user actions
- In Selected Policies, find cloud app policy
- You can't deselect these policies or move them to Available Policies because they're enforced at a tenant level
To select a policy to be applied to the application being published:
- On the Conditional Access Policy tab, in the Available Policies list, select a policy.
- Select the right arrow and move it to the Selected Policies list.
Note
You can select the Include or Exclude option for a policy. If both options are selected, the policy is unenforced.
Note
The policy list appears when you select the Conditional Access Policy tab. Select refresh, and the wizard queries the tenant. Refresh appears after an application is deployed.
Virtual Server Properties
A virtual server is a BIG-IP data plane object, represented by a virtual IP address. The server listens for clients requests to the application. Received traffic is processed and evaluated against the APM profile associated with the virtual server. Traffic is directed according to policy.
For Destination Address, enter an IPv4 or IPv6 address that BIG-IP uses to receive client traffic. Ensure a corresponding record in domain name server (DNS) that enables clients to resolve the external URL, of the BIG-IP published application, to this IP. You can use computer's localhost DNS for testing.
For Service Port, enter 443, and select HTTPS.
Check the box for Enable Redirect Port.
Enter a value for Redirect Port. This option redirects incoming HTTP client traffic to HTTPS.
Select the Client SSL Profile you created, or leave the default for testing. The Client SSL Profile enables the virtual server for HTTPS, so client connections are encrypted over TLS.
Pool Properties
The Application Pool tab has services behind a BIG-IP, represented as a pool, with one or more application servers.
For Select a Pool, select Create New, or select another.
For Load Balancing Method, select Round Robin.
For Pool Servers, select a node, or select an IP address and port for the server hosting the header-based application.
Note
The Microsoft back-end application is on HTTP Port 80. If you select HTTPS, use 443.
Single Sign-On & HTTP Headers
With SSO, users access BIG-IP published services without entering credentials. The Easy Button wizard supports Kerberos, OAuth Bearer, and HTTP authorization headers for SSO.
On Single Sign-On & HTTP Headers, in SSO Headers, for Header Operation, select insert
For Header Name, use upn.
For Header Value, use %{session.saml.last.identity}.
For Header Operation, select insert.
For Header Name, use employeeid.
For Header Value, use %{session.saml.last.attr.name.employeeid}.
Note
APM session variables in curly brackets are case-sensitive. Inconsistencies cause attribute mapping failures.
Session Management
Use BIG-IP session management settings to define conditions for user sessions termination or continuation.
To learn more, go to support.f5.com for K18390492: Security | BIG-IP APM operations guide
Single log-out (SLO) ensures IdP, BIG-IP, and user agent sessions terminate when users sign out. When the Easy Button instantiates a SAML application in your Microsoft Entra tenant, it populates the sign out URL, with the APM SLO endpoint. IdP-initiated sign out from My Apps terminates BIG-IP and client sessions.
Learn more: see, My Apps
The SAML federation metadata for the published application is imported from your tenant. The import provides the APM with the SAML sign out endpoint for Microsoft Entra ID. This action ensures SP-initiated sign out terminates client and Microsoft Entra sessions. Ensure the APM knows when user sign out occurs.
If the BIG-IP webtop portal accesses published applications, then th eAPM processes the sign out to call the Microsoft Entra sign-out endpoint. If the BIG-IP webtop portal isn’t used, users can't instruct the APM to sign out. If users sign out of the application, the BIG-IP is oblivious. Thus, ensure SP-initiated sign out securely terminates sessions. You can add an SLO function to an application Sign out button, Then, clients are redirected to the Microsoft Entra SAML or BIG-IP sign out endpoint. To locate the SAML sign out endpoint URL for your tenant, go to App Registrations > Endpoints.
If you can't change the app, enable the BIG-IP to listen for the application sign out call and trigger SLO.
Learn more:
- PeopleSoft Single Logout
- Go to support.f5.com for:
Deploy
Deployment provides a breakdown of your configurations.
- To commit settings, select Deploy.
- Verify the application in your tenant list of Enterprise applications.
- The application is published and accessible via SHA, with its URL, or on Microsoft application portals.
Test
- In a browser, connect to the application external URL or select the application icon on My Apps.
- Authenticate to Microsoft Entra ID.
- A redirection occurs to the BIG-IP virtual server for the application and signed in with SSO.
The following screenshot is injected headers output from the header-based application.
Note
You can block direct access to the application, thereby enforcing a path through the BIG-IP.
Advanced deployment
For some scenarios, Guided Configuration templates lack flexibility.
Learn more: Tutorial: Configure F5 BIG-IP Access Policy Manager for header-based SSO.
In BIG-IP, you can disable the Guided Configuration strict management mode. Then, manually change configurations, however most configurations are automated with wizard templates.
To disable strict mode, navigate to Access > Guided Configuration.
On the row for the application configuration, select the padlock icon.
BIG-IP objects associated with the published instance of the application are unlocked for management. Changes with the wizard are no longer possible.
Note
If you re-enable strict mode and deploy a configuration, the action overwrites settings not in the Guided Configuration. We recommend the advanced configuration for production services.
Troubleshooting
Use the following guidance when troubleshooting.
Log verbosity
BIG-IP logs help isolate issues with connectivity, SSO, policy, or misconfigured variable mappings. To troubleshoot, increase the log verbosity.
- Navigate to Access Policy > Overview.
- Select Event Logs.
- Select Settings.
- Select the row of your published application
- Select Edit.
- Select Access System Logs.
- From the SSO list, select Debug.
- Select OK.
- Reproduce the issue.
- Inspect the logs.
Note
Revert this feature when finished. Verbose mode generates excessive data.
BIG-IP error message
If a BIG-IP error message appears after Microsoft Entra preauthentication, the issue might relate to Microsoft Entra ID-to-BIG-IP SSO.
- Navigate to Access Policy > Overview.
- Select Access reports.
- Run the report for the last hour.
- Review the logs for clues.
Use the View session variables link, for the session, to help understand if the APM receives expected Microsoft Entra claims.
No BIG-IP error message
If no BIG-IP error message appears, the issue might be related to the back-end request, or BIG-IP-to-application SSO.
- Navigate to Access Policy > Overview.
- Select Active Sessions.
- Select the active session link.
Use the View Variables link to help determine SSO issues, particularly if the BIG-IP APM doesn't obtain correct attributes.
Learn more:
- Configuring LDAP remote authentication for Active Directory
- Go to techdocs.f5.com for Manual Chapter: LDAP Query