I am trying to implement SAML in Django and I have two servers example.com and idp.example.com. On the IDP server, I am using djangosaml2idp. I have been able to implement the login functionality successfully, but the logout is failing on the IDP server.
Checking logs on idp.example.com reveals the following issue:
ServiceError: 'str' object has no attribute 'destination' {'status': 400} Traceback (most recent call last): File "/home/user/env/lib/python3.9/site-packages/djangosaml2idp/views.py", line 394, in get hinfo = idp_server.apply_binding(binding, resp.__str__(), resp.destination, relay_state, response=True) AttributeError: 'str' object has no attribute 'destination'
The logout response is as follows:
`<?xml version="1.0"?>
https://idp.example.com/idp/metadata/9EufdzSXgKly0XjOcl8l2DYzUhk=kTiqFydF7hL8ZlgC9iHQ3K7cU7T74XfORC0Y1AJqjwCg1MfgtDbTLIn/d/Zn8RnU
s0jmPrC588lcJeB/vzhuzWsJrQjyhPyb9Z7Xqjkx8wBtM39vmL0vIC92wS3/u4+n
mxOk6V+DnyB75cYL60yApHyiXs5RqW24UDUsuTGksT03LCKRNrraJGwG7jNtNvZE
onkJdEyhIIxsDlyqfXYiVgjP77E0rIhVEZfwQ4C3yDEdBNVBHr9RkHlvm0HmqRxF
UrJNQww6V+b69x6vB+wlC/nIjh7i6QDMtO5tsTlu+JSzvEn7xLc67qPvZxdYScek
fcpY8PCs7WCTrXbTF9XzTg==MIIDGzCCAgOgAwIBAgIUd0aRekN/sTmINbOXE7IragHy5UwwDQYJKoZIhvcNAQELBQAwHTEbMBkGA1UEAwwSaWRwLnJlZ2V4cGxvcmUuY29tMB4XDTIzMDQyMDEwNTkxN1oXDTMzMDQxNzEwNTkxN1owHTEbMBkGA1UEAwwSaWRwLnJlZ2V4cGxvcmUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvzdfnFfUhoTmuRpqBLabIBiWUjRZZ2OwxfJlRki1eyOjmi/lySbCY3/PSQG+KZ47mpxiz2+gTkdj6hTilRGvvCpXsJuHvNWE4w2yS6n8Weps40Rpb9uEihfljhCL2h/ImRakXohPd8x/0FXbozZZLLwudyhEpBFcRjnHoFgxmnVFQyox2+M6tpBOOg6sRTVpcX6eVpfxKPXg+Anp5xWQtyXI0+gGRqB6bTh/BZVLIgCNj/KpoU4f7AjcFVALe6GfakXPlAjPvN1W0GJhIwfDLGtYgNA5cAW5GebBIlDOvZjRFet9+sJ6XiqR5RZnZQHe/NEpS5TrQXLhM3y60x6lrQIDAQABo1MwUTAdBgNVHQ4EFgQUXhIrqxid+CLwzXs6xkjNtAob3mQwHwYDVR0jBBgwFoAUXhIrqxid+CLwzXs6xkjNtAob3mQwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAfrCNy+9OHbGGWKDM6KIzsw+q+rUlq55mKENR/E57UiJn+RauNx2rneXKSVcDuNVD+Gk5nXc3wqzbmuCKxvjF5Sdb/E4uwhI1ohw0tieAqQu5k1juMuCeGVeAMClFtoc681b3nUsKS5LyUJBtO8rxLEMC6MT70JB3xxqVgzCe1Q5VhwUfPiyEAXsH4WfjolPCKogZF1dE/dRA2o3Iw4J/yb+RiMf6cukELogibQfHom0No7YzH0xsSsnFAPaukySJdpuW6DUwRVDTSPaYPDFDadqY2FrlzWPvSy6p2KkcclPWmsj/kjAfXmI4MrXJ7t5WUzQUFw2mfab/rKBSn8i4uA==`
Looks like it's not able to parse the resp object.
I am trying to implement SAML in Django and I have two servers example.com and idp.example.com. On the IDP server, I am using djangosaml2idp. I have been able to implement the login functionality successfully, but the logout is failing on the IDP server.
Checking logs on idp.example.com reveals the following issue:
ServiceError: 'str' object has no attribute 'destination' {'status': 400} Traceback (most recent call last): File "/home/user/env/lib/python3.9/site-packages/djangosaml2idp/views.py", line 394, in get hinfo = idp_server.apply_binding(binding, resp.__str__(), resp.destination, relay_state, response=True) AttributeError: 'str' object has no attribute 'destination'
The logout response is as follows:`<?xml version="1.0"?>