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

Consolidate JWT issuance and key management #2955

Closed
jpeach opened this issue Oct 15, 2021 · 2 comments · Fixed by #3376
Closed

Consolidate JWT issuance and key management #2955

jpeach opened this issue Oct 15, 2021 · 2 comments · Fixed by #3376
Assignees

Comments

@jpeach
Copy link
Contributor

jpeach commented Oct 15, 2021

Summary

Kuma has 3 JWT token issuers

These all driver the underlying JWT package in subtly different ways, and manage their keys in slightly different ways (e.g. zone ingress and dataplane key management is a copy/paste, but user key management is quite different).

We should consolidate all this so that JWT and key management in Kuma behaves consistently and predictably across subsystems.

Specifically, we should also switch all these from symmetric JWT signing methods to asymmetric, since that would IMHO make the deployment process substantially easier. What I would like to be able to do for deployment is sign all the dataplane tokens offline, then simply provide kuma-cp with the public key to validate them, removing the need to have a running kuma-cp to issue them in the first place.

@jpeach
Copy link
Contributor Author

jpeach commented Oct 15, 2021

Another weird thing about the JWT code is that we generate a RSA signing key, but we don't use it with RSA signing algorithms. The private key gets serialized as ASN.1 and then passed into the symmetric HMAC signing method as a bag of bytes. It's not clear to be whether this is weaker than a straight crypto-rand byte string, or whether it's approximately the same.

@github-actions
Copy link
Contributor

This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.

@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Nov 22, 2021
@jpeach jpeach removed the triage/stale Inactive for some time. It will be triaged again label Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants