Forum Discussion
Matt_108491
Nimbostratus
Dec 03, 2008Some basic iRule questions
I am a little new to irules so I could get some advice I would appriciate it.
I have traffic moving through an F5 LTM and it uses client side authentication.
There is an I rule configured that works as follows
This is existing and seems to work - the idea is to put the cert subject dn into an http header -
when CLIENTSSL_CLIENTCERT {
set subject_dn [X509::subject [SSL::cert 0]]
}
when HTTP_REQUEST {
Insert user header
HTTP::header insert user $subject_dn
set names [HTTP::header names]
foreach name $names {
set val [HTTP::header value $name]
log local0. " $name: $val"
}
}
I would like to do two additonal steps
1. Redirect the request to a new URI IF the URL matches a pattern for example
2. Put the origninal URL and URI in a second head which for the sake of discussion I will call mytarget.
so essentially I am trying to modify the above rule too do the following
if the users goes to *.example.com/ AND the $subject_dn is populated
send them store *.example.com/ in a header and redirect them to the same *.example.com/redirect
- hoolio
Cirrostratus
What are you trying to accomplish with the changes to the iRule? - Matt_108491
Nimbostratus
- hoolio
Cirrostratus
I can understand why you'd want to insert the client cert in the headers if the SSL decryption is being moved to the BIG-IP. But I'm not sure about the URI. Wouldn't the proxy see the original requested URI? Or do you want to change this on the BIG-IP and insert the original URI in a header?
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