SAML: per-SP signing cert selection for staggered cert rotation

Aperta
#379 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
34/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
ruby

Direzione di ricerca

Start by tracing how SP configuration is represented and how SAMLService::Signing currently obtains its key from Entities.private_key. The issue says per-SP selection is blocked until SPs move into the database, so first inspect that configuration path and the work that persists SPs. Done means each SP can select a signing or rollover certificate and rotation can be performed per SP as described.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

problem

cert rotation (saml-cert-rotation) is a global flip: promote! switches the signing key for every SP at once. any SP pinned to the old cert breaks until someone updates its admin panel, and the SPs are updated one after another. so the Nth SP is down for the time it takes to update SPs 1..N, not just its own ~30s.

proposal

let each SP choose which cert we sign its responses with:

  • add a nullable saml_certificate_id on the SP. nil means "current signing cert"
  • SAMLService::Signing looks up the key for the SP it's responding to, instead of reading Entities.private_key globally
  • the SP admin page gets a dropdown listing signing and rollover certs

rotation then works per SP:

  1. generate the new cert. it gets published in metadata as rollover
  2. for each SP: update its IdP cert, then flip that SP to the new cert on our side
  3. promote, and retire the old cert once nothing is pinned to it

what this gets us

  • single-cert SPs (one cert text box): the blip is still unavoidable, but it only lasts that SP's own "save theirs, flip ours" gap instead of adding up across SPs
  • multi-cert / metadata-driven SPs: add the new cert next to the old one, then flip ours. zero blip
  • per-SP rollback: flip just the SP that broke
  • compromise rotation: still the global promote + immediate retire, on purpose

blocked on

SPs moving into the DB. right now SP config isn't something we can hang a foreign key off.

Lingua principale
Ruby
Stelle
85
Fork
72
Merge medio
3g 12h
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hackclub/auth

Tutte le issue di hackclub/auth

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.