For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

praque_135655's avatar
praque_135655
Icon for Nimbostratus rankNimbostratus
Oct 31, 2013

Not able to get the saml token using HTTP::payload or HTTP::collect

Hi All,

 

i could not able to get the SAML token using HTTP::PAYLOAD or HTTP::Collect.

 

I have developed the code for the following usecase.

 

Please help me on this.

 

Usecase:

1) Enter the url IDP url http://xmppt.airservices.eds.com:8080/iam/code.asp

 

2) Siteminder challenges the user( enter credentials)

 

3) Internally page invoked the SSO service and grap the saml token from html body and post it to the saml assertion consumer(http://usclspcim021.airservices.eds.com/affwebservices/public/saml2assertionconsumer).

 

http://xmppt.airservices.eds.com/affwebservices/public/saml2sso?SPID=service_provider&ProtocolBinding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST

 

4) Process the redirect (Siteminder issues a redirect) by grabing the Siteminder cookie (SMSESSION). Do not do the actual redirect. (grap the usclspcim021.airservices.eds.com cookie, replace the saml token with the SMCOOKIE)

 

5) Finally reach the landing page.

 

http://usclspcim021.airservices.eds.com/TestBasicAuth/finalpage.html

 

when HTTP_REQUEST { log local0. "enter HTTP Request" log local0. "enter HTTP Method:[HTTP::method]" if {[HTTP::method] equals "GET" || "POST"} { log local0. "enter into Get method"

 

    if {[HTTP::header Content-Length] > 1 && [HTTP::header Content-Length] < 7000} {
    set content_length [HTTP::header Content-Length]
     Use default collect length
       set SAMLResponse [HTTP::payload]
       set SAMLCollect [HTTP::collect]

    log local0. "10.0023- Printing the SAML response:$SAMLResponse IP: [IP::client_addr]"
    log local0. "10.0023- Printing the SAML Collect:$SAMLCollect IP: [IP::client_addr]"

    }

}

}

 

when HTTP_REQUEST_DATA { set SAMLResponse [HTTP::payload] log local0. "60.0000- Printing the SAML response:$SAMLResponse IP: [IP::client_addr]" HTTP::release } when HTTP_RESPONSE {

 

}