Manual Chapter :
Using APM as a SAML Service Provider
Applies To:
Show VersionsBIG-IP APM
- 16.0.1, 16.0.0
Using APM as a SAML Service Provider
About configuration
requirements for APM as a SAML service provider
For Access Policy Manager to act as a SAML service provider (SP), you must
configure the following:
- SAML SP service – one required
- SAML Identity Provider (IdP) connectors – one or more required
- An SSL certificate and key from each SAML IdP, imported into the store on the BIG-IP system
- An access profile
- An access policy that includes the SAML Auth agent
- A virtual server that assigns the access profile
When configuring a SAML SP, you cannot configure it as a portal
access resource. If the BIG-IP system is configured as a portal access to a backend resource
that is the actual SAML SP, then the portal access (rewrite filter) does URL rewriting, which is
not compatible with SAML functionality. The SAML SP backend resource needs to be configured as a
pool for this to work.
When configured as a SAML SP, you can use step-up authentication with SAML. You need to put a
SAML Auth agent in a subroutine in a per-request policy. The policy can then perform step-up
authentication, for example, when end users access different resources. Refer to
BIG-IP
APM: Implementing Zero Trust with Per-Request Policies
for an example of using step-up
authentication with SAML.About local SP
service
A SAML SP service is a type of AAA
service in Access Policy Manager (APM ). It requests authentication from an external SAML Identity
Provider (IdP) that is specified on APM in a SAML IdP connector. (You bind a SAML service
provider (SP) service to one or more SAML IdP connectors.) APM requests authentication from an
IdP and consumes assertions from it to allow access to resources behind APM.
About SAML IdP discovery
On a BIG-IP system that you use as a SAML service provider (SP), you can
bind an SP service to one or more SAML Identity Provider (IdP) connectors (each of which
specifies an external IdP). When you bind an SP service to multiple IdP connectors, Access Policy Manager chooses the correct IdP connector at run time through a
filtering and matching process called IdP discovery.
Scenario
You might bind multiple IdP connectors to an SP service on the BIG-IP system when you must
provide services to different businesses and universities, each of which specifies an IdP to
identify their users. When the user's information arrives at the SP service on the BIG-IP
system, the SP service identifies the correct IdP and redirects the user to authenticate against
that IdP before the SP service provides access to the service.
The SP service performs IdP discovery for a user only when the user initiates connection
from an SP.
Session variables and the typical access policy for BIG-IP system as SP
On a BIG-IP system configured as an SP, the typical access policy presents a logon page to the
user. The Logon Page action populates session variables. You can customize the Logon Page action
and affect session variable values. A SAML Auth action follows the logon page.
A SAML Auth action specifies an SP service. An SP service is an AAA service that requests
authentication from an external IdP (specified in an IdP connector).
Session variables and SAML IdP discovery
Among multiple IdP connectors, the BIG-IP system must discover the correct external IdP with
which to authenticate a user. For IdP discovery to work, you must specify matching criteria, a
session variable name and value, for each IdP connector.
For example, users of a service might go to a particular landing page. When you bind the IdP
connector, for the external IdP that serves those users, to the SP service, select the
%{session.server.landinguri}
session variable and supply a landing path
value, such as, /south*
. For users going to URLs such as
https://sp-service/southwest
and
https://sp-service/southeast
, the SP service selects the same IdP to
authenticate them.Logon Page action customization
These are some common customization examples for the Logon Page action.
Yes
for Split domain from full
Username
. The Logon Page agent takes the user name, such as joe@office.com, that was
entered and creates the following session variables with these values.
Session Variable | Value |
---|---|
%{session.logon.last.username} | joe |
%{session.logon.last.domain} | office.com |
%{session.logon.last.logonname} | joe@office.com |
Change the prompt for the first text field (username field). To omit the password: for
Type
, select none
from the list. About IdP
connectors
An IdP connector specifies how a BIG-IP system, configured as a SAML service provider (SP), connects with an external SAML
identity provider (IdP).
About methods for
configuring SAML IdP connectors in APM
You can use one or more of these methods to configure SAML identity
provider (IdP) connectors in Access Policy Manager
(APM).
- From metadata - Obtain a metadata file from the vendor and import it into APM. The advantage to this method is that the vendor provides all required data, including the certificate. You can complete the configuration by simply typing a unique name for the identity provider, and browsing to and importing the file. APM imports the certificate to the BIG-IP system and configures the SAML IdP connector.
- From template - Use templates that APM provides for some vendors. The advantages to this method are that:
- Most required data is included in the template. (Note that the certificate is not included.)
- Additional required data is minimal and is available from the vendor.
- Custom - Research the identity provider requirements and type all settings into the Configuration utility. Use this method when a metadata file or a template for an identity provider is not available. APM configures the SAML IdP connector. You must obtain a certificate from the vendor and import it into the BIG-IP system.
- IdP Automation - Provide files with cumulative IdP metadata on remote systems, then configure BIG-IP IdP automation to poll the files periodically and create IdP connectors and bind them to a specific service provider (SP) service.
Configuring the BIG-IP system as a SAML Service Provider
Setting up a BIG-IP system as a SAML service provider (SP) involves two
steps:
- First, you set up one BIG-IP system as a SAML service provider (SP)
- Then, you go to one or more external SAML identity provider (IdP) systems and configure connectivity to the SP system
When configuring a SAML SP, you cannot configure it as a
portal access resource. If the BIG-IP system is configured as a portal access to a
backend resource that is the actual SAML SP, then the portal access (rewrite filter)
does URL rewriting, which is not compatible with SAML functionality. The SAML SP
backend resource needs to be configured as a pool for this to work.
Flowchart: BIG-IP system as a SAML service provider configuration
This flowchart illustrates the process for configuring a BIG-IP system as
a SAML service provider (SP). In this configuration, the BIG-IP system relies on external SAML
Identity Providers (IdPs).
Configuring a
custom SAML IdP connector
You configure a SAML IdP connector so that Access
Policy Manager (APM) (as a SAML service provider) can send authentication requests to
this Identity Provider (IdP), relying on it to authenticate users and to provide access
to resources behind APM.
- On the Main tab, click.The External IdP Connectors screen displays.
- Click.The Create New SAML IdP Connector screen opens.
- In theNamefield, type a unique name for the SAML IdP connector.
- In theIdP Entity IDfield, type a unique identifier for the IdP.This is usually a URI. Obtain this value from the vendor.
- To configure single sign-on service, from the left pane, select.The screen changes to display the applicable settings.
- In theSingle Sign On Service URLfield, type the location on the IdP where APM should send authentication requests.
- From theSingle Sign On Service Bindingfield, select one:
- POST (the default value)
- Redirect
This is the binding APM uses to send authentication requests to the IdP. - For the service provider to connect to an artifact resolution service and exchange an artifact for an assertion, select.
- In theArtifact Resolution Service Settingsarea, in theLocation URLfield, type the URI of the IdP artifact resolution service.The URI must include the scheme, host name, port, and full path.
- In theIP Addressfield, type the IP address that this BIG-IP system (as SP) will use to connect to the IdP artifact resolution service.The value must be a valid IPv4 or IPv6 address.The host name from theLocation URLmust resolve to this IP address.
- In thePortfield, type the port for the artifact resolution service.This must match the port number from theLocation URL.
- To specify that the IdP requires that artifact resolve requests be signed, select theSign Artifact Resolution Requestcheck box, and select a profile from theServer SSL Profilelist.
- If the artifact resolution service is protected by HTTP Basic authentication, in theUser Namefield, type a Basic user name and in thePasswordfield type a password.
- SelectAssertion Settingsfrom the left pane.
- From theIdentity Locationlist, select where to find theprincipal(usually, this is a user) to be authenticated:
- Subject- In the subject of the assertion. This is the default setting.
- Attribute- In an attribute. If selected, theIdentity Location Attributefield displays, and you must type an attribute name into it.If the assertion from the IdP does not include this attribute, the BIG-IP system (as SP) does not accept the assertion as valid.
- SelectSecurity Settingsfrom the left pane.
- To require that the SAML SP sign the assertion request before sending it to the IdP, select theMust be signedcheck box and select an algorithm from theSigning Algorithmlist.
- From the Certificate Settings area, select a certificate from theIdP's Assertion Verification Certificatelist.The BIG-IP system uses this certificate from the IdP to verify the signature of the assertion from the IdP. If the certificate from the IdP is not in the BIG-IP system store, obtain it and import it into the store. Then edit this IdP connector to select the certificate for it.
- SelectSLO Service Settingsfrom the left pane.
- In theSingle Logout Request URLfield, type a URL.When a service provider initiates a logout, APM sends the logout request to the SAML Identity Provider (IdP) using this URL.
- In theSingle Logout Response URLfield, type a URL.When the IdP initiates a logout, APM sends the logout response to the IdP using this URL.
APM supports HTTP-POST binding for the SLO service. For SLO to work, all entities (SPs and IdPs) must support SLO. - ClickOK.The popup screen closes.
APM creates a SAML IdP connector. It is available to bind to a SAML SP
service.
Creating a virtual server for a BIG-IP (as SAML SP) system
Before you start this task, configure a client SSL profile and a
server SSL profile.
Access Policy Manager
supports using a non-SSL virtual server for the BIG-IP system
(as SP). However, we highly recommend using an SSL virtual server for security
reasons. The following procedure includes steps that are required for configuring an
SSL virtual server. These are: selecting client and server SSL profiles and setting
the service port to HTTPS.
Specify a host virtual server to use as the SAML SP.
- On the Main tab, click.The Virtual Server List screen opens.
- ClickCreate.The New Virtual Server screen opens.
- In theNamefield, type a unique name for the virtual server.
- For theDestination Address/Masksetting, confirm that theHostbutton is selected, and type the IP address in CIDR format.The supported format is address/prefix, where the prefix length is in bits. For example, an IPv4 address/prefix is10.0.0.1or10.0.0.0/24, and an IPv6 address/prefix isffe1::0020/64or2001:ed8:77b5:2:10:10:100:42/64. When you use an IPv4 address without specifying a prefix, the BIG-IP system automatically uses a/32prefix.The IP address you type must be available and not in the loopback network.
- In theService Portfield, type443or selectHTTPSfrom the list.
- For theHTTP Profile (Client)setting, verify that the default HTTP profile,http, is selected.
- For theSSL Profile (Client)setting, from theAvailablelist, select the name of the Client SSL profile you previously created and move the name to theSelectedlist.
- For theSSL Profile (Server)setting, from theAvailablelist, select the name of the Server SSL profile you previously created and move the name to theSelectedlist.
- ClickFinished.
The virtual server for the BIG-IP system configured as an SP now appears on the
Virtual Server List. The virtual server destination is available for use in a SAML SP
service configuration.
Configuring a SAML
SP service
Configure a SAML service provider (SP) service for
Access Policy Manager to provide AAA authentication, requesting authentication and
receiving assertions from a SAML identity provider (IdP).
- On the Main tab, click.The Local SP Services screen displays.
- ClickCreate.The Create New SAML SP Service screen opens.
- In theNamefield, type a unique name for the SAML SP service.
- In theEntity IDfield, type a unique identifier for a SAML SP entity.It is recommended that Entity ID is a URL that contains the FQDN of the SP virtual server. IfSchemeandHostare specified, the SAML SP entity can be a unique identifier other than a URL. It can use session variables that are exposed as real values at runtime. For example,https://%{session.server.network.name}
- If theEntity IDfield does not contain a valid URI, in the SP Name Settings area from theSchemelist, selecthttpsorhttpand in theHostfield, type a host name.For example, typesiterequest.comin theHostfield.
- In theRelay Statefield, type a value.The value can be an absolute path, such ashr/index.htmlor a URI, such ashttps://www.abc.com/index.html. It is where the service provider redirects users after SAML single sign-on completes.
- For this service provider to request an artifact instead of an assertion from the IdP, from the left pane selectEndpoint Settingsand, from theAssertion Consumer Service Bindinglist, selectArtifact.POSTis the default setting.
- From the left pane, selectSecurity Settings.The screen displays the applicable settings.
- If you want this BIG-IP system to send signed authentication requests to the SAML IdP, selectSigned Authentication Request. Then select a key and a certificate from those in the BIG-IP system store from theMessage Signing Private KeyandMessage Signing Certificatelists.
- If this BIG-IP system requires signed assertions from the SAML IdP, ensure that theWant Signed Assertioncheck box remains selected.
- If this BIG-IP system requires encrypted assertions from the SAML IdP, selectWant Encrypted Assertion. Then select a key and a certificate from those in the BIG-IP system store from theAssertion Decryption Private KeyandAssertion Decryption Certificatelists.The BIG-IP system uses the private key and certificate to decrypt the assertion.
- To configure additional service provider attributes, from the left pane clickAdvanced.The screen displays the applicable settings.
- To force users to authenticate again even when they have an SSO session at the identity provider, select theForce Authenticationcheck box.This setting is for use when the external IdP supports a force authentication flag.
- To allow the external IdP, when processing requests from this BIG-IP system as SP, to create a new identifier to represent the principal, select theAllow Name-Identifier Creationcheck box.
- To specify the type of identifier information to use, select a URI reference from theName-Identifier Policy Formatlist.For example, if a Service Provider (SP) initiates SSO by sending anAuthnRequestto the IdP with formaturn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress, then the IdP response should contain the subject identity in email format.
- To specify that the assertion subject's identifier be returned in the namespace of an SP other than the requester, or in the namespace of a SAML affiliation group of SPs, type a value in theSP Name-Identifier Qualifierfield.
- ClickOK.The screen closes.
APM creates the SAML SP service. It is available to bind to SAML IdP connectors and to
export to a metadata file.
Binding a SAML SP service to SAML IdP connectors
Select a SAML SP service and bind one or more SAML
IdP connectors to it so that this device (BIG-IP system as a SAML service provider) can
request authentication from the appropriate external IdP.
If you bind
this SP service to more than one IdP connector, you must configure matching criteria
for each IdP connector. When users initiate connections at service providers, the
BIG-IP system uses matching criteria to identity the correct IdP among many using
SAML IdP discovery.
- On the Main tab, click.The Local SP Services screen displays.
- Select a SAML SP service from the list.
- ClickBind/Unbind IdP Connectors.A pop-up screen displays a list of any IdP connectors that are associated with this SP service.
- To add an SAML IdP connector to the list, clickAdd New Row.
- To bind only one IdP connector with this SP service, complete the configuration:
- Select a connector from theSAML IdP Connectorslist in the new row.When you bind only one IdP connector to an SP service, you do not need to fill in theMatching SourceandMatching Valuefields.
- Click theUpdatebutton.The configuration is not saved until you clickOK.
- ClickOK.APM saves the configuration. The screen closes.
- To bind multiple IdP connectors with this SP service, complete the configuration:
- Select a connector from theSAML IdP Connectorslist in the new row.
- In theMatching Sourcefield, select or type the name of a session variable.Use a session variable only if it is populated in the policy before the SAML Auth action.For example, select%{session.server.landinguri}or type%{session.logon.username}.
- In theMatching Valuefield, type a value.The value can include the asterisk (*) wild card.For example, type*hibb*orsouth*.
- Click theUpdatebutton.The configuration is not saved until you clickOK.
- To add other IdP connectors, start by clickingAdd New Row, fill the new row, and end by clickingUpdate.
- ClickOK.APM saves the configuration. The screen closes.
The SAML IdP connectors that you selected are bound the SAML SP service.
Exporting SAML SP metadata from APM
You need to convey the SP metadata from APM to the external SAML IdP that provides
authentication service to this SP. Exporting the SAML SP metadata to a file provides you
with the information that you need to do this.
- On the Main tab, click.The Local SP Services screen displays.
- Select an SP service from the list and clickExport Metadata.A popup window opens, displayingNoon theSign Metadatalist.
- For APM to sign the metadata, perform these steps:
- From theSign Metadatalist, selectYes.
- From theSigning Keylist, select a key.APM uses the key to sign the metadata.
- From theSignature Verification Certificatelist, select a certificate.APM exports the certificate to the metadata file. The system on which you import the metadata file can use the certificate to verify the metadata signature.
- SelectOK.APM downloads an XML file.
You must either import the XML file on the IdP system or use the information in the
XML file to configure SP metadata on the IdP system .
Configuring an
access policy to authenticate with an external SAML IdP
Before you start this task, configure
an access profile.
When you use this BIG-IP system as a
SAML service provider (SP), configure an access policy to direct users to an
external SAML Identity Provider (IdP) for authentication.
- On the Main tab, click.The Access Profiles (Per-Session Policies) screen opens.
- In the Per-Session Policy column, click theEditlink for the access profile you want to configure.The visual policy editor opens the access policy in a separate screen.
- Click the(+)icon anywhere in the access policy to add a new item.Only an applicable subset of access policy items is available for selection in the visual policy editor for any access profile type.A popup screen opens, listing predefined actions on tabs such as General Purpose, Authentication, and so on.
- On the Authentication tab, selectSAML Authand click theAdd Itembutton.The SAML Auth properties window opens.
- In the SAML Authentication SP area from theAAA Serverlist, select a SAML SP service and clickSave.The Access Policy window displays.
- Add any additional actions that you require to complete the policy.
- Change the Successful rule branch fromDenytoAllow, and then click theSavebutton.
- At the top of the window, click theApply Access Policylink to apply and activate your changes to this access policy.
- Click theClosebutton to close the visual policy editor.
You have an access policy that uses
SAML authentication against an external SAML IdP and further qualifies the
resources that a user can access.
Simple access policy to authenticate users
against an external SAML IdP
To
apply this access policy to network traffic, add the access profile to a virtual
server.
To ensure
that logging is configured to meet your requirements, verify the log settings for
the access profile.
Verify log settings for the access profile
Confirm that the correct log settings are selected
for the access profile to ensure that events are logged as you intend.
Log settings are configured in the
area of the product. They enable and disable logging for access
system and URL request filtering events. Log settings also specify log publishers
that send log messages to specified destinations. - On the Main tab, click.The Access Profiles (Per-Session Policies) screen opens.
- Click the name of the access profile that you want to edit.The properties screen opens.
- On the menu bar, clickLogs.The access profile log settings display.
- Move log settings between theAvailableandSelectedlists.You can assign up to three log settings that enable access system logging to an access profile. You can assign additional log settings to an access profile provided that they enable logging for URl request logging only.Logging is disabled when theSelectedlist is empty.
- ClickUpdate.
An access profile is in effect when it is assigned to a virtual server.
Adding the access
profile to the virtual server
You associate the access profile with the virtual
server so that the system can apply the profile to incoming traffic.
- On the Main tab, click.The Virtual Server List screen opens.
- Click the name of the virtual server you want to modify.
- In the Access Policy area, from theAccess Profilelist, select the access profile that you configured earlier.
- ClickUpdateto save the changes.
Adding SAML SP
metadata from APM to an external SAML IdP
To complete the agreement between APM as the SAML
service provider and a SAML IdP, you must configure service provider metadata at the
IdP.
The method for configuring SAML service provider metadata at a
SAML IdP will vary by vendor.
- Using the method that the vendor provides, either:
- Import the SAML SP metadata file that you exported from APM for a SAML SP service that is bound to the SAML IdP connector for this IdP.
- Or take information from the SAML SP metadata file that you exported from APM and add it using the vendor's interface. Pay particular attention to the values for entityID, AssertionConsumerService, and the certificate.Typically, the value of AssertionConsumerService is a URL that looks like this:https://bigip-sp-vs/saml/sp/profile/post/acs.
Creating SAML authentication context
classes
You create SAML authentication context classes to provide URIs to SAML service
providers. These URIs specify authentication methods in SAML authentication requests and
authentication statements.
- On the Main tab, click.The Local SP Services screen displays.
- ClickAuthentication Context Classes.The Authentication Context Classes screen displays.
- ClickCreate.The Create New SAML Authentication Context Classes screen displays.
- ClickGeneral Settings.
- In theNamefield, type a name used in the SAML Service Provider (SP) local SP service configuration.
- In theDescriptionfield, type a descriptive text for the authentication context classes.
- ClickAuthentication Classes.
- ClickAdd.
- In theNamefield, type a name for the authentication class.
- From the Value dropdown menu, select an existing value.
- Add more values as needed.
- ClickUpdate.
- ClickOK.
An authentication context class with a list of authentication contexts is available.