Customising the NAM 4.2 logout pages with parameters fails

  • 7017312
  • 01-Mar-2016
  • 09-May-2016

Environment

NetIQ Access Manager 4.1
NetIQ Access Manager 4.2

Situation

Access Manager 4.2 setup and working well - users could access protected resources and federated services successfully after having credentials validated at Identity Server. Administrator needed to modify the logout pages (logoutSuccess JSP pages) so that parameters could be passed in and depending on the parameter values, users would get redirected to certain pages.

An attempt was made to customing the logoutSuccess_legacy.jsp and logoutSuccess_latest.jsp code based on what was found in the logoutSuccess.jsp (see below)

Here is logoutSuccess.jsp:

 

<%@ page import="com.novell.nidp.*" %>

<%

    if (NIDPConstants.useLegacyUI())

                        {

%>

        <%@ include file="logoutSuccess_legacy.jsp" %>

<%  } else { %>

 

        <%@ include file="logoutSuccess_latest.jsp" %>

<%  } %>

yet no redirects were visible. It appears like we cannot do redirects from within these JSP pages. Note that by default the logoutSuccess_latest.jsp file is the one executed, unless running in legacy mode (https://www.netiq.com/documentation/access-manager-42-appliance/install_upgrade/data/b1idqsr7.html)

Resolution

Changed logoutSuccess_latest.jsp (not running legacy mode) to do a client side JavaScript redirect instead of a server side one. In the example below (we pass an input parameter into the login page, and write value to strDestinationUrl), we added logic into the logoutSuccess_latest.jsp to parse the URL and use window.location to redirect the user.

<!DOCTYPE HTML PUBLIC "-//W3C//Dtd HTML 4.0 transitional//<%=uh.getLanguageCode()%>">
<html lang="<%=uh.getLanguageCode()%>">
    <head>
        <link href="<%= uh.getImage("hf_style.css",false)%>" rel="stylesheet">
            <style type="text/css" media="screen"><!--
                body  { background-color: <%=uh.getBGColor()%> }
          --></style>

<%
    if (null != strDestinationUrl)
    {
%>
        <script>
           alert("Client browser redirect to <%=strDestinationUrl%> from loginSuccess.jsp");
           window.location = "<%=strDestinationUrl%>";
       </script>
<%
    }
%>

Feedback service temporarily unavailable. For content questions or problems, please contact Support.