authentik
authentik copied to clipboard
Setting `goauthentik.io/user/token-expires` by group attribute
Is your feature request related to a problem? Please describe.
I'm using LDAP login and want to allow a set of users to create no-expiring app-passwords, the docs said goauthentik.io/user/token-expires can be used for that, but I found out I have to set the attribute for each user.
Describe the solution you'd like
Instead of setting goauthentik.io/user/token-expires per user (#4194), I feel this is more convenientto set it at group-level, i.e. use group_attributes() instead:
https://github.com/goauthentik/authentik/blob/0ea1c8f138e1fcfcb980c8418cb3f7bcb8675c20/authentik/core/api/tokens.py#L146
Describe alternatives you've considered
- Alternatively, provide a system-wide variable to configure, but this is less flexible
Additional context