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

JWTAuthenticator distributed claims resolution honors tls config #1129

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

margocrawf
Copy link
Contributor

Kube 1.23 introduced a new field on the OIDC Authenticator which
allows us to pass in a client with our own TLS config. See
kubernetes/kubernetes#106141.

Signed-off-by: Margo Crawford margaretc@vmware.com

Release note:

Distributed claims resolution honors Pinniped TLS config

NotBefore: jwt.NewNumericDate(time.Now().Add(-time.Hour)),
IssuedAt: jwt.NewNumericDate(time.Now().Add(-time.Hour)),
}
mux.Handle("/claim_source", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test feels pretty awkward but I can't declare mux.Handle("/claim_source", ... later (once the groups claim name and groups value are known) because it's not allowed to be redeclared for each test.
I thought about spinning up an entire new test server in each test but that also gets awkward because currently we need to know the issuer name in the test table and it also just feels kinda wasteful.

@codecov
Copy link

codecov bot commented Apr 18, 2022

Codecov Report

Merging #1129 (0b72f70) into main (c40bca5) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1129      +/-   ##
==========================================
+ Coverage   79.70%   79.72%   +0.02%     
==========================================
  Files         136      136              
  Lines       10060    10054       -6     
==========================================
- Hits         8018     8016       -2     
+ Misses       1770     1767       -3     
+ Partials      272      271       -1     
Impacted Files Coverage Δ
...ler/authenticator/jwtcachefiller/jwtcachefiller.go 87.50% <100.00%> (+1.22%) ⬆️
...l/localuserauthenticator/localuserauthenticator.go 57.20% <0.00%> (+0.93%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c40bca5...0b72f70. Read the comment docs.

Copy link
Member

@cfryanr cfryanr left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Kube 1.23 introduced a new field on the OIDC Authenticator which
allows us to pass in a client with our own TLS config. See
kubernetes/kubernetes#106141.

Signed-off-by: Margo Crawford <margaretc@vmware.com>
@margocrawf margocrawf force-pushed the jwt-authenticator-client-field branch from 2a324b6 to 0b72f70 Compare April 19, 2022 18:36
@margocrawf margocrawf merged commit 63779dd into main Apr 19, 2022
@margocrawf margocrawf deleted the jwt-authenticator-client-field branch April 19, 2022 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants