authentik.stages.authenticator_webauthn.apps

authentik webauthn app config

 1"""authentik webauthn app config"""
 2
 3from authentik.blueprints.apps import ManagedAppConfig
 4from authentik.lib.utils.time import fqdn_rand
 5from authentik.tasks.schedules.common import ScheduleSpec
 6
 7
 8class AuthentikStageAuthenticatorWebAuthnConfig(ManagedAppConfig):
 9    """authentik webauthn config"""
10
11    name = "authentik.stages.authenticator_webauthn"
12    label = "authentik_stages_authenticator_webauthn"
13    verbose_name = "authentik Stages.Authenticator.WebAuthn"
14    default = True
15
16    @property
17    def tenant_schedule_specs(self) -> list[ScheduleSpec]:
18        from authentik.stages.authenticator_webauthn.tasks import webauthn_mds_import
19
20        return [
21            ScheduleSpec(
22                actor=webauthn_mds_import,
23                crontab=f"{fqdn_rand('webauthn_mds_import')} {fqdn_rand('webauthn_mds_import', 24)} * * {fqdn_rand('webauthn_mds_import', 7)}",  # noqa: E501
24            ),
25        ]
class AuthentikStageAuthenticatorWebAuthnConfig(authentik.blueprints.apps.ManagedAppConfig):
 9class AuthentikStageAuthenticatorWebAuthnConfig(ManagedAppConfig):
10    """authentik webauthn config"""
11
12    name = "authentik.stages.authenticator_webauthn"
13    label = "authentik_stages_authenticator_webauthn"
14    verbose_name = "authentik Stages.Authenticator.WebAuthn"
15    default = True
16
17    @property
18    def tenant_schedule_specs(self) -> list[ScheduleSpec]:
19        from authentik.stages.authenticator_webauthn.tasks import webauthn_mds_import
20
21        return [
22            ScheduleSpec(
23                actor=webauthn_mds_import,
24                crontab=f"{fqdn_rand('webauthn_mds_import')} {fqdn_rand('webauthn_mds_import', 24)} * * {fqdn_rand('webauthn_mds_import', 7)}",  # noqa: E501
25            ),
26        ]

authentik webauthn config

label = 'authentik_stages_authenticator_webauthn'
verbose_name = 'authentik Stages.Authenticator.WebAuthn'
default = True
tenant_schedule_specs: list[authentik.tasks.schedules.common.ScheduleSpec]
17    @property
18    def tenant_schedule_specs(self) -> list[ScheduleSpec]:
19        from authentik.stages.authenticator_webauthn.tasks import webauthn_mds_import
20
21        return [
22            ScheduleSpec(
23                actor=webauthn_mds_import,
24                crontab=f"{fqdn_rand('webauthn_mds_import')} {fqdn_rand('webauthn_mds_import', 24)} * * {fqdn_rand('webauthn_mds_import', 7)}",  # noqa: E501
25            ),
26        ]

Get a list of schedule specs that must exist in each tenant