Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow base64 padding characters in bearer tokens #267

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

divergentdave
Copy link
Contributor

The base64 custom validator is too strict for the aggregator API's purposes, as it doesn't allow = padding characters. Janus currently expects to be able to decode aggregator API bearer tokens with the STANDARD base64 engine, so bearer tokens must end with two padding characters, given the token length we chose. This PR adds = to the validator's allowed alphabet.

@divergentdave divergentdave requested review from a team and jbr as code owners July 7, 2023 19:54
@jbr
Copy link
Contributor

jbr commented Jul 7, 2023

Do we really need to validate them at all? I've historically just treated them as opaque ascii/utf8, which I understand isn't exactly in compliance with the spec but there also isn't any reason divviup-api needs to be enforcing the bearer token spec here; we're just passing around bytes between other parties. This may be a topic to further discuss when Tim is back, so let's merge this in the meantime

@divergentdave divergentdave merged commit a7e525b into main Jul 7, 2023
6 checks passed
@divergentdave divergentdave deleted the david/base64-allow-padding branch July 7, 2023 20:03
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