Skip to content
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

general system exception: Passed perm has app label of 'authentik_flow' while given obj has app label 'authentik_flows' and given objcontent_type has app label 'authentik_flows'" #12903

Open
cheggerdev opened this issue Jan 31, 2025 · 0 comments

Comments

@cheggerdev
Copy link

cheggerdev commented Jan 31, 2025

Describe the bug
given perm app has lebel of 'authentik_flow' while expected is 'authentik_flows'
There is a missing 's' in the authentik.events.middleware where the exeception occured.

To Reproduce
Steps to reproduce the behavior:

  1. In the enrollment flow add a expression policy to the user-write-stage
  2. Run the enrollment
  3. When the policy should run the error happens
  4. Relogin as admin and see error in Events -> Logs -> General system exception

Logs

Stacktrace from authentik
Traceback (most recent call last):
  File "/ak-root/venv/lib/python3.12/site-packages/asgiref/sync.py", line 518, in thread_handler
    raise exc_info[1]
  File "/ak-root/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
    response = await wrapped_callback(
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/asgiref/sync.py", line 468, in __call__
    ret = await asyncio.shield(exec_coro)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/asgiref/current_thread_executor.py", line 40, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/asgiref/sync.py", line 522, in thread_handler
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/sentry_sdk/integrations/django/views.py", line 94, in sentry_wrapped_callback
    return callback(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper
    return view_func(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 98, in view
    self.setup(request, *args, **kwargs)
  File "/authentik/flows/views/inspector.py", line 81, in setup
    if request.user.has_perm("authentik_flow.inspect_flow", self.flow):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/django/contrib/auth/models.py", line 480, in has_perm
    return _user_has_perm(self, perm, obj=obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/django/contrib/auth/models.py", line 220, in _user_has_perm
    if backend.has_perm(user, perm, obj):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/guardian/backends.py", line 90, in has_perm
    raise WrongAppError("Passed perm has app label of '%s' while "
guardian.exceptions.WrongAppError: Passed perm has app label of 'authentik_flow' while given obj has app label 'authentik_flows' and given objcontent_type has app label 'authentik_flows'

Version and Deployment (please complete the following information):

  • authentik version: 2024.12.3
  • Deployment: [docker-compose]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant