mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Revert "Improve multi-authorizer errors"
This reverts commit 1c012f1c49.
			
			
This commit is contained in:
		@@ -227,7 +227,7 @@ func (pl policyList) Authorize(a authorizer.Attributes) (authorizer.Decision, st
 | 
			
		||||
			return authorizer.DecisionAllow, "", nil
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return authorizer.DecisionNoOpinion, "no ABAC policy matched", nil
 | 
			
		||||
	return authorizer.DecisionNoOpinion, "No policy matched.", nil
 | 
			
		||||
	// TODO: Benchmark how much time policy matching takes with a medium size
 | 
			
		||||
	// policy file, compared to other steps such as encoding/decoding.
 | 
			
		||||
	// Then, add Caching only if needed.
 | 
			
		||||
 
 | 
			
		||||
@@ -121,8 +121,6 @@ func (r *RBACAuthorizer) Authorize(requestAttributes authorizer.Attributes) (aut
 | 
			
		||||
	reason := ""
 | 
			
		||||
	if len(ruleCheckingVisitor.errors) > 0 {
 | 
			
		||||
		reason = fmt.Sprintf("RBAC: %v", utilerrors.NewAggregate(ruleCheckingVisitor.errors))
 | 
			
		||||
	} else {
 | 
			
		||||
		reason = "no RBAC policy matched"
 | 
			
		||||
	}
 | 
			
		||||
	return authorizer.DecisionNoOpinion, reason, nil
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user