用于初始化pysaml2客户端的数据的正确格式是什么?这个库抱怨Missing entity_id specification,尽管在xml中有一个entityID (如下所示)。
spConfig = Saml2Config()
spConfig.load({
'metadata': {
'inline': [idp_metadata],
},
'service': {
'sp': {
'endpoints': {
'assertion_consumer_service': [
(acs_url, BINDING_HTTP_REDIRECT),
(acs_url, BINDING_HTTP_POST),
(https_acs_url, BINDING_HTTP_REDIRECT),
(https_acs_url, BINDING_HTTP_POST)
],
},
# Don't verify that the incoming requests originate from us via
# the built-in cache for authn request ids in pysaml2
'allow_unsolicited': True,
# Don't sign authn requests, since signed requests only make
# sense in a situation where you control both the SP and IdP
'authn_requests_signed': False,
'logout_requests_signed': True,
'want_assertions_signed': True,
'want_response_signed': False,
},
},
})
saml_client = Saml2Client(config=spConfig)XML:
<?xml version="1.0" encoding="UTF-8"?>
<md:EntityDescriptor
entityID="http://www.okta.com/[redacted]"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata">
...库版本是最新的。在macOS Catalina上运行python 3.10。
发布于 2021-02-11 10:04:55
部分回答: pysaml2需要一个额外的参数:
settings = {
'metadata': {
'inline': [idp_metadata],
},
'entityid': ...文档太糟糕了,目前还不清楚这是不是一个完整的解决方案。
https://stackoverflow.com/questions/66145660
复制相似问题