Rotate the token signing and encryption keys without signing everyone out

Ouverte
#3,313 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
39/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
csharp

Piste de recherche

Start with src/FluentCMS.Core/Identity/Oidc/SigningKeyStore.cs and the ServerCredentials code around lines 124–144, then trace token lifetimes, encryption keys, and the discovery document. The issue calls for an ADR before implementation; first establish the rotation and overlap design with maintainers. Done means accepted design and tests covering validation through the overlap, retirement, secondary certificate validation, and both discovery keys during rotation.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

area:identity security type:feature

Problem

src/FluentCMS.Core/Identity/Oidc/SigningKeyStore.cs:21-22,32-47 only ever inserts one key per use under a fixed id; nothing adds a second. ServerCredentials (:124-144) takes one certificate with no slot for the previous one, so replacing a certificate invalidates every issued token at once. The encryption key never rotates either. An operator who suspects a key has no way to replace it without signing everyone out, and no routine rotation exists.

Proposal

Write an ADR first, then:

  • A command and a recurring job that add a new signing key and retire the old one after the longest token lifetime.
  • A secondary certificate setting, used for validation only.
  • The same for the encryption key.

Acceptance

  • ADR accepted
  • A token issued before a rotation validates until it expires
  • A retired key is removed after the overlap
  • Replacing the configured certificate with the previous one set as secondary signs nobody out
  • The discovery document lists both keys during the overlap

Found in the code review of 17 Nov 2026.

Langage dominant
C#
Étoiles
569
Forks
107
Merge moyen
2 h 49 min
PR mergées (30 j)
397

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de fluentcms/FluentCMS

Toutes les issues de fluentcms/FluentCMS

Issues similaires

Plus d'issues C#

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.