Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 79 for PolicyRule (0.28 sec)

  1. pkg/registry/rbac/validation/rule_test.go

    	}
    	ruleReadServices := rbacv1.PolicyRule{
    		Verbs:     []string{"GET", "WATCH"},
    		APIGroups: []string{"v1"},
    		Resources: []string{"services"},
    	}
    	ruleWriteNodes := rbacv1.PolicyRule{
    		Verbs:     []string{"PUT", "CREATE", "UPDATE"},
    		APIGroups: []string{"v1"},
    		Resources: []string{"nodes"},
    	}
    	ruleAdmin := rbacv1.PolicyRule{
    		Verbs:     []string{"*"},
    		APIGroups: []string{"*"},
    		Resources: []string{"*"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/apis/audit/validation/validation_test.go

    		errorCases = append(errorCases, audit.Policy{Rules: []audit.PolicyRule{rule}})
    	}
    
    	// Multiple rules.
    	errorCases = append(errorCases, audit.Policy{Rules: append(validRules, audit.PolicyRule{})})
    
    	// invalid omitStages in policy
    	policy := audit.Policy{OmitStages: []audit.Stage{
    		audit.Stage("foo"),
    	},
    		Rules: []audit.PolicyRule{{
    			Level: audit.LevelMetadata,
    		}},
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 02 07:48:42 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.conversion.go

    		return err
    	}
    	if err := s.AddGeneratedConversionFunc((*PolicyRule)(nil), (*audit.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error {
    		return Convert_v1_PolicyRule_To_audit_PolicyRule(a.(*PolicyRule), b.(*audit.PolicyRule), scope)
    	}); err != nil {
    		return err
    	}
    	if err := s.AddGeneratedConversionFunc((*audit.PolicyRule)(nil), (*PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 06 19:08:27 UTC 2021
    - 14.6K bytes
    - Viewed (0)
  4. pkg/registry/rbac/validation/internal_version_adapter.go

    	rbacv1helpers "k8s.io/kubernetes/pkg/apis/rbac/v1"
    )
    
    func ConfirmNoEscalationInternal(ctx context.Context, ruleResolver AuthorizationRuleResolver, inRules []rbac.PolicyRule) error {
    	rules := []rbacv1.PolicyRule{}
    	for i := range inRules {
    		v1Rule := rbacv1.PolicyRule{}
    		err := rbacv1helpers.Convert_rbac_PolicyRule_To_v1_PolicyRule(&inRules[i], &v1Rule, nil)
    		if err != nil {
    			return err
    		}
    		rules = append(rules, v1Rule)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 22 12:17:05 UTC 2018
    - 1.1K bytes
    - Viewed (0)
  5. pkg/apis/rbac/v1/evaluation_helpers.go

    	"strings"
    
    	rbacv1 "k8s.io/api/rbac/v1"
    )
    
    func VerbMatches(rule *rbacv1.PolicyRule, requestedVerb string) bool {
    	for _, ruleVerb := range rule.Verbs {
    		if ruleVerb == rbacv1.VerbAll {
    			return true
    		}
    		if ruleVerb == requestedVerb {
    			return true
    		}
    	}
    
    	return false
    }
    
    func APIGroupMatches(rule *rbacv1.PolicyRule, requestedGroup string) bool {
    	for _, ruleGroup := range rule.APIGroups {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 18 15:37:57 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  6. pkg/apis/rbac/v1/zz_generated.conversion.go

    		return err
    	}
    	if err := s.AddGeneratedConversionFunc((*v1.PolicyRule)(nil), (*rbac.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error {
    		return Convert_v1_PolicyRule_To_rbac_PolicyRule(a.(*v1.PolicyRule), b.(*rbac.PolicyRule), scope)
    	}); err != nil {
    		return err
    	}
    	if err := s.AddGeneratedConversionFunc((*rbac.PolicyRule)(nil), (*v1.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 21K bytes
    - Viewed (0)
  7. pkg/apis/rbac/v1beta1/zz_generated.conversion.go

    		return err
    	}
    	if err := s.AddGeneratedConversionFunc((*v1beta1.PolicyRule)(nil), (*rbac.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error {
    		return Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(a.(*v1beta1.PolicyRule), b.(*rbac.PolicyRule), scope)
    	}); err != nil {
    		return err
    	}
    	if err := s.AddGeneratedConversionFunc((*rbac.PolicyRule)(nil), (*v1beta1.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 22.1K bytes
    - Viewed (0)
  8. pkg/registry/rbac/validation/policy_compact.go

    // this is a fast check, and works well with the decomposed "missing rules" list from a Covers check.
    func CompactRules(rules []rbacv1.PolicyRule) ([]rbacv1.PolicyRule, error) {
    	compacted := make([]rbacv1.PolicyRule, 0, len(rules))
    
    	simpleRules := map[simpleResource]*rbacv1.PolicyRule{}
    	for _, rule := range rules {
    		if resource, isSimple := isSimpleResourceRule(&rule); isSimple {
    			if existingRule, ok := simpleRules[resource]; ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 22 12:17:05 UTC 2018
    - 3.1K bytes
    - Viewed (0)
  9. pkg/apis/rbac/v1alpha1/zz_generated.conversion.go

    		return err
    	}
    	if err := s.AddGeneratedConversionFunc((*v1alpha1.PolicyRule)(nil), (*rbac.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error {
    		return Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(a.(*v1alpha1.PolicyRule), b.(*rbac.PolicyRule), scope)
    	}); err != nil {
    		return err
    	}
    	if err := s.AddGeneratedConversionFunc((*rbac.PolicyRule)(nil), (*v1alpha1.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 23.6K bytes
    - Viewed (0)
  10. pkg/controller/clusterroleaggregation/clusterroleaggregation_controller_test.go

    )
    
    func TestSyncClusterRole(t *testing.T) {
    	hammerRules := func() []rbacv1.PolicyRule {
    		return []rbacv1.PolicyRule{
    			{Verbs: []string{"hammer"}, Resources: []string{"nails"}},
    			{Verbs: []string{"hammer"}, Resources: []string{"wedges"}},
    		}
    	}
    	chiselRules := func() []rbacv1.PolicyRule {
    		return []rbacv1.PolicyRule{
    			{Verbs: []string{"chisel"}, Resources: []string{"mortises"}},
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 9K bytes
    - Viewed (0)
Back to top