on 10-Jul-2018 04:06
In previous articles, we have discussed the use of F5 BIG-IP as a SSL VPN and then followed up by adding endpoint security to the same Access Profile configuration we used for VPN access. I now wanted to take some time to discuss a use case that is certainly near and dear to those in the DoD and Federal government but is also being implemented more and more within the private sector. Prior to getting into the configuration of this use case, I wanted to clarify a few things. This solution is not meant to replace Windows Integrated Authentication or any type of certificate authority function but is rather used when the BIG-IP is configured as a reverse or to support those applications that do not support client certificate authentication.
As mentioned above https://devcentral.f5.com/s/articles/creating-a-ssl-vpn-using-f5-full-webtop-30146 describes the configuration of a full Webtop to establish full network access and then added https://www.linkedin.com/pulse/configuring-endpoint-security-client-side-stephen-lyons/?lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_view_base_post_details%3BAQH0s5%2BNRiqaYPuF5aR70g%3D%3D which described adding endpoint security. Below are screenshots of what the APM VPE configuration looked like when configuring forms based authentication. In this example, I will be configuring access to Microsoft Outlook Web App using client certificate authentication and Kerberos Constrained Delegation (KCD).
If you have followed with us during the last few articles you would have already met the following prerequisites. If you have not, make sure these are done before you get started as these are outside the scope of this article.
Now let's get started with configuring our Exchange 2016 instance for certificate authentication for users outside of the network but are members of the demo.lab domain. We will be using F5 documentation for enabling Kerberos Constrained Delegation (KCD) found at the link below.
https://www.f5.com/pdf/deployment-guides/kerberos-constrained-delegation-dg.pdf
Before we get started with our Kerberos Constrained Delegation configuration, I wanted to identify the most common issues I have experienced in the field.
To create the APM delegation account from the UI follow the following steps provided directly from F5's Kerberos Constrained Delegation deployment guide.
In the First and Last name boxes, type the appropriate names.
To configure the account created in previous steps to support delegation, follow these steps. I will be using the Attribute Editor within the DSA console rather than using setspn or ADSIEdit. You must enable Advanced Features to view this tab.
This concludes the configuration of the APM Delegation Account.
Note: For KCD to work correctly, the application such as OWA in this instance must already be configured to support Kerberos. Enabling Exchange OWA to support Kerberos is outside the scope of this article.
Now that we have configured an active directory account to support delegation we will begin the Kerberos configuration on the BIG-IP. To start we will create an SSO configuration using the configuration items below. If not defined below, leave the default setting.
Note: Defining a KDC is not a requirement as DNS will most often identify the appropriate KDC. However, I will configure it in this demo.
Note: In order to support AES Kerberos Encryption, the account name must be in SPN format as shown in the screenshot above. If it is not, you will receive the following error.
"Kerberos: can't decrypt S4U2Self ticket for user 12345679@SITEREQUEST.COM - Decrypt integrity check failed (-1765328353)."
Configuring a LDAP AAA Resource
# For each element in the list:
foreach field $x509e_fields {
# If the element contains UPN:
if { $field contains "othername:UPN" } {
## set start of UPN variable
set start [expr {[string first "<" $field] +1}]
# UPN format is
# Return the UPN, by finding the index of opening and closing brackets, then use string range to get everything between.
return [string range $field $start [expr { [string first ">" $field $start] - 1 } ] ]; } }
# Otherwise return UPN Not Found:
return "UPN-NOT-FOUND";
At this point, you have a fully deployed VPE capable of supporting smart card authentication.
Note: There is so much more we can do here from pre-authentication checks for AV, firewall, redirect users versus allow and deny, etc. though these items are outside the scope of this article. I will attempt to identify these capabilities in future articles
At this point, we have successfully configured a delegation account in Active Directory, configured APM to support smart card authentication as well as configure our OWA virtual server to support client-side certificate authentication requests with the configuration of the client-side SSL profile.
This article more than anything was meant to provide visuals of an actual client certificate authentication implementation. While there are several other methods not included in this document such as the implementation of iRules for certain functions, this is what works best for me. Future articles will include troubleshooting methods for cert based authentication and KCD. I hope this helps. Until next time!
Steve,
Question on the SSO Credential Mapping. I see that you specified "sAMAccountName from LDAP Directory" as the SSO Token Username, but left the SSO Token Password as "Password from Logon Page". How does this work with a DoD Common Acces Card (CAC) smartcard?
Without going on for too long, I need to get external users (reverse proxy) to actually authenticate against AD or LDAP and have their "lastLogonTimestamp" attribute get updated with their successful access to our SharePoint site.
Will the SSO Credential Mapping work with LDAP or AD, and will this trigger an update to this AD attribute?
My setup looks nearly identical to your above setup except that I have "AD Query" with the same lookup (userPrincipalName=%{session.logon.last.upn}), and no SSO Credential Mapping.
We have found that the AD Query (or LDAP Query) alone is not updating the "lastLogonTimestamp" attribute which is a problem, as we disable accounts after a certain amount of time since the last "lastLogonTimestamp".
Any insight that you could provide would be appreciated.
Hi Joe! No need to be concerned about the "Password from Logon Page" and to be honest the credentials that are going to be used are obtained from the Kerberos SSO profile. Below is a screenshot of my current vpe supporting smart card/certificate based authentication.
From there we need to validate what we are using in our Kerberos SSO profile is actually being obtained.
Enable Debug logging and you can see all of the session variables and if any you are expecting that maybe were not populated.
Then after successfully authenticating using KCD they yes after validation the "lastLogonTimestamp" is updated.
I only support the DoD and intel agencies so this is what I do on a fairly common basis. If you need any help at all please do not hesitate to reach out. Hope this helps!
Honestly, I don't know that it really matters. There was some password reset limitations of using the LDAP query versus AD but I don't remember off the top of my head. However, in your case, this wouldn't be an issue unless you had a branch for users that didn't have a CAC that were still using UN/PW. The thing to remember is that the variable is going to change.
If you use LDAP you will use something like session.ldap.last.attr.sAMAccountName versus using AD will result in session.ad.last.attr.sAMAccountName.
Roger that. It appears to have worked with AD Query, but when I looked into my AD account the attribute that got updated was the "lastLogon" and not the "lastLogonTimestamp". Granted I am not sure if there is a process in the DC that updated the "lastLogonTimestamp" with the "lastLogon" info after a period of time. I'll have to check that out later.
Thanks again for your assistance!
No worries Joe. I will say that is an interesting observation though. Using LDAP I see only lastLogonTimestamp being updated and not the lastlogon. If I find the time, I may try modifying my VPE to reflect AD query vs LDAP to see the results in AD as far as time stamps.
Steve,
So, after some digging, I have found a few things:
1) As you stated, using AD Query or LDAP Query should work either way, BUT since my Kerberos SSO config is set to "session.ad.last.attr.sAMAccountName" I must use the "sAMAccountName form Active Directory" in the SSO Credential Mapping
2) I still do not see an update to the AD "lastLogon" attribute though. It gets updated when I unlock my workstation with my Token card and PIN, but not when I access a VS with associated Access Policy.
I am at a loss how to get this AD attribute to update, but I will keep trying.
On a side note, after researching the "lastLogon" and "lastLogonTimestamp" it appears as though the former is specific to each DC. Meaning that whichever DC processed the logon the "lastLogon" attribute is then updated on that DC ONLY (not replicated). If the DC that processed the logon has a "lastLogonTimestamp" that is greater than 14 days of the newly processed "lastLogon" then the "lastLogonTimestamp" of that DC will get updated with the "lastLogon" date/time, and then that "lastLogonTimestamp" get replicated across all the DC's.
I'm not sure where I go from here, but if you have any insight let me know. Thanks again!