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

collector credential impedance mismatches #583

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Conversation

tgeoghegan
Copy link
Contributor

Resolves some impedance mismatches with the Janus aggregator API's handling of collector authentication tokens. Specifcally:

  • TaskCreate contains an AuthenticationTokenHash, which is not quite the same as an AuthenticationToken
  • The canonical form of a Janus bearer token is the unpadded Base64URL encoding of the bytes (1), and an authentication token hash is the SHA-256 of the canonical form (2).

Resolves some impedance mismatches with the Janus aggregator API's
handling of collector authentication tokens. Specifcally:

 - TaskCreate contains an `AuthenticationTokenHash`, which is not quite
   the same as an `AuthenticationToken`
 - The canonical form of a Janus bearer token is the unpadded Base64URL
   encoding of the bytes ([1]), and an authentication token hash is the
   SHA-256 of the canonical form (2).

[1]: https://github.com/divviup/janus/blob/89a6a954339e526d991bab378fb5596d9eba64b8/core/src/auth_tokens.rs#L197
[2]: https://github.com/divviup/janus/blob/89a6a954339e526d991bab378fb5596d9eba64b8/core/src/auth_tokens.rs#L349
@tgeoghegan tgeoghegan requested review from jbr and a team as code owners October 18, 2023 22:14
@jbr jbr merged commit 64bcccf into main Oct 18, 2023
6 checks passed
@jbr jbr deleted the timg/collector-auth-token-bugs branch October 18, 2023 22:46
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