Authz: Fix namespace authorization when calling a cluster resource (#102110)
This commit is contained in:
1 parent
2bbd5faf6d
commit
5d94293305
1 file changed
+5
@@ -40,6 +40,11 @@ func (auth namespaceAuthorizer) Authorize(ctx context.Context, a authorizer.Attr
|
||||
return authorizer.DecisionDeny, "invalid namespace", err
|
||||
}
|
||||
|
||||
// If we call a cluster resource we delegate to the next authorizer
|
||||
if ns.Value == "" {
|
||||
return authorizer.DecisionNoOpinion, "", nil
|
||||
}
|
||||
|
||||
if ns.OrgID != ident.GetOrgID() {
|
||||
return authorizer.DecisionDeny, "invalid org", nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user