Environment
NetIQ Access Manager 3.2
Access Gateway configured with 'SSL terminator' flag enabled
Identity Server and Access Gateway both configured with HTTP scheme and no HTTPS
F5 SSL terminator sitting between browsers and Access Manager components
Access Gateway configured with 'SSL terminator' flag enabled
Identity Server and Access Gateway both configured with HTTP scheme and no HTTPS
F5 SSL terminator sitting between browsers and Access Manager components
Situation
Customer has Access Manager 3.2 behind an F5 SSL terminator, with everything talking HTTP on the Access Manager side. When the login*.jsp files are built at runtime, they build a URL for the
form action.
<form name="IDPLogin" enctype="application/x-www-form-urlencoded"
method="POST" action="<%= (String) request.getAttribute("url")
%>"
Which in this example returns:
<form name="IDPLogin"
enctype="application/x-www-form-urlencoded" method="POST" action="http://login.novell.com/nidp/idff/sso?sid=6"
There is no way to hardcode the action tag value into the form, as the sid
keeps changing (to know what auth request it was dealing with).
The problem is that this action tag URL remains as http and no rewrites occur at the F5 SSL terminator, so two
things happen:
- Browser throws the security exception submitting to a non-secure resource
- The destination times out as it cannot post to http://auth
So what I would like to know is what server side code could we
embed into the login pages (custom) to take the result of:
request.getAttribute("url") and rewrite the string from http: to
https:
Resolution
Replace the string:
<%= (String) request.getAttribute("url") %>
with:
<%= request.getAttribute("url").toString().replace("http:","https:") %>
<%= (String) request.getAttribute("url") %>
with:
<%= request.getAttribute("url").toString().replace("http:","https:") %>