django-saml2-auth
django-saml2-auth copied to clipboard
NoneType' object has no attribute 'subject'
trafficstars
Hi-
The idp I have , that is okta, is encrypting the saml response with the public key of my server. I have the private key of the server.
I need to decrypt it to get the user identity.
My saml setting is
saml_settings = { 'metadata': { "local": [ metadat_xml
],
},
'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)
],
},
'allow_unsolicited': True,
'authn_requests_signed': False,
'logout_requests_signed': True,
'want_assertions_signed': True,
'want_response_signed': False,
},
},
'key_file': "mykey.key", # private part
'cert_file': "mykey.crt", # public part
'xmlsec_path': '/usr/bin/xmlsec1',
'encryption_keypairs': [{
'key_file': 'mykey.key',
'cert_file': 'mykey.crt',
}]
}
I am not abel to get the user identity and it says NoneType' object has no attribute 'subject'
I tried decrypting the token using the below url with my private key and I am able to decrypt it. https://www.samltool.com/decrypt.php
Can you please let me know what I am missing?
Did you fixed it?