Forum Discussion
Amit_Grover_171
Nimbostratus
Oct 12, 2015Need to write Irule to decode auth string to Base64 and fetch domain name from it and compare that domain name with certificate to deny/permit traffic
Hi,
Need to write Irule to decode auth string to Base64 and fetch domain name from it and compare that domain name with certificate to deny/permit traffic.
Please help ASAP.
/Regards
A...
Stanislas_Piro2
Cumulonimbus
Oct 14, 2015Hi Amit,
did you try to replace HTTP event and commands from Kevin irule by TCP one.
You can also get the requested TLS server name instead of cert used.
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENTSSL_CLIENTHELLO {
if { [SSL::extensions exists -type 0] } {
if the servername exists - store it in tls_servername variable
set tls_servername [string range [SSL::extensions -type 0] 9 [string length [SSL::extensions -type 0]]]
}
}
when CLIENT_DATA {
HTTP payload data is available here
set authStr [findstr [TCP::payload] ""]
if { $authStr ne "" } {
set domain [findstr $authStr "mechanism='EXTERNAL'>" 21 end]
catch { set domain [b64decode $domain] }
log local0. "domain = $domain"
}
TCP::release
}
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