Auth: Respect cache control for JWKS in auth.jwt (#68872)

* respect cache control for auth.jwt

* add documentation

* add small note on cache control header ignores

* make distinction of env
This commit is contained in:
Jo
2023-05-23 12:29:10 +02:00
committed by GitHub
parent 86ea0c2bc9
commit 5e5c751ecd
4 changed files with 124 additions and 8 deletions
+10
View File
@@ -109,6 +109,16 @@ func TestVerifyUsingJWKSetURL(t *testing.T) {
})
require.NoError(t, err)
_, err = initAuthService(t, func(t *testing.T, cfg *setting.Cfg) {
cfg.JWTAuthJWKSetURL = "http://example.com/.well-known/jwks.json"
})
require.NoError(t, err)
oldEnv := setting.Env
setting.Env = setting.Prod
defer func() {
setting.Env = oldEnv
}()
_, err = initAuthService(t, func(t *testing.T, cfg *setting.Cfg) {
cfg.JWTAuthJWKSetURL = "http://example.com/.well-known/jwks.json"
})