You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// nameMatches checks to see if the resourceName of the action is in a the specified whitelist. An empty whitelist indicates that any name is allowed.
92
92
// An empty string in the whitelist should only match the action's resourceName if the resourceName itself is empty string. This behavior allows for the
93
93
// combination of a whitelist for gets in the same rule as a list that won't have a resourceName. I don't recommend writing such a rule, but we do
94
94
// handle it like you'd expect: white list is respected for gets while not preventing the list you explicitly asked for.
@@ -77,7 +73,7 @@ func (a *openshiftAuthorizer) getAllowedSubjectsFromNamespaceBindings(namespace
77
73
}
78
74
79
75
for_, rule:=rangerole.Rules() {
80
-
matches, err:=attributes.RuleMatches(rule)
76
+
matches, err:=RuleMatches(attributes, rule)
81
77
iferr!=nil {
82
78
errs=append(errs, err)
83
79
continue
@@ -96,14 +92,12 @@ func (a *openshiftAuthorizer) getAllowedSubjectsFromNamespaceBindings(namespace
96
92
// authorizeWithNamespaceRules returns isAllowed, reason, and error. If an error is returned, isAllowed and reason are still valid. This seems strange
97
93
// but errors are not always fatal to the authorization process. It is entirely possible to get an error and be able to continue determine authorization
98
94
// status in spite of it. This is most common when a bound role is missing, but enough roles are still present and bound to authorize the request.
0 commit comments