Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 322 for Authorize (0.34 sec)

  1. pkg/registry/admissionregistration/validatingadmissionpolicy/authz.go

    		// identical paramKind to old object
    		return nil
    	}
    
    	return v.authorize(ctx, policy)
    }
    
    func (v *validatingAdmissionPolicyStrategy) authorize(ctx context.Context, policy *admissionregistration.ValidatingAdmissionPolicy) error {
    	if v.authorizer == nil || policy.Spec.ParamKind == nil {
    		return nil
    	}
    
    	// for superuser, skip all checks
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 21:29:56 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/authorization/metrics/metrics_test.go

    			t.Fatal(err)
    		}
    		authorizationDecisionsTotal.Reset()
    	}
    
    }
    
    type dummyAuthorizer struct {
    	decision authorizer.Decision
    	err      error
    }
    
    func (d *dummyAuthorizer) Authorize(ctx context.Context, attrs authorizer.Attributes) (authorizer.Decision, string, error) {
    	return d.decision, "", d.err
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 16 13:20:59 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/caching_authorizer.go

    	"k8s.io/apiserver/pkg/authorization/authorizer"
    )
    
    type authzResult struct {
    	authorized authorizer.Decision
    	reason     string
    	err        error
    }
    
    type cachingAuthorizer struct {
    	authorizer authorizer.Authorizer
    	decisions  map[string]authzResult
    }
    
    func newCachingAuthorizer(in authorizer.Authorizer) authorizer.Authorizer {
    	return &cachingAuthorizer{
    		authorizer: in,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 12 18:58:24 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go

    			serv.statusCode = test.statusCode
    			authorized, _, err := wh.Authorize(context.Background(), test.attr)
    			if test.expectedErr && err == nil {
    				t.Fatalf("%d: Expected error", i)
    			} else if !test.expectedErr && err != nil {
    				t.Fatalf("%d: unexpected error: %v", i, err)
    			}
    
    			if test.expectedAuthorized != (authorized == authorizer.DecisionAllow) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  5. pkg/registry/admissionregistration/validatingadmissionpolicybinding/authz.go

    		// identical paramRef and policy to old object
    		return nil
    	}
    
    	return v.authorize(ctx, binding)
    }
    
    func (v *validatingAdmissionPolicyBindingStrategy) authorize(ctx context.Context, binding *admissionregistration.ValidatingAdmissionPolicyBinding) error {
    	if v.authorizer == nil || v.resourceResolver == nil || binding.Spec.ParamRef == nil {
    		return nil
    	}
    
    	// for superuser, skip all checks
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 12:19:03 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  6. plugin/pkg/auth/authorizer/node/node_authorizer.go

    	}
    	return r.authorize(nodeName, startingType, attrs)
    }
    
    func (r *NodeAuthorizer) authorize(nodeName string, startingType vertexType, attrs authorizer.Attributes) (authorizer.Decision, string, error) {
    	if len(attrs.GetName()) == 0 {
    		klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs)
    		return authorizer.DecisionNoOpinion, "No Object name found", nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 16K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/authorization/cel/metrics.go

    	RecordAuthorizationMatchConditionEvaluation(ctx context.Context, authorizerType, authorizerName string, elapsed time.Duration)
    	// RecordAuthorizationMatchConditionEvaluationFailure increments if any evaluation error was encountered evaluating matchConditions for an Authorize() call to the given authorizer
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 22:41:27 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/authorization/metrics/metrics.go

    	decision, reason, err := a.delegate.Authorize(ctx, attributes)
    	switch decision {
    	case authorizer.DecisionNoOpinion:
    		// non-terminal, not reported
    	case authorizer.DecisionAllow:
    		// matches SubjectAccessReview status.allowed field name
    		RecordAuthorizationDecision(a.authorizerType, a.authorizerName, "allowed")
    	case authorizer.DecisionDeny:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 16 13:20:59 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  9. tests/test_security_oauth2_authorization_code_bearer_description.py

    from fastapi import FastAPI, Security
    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize",
        tokenUrl="token",
        description="OAuth2 Code Bearer",
        auto_error=True,
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/authorization/authorizer/interfaces.go

    	// GetPath returns the path of the request
    	GetPath() string
    }
    
    // Authorizer makes an authorization decision based on information gained by making
    // zero or more calls to methods of the Attributes interface.  It returns nil when an action is
    // authorized, otherwise it returns an error.
    type Authorizer interface {
    	Authorize(ctx context.Context, a Attributes) (authorized Decision, reason string, err error)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 06 14:36:14 UTC 2023
    - 4.8K bytes
    - Viewed (0)
Back to top