Forum Discussion
Robert_Decker_2
Nimbostratus
Feb 01, 2006Authenticate customer using SSL client certificate or LDAP
I was wondering if anyone could show me how to perform multiple methods of authentication within an Irule. I would like to use ssl authentication against a client certificate as the first method, how...
Feb 06, 2006
Not sure if this is what Colin was getting at or not, but you could assign multiple rules to a vip and pass variables between them. This way you can "simulate" calling multiple iRules using conditions.
Here's some pseudo code for the three iRules.
**** rule check_for_client_cert ****
when CLIENTSSL_CLIENTCERT {
set has_client_cert 1
}
**** rule client_cert_rule ****
when HTTP_REQUEST {
if { [info exists has_client_cert] } {
code goes here
}
}
**** rule ldap_rule ****
when HTTP_REQUEST {
if { ! [info exists has_client_cert] } {
code goes here.
}
}
In this code, if the CLIENTSSL_CLIENTCERT event is raises, then the variable has_client_cert is set. Then in the HTTP_REQUEST events, you can check whether the variable has been set. The "info exists" command is a builtin TCL command to check whether a variable has been defined.
Hope this helps...
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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