Thomas Kosiewski
f569d9c33d
feat: add separate max token lifetime for administrators ( #18267 )
...
# Add separate token lifetime limits for administrators
This PR introduces a new configuration option `--max-admin-token-lifetime` that allows administrators to create API tokens with longer lifetimes than regular users. By default, administrators can create tokens with a lifetime of up to 7 days (168 hours), while the existing `--max-token-lifetime` setting continues to apply to regular users.
The implementation:
- Adds a new `MaximumAdminTokenDuration` field to the session configuration
- Modifies the token validation logic to check the user's role and apply the appropriate lifetime limit
- Updates the token configuration endpoint to return the correct maximum lifetime based on the user's role
- Adds tests to verify that administrators can create tokens with longer and shorter lifetimes
- Updates documentation and help text to reflect the new option
This change allows organizations to grant administrators extended token lifetimes while maintaining tighter security controls for regular users.
Fixes #17395
2025-06-06 17:36:30 +02:00
..
2025-01-21 11:23:21 +00:00
2025-06-02 20:13:08 -07:00
2025-02-12 10:47:25 +00:00
2023-11-02 14:41:34 -05:00
2024-08-20 14:47:46 +10:00
2025-06-02 20:13:08 -07:00
2024-12-05 12:32:52 +11:00
2024-12-05 12:32:52 +11:00
2023-10-24 12:00:04 +03:00
2024-04-02 10:02:30 -05:00
2024-04-01 09:19:26 -05:00
2024-04-01 09:19:26 -05:00
2024-04-02 10:02:30 -05:00
2024-04-01 09:19:26 -05:00
2024-04-01 09:19:26 -05:00
2023-10-09 23:04:35 +00:00
2023-10-09 23:02:16 -05:00
2024-01-24 14:05:39 +00:00
2024-08-20 14:47:46 +10:00
2025-05-30 11:00:26 -03:00
2024-06-26 09:00:42 +01:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2025-02-19 13:08:38 +00:00
2024-07-11 15:22:20 +02:00
2024-07-11 15:22:20 +02:00
2025-02-19 13:08:38 +00:00
2025-03-21 15:28:08 +00:00
2025-03-21 15:28:08 +00:00
2024-01-02 20:46:18 +02:00
2024-09-17 14:08:33 -05:00
2024-09-17 10:22:20 -05:00
2024-09-17 10:22:20 -05:00
2024-09-17 10:22:20 -05:00
2024-09-17 10:22:20 -05:00
2024-09-17 10:22:20 -05:00
2024-09-17 10:22:20 -05:00
2025-04-04 14:04:20 -04:00
2025-04-04 14:04:20 -04:00
2024-09-17 10:22:20 -05:00
2025-04-04 14:04:20 -04:00
2024-09-17 14:08:33 -05:00
2024-11-13 13:44:21 -06:00
2024-11-13 13:44:21 -06:00
2024-11-13 13:44:21 -06:00
2024-11-13 13:44:21 -06:00
2024-09-17 10:22:20 -05:00
2025-02-24 05:38:17 +00:00
2023-12-08 10:01:13 -06:00
2025-01-20 17:24:22 +00:00
2025-01-27 16:26:56 +00:00
2025-01-27 16:26:56 +00:00
2025-05-19 16:05:39 +01:00
2025-05-19 16:05:39 +01:00
2025-03-10 12:28:06 +00:00
2025-03-10 12:28:06 +00:00
2025-05-19 16:05:39 +01:00
2025-05-19 16:05:39 +01:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2025-01-03 11:15:35 -06:00
2024-10-16 23:54:12 +02:00
2024-12-18 10:58:33 +00:00
2024-12-18 10:58:33 +00:00
2024-08-20 14:47:46 +10:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2025-06-06 17:36:30 +02:00
2024-03-20 13:14:43 -04:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2024-08-20 14:47:46 +10:00
2025-05-16 10:09:46 -04:00
2025-03-25 13:54:53 +01:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2023-09-14 19:48:29 -05:00
2024-03-25 15:14:27 +00:00
2024-03-25 15:14:27 +00:00
2024-07-09 14:27:34 +00:00
2024-07-01 16:04:45 -05:00
2024-11-01 19:43:51 +00:00
2024-07-01 16:04:45 -05:00
2024-11-01 19:43:51 +00:00
2024-12-05 22:37:25 +05:00
2024-08-20 14:47:46 +10:00
2024-07-01 16:04:45 -05:00
2025-06-03 16:55:34 +01:00
2024-10-17 14:15:14 +05:00
2024-07-01 16:04:45 -05:00
2024-08-20 14:47:46 +10:00
2024-10-17 14:15:14 +05:00
2024-07-01 16:04:45 -05:00
2023-09-14 19:48:29 -05:00
2024-10-16 17:02:56 +02:00
2024-08-20 14:47:46 +10:00
2025-02-12 18:18:17 +11:00
2024-01-24 14:05:39 +00:00
2024-10-16 23:54:12 +02:00
2025-05-13 20:48:16 +00:00
2024-08-20 14:47:46 +10:00
2025-05-13 20:48:16 +00:00
2023-10-09 11:47:57 -05:00
2025-05-22 19:48:23 +10:00
2025-05-13 20:48:16 +00:00
2025-05-23 11:35:05 -03:00
2024-12-20 00:06:22 +02:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2024-07-09 13:23:11 -05:00
2025-06-06 17:36:30 +02:00