Skip to content

Conversation

migmartri
Copy link
Member

This patch updates the JWT generation/verification code used today for authentication and attestation (robot-accounts) to generate and verify respective custom audience values.

The reason for this change is in preparation for #453, where we'll be creating additional JWT tokens that are meant to be distinct from the existing authentication ones.

The changes are as follows

Temporary authentication tokens

The tokens result of chainloop auth login now have the audience user-auth.chainloop, existing tokens will fail to validate, but that's ok since they have 24 hours max validity.

Robot-accounts

These tokens now have aud=attestations.chainloop but during verification we still support its previous value. This is to maintain compatibility with robot-accounts that are already in place. New ones will have the right audience

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Copy link
Member

@danlishka danlishka left a comment

Choose a reason for hiding this comment

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

LGTM

@migmartri migmartri merged commit e1f14ee into chainloop-dev:main Dec 8, 2023
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