IdP access to server environment variables

Brent Putman putmanb at
Thu Sep 29 16:50:08 BST 2011

On 9/29/11 11:39 AM, Cantor, Scott wrote:
> On 9/29/11 11:25 AM, "Liam Hoekenga" <liamr at> wrote:
>> We're using mod_proxy and mod_proxy_ajp.  I know that mod_proxy_ajp
>> will forward any environment variable with the AJP_ prefix to tomcat.
>> Is it then possible to access them?  (Maybe
>> $requestContext.getAttribute("variableName")?)
> I believe the AJP thing reflects them as headers once they get to Tomcat,
> but that's a dim recollection.

It's actually as HttpServletRequest attributes, so something like
httpServletRequest.getAttribute(name), which returns an Object.

You can get at the HttpServletRequest in the IdP $requestContext. 
Off-hand I don't have it exactly, but something like getting the
$request.getInboundMessageTransportand casting it to the actual impl,
which is an HttpServletRequestAdapter, which exposes the servlet
request. (yes, casting is bad and brittle, but it's all we currently have).

More information about the users mailing list