apache - Tomcat 中的 Shibboleth session 验证

标签 apache tomcat saml shibboleth

我有一个带有模块 mod_shib、mod_ssl 和 mod_jk 的 Apache/2.2.15 网络服务器。我有一个虚拟主机,它配置了(附在下面)AuthType Shibboleth、SSLCertificates 和 JKMount,以便在使用正确的 IDP 成功建立 session 后使用 AJP 将请求定向到我的 Tomcat 8 服务器。当我的 http 请求到达我的应用程序服务器时,我可以看到各种 Shib-* header ,以及我的 SP 从 IDP 请求的属性。

我的应用服务器有没有办法验证 shibsession cookie 或其他 header ?我正在尝试防止驻留在 DMZ 中的 Web 服务器以某种方式受到损害,并且攻击者向驻留在内部区域中的应用程序服务器发出请求的情况。

有没有一种方法可以验证 header 中可用内容的签名,以保证内容确实来自 IDP,而不是由控制我的 Web 服务器的攻击者制造的?

OpenSAML 库中是否有我可以用来实现此目的的东西?

最佳答案

Is there a way my app server can validate the shibsession cookie or other headers?

mod_shib 已经为您完成了这项艰巨的工作。在验证从身份提供者 (IdP) 返回的信息后,mod_shib 然后设置环境变量(不能由客户端设置)供您的应用程序读取和信任。在您的应用程序中实现 OpenSAML 是不必要的,因为 mod_shib 已经为您完成了验证工作。

来自docs :

The safest mechanism, and the default for servers that allow for it, is the use of environment variables. The term is somewhat generic because environment variables don't necessarily always imply the actual process environment in the traditional sense, since there's often no separate process. It really refers to a set of controlled data elements that the web server supplies to applications and that cannot be manipulated in any way from outside the web server. Specifically, the client has no say in them.

关于apache - Tomcat 中的 Shibboleth session 验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30402937/

相关文章:

PHP 7.2 : HTTP Form Post, 某些内容正在用反斜杠转义单引号。 Magic Quotes 在 5.x 中被删除

apache - Varnish绕过大文件

certificate - SAML:为什么证书位于签名中?

c# - 如何使用 C# 签署 SAMLResponse 和加密断言?

cookies - 什么是 SAML token 和 FedAuth cookie?

java - 为什么 Apache POI 中的文本格式不适用于 XSSF 而适用于 HSSF?

php - 有没有办法将 php 对象保存在内存中以避免磁盘读取和写入?

tomcat - 无法从 Grails 3.0.7 应用程序 war 中删除嵌入式 Tomcat

java - Runtime.exec() 在 tomcat/web 应用程序上不能正常工作

java - 为 tomcat-apache、axis2、jdk 设置 ubuntu 服务器