我正在尝试使用ADFS建立一个依赖方(SP).ADFS识别并响应没有签名的请求.但是ADFS无法验证签名的AuthRequest.我将证书导入依赖方的"签名验证证书"部分,但此证书似乎不用于依赖方请求的签名验证.
相反,它似乎使用'令牌解密'证书.我不明白这个证书的目的.有人可以解释一下这两个证书之间的区别,以及如何用另一个自签名证书(DER或pem格式)替换'token-decrypting'证书?谢谢
Fyi:将样本AuthnRequest发送到ADFS
<saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Destination="https://adfs-sj1.sjlab.local/adfs/ls/" ID="_422d0bb72b1120db737695464793dedf4ea8ddd2" IssueInstant="2012-07-30T21:52:47.501Z" Version="2.0">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">spid</saml2:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#_422d0bb72b1120db737695464793dedf4ea8ddd2">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>S5b7PCF8WscoOX++EcpyjQNW4q0=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>g1PXYERi48Q/vGXNBPwZlteyihQmt3eo9+MIQlBdC8MqTsm8GdvE1Nq4osszEyprAK5Q6Uv5QV/UgctUWGV2hUxLc5bpXVwpaYaoywH0XPXArROR1EyGVz2g5YAjgGxpU0YbxJIk+2A1DblE0alYSK/88oHHcmpwp6dmgwmvfXcRA83DnVCeIZoKSPuNTqSLb6UKk+QxUABieuAb1ecsQmJsEjUXcrPq+RPL1+goNhC4/vbPatuK90ZyZe5CljwAtWXmqoBzWexxgWdzs4E9zIc/aQi/HFioGz0EnPiipgBjHRlV+Gv0iFV1dS++a24+F7H2NG6aZSGipcyj2kJMDg==</ds:SignatureValue>
</ds:Signature>
</saml2p:AuthnRequest>
Run Code Online (Sandbox Code Playgroud) 我正在尝试将救援声明添加到其他失败的宝石中.麻烦的是我没有正确地覆盖原始gem的方法.我怎么能做到这一点?
原始宝石
module OmniAuth
class Configuration
include Singleton
def add_camelization(name, camelized)
self.camelizations[name.to_s] = camelized.to_s
end
Run Code Online (Sandbox Code Playgroud)
初始化/ omniauth.rb
module OmniAuth
class Configuration
def add_camelization(name, camelized)
begin
self.camelizations[name.to_s] = camelized.to_s
rescue
puts "No camelization for #{camelized}"
end
# ^ This rescue statement is not being called to replace the original gem's method.
end
end
end
Run Code Online (Sandbox Code Playgroud) 我用 Java 实现了一个 SAML SP。
我向 SAML 2.0 IDP 发送 AuthnRequest 并获得加密响应。
我的问题是:
我如何确保响应确实来自 IDP 而不是来自黑客?
仅验证签名是不够的,因为这只会告诉我发件人有一对匹配的私钥/公钥,但它可以是任何人。
所以,我需要 IDP 提前为我提供一个我上传到 jks 文件的证书,并每次将它与我从响应的 ds:X509Certificate 元素中提取的证书进行比较。
现在,是否有一种标准方法可以将发件人的证书与存储在我的密钥库中的证书进行比较?
我看到了以下代码:
KeyStore keyStore = getKS();
PKIXParameters params = new PKIXParameters(keyStore);
params.setRevocationEnabled(false);
CertPath certPath = certificateFactory.generateCertPath(Arrays.asList(certFromResponse));
CertPathValidator certPathValidator = CertPathValidator.getInstance(CertPathValidator.getDefaultType());
CertPathValidatorResult result = certPathValidator.validate(certPath, params);
Run Code Online (Sandbox Code Playgroud)
够了吗?如果验证没有抛出异常,它会验证发件人的身份吗?
我有ADFS服务器作为IdP.我有单独的SP应用程序.这些是在信任圈中定义的.SAML协议上的SSO工作正常.当我尝试SP启动注销请求时,我在ADFS端遇到错误:
MSIS7000:登录请求不符合Web浏览器客户端的WS-Federation语言或SAML 2.0协议WebSSO配置文件.
编辑来自ADFS事件跟踪的更多详细信息:
MSIS7015:此请求不包含预期的协议消息,或者根据HTTP SAML协议绑定找到了不正确的协议参数.
我已经审查了mu注销SAML消息并且看起来正确.只是提到同一个SP正在使用ForgeRocks IdP(来自Sun OpenSSO)正确注销.
Saml loout请求消息:
<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
ID="b00b3f55-f3e3-4935-9e91-da6bf8b62efd"
Version="2.0"
IssueInstant="2013-08-27T09:45:08Z"
Destination="https://00.00.00.00/adfs/ls/"
Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified"
NotOnOrAfter="2013-08-27T09:50:08Z"
>
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">SPEntityId/</saml:Issuer>
<saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">jsmith@company.com</saml:NameID>
<samlp:SessionIndex>_ea853497-c58a-408a-bc23-c849752d9741</samlp:SessionIndex>
Run Code Online (Sandbox Code Playgroud)
编辑
Lan向我建议签署注销请求消息是强制性的.他是对的.在OASIS规范(http://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf)第4.4.3.1节中.它被描述.根据我现在发送签名的消息,但我有同样的问题.
签名留言:
<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
ID="aed640c0-9455-49ea-9450-4ad7c08d98e7"
Version="2.0"
IssueInstant="2013-08-29T15:22:45Z"
Destination="https://server/adfs/ls/"
Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified"
NotOnOrAfter="2013-08-29T03:27:45Z"
>
<saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">user</saml:NameID>
<samlp:SessionIndex>_677952a2-7fb3-4e7a-b439-326366e677db</samlp:SessionIndex>
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">SPIssuer</saml:Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<Reference URI="#aed640c0-9455-49ea-9450-4ad7c08d98e7">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<DigestValue>53jjPvQ2Ty1Z+VikwrUwW4Erj3k=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>signed value</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>certificate</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
Run Code Online (Sandbox Code Playgroud)
我做错了什么?应该在ADFS上指定一些其他端点吗?因为我得到的应该与登录请求一样使用(这完全在我身边工作).
谢谢,拉斯特科
在使用 simplesamlphp 作为服务提供者成功接收 SAML 2.0 令牌后,我收到以下错误。
Oct 21 17:30:15 simplesamlphp DEBUG [6b6e3c270f] GenerateGroups - attribute 'eduPersonAffiliation' not found.
Oct 21 17:30:15 simplesamlphp DEBUG [6b6e3c270f] Session: doLogin("default-sp")
Oct 21 17:30:15 simplesamlphp WARNING [6b6e3c270f] Unable to find the SAML 2 binding used for this request.
Oct 21 17:30:15 simplesamlphp WARNING [6b6e3c270f] Request method: 'GET'
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] Backtrace:
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] 0 /var/www/simplesamlphp/www/module.php:180 (N/A)
Oct 21 17:30:15 simplesamlphp …Run Code Online (Sandbox Code Playgroud) 我在运行Windows_Server-2008-R2_SP1-English-64Bit-Base-2014.04.09的AWS EC2上安装了PingFederate.我有一个使用Spring Security进行身份验证的Java应用程序.
我已经了解了如何使用PingFederate,我可以设置身份提供商(IdP)和服务提供商(SP).我已经收集到IdP将是提供登录凭据(身份)的应用程序用户,并将此传递给SP,该SP在此页面的此图中具有SP的目标应用程序:
http://documentation.pingidentity.com/display/PF66/Service+Providers+and+Identity+Providers
此图像还显示了IdP和SP两侧的联合身份软件.
我已经使用我的本地PingFederate服务器创建了一个IdP和SP,只是为了查看配置选项是什么,我很困惑,我实际上需要能够为我的Spring Security应用程序提供SSO.
我的问题是:
我是否需要一个IdP和SP来实现我想要做的事情.
现在我们的用户名和密码存储在SQL Server中,我会利用它来PingFederate来验证用户吗?
我是否应该为此使用Spring Security SAML,或者其他路由更合适?
感谢您的帮助,我已经联系了PingFederate,但我的区域解决方案架构师恰好在周五之前.
如果我完全不在思考,我也会道歉,我正在努力将我的想法包围在需要的地方.
我正在使用spring security saml扩展以ADFS作为IDP来实现SSO。
据我了解,Spring Security使用开放的saml对SHA1withRSA作为签名算法的SAML请求进行签名。
我们需要进行更改以改为使用SHA256withRSA签名SAML请求。
如何才能做到这一点 ?
感谢对此的任何建议。首先十分感谢
我正在尝试使用SAML令牌连接到ACS,问题是ACS已配置为仅接受JWT令牌.将SAML转换为JWT的最佳方式是什么?
谢谢
我是SAML的新手,遇到过OneLogin Python SAML库。我能够使用Web应用程序作为服务提供商(SP)和OneLogin作为身份提供商(Idp)来启动并运行它。
我也希望能够增加对其他身份提供者的支持。但是,我发现python-saml库正在使用settings.json来获取Idp信息。我已经在他们的Github项目上研究了以下问题,但是无法获得可行的解决方案:[1] https://github.com/onelogin/python-saml/issues/64
[2] https://github.com。 com / onelogin / python-saml / issues / 52
有没有人成功使用此库来支持多个身份提供者?
我对SAML证书的这个概念并不陌生。
我目前正在为网站配置SSO,并且需要知道如何生成SAML证书?我用于此网站的设置不是通过Azure,而是直接从供应商站点进行,他们正在请求我的SAML证书。我需要特殊的工具吗?并在发送之前是否需要注册?