authentik.enterprise.lifecycle.apps
1from authentik.enterprise.apps import EnterpriseConfig 2from authentik.lib.utils.time import fqdn_rand 3from authentik.tasks.schedules.common import ScheduleSpec 4 5 6class ReportsConfig(EnterpriseConfig): 7 name = "authentik.enterprise.lifecycle" 8 label = "authentik_lifecycle" 9 verbose_name = "authentik Enterprise.Lifecycle" 10 default = True 11 12 @property 13 def tenant_schedule_specs(self) -> list[ScheduleSpec]: 14 from authentik.enterprise.lifecycle.tasks import apply_lifecycle_rules 15 16 return [ 17 ScheduleSpec( 18 actor=apply_lifecycle_rules, 19 crontab=f"{fqdn_rand('lifecycle_apply_lifecycle_rules')} " 20 f"{fqdn_rand('lifecycle_apply_lifecycle_rules', 24)} * * *", 21 ) 22 ]
7class ReportsConfig(EnterpriseConfig): 8 name = "authentik.enterprise.lifecycle" 9 label = "authentik_lifecycle" 10 verbose_name = "authentik Enterprise.Lifecycle" 11 default = True 12 13 @property 14 def tenant_schedule_specs(self) -> list[ScheduleSpec]: 15 from authentik.enterprise.lifecycle.tasks import apply_lifecycle_rules 16 17 return [ 18 ScheduleSpec( 19 actor=apply_lifecycle_rules, 20 crontab=f"{fqdn_rand('lifecycle_apply_lifecycle_rules')} " 21 f"{fqdn_rand('lifecycle_apply_lifecycle_rules', 24)} * * *", 22 ) 23 ]
Base app config for all enterprise apps
name =
'authentik.enterprise.lifecycle'
tenant_schedule_specs: list[authentik.tasks.schedules.common.ScheduleSpec]
13 @property 14 def tenant_schedule_specs(self) -> list[ScheduleSpec]: 15 from authentik.enterprise.lifecycle.tasks import apply_lifecycle_rules 16 17 return [ 18 ScheduleSpec( 19 actor=apply_lifecycle_rules, 20 crontab=f"{fqdn_rand('lifecycle_apply_lifecycle_rules')} " 21 f"{fqdn_rand('lifecycle_apply_lifecycle_rules', 24)} * * *", 22 ) 23 ]
Get a list of schedule specs that must exist in each tenant