Skip to content

Conversation

@ChrisPenner
Copy link
Member

@ChrisPenner ChrisPenner commented Feb 12, 2025

Overview

  • Set up a new EDDSA secret on staging
  • Set up new EDDSA secret on prod
  • Set the env var in the deployment hcls for share-api
  • Set the env var in the deployment hcls for cloud-api
  • Need to update the lib in cloud-api
  • Then actually do a key rotation to a new EdDSA key
  • Deploy the new cloud-api FIRST
  • Deploy share-api next

We want to be able to support public/private key crypto so that BYOC instances can validate tokens which come from Share.

This tweaks the auth library to allow EdDSA as a JWT algorithm,
and while I'm at it, adds key id and algo verification and key rotation.

Implementation notes

  • Tweaks the defaultJWTSettings helper, it now accepts a key definition, alongside a 'legacy key' and list of keys which we've rotated.
  • Also paves the way towards per-user keys if that's something we end up supporting (it can be useful for long-lived clients and/or API tokens)

Test coverage

  • Test key rotation and new keys.

- containers
- cookie
- cryptonite
- crypton
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crypton is where cryptonite moved to since HVR is no longer maintaining it.

@ChrisPenner ChrisPenner marked this pull request as ready for review February 24, 2025 23:48
@ChrisPenner ChrisPenner merged commit 3c5f4ad into main Feb 25, 2025
4 checks passed
@ChrisPenner ChrisPenner deleted the eddsa branch February 25, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants