Rotate the token signing and encryption keys without signing everyone out

Abierto
#3,313 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
39/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
csharp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C#
Estrellas
569
Forks
107
Merge medio
2 h 49 min
PR fusionados (30 d)
397

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fluentcms/FluentCMS

Todos los issues de fluentcms/FluentCMS

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.