-
Notifications
You must be signed in to change notification settings - Fork 63
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
Update jose v4 #248
Update jose v4 #248
Conversation
Sorry @benashz , i didn't see the review tag - if you want some more changes I can put them in before the release tag |
@vinay-gopalan @kpcraig - yes, I am fairly certain these changes will break depending on the K8s API server config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to revisit this change.
@@ -43,6 +43,12 @@ var supportedJwtAlgs = []capjwt.Alg{ | |||
capjwt.ES256, capjwt.ES384, capjwt.ES512, | |||
} | |||
|
|||
var allowedSignatureAlgs = []jose.SignatureAlgorithm{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like we should support setting these from configuration.
var allowedSignatureAlgs = []jose.SignatureAlgorithm{ | ||
jose.RS256, | ||
jose.ES256, | ||
jose.HS256, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don't seem to match what K8s supports, per: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/#options:
--oidc-signing-algs strings Default: "RS256"
Comma-separated list of allowed JOSE asymmetric signing algorithms. JWTs with a supported 'alg' header values are: RS256, RS384, RS512, ES256, ES384, ES512, PS256, PS384, PS512. Values are defined by RFC 7518 https://tools.ietf.org/html/rfc7518#section-3.1.
This is a short PR to update the go-jose library to v4 to avoid possible issues with v2 support, copying hashicorp/vault-plugin-auth-gcp#203
It's possible v2.6.3 also fixes this issue (see https://github.com/go-jose/go-jose/releases/tag/v2.6.3), but this feels more future-proof (and the solution was readily available).