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

Use http cache for improving performance #104

Closed
int128 opened this issue Jun 23, 2019 · 2 comments
Closed

Use http cache for improving performance #104

int128 opened this issue Jun 23, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@int128
Copy link
Owner

int128 commented Jun 23, 2019

Use the http cache to reduce time for the OIDC discovery. See https://github.com/kubernetes/client-go/blob/790a4f63632139cf6731014d00a9a8338f1fbd7d/discovery/cached/disk/round_tripper.go.

@int128 int128 added the enhancement New feature or request label Jun 23, 2019
@int128
Copy link
Owner Author

int128 commented Jun 24, 2019

Keycloak does not allow cache:

% curl -v -L https://keycloak.example.com/auth/realms/hello/.well-known/openid-configuration
> GET /auth/realms/hello/.well-known/openid-configuration HTTP/2
> Host: keycloak.example.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/2 200
< date: Mon, 24 Jun 2019 13:45:18 GMT
< content-type: application/json
< content-length: 2421
< vary: Accept-Encoding
< cache-control: no-cache, must-revalidate, no-transform, no-store

Google IdP allows cache:

% curl -v -L https://accounts.google.com/.well-known/openid-configuration
> GET /.well-known/openid-configuration HTTP/2
> Host: accounts.google.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/2 200
< accept-ranges: none
< vary: Accept-Encoding
< content-type: application/json
< access-control-allow-origin: *
< date: Mon, 24 Jun 2019 13:04:19 GMT
< expires: Mon, 24 Jun 2019 14:04:19 GMT
< last-modified: Mon, 05 Nov 2018 17:08:01 GMT
< x-content-type-options: nosniff
< server: sffe
< x-xss-protection: 0
< age: 1893
< cache-control: public, max-age=3600
< alt-svc: quic=":443"; ma=2592000; v="46,44,43,39"

@int128
Copy link
Owner Author

int128 commented Nov 2, 2019

kubelogin validates the token without the discovery and cache is not needed now. Close.

@int128 int128 closed this as completed Nov 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant