gpt4 book ai didi

python - "SignatureError: Failed to verify signature"- Okta,pySAML2

转载 作者:太空宇宙 更新时间:2023-11-03 15:01:40 31 4
gpt4 key购买 nike

三天来,我一直在绞尽脑汁,试图将我的头缠绕在 Okta 和 SAML 上。

在我的本地机器 (OSX Mavericks) 上,我能够成功地按照此处列出的步骤进行操作:http://developer.okta.com/docs/guides/pysaml2

一切正常。

但是将所有内容都转移到我们的生产服务器上,这是一个 CentOS 机器,运行几乎相同的代码,我遇到了这个“SignatureError:无法验证签名”错误。

Traceback (most recent call last): auth_response = saml_client.parse_authn_request_response(SAMLResponse, entity.BINDING_HTTP_POST) File \"/usr/local/lib/python2.7.11/lib/python2.7/site-packages/saml2/client_base.py\", line 599, in parse_authn_request_response binding, **kwargs)

response = response.loads(xmlstr, False, origxml=origxml) File \"/usr/local/lib/python2.7.11/lib/python2.7/site-packages/saml2/response.py\", line 510, in loads self._loads(xmldata, decode, origxml)

File \"/usr/local/lib/python2.7.11/lib/python2.7/site-packages/saml2/response.py\", line 335, in _loads **args) File \"/usr/local/lib/python2.7.11/lib/python2.7/site-packages/saml2/sigver.py\", line 1756, in correctly_signed_response class_name(response), origdoc)

File \"/usr/local/lib/python2.7.11/lib/python2.7/site-packages/saml2/sigver.py\", line 1571, in _check_signature raise SignatureError(\"Failed to verify signature\") SignatureError: Failed to verify signature

我已在互联网上搜索以寻找解决此错误的方法。我是 SAML 和 Okta 的新手。

我的假设是,这与 xmlsec1 在我们的生产机器上的行为不同有关。但是版本是一样的。有很多依赖项,所以我不确定问题出在哪里。

有人遇到过这个错误吗?关于我可以尝试什么的任何想法?

最佳答案

我知道这有点晚了,但万一其他人遇到这个:

pysaml2 使用 python 的内置日志记录提供了大量日志记录,我为 saml2.sigver 定义了一个处理程序,它提供了很多信息。在这些日志中我发现了这个:

Error: unable to load xmlsec-openssl library. Make sure that you have
this it installed, check shared libraries path (LD_LIBRARY_PATH)
envornment variable or use "--crypto" option to specify different
crypto engine.

原来我需要安装 xmlsec1-openssl。希望这对将来的人有所帮助。

关于python - "SignatureError: Failed to verify signature"- Okta,pySAML2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37197350/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com