title: Retrieving Shibboleth attributes from AJP connector request
body: <p>I have encountered a weird problem when working with Shibboleth authentication running on Apache and when Tomcat7 running on the back end, Apache sends everything through mod_proxy_ajp. And so it does with parameters from Shibboleth.</p>
  
  <p>In the <a href="https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPJavaInstall" rel="nofollow noreferrer">documentation</a> it is explicitly stated that AJP sends only attributes with prefix <code>attributePrefix="AJP_"</code> and that a developer should not take shortcuts and enable sending auth attributes through HTTP headers: <a href="https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPSpoofChecking" rel="nofollow noreferrer">https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPSpoofChecking</a></p>
  
  <p>I try to retrieve attributes using</p>
  
  <pre><code>HttpServletRequest req = (HttpServletRequest) FacesContext.getCurrentInstance()
                           .getExternalContext().getRequest();
  
  Enumeration&lt;String&gt; e = req.getAttributeNames();
  </code></pre>
  
  <p>But no matter what I try, no Shibboleth attributes ever show up.</p>