F5 Identity and Access Management Solutions > Archived Identity & Access Management Labs > 300 Series: Advanced Use Cases & Solutions Source | Edit on
Lab 3: SAML Identity Provider (IdP) - kerberos Auth¶
The purpose of this lab is to deploy and test a Kerberos to SAML configuration. Students will modify a previous built Access Policy and create a seamless access experience from Kerberos to SAML for connecting users. This lab will leverage the work performed previously in Lab 2. Archive files are available for the completed Lab 2.
Objective:
- Gain an understanding of the Kerberos to SAML relationship its component parts.
- Develop an awareness of the different deployment models that Kerberos to SAML authentication opens up
Lab Requirements:
- All Lab requirements will be noted in the tasks that follow
Estimated completion time: 25 minutes
Task 1 - Setup Lab Environment¶
To access your dedicated student lab environment, you will need a web browser and Remote Desktop Protocol (RDP) client software. The web browser will be used to access the Unified Demo Framework (UDF) Training Portal. The RDP client will be used to connect to the jumphost, where you will be able to access the BIG-IP management interfaces (HTTPS, SSH).
Click DEPLOYMENT located on the top left corner to display the environment
Click ACCESS next to jumphost.f5lab.local

Select your RDP resolution.
The RDP client on your local host establishes a RDP connection to the Jump Host.
Login with the following credentials:
- User: f5lab\user1
- Password: user1
After successful logon the Chrome browser will auto launch opening the site https://portal.f5lab.local. This process usually takes 30 seconds after logon.
Click the Classes tab at the top of the page.

Scroll down the page until you see 301 SAML Federation on the left

Hover over tile SAML Identity Provider (IdP) - Kerberos Auth. A start and stop icon should appear within the tile. Click the Play Button to start the automation to build the environment


The screen should refresh displaying the progress of the automation within 30 seconds. Scroll to the bottom of the automation workflow to ensure all requests succeeded. If you experience errors try running the automation a second time or open an issue on the Access Labs Repo.

TASK 2 ‑ Configure the SAML Identity Provider (IdP)¶
IdP Service¶
Begin by selecting: Access ‑> Federation ‑> SAML Identity Provider ‑> Local IdP Services
Click the Create button (far right)

In the Create New SAML IdP Service dialog box, click General Settngs in the left navigation pane and key in the following:
IdP Service Name: idp.acme.comIdP Entity ID: https://idp.acme.com
Note
The yellow box on “Host” will disappear when the Entity ID is entered
In the Create New SAML IdP Service dialog box, click Assertion Settings in the left navigation pane and key in the following:
Assertion Subject Type: Persistent Identifier(drop down)Assertion Subject Value: %{session.logon.last.username}(drop down)
In the Create New SAML IdP Service dialog box, click SAML Attributes in the left navigation pane and click the Add button as shown

In the Name field in the resulting pop-up window, enter the following:
emailaddressUnder Attribute Values, click the Add button
In the Values line, enter the following:
%{session.ad.last.attr.mail}Click the Update button
Click the OK button

In the Create New SAML IdP Service dialog box, click Security Settings in the left navigation pane and key in the following:
Signing Key: /Common/idp.acme.com(drop down)Signing Certificate: /Common/idp.acme.com(drop down)Note
The certificate and key were previously imported
Click OK to complete the creation of the IdP service

SP Connector¶
Click on External SP Connectors (under the SAML Identity Provider tab) in the horizontal navigation menu
Click specifically on the Down Arrow next to the Create button (far right)
Select From Metadata from the drop down menu

In the Create New SAML Service Provider dialogue box, click Browse and select the sp_acme_com.xml file from the Desktop of your jump host
In the Service Provider Name field, enter the following:
sp.acme.comClick OK on the dialog box

Note
The sp_acme_com.xml file was created previously. Oftentimes SP providers will have a metadata file representing their SP service. This can be imported to save object creation time as has been done in this lab.
Click on Local IdP Services (under the SAML Identity Provider tab) in the horizontal navigation menu

Select the Checkbox next to the previously created
idp.acme.comand click the Bind/Unbind SP Connectors button at the bottom of the GUI
In the Edit SAML SP’s that use this IdP dialog, select the
/Common/sp.acme.comSAML SP Connection Name created previouslyClick the OK button at the bottom of the dialog box

Under the Access ‑> Federation ‑> SAML Identity Provider ‑> Local IdP Services menu you should now see the following (as shown):
Name: idp.acme.comSAML SP Connectors: sp.acme.com
TASK 3 - Create a SAML Resource¶
Begin by selecting Access ‑> Federation ‑> SAML Resources >> **+ (Plus Button)

In the New SAML Resource window, enter the following values:
Name: sp.acme.comSSO Configuration: idp.acmem.comCaption: sp.acme.comClick Finished at the bottom of the configuration window

Task 4 - Create a Webtop¶
Select Access ‑> Webtops ‑> Webtop Lists >> + (Plus Button)

In the resulting window, enter the following values:
Name: full_webtopType: Full(drop down)Minimize To Tray uncheckClick Finished at the bottom of the GUI

Task 5 - Create a Kerberos AAA Object¶
From the jumphost, navigate to the command line enter the command below to generate a kerberos key tab file
ktpass -princ HTTP/idp.acme.com@F5LAB.LOCAL -mapuser f5lab\krbtsrv -ptype KRB5_NT_PRINCIPAL -pass ’P@$$w0rd' -out C:\Users\user1\Desktop\out.keytab
From the BIG-IP GUI, navigate to Access >> Authentication >> Kerberos >> Click the + Plus Symbol

Name: idp.acme.comSPN Format: Host-based serviceAuth Realm: F5LAB.LOCALService Name: HTTPKeytab File: out.keytabClick Finished

Task 6 - Create a SAML IdP Access Policy¶
Select Access ‑> Profiles/Policies ‑> Access Profiles (Per-Session Policies)
Click the Create button (far right)

In the New Profile window, enter the following information:
Name: idp.acme.com‑pspProfile Type: All(drop down)Profile Scope: Profile(default)Customization Type: modern(default)
Scroll to the bottom of the New Profile window to the Language Settings section
Select English from the Factory Built‑in Languages menu on the right and click the Double Arrow (<<), then click the Finished button.
The Default Language should be automatically set

From the Access ‑> Profiles/Policies ‑> Access Profiles (Per-Session Policies) screen, click the Edit link on the previously created
idp.acme.com-pspline
Click the Plus (+) Sign between Start and Deny

In the pop-up dialog box, select the Logon tab and then select the Radio next to HTTP 401 Response, and click the Add Item button

In the HTTP 401 Response dialog box, enter the following information:
HTTP Auth Level: negotiate(drop down)Click the Save button at the bottom of the dialog box

Click the Branch Rules tab
Click the X on the Basic Branch

Click Save

Click the + (Plus symbo) on the negotiate branch

Click the Authentication tab
Select Kerberos Auth
Click Add Item

In the Kerberos Auth dialog box, enter the following information:
AAA Server: /Common/idp.acme.com(drop down)Request Based Auth: Enabled(drop down)Click Save

Click the Plus (+) Sign on the Successful branch between Kerberos Auth and Deny

In the pop-up dialog box, select the Authentication tab and then select the Radio next to AD Query, and click the Add Item button

In the resulting AD Query pop-up window, select
/Commmon/f5lab.localfrom the Server drop down menuIn the SearchFilter field, enter the following value:
userPrincipalName=%{session.logon.last.username}
In the AD Query window, click the Branch Rules tab
Change the Name of the branch to Successful.
Click the Change link next to the Expression

In the resulting pop-up window, delete the existing expression by clicking the X as shown

Create a new Simple expression by clicking the Add Expression button

In the resulting menu, select the following from the drop down menus:
Agent Sel: AD QueryCondition: AD Query PassedClick the Add Expression Button

Click the Finished button to complete the expression

Click the Save button to complete the AD Query

Click the Plus (+) Sign on the Successful branch between AD Query and Deny

In the pop-up dialog box, select the Assignment tab and then select the Radio next to Advanced Resource Assign, and click the Add Item button

In the resulting Advanced Resource Assign pop-up window, click the Add New Entry button
In the new Resource Assignment entry, click the Add/Delete link

In the resulting pop-up window, click the SAML tab, and select the Checkbox next to /Common/sp.acme.com

Click the Webtop tab, and select the Checkbox next to
/Common/full_webtopClick the Update button at the bottom of the window to complete the Resource Assignment entry

Click the Save button at the bottom of the Advanced Resource Assign window

In the Visual Policy Editor, select the Deny ending on the fallback branch following Advanced Resource Assign

In the Select Ending dialog box, selet the Allow radio button and then click Save

In the Visual Policy Editor, click Apply Access Policy (top left), and close the Visual Policy Editor

TASK 7 - Create the IdP Virtual Server¶
Begin by selecting Local Traffic ‑> Virtual Servers
Click the Create button (far right)

In the New Virtual Server window, enter the following information:
General Properties Name: idp.acme.comDestination Address/Mask: 10.1.10.102Service Port: 443
Configuration HTTP Profile: http(drop down)SSL Profile (Client) wildcard.acme.com
Access Policy Access Profile: idp.acme.com-psp
Scroll to the bottom of the configuration window and click Finished
TASK 8 - Test the Configuration¶
From the jumphost, navigate to the SAML IdP you previously configured at https://idp.acme.com. Noticee you are automatically signed into the IDP.
Click sp.acme.com

You are then successfully logged into https://sp.acme.com and presented a webpage.
From the jumphost CLI, type klist. You will see there is a kerberos ticket for HTTP/idp.acme.com@F5LAB.LOCAL

Review your Active Sessions (Access ‑> Overview ‑> Active Sessions)
Review your Access Report Logs (Access ‑> Overview ‑> Access Reports)
Task 9 - Lab Cleanup¶
From a browser on the jumphost navigate to https://portal.f5lab.local
Click the Classes tab at the top of the page.

Scroll down the page until you see 301 SAML Federation on the left

Hover over tile SAML Identity Provider (IdP) - Kerberos Auth. A start and stop icon should appear within the tile. Click the Stop Button to trigger the automation to remove any prebuilt objects from the environment


The screen should refresh displaying the progress of the automation within 30 seconds. Scroll to the bottom of the automation workflow to ensure all requests succeeded. If you you experience errors try running the automation a second time or open an issue on the Access Labs Repo.

This concludes the lab.

