apm logout uri not working with javascript...

I have a problem with a apm protected app that wont logout.

The apm has an external idp using saml, it doesnt use a landing page or anything. Just a saml idp.

When you logout from the app it uses a javascript function that calls a logout uri. But.. The javascript doesnt follow through to the saml post. Is there a way to solve this in the apm policy or irule?

/Kim

Have you tried to put loggout uri in “Logout URI Include” setting inside APM policy?

yes, and also a tried a access::session remove irule that triggers on a specific uri.

So APM session does terminated but IDP remains right?

I´d say neither of them get terminated, as the javascript just sends it´s GET /uri and doesnt follow through with the POST saml slo url..

i rule with “access::session remove” should terminate the APM session
are you sure it doesn’t?

for actual solution you should somehow trigger browser redirect
have not test it but something like this might work

when HTTP_REQUEST {
    if { [string tolower [HTTP::path]] eq "/logout" } {
        set html {<!doctype html>
<html>
<head><meta charset="utf-8"><title>Logging out...</title></head>
<body>
<script>
  window.location.replace("/my.logout.php3");
</script>
</body>
</html>}

        HTTP::respond 200 content $html "Content-Type" "text/html" "Cache-Control" "no-store"
    }
}

I have a similar one, but i redirect to vdesk hangup.. But, they want their own logout page. Nothing is ever easy, right?

But if you enale SLO in saml you will be redirect to idp after vdesk hangup

else you could try something like this

when HTTP_REQUEST {
    if { [string tolower [HTTP::path]] eq "/logout" } {

		set apm_cookie [HTTP::cookie value MRHSession]
		if { $apm_cookie != "" && [ACCESS::session exists $apm_cookie] } {
            ACCESS::session remove
        }

        set html {<!doctype html>
<html>
<head><meta charset="utf-8"><title>Logging out...</title></head>
<body>
<script>
  // Force a real navigation (not AJAX)
  window.location.replace("put_the_logout_page_you_want");
</script>
</body>
</html>}

        HTTP::respond 200 content $html "Content-Type" "text/html" "Cache-Control" "no-store"
    }
}