Skip to content

no webauthn device register possible #8734

@dierkgrossfeld

Description

@dierkgrossfeld

Describe the bug
If webauthn device is already registered authentication works without any issue.

But as long as no webauthn device is configured one can neither enforce it in the validation flow nor manually in the user profile.
To Reproduce
Steps to reproduce the behavior:

  1. delete webauthn device
  2. logout
  3. login
  4. try to add webauthn device in user profile settings

Expected behavior
webauthn device can be registered

Logs

Stacktrace from authentik
Traceback (most recent call last):
  File "/authentik/flows/views/executor.py", line 291, in get
    stage_response = self.current_stage_view.dispatch(request)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 143, in dispatch
    return handler(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/authentik/flows/stage.py", line 95, in get
    challenge = self._get_challenge(*args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/authentik/flows/stage.py", line 172, in _get_challenge
    challenge = self.get_challenge(*args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/authentik/stages/authenticator_webauthn/stage.py", line 114, in get_challenge
    "registration": loads(options_to_json(registration_options)),
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/webauthn/helpers/options_to_json.py", line 71, in options_to_json
    ] = _selection.authenticator_attachment.value
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
builtins.AttributeError: 'str' object has no attribute 'value'

Version and Deployment (please complete the following information):

  • authentik version: 2024.2.1
  • Deployment: helm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions