Forum Discussion
fujisen
Oct 19, 2011Nimbostratus
Username persistence
hi,
View client (SSO)-> APM/LTM -> server 1&2
Below Irule is creating username persistent entry only when one connect profile is enabled but not otherwise
when HTTP_REQUEST {
HTTP::collect [HTTP::header Content-Length]
}
when HTTP_REQUEST_DATA {
First request when entering credentials
set username [findstr [HTTP::payload] username 30 "<"]
if { $username ne "" } {
persist uie $username 180
log local0. "Persisting $username"
}
}
Anyway to Keep oneconnect disabled and persist username?
Thanks in advance
- fujisenNimbostratusHTTP_REQUEST {
- Patrick_Chang_7Historic F5 AccountIf oneconnect profile is not enabled, then the iRule only triggers on the first request in the connection. You could make the response HTTP1.0. This would force a new connection for every request. Or you could use a oneconnect profile with a netmask of 255.255.255.255 (which would end up with a new connection for every client IP).
- nitassEmployeei might be wrong but i understand without oneconnect, event is still triggered but server-side connection isn't detached.
[root@iris:Active] config b virtual bar list virtual bar { snat automap pool foofoo destination 172.28.17.33:http ip protocol tcp rules myrule profiles { http {} tcp {} } } [root@iris:Active] config b pool foofoo list pool foofoo { members 10.10.70.120:http {} } [root@iris:Active] config b rule myrule list rule myrule { when CLIENT_ACCEPTED { set i 0 log local0. "i - $i|client - [IP::client_addr]:[TCP::client_port]" } when HTTP_REQUEST { log local0. "i - $i|client - [IP::client_addr]:[TCP::client_port]" if {$i == 0} { pool foo } incr i } when HTTP_RESPONSE { log local0. "i - $i|server - [IP::remote_addr]:[TCP::remote_port]" } } [root@iris:Active] config b pool foo list pool foo { members 10.10.70.110:http {} } [root@iris:Active] config tail -f /var/log/ltm Oct 20 20:18:29 local/tmm info tmm[4601]: Rule myrule : i - 0|client - 192.168.206.102:62984 Oct 20 20:18:29 local/tmm info tmm[4601]: Rule myrule : i - 0|client - 192.168.206.102:62984 Oct 20 20:18:29 local/tmm info tmm[4601]: Rule myrule : i - 1|server - 10.10.70.110:80 Oct 20 20:18:29 local/tmm info tmm[4601]: Rule myrule : i - 1|client - 192.168.206.102:62984 Oct 20 20:18:29 local/tmm info tmm[4601]: Rule myrule : i - 2|server - 10.10.70.110:80 Oct 20 20:18:29 local/tmm info tmm[4601]: Rule myrule : i - 2|client - 192.168.206.102:62984 Oct 20 20:18:29 local/tmm info tmm[4601]: Rule myrule : i - 3|server - 10.10.70.110:80 Oct 20 20:18:29 local/tmm info tmm[4601]: Rule myrule : i - 3|client - 192.168.206.102:62984 Oct 20 20:18:29 local/tmm info tmm[4601]: Rule myrule : i - 4|server - 10.10.70.110:80 Oct 20 20:18:39 local/tmm info tmm[4601]: Rule myrule : i - 4|client - 192.168.206.102:62984 Oct 20 20:18:39 local/tmm info tmm[4601]: Rule myrule : i - 5|server - 10.10.70.110:80 Oct 20 20:18:40 local/tmm info tmm[4601]: Rule myrule : i - 5|client - 192.168.206.102:62984 Oct 20 20:18:40 local/tmm info tmm[4601]: Rule myrule : i - 6|server - 10.10.70.110:80 Oct 20 20:18:42 local/tmm info tmm[4601]: Rule myrule : i - 6|client - 192.168.206.102:62984 Oct 20 20:18:42 local/tmm info tmm[4601]: Rule myrule : i - 7|server - 10.10.70.110:80 Oct 20 20:18:42 local/tmm info tmm[4601]: Rule myrule : i - 7|client - 192.168.206.102:62984 Oct 20 20:18:42 local/tmm info tmm[4601]: Rule myrule : i - 8|server - 10.10.70.110:80
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