Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for IsResourceRequest (0.31 sec)

  1. plugin/pkg/admission/certificates/ctbattest/admission_test.go

    	}
    	if a.GetName() != f.allowedName {
    		return authorizer.DecisionDeny, fmt.Sprintf("unrecognised resource name '%s'", a.GetName()), nil
    	}
    	if !a.IsResourceRequest() {
    		return authorizer.DecisionDeny, fmt.Sprintf("unrecognised IsResourceRequest '%t'", a.IsResourceRequest()), nil
    	}
    	return f.decision, "", nil
    }
    
    type testAttributes struct {
    	resource    schema.GroupResource
    	subresource string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. pkg/registry/core/serviceaccount/storage/token.go

    func newContext(ctx context.Context, resource, name, namespace string, gvk schema.GroupVersionKind) context.Context {
    	newInfo := genericapirequest.RequestInfo{
    		IsResourceRequest: true,
    		Verb:              "get",
    		Namespace:         namespace,
    		Resource:          resource,
    		Name:              name,
    		Parts:             []string{resource, name},
    		APIGroup:          gvk.Group,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 05 10:24:31 UTC 2024
    - 10K bytes
    - Viewed (0)
  5. plugin/pkg/auth/authorizer/node/node_authorizer.go

    		return authorizer.DecisionNoOpinion, fmt.Sprintf("unknown node for user %q", attrs.GetUser().GetName()), nil
    	}
    
    	// subdivide access to specific resources
    	if attrs.IsResourceRequest() {
    		requestResource := schema.GroupResource{Group: attrs.GetAPIGroup(), Resource: attrs.GetResource()}
    		switch requestResource {
    		case secretResource:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 16K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go

    		r.Spec = authorizationv1.SubjectAccessReviewSpec{
    			User:   user.GetName(),
    			UID:    user.GetUID(),
    			Groups: user.GetGroups(),
    			Extra:  convertToSARExtra(user.GetExtra()),
    		}
    	}
    
    	if attr.IsResourceRequest() {
    		r.Spec.ResourceAttributes = &authorizationv1.ResourceAttributes{
    			Namespace:   attr.GetNamespace(),
    			Verb:        attr.GetVerb(),
    			Group:       attr.GetAPIGroup(),
    			Version:     attr.GetAPIVersion(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:01:15 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go

    	if !ok {
    		responsewriters.ErrorNegotiated(
    			apierrors.NewInternalError(fmt.Errorf("no RequestInfo found in the context")),
    			Codecs, schema.GroupVersion{}, w, req,
    		)
    		return
    	}
    	if !requestInfo.IsResourceRequest {
    		pathParts := splitPath(requestInfo.Path)
    		// only match /apis/<group>/<version>
    		// only registered under /apis
    		if len(pathParts) == 3 {
    			r.versionDiscoveryHandler.ServeHTTP(w, req)
    			return
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:06:46 UTC 2024
    - 52.9K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go

    	}
    }
    
    func fakeRequestInfo(resource, apiGroup string) *genericapirequest.RequestInfo {
    	return &genericapirequest.RequestInfo{
    		IsResourceRequest: true,
    		Path:              "/api/v1/test",
    		Verb:              "test",
    		APIPrefix:         "api",
    		APIGroup:          apiGroup,
    		APIVersion:        "v1",
    		Namespace:         "",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 101.8K bytes
    - Viewed (0)
Back to top