Forum Discussion
Jan 11, 2010
HTTPS - direct based on URI - not terminating SSL
I need to direct traffic to a particular pool based on uri contents. I'm NOT terminating SSL.
1-Can I do this without terminating SSL
2-do I need the else statment or will it default to the pool associated with the VS?
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/test/" } {
pool test1_443
} else { pool test2_443 }
}
- hoolio
Cirrostratus
If you want to inspect or modify the HTTP headers or payload (including the URI), you must decrypt the SSL on LTM. If you need to also use SSL between LTM and the servers, you could decrypt on the clientside using a client SSL profile and re-encrypt on the serverside using a server SSL profile.when CLIENT_ACCEPTED { set default_pool [LB::server pool] } when HTTP_REQUEST { if {[HTTP::uri] starts_with "/test/" } { pool test1_443 } else { pool $default_pool } }
- Gotcha make sense.
- hoolio
Cirrostratus
I would expect the iRule to work with a client and server SSL profile enabled on the VIP with the VIP and pool members defined on port 443. If you remove the server SSL profile, the iRule should only work if you configure a pool on port 80 (or if the servers allow non-SSL requests on port 443). - Gotcha, Thanks for the reference post. We did figure out what was going on, and yes the server was accepting non SSL traffic on it's SSL port.. either way it looks like we need to host the cert if we want to decrypt and encrypt with out a cert error..
- hoolio
Cirrostratus
Good to see you figured out why it was working without a server SSL profile. Yes, you can remove the CLIENT_ACCEPTED part of the iRule if you're hard coding the iRule for both cases. Or you could remove the CLIENT_ACCEPTED event and the else case if you add a OneConnect profile to the VIP. If you're not using SNAT with OneConnect and need exact correlation between client connections and server connections, you can set the OneConnect source mask to 255.255.255.255. - Good info Thanks!
- hoolio
Cirrostratus
LTM can validate client certs against a root cert you configure in the client SSL profile. If you want to handle failures with something other than a TCP close/reset, you'll need to use an iRule.
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