Identity Server login form action tag not rewritten to https when SSL termination enabled

  • 7011818
  • 22-Feb-2013
  • 22-Feb-2013


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


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=""
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:
  1. Browser throws the security exception submitting to a non-secure resource
  2. 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:


Replace the string:

<%= (String) request.getAttribute("url") %>

<%= request.getAttribute("url").toString().replace("http:","https:") %>