- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 39 for IsResourceRequest (0.19 sec)
-
staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/caching_authorizer.go
GetUser() user.Info GetVerb() string IsReadOnly() bool GetNamespace() string GetResource() string GetSubresource() string GetName() string GetAPIGroup() string GetAPIVersion() string IsResourceRequest() bool GetPath() string })(nil) // The user info accessors known to cache key construction. If this fails to compile, the cache // implementation may need to be updated. var _ user.Info = (interface {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 12 18:58:24 UTC 2024 - 3.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authorization/path/path.go
} else { paths.Insert(p) } } return authorizer.AuthorizerFunc(func(ctx context.Context, a authorizer.Attributes) (authorizer.Decision, string, error) { if a.IsResourceRequest() { return authorizer.DecisionNoOpinion, "", nil } pth := strings.TrimPrefix(a.GetPath(), "/") if paths.Has(pth) { return authorizer.DecisionAllow, "", nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Apr 09 13:47:19 UTC 2021 - 1.9K bytes - Viewed (0) -
pkg/registry/rbac/clusterrole/policybased/storage_test.go
IsResourceRequest: true, Verb: "create", APIGroup: "rbac.authorization.k8s.io", APIVersion: "v1", Resource: "clusterroles", Name: "", }) updateContext := request.WithRequestInfo(request.WithNamespace(context.TODO(), ""), &request.RequestInfo{ IsResourceRequest: true, Verb: "update",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Apr 09 13:47:19 UTC 2021 - 6.2K bytes - Viewed (0) -
plugin/pkg/auth/authorizer/rbac/rbac.go
// Build a detailed log of the denial. // Make the whole block conditional so we don't do a lot of string-building we won't use. if klogV := klog.V(5); klogV.Enabled() { var operation string if requestAttributes.IsResourceRequest() { b := &bytes.Buffer{} b.WriteString(`"`) b.WriteString(requestAttributes.GetVerb()) b.WriteString(`" resource "`) b.WriteString(requestAttributes.GetResource())
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/registry/rbac/role/policybased/storage_test.go
IsResourceRequest: true, Verb: "create", APIGroup: "rbac.authorization.k8s.io", APIVersion: "v1", Namespace: "myns", Resource: "roles", Name: "", }) updateContext := request.WithRequestInfo(request.WithNamespace(context.TODO(), "myns"), &request.RequestInfo{ IsResourceRequest: true, Verb: "update",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Apr 09 13:47:19 UTC 2021 - 6.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/audit/policy/checker.go
} return true } // Check whether the rule's non-resource URLs match the request attrs. func ruleMatchesNonResource(r *audit.PolicyRule, attrs authorizer.Attributes) bool { if attrs.IsResourceRequest() { return false } path := attrs.GetPath() for _, spec := range r.NonResourceURLs { if pathMatches(path, spec) { return true } } return false }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 02 22:24:14 UTC 2022 - 6.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/match_test.go
}) } } func TestLiterals(t *testing.T) { ui := &user.DefaultInfo{Name: "goodu", UID: "1", Groups: []string{"goodg1", "goodg2"}} reqRN := RequestDigest{ RequestInfo: &request.RequestInfo{ IsResourceRequest: true, Path: "/apis/goodapig/v1/namespaces/goodns/goodrscs", Verb: "goodverb", APIPrefix: "apis", APIGroup: "goodapig", APIVersion: "v1",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 30 12:18:35 UTC 2023 - 13.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/request/requestinfo_test.go
apiRequestInfo, err := resolver.NewRequestInfo(req) if err != nil { t.Errorf("Unexpected error for url: %s %v", successCase.url, err) } if !apiRequestInfo.IsResourceRequest { t.Errorf("Expected resource request") } if successCase.expectedVerb != apiRequestInfo.Verb {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 15 12:19:21 UTC 2018 - 11.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/filters/traces.go
otelhttp.WithTracerProvider(tp), otelhttp.WithSpanNameFormatter(func(operation string, r *http.Request) string { ctx := r.Context() info, exist := request.RequestInfoFrom(ctx) if !exist || !info.IsResourceRequest { return r.Method } return getSpanNameFromRequestInfo(info, r) }), } wrappedHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 15 01:42:42 UTC 2024 - 2.5K bytes - Viewed (0) -
pkg/auth/authorizer/abac/abac.go
if !p.Spec.Readonly { return true } return false } func nonResourceMatches(p abac.Policy, a authorizer.Attributes) bool { // A non-resource policy cannot match a resource request if !a.IsResourceRequest() { // Allow wildcard match if p.Spec.NonResourcePath == "*" { return true } // Allow exact match if p.Spec.NonResourcePath == a.GetPath() { return true }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 11 03:11:30 UTC 2021 - 7.4K bytes - Viewed (0)