-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Background
To allow more UX-friendly keys rotation, having a set of keys for signing JWTs is needed. Once a set of keys is used, the "oldest" one can stop signing keys for time equal to expiration of JWT set in config. After that time, it can be replaced with new one.
Example (more smooth rotation):
- Current keys: [A].
- New key B is generated (for example by rotation of A). Current keys [B, A].
- For some time (let's say 30 min) B is not used yet to sign JWT to allow backends based on LS to fetch this new set of keys.
- After that time, B starts signing JWTs. A becomes "idle" for some time.
- A gets removed. Current keys: [B].
A set of keys is also useful if we for some reason will have to revoke some JWTs, as we would only have to revoke one key from a set, leaving more users unaffected.
Feature
Have a set of keys for signing JWTs, each key having its own unique ID, and add this ID to header of JWT.
dk1844
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request