What is the proper format for data to initialize the pysaml2 client? The library complains that Missing entity_id specification
, despite there being an entityID
in the xml (below).
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"> ...
The library version is the most recent. python
3.10 running on macOS Catalina.
没有评论:
发表评论