refactor(jwt): gate signing-key auto-rotation cron on SIGNING_KEY_ROTATION_DAYS (#20866)

Only register the JWT signing-key rotation cron when
`SIGNING_KEY_ROTATION_DAYS` is set, and move that variable to Advanced
Settings.
This commit is contained in:
Charles Bochet
2026-05-23 11:51:06 +02:00
committed by GitHub
parent 056e3a4cd8
commit 91ce59d8e2
3 changed files with 25 additions and 7 deletions
@@ -1185,9 +1185,9 @@ export class ConfigVariables {
FALLBACK_ENCRYPTION_KEY: string;
@ConfigVariablesMetadata({
group: ConfigVariablesGroup.SERVER_CONFIG,
group: ConfigVariablesGroup.ADVANCED_SETTINGS,
description:
'Number of days after which the Enterprise auto-rotation cron issues a new current JWT signing key. When unset, the cron is a no-op. Previous keys remain in the database to keep verifying tokens they signed; revocation stays a manual admin action.',
'Days the current JWT signing key stays valid before the rotation cron issues a new one. Leave unset to disable auto-rotation.',
type: ConfigVariableType.NUMBER,
})
@CastToPositiveNumber()