mirror of
https://github.com/alibaba/higress.git
synced 2026-06-26 10:45:25 +08:00
fix(oidc): fail closed when verifier is unavailable (#4013)
Signed-off-by: EndlessSeeker <1766508902@qq.com> Co-authored-by: Jingze <52855280+Jing-ze@users.noreply.github.com>
This commit is contained in:
@@ -71,7 +71,14 @@ func onHttpRequestHeaders(ctx wrapper.HttpContext, config PluginConfig, log log.
|
||||
// TODO: remove this verifier after envoy support send request during parseConfig
|
||||
if err := config.oidcHandler.ValidateVerifier(); err != nil {
|
||||
log.Critical(err.Error())
|
||||
return types.ActionContinue
|
||||
_ = proxywasm.SendHttpResponseWithDetail(
|
||||
http.StatusServiceUnavailable,
|
||||
"oidc.verifier_unavailable",
|
||||
nil,
|
||||
[]byte("OIDC verifier is unavailable"),
|
||||
-1,
|
||||
)
|
||||
return types.ActionPause
|
||||
}
|
||||
|
||||
config.oidcHandler.ServeHTTP(rw, req)
|
||||
|
||||
Reference in New Issue
Block a user