Skip to content

Issue with SimpleSAMLphp 1.19.8 #366

Open
@rmincling

Description

@rmincling

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:

`saml2.response.StatusInvalidAuthnResponseStatement: The Authn Response Statement is not valid
ERROR 2023-03-23 16:56:56,871 log 14996 123145691701248 Internal Server Error: /saml2_auth/acs/
Traceback (most recent call last):
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
    raise exc_info[1]
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/django/core/handlers/exception.py", line 43, in inner
    response = await get_response(request)
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
    response = await wrapped_callback(
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/asgiref/sync.py", line 448, in __call__
    ret = await asyncio.wait_for(future, timeout=None)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
    return await fut
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/asgiref/sync.py", line 490, in thread_handler
    return func(*args, **kwargs)
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/sentry_sdk/integrations/django/views.py", line 85, in sentry_wrapped_callback
    return callback(request, *args, **kwargs)
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/django/views/generic/base.py", line 103, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/django/utils/decorators.py", line 46, in _wrapper
    return bound_method(*args, **kwargs)
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 55, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/django/views/generic/base.py", line 142, in dispatch
    return handler(request, *args, **kwargs)
  File "/Users/robertm/dev/platform/d3_platform/src/platform_v2/accounts/views.py", line 281, in post
    session_info = response.session_info()
  File "/Users/robertm/dev/platform/d3_platform/lib/python3.9/site-packages/saml2/response.py", line 1099, in session_info
    raise StatusInvalidAuthnResponseStatement("The Authn Response Statement is not valid")`

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues that document features and specific configuration/use casesquestion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions