-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with SimpleSAMLphp 1.19.8 #366
Comments
it seems that you have to map the user attributes and the format of these in https://pysaml2.readthedocs.io/en/latest/howto/config.html#requested-attribute-name-format and |
So heres my config PHP config
and in my settings.py
and
Am I missing something? |
Forgot to mention I'm on Django==4.1.7 |
look at this it depends on which format your IDP uses, if BASIC or URI here an example of attribute mapping with uri please check if you have to configure it with uri or basic, then create your attribute-map file and put in a path configured in attribute_map_dir |
oh, so attribute_map_dir is mandatory? Apologies, this is new to me, I've inherited a Django setup that was using django-saml2-auth which didn't seem to need this defined. |
So this is the IDP metadata output from the IDP
No format is stated, so does it default to URI? |
please share also an example response |
Sure, here you go, it looks like its using basic formatting, I don't seem to be able to get the formatting of my attribute map file correct? The response.ava and assertion/assertion attributes are all empty, even though the raw SAML response has the authenticated user data in the AttributeStatement. Its also worth noting that i receive this exact same response in my previous setup using django-saml2-auth, Django 2.22 and pysaml2 7.4.1, the SAML response object has ava, assertion and assertions attributes all populated. So its definitely something I'm missing when setting this all up using djangosaml2.
|
Just to add I've tried an attribute mapping file with various definitions (below) and still the same result
and
|
Could the issue I'm having, have anything to do with? https://djangosaml2.readthedocs.io/contents/miscellanea.html#simplesamlphp-issues But as I said above, this exact same IDP test setup works with django-saml2-auth with Django 2.22 and an older version of pysaml2 (6.5.0). Whereas now I'm using djangosaml2 with django 4.1.7 and pysaml2==7.4.1. |
Well I may as well add the solution to this. In the ['service']['sp']['endpoints'] section of my SAML_CONFIG I had this:
Not realising that I missed out defining an 'assertion_consumer_service' entry for the BINDING_HTTP_POST binding, so i changed it to this...
This resulted in the SAML response object to detect and populate the response.ava, assertion and assertions attributes. It's also worth noting that I did not require an attribute mapping directory/file. |
Thank you @rmincling for have shared this! Please feel free to add this issue in a trouble shooting section in the documentation, with a Pull Request, or any other contributions to help user in using this project best! |
Hi,
I'm having some issues with correctly logging in with this test docker image https://github.com/kristophjunge/docker-test-saml-idp .
I can bring up the SimpleSAMLphp login page via django and it successfully logs in on SimpleSAMLphp server with test user data. However, when I'm trying to parse the response from SimpleSAMLphp, the response.assertion and response.assertions array are both blank, as well as response.ava. This causes the error below:
I was hoping you could please advise as to what may be the issue. It is worth noting this exact same docker image works with django-saml2-auth (but an older version), I am migrating over to your well defined package.
Regards,
Rob
The text was updated successfully, but these errors were encountered: