Forum Discussion
APM multi domain SSO, incorrect timeout URL
Hi,
I've set up APM with multidomain SSO. Let's say I have a site "service.mydomain.com" and a login URL "login.mydomain.com".
Works fine, I go to service.mydomain.com, I don't have an APM session, I get redirected to login.mydomain.com. I can log in, I go back to service.mydomain.com. SSO gets activated, all is well.
Now let's say I don't log in on login.mydomain.com and let it timeout. A link appears: "Expired/Timeout, click here to start a new session". The link points to the root of login.mydomain.com.
When I click on the link, The SSO_ORIG_URI from the first redirect is lost, there is no link back to the service. The correct thing for the APM would be to link to the SSO_ORIG_URI, which it knows because it was in the redirect that was sent by the service when this specific session was created.
Am I missing something here? Or is this bad behaviour by the BigIP/APM?
Thanks Vincent
4 Replies
- Seth_Cooper
Employee
The SSO_ORIG_URI is going to be consumed by login.mydomain.com and then it is part of the session. When the session timeout hits the session is removed. When you click "start a new session" this is completely independent of the previous request/session and a new request for my.policy happens in the browser. This new request gets a new session id and has no idea about the previous SSO_ORIG_URI so it will stay on the login.mydomain.com resource.
I suggest configuring a longer timeout value if this is a problem.
Seth
- Kevin_Stewart
Employee
If I may add, while a longer timer is definitely the way to go, here's an iRule solution that will extend the SSO_ORIG_URI across access sessions:
when ACCESS_SESSION_STARTED { if { [HTTP::uri] contains "/F5Networks-SSO-Req?SSO_ORIG_URI" } { set sid [string range [ACCESS::session sid] [expr [string length [ACCESS::session sid]] -8] end] table set -subtable SSO ${sid} [findstr [HTTP::uri] "=" 1] } } when HTTP_REQUEST { if { [HTTP::cookie exists MRHSession] } { set sid [string range [HTTP::cookie value MRHSession] [expr [string length [HTTP::cookie value MRHSession]] -8] end] if { ( [HTTP::uri] equals "/" ) and ( [HTTP::cookie exists MRHSession] ) and not ( [ACCESS::session exists -sid [HTTP::cookie value MRHSession]] ) and ( [table lookup -subtable SSO ${sid}] ne "" ) } { HTTP::respond 302 Location "/F5Networks-SSO-Req?SSO_ORIG_URI=[table lookup -subtable SSO ${sid}]" table delete -subtable SSO ${sid} unset sid } } } - Stanislas_Piro2
Cumulonimbus
Hi,
did you looked this thread? https://devcentral.f5.com/questions/apm-access-policy-default-logout-uri-override-based-on-landing-uri
I don't know if you can use it but it was a solution to replace link in the logout page instead of creating an irule.
- Kevin_Stewart
Employee
Just a question: am I correct in that this only works for a short while? Meaning that if the timeout happened long ago, the corresponding sid "parent" is already deleted from the table?
That is correct. You're at the mercy of the session table's timeout. The only other reasonable way would be to send the URI data to the client in a cookie.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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