praque_135655
Oct 18, 2013Nimbostratus
Getting HTTPID AND PASSWORD using irule
hi,
Following the is the requirement, i need to get userid and password from F5 incoming request and post it to siteminder application url.
UseCase: 1. In coming request at F5 has id/pwd in HTTP header 2. Retrieve the id/pwd at F5 3. Post id/pwd by accessing a dummy web resource secured (by Siteminder) to Siteminder
i am new to F5 irule. i wrote the below script. please verify the below irule and advise me for any modification.
irule to retrieve the userid and password:
when HTTP_REQUEST {
if {[HTTP::method] eq "POST"} {
if{[HTTP::header exists Authorization]}{
set userID [HTTP::username]
set pass [HTTP::password]
log local0. $userID
log local0. $pass
if{[HTTP::uri] contains "/OAuthDemo/test.html"}{
HTTP::redirect "http://siteminder:90/OAuthDemo/test.html"
}
}
}
}