只有一个Shibboleth SP反向代理不同的网站

我想知道是否有可能只有一个Shibboleth服务提供商(SP),如果您通过一个反向代理(与SSL卸载等)传递请求到您的所有网站。

所以,假设我在不同的领域有以下网站:

example.org blog.example.org wiki.example.org 

网站本身及其各自的Web服务器都驻留在自己的VM中,不能直接与外部通信。 我有另一个虚拟机只运行所有这些域的反向代理,并将请求传递到相应VM上的Web服务器。 我们称之为反向代理proxy.example.org (请注意,这不会是一个可访问的域名)。

现在,而不是为每个站点configuration一个SP,我只想在proxy.example.org上安装它,configuration它,以便每个请求

 example.org/secure blog.example.org wiki.example.org 

将触发Shibboleth身份validation。 请求传递成功后,validation成功。 那可能吗?

我问,因为我只发现这个资源https://wiki.shibboleth.net/confluence/display/SHIB2/SPReverseProxy ,我觉得很模糊,因为它只是说

  • 资源上的位置/安全由Shibboleth SP保护
  • Shibboleth SP拦截请求并使用https:// proxy.example.org /Shibboleth.sso/SAML2/POST的AssertionConsumerServiceURL生成SAML2 AuthnRequest

所以我不太清楚SP(SP)的安装位置

对的,这是可能的。 几年前,我configuration了一个Shib Proxy。 这里是我当时写的所有文档(它是Solaris上的一个设置,在Linux上有些可能不同)。 你将需要一个服务器,持有你想保护的应用程序和代理服务器与Shibboleth的东西和一些代理规则就可以了。

  • 安装区(或Linux服务器)(将用作Shibboleth代理)
  • 编译Shib守护进程(或在Linux上安装)
  • 在IDP Shib AAIregistry中注册主机
  • 检查守护进程configuration: shibd -t -c /opt/AAI/etc/shibboleth/shibboleth2.xml
  • 在安装守护进程后,我们必须将其configuration为“代理”使用。 但首先,我们要testing我们的初始设置。 打开文件shibboleth2.xml并在文件中查找错误的URL。 一切都应该指向你的网站。 searchHandler type="Status" ,最后删除ACL。 您的处理程序应如下所示: <Handler type="Status" Location="/Status" />
  • 现在,您可以将浏览器指向“状态”页面, http://DOMAIN/Shibboleth.sso/Status 。 如果你看到XML输出,一切都很好。 如果没有,请检查您的shibbolethconfiguration。
  • 现在到Apache Webserver:testing一个单一的PHP或HTML文件,以确保Apache按预期工作。 设置你想用代理保护的应用程序(这将在不同的服务器上)。 不要忘记编辑防火墙,并允许从(AAI)代理访问networking服务器。
  • 现在我们添加一个新的服务(这是在AAI代理上完成的):
    • 创build一个指向shibboleth(aai)代理服务器的新CNAME
    • 通过sshlogin到aai代理服务器
    • 编辑shibboleth2.xml:添加一个新的应用程序覆盖。 复制这个存根<ApplicationOverride id="<APP NAME>" entityID="https://<DOMAIN>/shibboleth" />
    • replaceAPP NAME和DOMAIN
    • 编辑/opt/csw/apache2/etc/extra/httpd-vhosts.conf(在linux上会有所不同)
    • 添加一个新的虚拟主机。
  • 复制这个存根

     NameVirtualHost IPADDR:80 <VirtualHost IPADDR:80> ServerName DOMAIN ServerAdmin [email protected] Redirect / https://DOMAIN/ ErrorLog var/log/aai.error.log CustomLog var/log/aai.access.log common </VirtualHost> <VirtualHost IPADDR:443> ServerName DOMAIN ServerAdmin [email protected] # The Shibboleth handler shall process all HTTPS requests... <Location /> Order deny,allow Allow from all AuthType shibboleth ShibRequestSetting applicationId APPNAME ShibUseHeaders On Require shibboleth </Location> # ...but only enforce a Session for the location below. <Location /secure> AuthType shibboleth ShibRequireSession On ShibRequestSetting applicationId APPNAME ShibUseHeaders On Require valid-user </Location> SSLEngine On SSLCertificateFile etc/server.crt SSLCertificateKeyFile etc/server.key SSLCertificateChainFile etc/server-ca.crt SSLProxyEngine on ProxyRequests off ProxyPass /secure https://WEBSERVERURL ProxyPassReverse /secure https://WEBSERVERURL ProxyPreserveHost On ErrorLog var/log/APPNAME.error.log CustomLog var/log/APPNAME.access.log common </VirtualHost> 
    • replaceAPP NAME,WEBSERVER URL,IP ADDR和DOMAIN,您将不得不更改设置的path。

    • 重新启动apache和shibd

请享用