Forum Discussion
Christopher_J_B
Nimbostratus
Sep 24, 2010Is it possible to collect HTTP payload information with SSL/Client side enabled on the VIP?
I am creating iRules to parse HTTP Post requests/XML pulling web services call, information, etc.. The method I am using to collect/parse the HTTP payload is not working with SSL termination on the F5 (SSL Profile/Client enabled).
Is it possible? If so which event should I use?
For non-SSL terminate connections using HTTP_REQUEST_DATA using a HTTP:payload function
Here are snippets of the configuration of the VIP
virtual sandapcspapl-ssl-vip {
snat automap
pool sandapcspapl-80
destination 10.12.0.101:https
ip protocol tcp
rules
tcp_CSPRTAPL
xml_CSPRTAPL
profiles
http-x-forwarded-for
sandapcspaplv2
tcp
}
profile clientssl sandapcspaplv2 {
defaults from clientssl
key "sandapcspaplv2.key"
cert "sandapcspaplv2.crt"
}
- hoolio
Cirrostratus
You should be able to use HTTP::collect and HTTP::payload with a virtual server that accepts encrypted SSL traffic and decrypts it with a client SSL profile. The HTTP related iRule functionality should work the same with a client SSL profile and encrypted traffic as unencrypted traffic without a client SSL profile. - Christopher_J_B
Nimbostratus
I have 2x VIP - one SSL terminated and the other not. The iRule is the same for both VIP - all traffic that is dest'd to the non-SSL VIP works - SSL nada - hoolio
Cirrostratus
So nothing gets logged at all when you add this iRule to a virtual server with a client SSL profile enabled? Can you add some debug logging to CLIENT_ACCEPTED to check that the TCP connection from the client to the SSL VS has been established and in HTTP_REQUEST to see whether the criteria for collecting they payload is being met?From: http://devcentral.f5.com/wiki/default.aspx/iRules/CreditCardScrubber.html Only check responses that are a text content type (text/html, text/xml, text/plain, etc). if { [HTTP::header "Content-Type"] starts_with "text/" } { Get the content length so we can collect the data (to be processed in the HTTP_RESPONSE_DATA event) Limit collection to 1Mb (1048576 minus a little to spare) - See SOL6578 for details if { [HTTP::header exists "Content-Length"] } { if { [HTTP::header "Content-Length"] > 1048000 }{ Content-Length over 1Mb so collect 1Mb set content_length 1048000 } else { Content-Length under 1Mb so collect actual length set content_length [HTTP::header "Content-Length"] } } else { Response did not have Content-Length header, so use default of 1Mb set content_length 1048000 } Don't collect content if Content-Length header value was 0 if { $content_length > 0 } { HTTP::collect $content_length } }
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