mirror of
https://github.com/goharbor/harbor.git
synced 2024-10-05 08:47:52 +02:00
Handle helm push in OIDC filter
Fixes #8130 Enable OIDC filter to handle requests to /api/chartrepo/* Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit is contained in:
parent
5d887ad0d8
commit
8a9d352f54
@ -229,8 +229,10 @@ type oidcCliReqCtxModifier struct{}
|
|||||||
|
|
||||||
func (oc *oidcCliReqCtxModifier) Modify(ctx *beegoctx.Context) bool {
|
func (oc *oidcCliReqCtxModifier) Modify(ctx *beegoctx.Context) bool {
|
||||||
path := ctx.Request.URL.Path
|
path := ctx.Request.URL.Path
|
||||||
if path != "/service/token" && !strings.HasPrefix(path, "/chartrepo/") {
|
if path != "/service/token" &&
|
||||||
log.Debug("OIDC CLI modifer only handles request by docker CLI or helm CLI")
|
!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
|
return false
|
||||||
}
|
}
|
||||||
if ctx.Request.Context().Value(AuthModeKey).(string) != common.OIDCAuth {
|
if ctx.Request.Context().Value(AuthModeKey).(string) != common.OIDCAuth {
|
||||||
|
Loading…
Reference in New Issue
Block a user