Forum Discussion
Jason_Jernigan_
Nimbostratus
Mar 06, 2006Client SSL Insert
I've got a site using client SSL cert inserted to the header for authentication with the backend web server. The irule is as follows.
when CLIENTSSL_CLIENTCERT {
if { [SSL::cert count] > 0 } {
session add ssl [SSL::sessionid] [X509::cert_fields [SSL::cert 0] [SSL::verify_result] whole] 450
}
}
when HTTP_REQUEST {
set certfields [session lookup ssl [SSL::sessionid]]
if { $certfields != "" } {
HTTP::header insert $certfields
}
}
This is followed by another irule that chooses which pool based on active members. This inserting of the header works fine when the pool that is choosen in the next irule is the same as the default pool that is listed for the virtual server. However if it chooses another pool then the session lookup fails? Any help would be greatly appreciated.
Thanks,
Jason
- Jason_Jernigan_
Nimbostratus
I added some logging to figure out what was going on. Below is the irule with the logging enabled. - unRuleY_95363Historic F5 AccountThis may sound a little bizzare, and will eventually be fixed in a future release. The session table actually utilizes the persistence table and as a result, some of the behaviors of the persist table have made there way into how the session table behaves. The issue that is getting you here is what's known as "persist across ...". Since the pool is different, persistence would normally not use the entry unless persist across services or persist across pools is enabled. Obviously, this really isn't appropriate behavior for the session table.
set certfields [session lookup ssl {[SSL::sessionid] any}]
- Jason_Jernigan_
Nimbostratus
Ok I changed the code to this: - unRuleY_95363Historic F5 AccountOk, I'll need to try to reproduce this. What version + hotfixes are you running?
- Jason_Jernigan_
Nimbostratus
We are running version 9.1 with no hotfixes. - unRuleY_95363Historic F5 AccountThe session cmd is broken in 9.1 & 9.1.1 (CR56247). You should call support and get the latest hotfix that is available for 9.1.1 which includes the fix for this.
- Jason_Jernigan_
Nimbostratus
We installed 9.1.1 along with a hotfix. Our current build information is as follows. - Michael_Voight_Historic F5 AccountCR56247 is included in 9.1.1 (as noted in the CR, "Fixed in 9.1.1.54.0". This is the released 9.1.1)
- Michael_Voight_Historic F5 AccountCR56247 is included in 9.1.1 (as noted in the CR, "Fixed in 9.1.1.54.0". This is the released 9.1.1)
- unRuleY_95363Historic F5 AccountYou could try this instead:
set certfields [session lookup ssl [list [SSL::sessionid] any]]
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects