From e673fa13d5bcdc61057eb31918f6084793fb8950 Mon Sep 17 00:00:00 2001 From: Daniel Jiang Date: Wed, 3 Jul 2019 17:29:37 +0800 Subject: [PATCH] Handle helm push in OIDC filter Fixes #8130 Enable OIDC filter to handle requests to /api/chartrepo/* Signed-off-by: Daniel Jiang --- src/core/filter/security.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/filter/security.go b/src/core/filter/security.go index 54d5d4523..c4ed6a9f2 100644 --- a/src/core/filter/security.go +++ b/src/core/filter/security.go @@ -229,8 +229,10 @@ type oidcCliReqCtxModifier struct{} func (oc *oidcCliReqCtxModifier) Modify(ctx *beegoctx.Context) bool { path := ctx.Request.URL.Path - if path != "/service/token" && !strings.HasPrefix(path, "/chartrepo/") { - log.Debug("OIDC CLI modifer only handles request by docker CLI or helm CLI") + if path != "/service/token" && + !strings.HasPrefix(path, "/chartrepo/") && + !strings.HasPrefix(path, "/api/chartrepo/") { + log.Debug("OIDC CLI modifier only handles request by docker CLI or helm CLI") return false } if ctx.Request.Context().Value(AuthModeKey).(string) != common.OIDCAuth {