Forum Discussion
Patrick_Norde
Nimbostratus
Oct 14, 2015Assign APM webtop without redirecting to it
Hello all,
i am working on an APM implementation and facing some problem that does not easily solve itself. Let me describe the situation: Customer wants to publish 2 websites that need authenti...
Walter_Kacynski
Cirrostratus
Oct 15, 2015I have done this with the following iRule:
when ACCESS_POLICY_COMPLETED {
set sid [ACCESS::session data get "session.user.sessionid"]
switch [ACCESS::session data get "session.policy.result"] {
"allow" {
switch -glob [ACCESS::session data get "session.server.landinguri"] {
"/saml/idp/profile/redirectorpost/sso" {
If the logon is being driven by a SAML request then don't interfere with the default redirect logic
}
"/webtop" {
If the user has requested the webtop explicitly then don't interfere
}
default {
Instead of going directly to the WebTop send the user to their original URL.
They can get back to the WebTop by going to /webtop via the redirect handled in ACCESS_ACL_ALLOWED
if { [ACCESS::session data get session.assigned.webtop] starts_with "/Common/" } {
if { [string length [ACCESS::session data get session.server.landinguri_base64]] != 0 } {
session.server.landinguri_base64 is for release 11.5.1
Handle Multi-Domain Authentication Landing URI
ACCESS::respond 302 Location "[ACCESS::session data get session.server.network.protocol]://[ACCESS::session data get session.server.network.name][ACCESS::session data get session.server.landinguri_base64]"
} elseif { [string length [ACCESS::session data get session.server.multidomain_host]] != 0 } {
session.server.multidomain_host is for release 11.6.0
Handle Multi-Domain Authentication Landing URI
ACCESS::respond 302 Location "[ACCESS::session data get session.server.network.protocol]://[ACCESS::session data get session.server.network.name]/F5Networks-SSO-Req?SSO_ORIG_URI=[b64encode [string range [ACCESS::session data get session.server.landinguri] 33 end]]"
} else {
The Request originated on the Primary Auth URL / Single Domain Auth
ACCESS::respond 302 Location "[ACCESS::session data get session.server.network.protocol]://[ACCESS::session data get session.server.network.name][ACCESS::session data get session.server.landinguri]"
}
}
}
}
}
}
}
when ACCESS_ACL_ALLOWED {
switch -glob [HTTP::uri] {
"/webtop" {
Allow the user to get back to the webtop if they navigate to a backend server
ACCESS::respond 302 Location "https://[HTTP::host]/vdesk/webtop.eui?webtop=[ACCESS::session data get session.assigned.webtop]&webtop_type=webtop_full"
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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