将Apache Shibboleth环境variables转发给Tomcat

我使用Shibbolethv2.3与Apache Web服务器和Tomcat应用程序服务器。 我使用mod_proxy.so作为反向代理使用Apache。 我无法将Apache的Shibboleth环境variables转发给Tomcat。 我能够转发标题中的属性,但正如wiki中已经提到的,这种方法是不安全的。 我试图通过下面的指令转发环境variables:

SetEnv AJP_username $ {username}

然后在Java端,我可以通过以下方式访问该属性:request.getAttribute(“username”); 这里奇怪的是,我得到了不同的价值,而不是Shibboleth设定的价值。 我得到了Windows帐户名称。 如果我使用任何其他属性名称,我得到一个空值。

我搜查了很多,已经用完了。 请指导我find正确的解决scheme。

我的设置细节:

  1. Shibboleth版本:2.3
  2. 操作系统:Windows XP SP3
  3. networking服务器:Apache 2.2
  4. 应用程序服务器:Tomcat 6
  5. 代理模块:mod_proxy.so

确保通过在httpd.conf中使用ajp代理

 ProxyPass /example ajp://example.org/example 

在ApplicationDefaults部分的shibboleth2.xml中,我们需要添加

 attributePrefix="AJP_" 

所以它看起来像

 <ApplicationDefaults id="default" policyId="default" entityID="https://idp.example.org" REMOTE_USER="eppn persistent-id targeted-id" signing="false" encryption="false" attributePrefix="AJP_"> 

请在shib邮件列表中查看此问题: http ://groups.google.com/group/shibboleth-users/browse_thread/thread/2bdd3e272baf49a2?pli=1