- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for ResourceMatches (0.2 sec)
-
staging/src/k8s.io/apimachinery/pkg/api/meta/priority.go
} remainingGVRs := append([]schema.GroupVersionResource{}, originalGVRs...) for _, pattern := range m.ResourcePriority { matchedGVRs := []schema.GroupVersionResource{} for _, gvr := range remainingGVRs { if resourceMatches(pattern, gvr) { matchedGVRs = append(matchedGVRs, gvr) } } switch len(matchedGVRs) { case 0: // if you have no matches, then nothing matched this pattern just move to the next continue
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 05 23:44:02 UTC 2021 - 7.6K bytes - Viewed (0) -
pkg/auth/authorizer/abac/abac.go
func matches(p abac.Policy, a authorizer.Attributes) bool { if subjectMatches(p, a.GetUser()) { if verbMatches(p, a) { // Resource and non-resource requests are mutually exclusive, at most one will match a policy if resourceMatches(p, a) { return true } if nonResourceMatches(p, a) { return true } } } return false }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 11 03:11:30 UTC 2021 - 7.4K bytes - Viewed (0) -
pkg/apis/rbac/v1/evaluation_helpers.go
for _, ruleGroup := range rule.APIGroups { if ruleGroup == rbacv1.APIGroupAll { return true } if ruleGroup == requestedGroup { return true } } return false } func ResourceMatches(rule *rbacv1.PolicyRule, combinedRequestedResource, requestedSubresource string) bool { for _, ruleResource := range rule.Resources { // if everything is allowed, we match if ruleResource == rbacv1.ResourceAll {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 18 15:37:57 UTC 2023 - 3.8K bytes - Viewed (0) -
pkg/apis/rbac/helpers.go
*/ package rbac import ( "fmt" "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" ) // ResourceMatches returns the result of the rule.Resources matching. func ResourceMatches(rule *PolicyRule, combinedRequestedResource, requestedSubresource string) bool { for _, ruleResource := range rule.Resources { // if everything is allowed, we match
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Feb 23 15:11:00 UTC 2020 - 12.1K bytes - Viewed (0) -
plugin/pkg/auth/authorizer/rbac/rbac.go
} return rbacv1helpers.VerbMatches(rule, requestAttributes.GetVerb()) && rbacv1helpers.APIGroupMatches(rule, requestAttributes.GetAPIGroup()) && rbacv1helpers.ResourceMatches(rule, combinedResource, requestAttributes.GetSubresource()) && rbacv1helpers.ResourceNameMatches(rule, requestAttributes.GetName()) } return rbacv1helpers.VerbMatches(rule, requestAttributes.GetVerb()) &&
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 24 10:13:50 UTC 2022 - 7.8K bytes - Viewed (0) -
pkg/apis/rbac/helpers_test.go
expected: false, }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { rule := &rbac.PolicyRule{ Resources: tc.ruleResources, } actual := rbac.ResourceMatches(rule, tc.combinedRequestedResource, tc.requestedSubresource) if tc.expected != actual { t.Errorf("expected %v, got %v", tc.expected, actual) } }) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 9.2K bytes - Viewed (0)