Forum Discussion
MW1
Cirrus
Jul 02, 2010Is this feasible - match uri value from local value in file?
All,
my company has asked me if it is possible to match a URI in a request from a value in a local file, if the value matches the F5 would then insert a encrypted cookie with the client IP (following the Cookie LoJack on the site) before allowing the user to access the backend server where they can log in. They hope to provide a new value to the users & the F5 approx every 20-30 minutes, as the users are out on the internet I'm presuming I will need to support 2 values due to the possible differences in timing between the F5 receiving the new URI string and the users. Does this sound feasible?
regards
W60
- Chris_Miller
Altostratus
When you say "local file" - do you mean local to the F5? It sounds like you might be able to use datagroups for this.when HTTP_REQUEST { if { [matchclass [HTTP::uri] eq $::test] } { HTTP::cookie insert name "x" value "[IP::client_addr]" } }
- hoolio
Cirrostratus
As Chris suggested, you could use a datagroup to store the values you want to check the URI against. You'd probably want to set a variable in the request tracking whether to insert a cookie in the response this could be based on the URI and/or whether the request contains a valid cookie. You could then check that variable in HTTP_RESPONSE and use HTTP::cookie insert and HTTP::cookie encrypt to set an encrypted cookie. See the HTTP::cookie wiki page for details:
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