Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 3,660 for subjects (0.13 sec)

  1. pkg/apis/rbac/v1/helpers.go

    		r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, rbacv1.Subject{APIGroup: rbacv1.GroupName, Kind: rbacv1.GroupKind, Name: group})
    	}
    	return r
    }
    
    func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder {
    	for _, user := range users {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 18 15:37:57 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  2. pkg/apis/rbac/helpers.go

    func SubjectsStrings(subjects []Subject) ([]string, []string, []string, []string) {
    	users := []string{}
    	groups := []string{}
    	sas := []string{}
    	others := []string{}
    
    	for _, subject := range subjects {
    		switch subject.Kind {
    		case ServiceAccountKind:
    			sas = append(sas, fmt.Sprintf("%s/%s", subject.Namespace, subject.Name))
    
    		case UserKind:
    			users = append(users, subject.Name)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 23 15:11:00 UTC 2020
    - 12.1K bytes
    - Viewed (0)
  3. plugin/pkg/auth/authorizer/rbac/subject_locator.go

    				}
    				if RulesAllow(requestAttributes, rules...) {
    					subjects = append(subjects, roleBinding.Subjects...)
    				}
    			}
    		}
    	}
    
    	dedupedSubjects := []rbacv1.Subject{}
    	for _, subject := range subjects {
    		found := false
    		for _, curr := range dedupedSubjects {
    			if curr == subject {
    				found = true
    				break
    			}
    		}
    
    		if !found {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 22 12:17:05 UTC 2018
    - 4.7K bytes
    - Viewed (0)
  4. pkg/apis/rbac/v1alpha1/conversion_test.go

    				RoleRef:  v1alpha1.RoleRef{Name: "foo", APIGroup: v1alpha1.GroupName},
    				Subjects: []v1alpha1.Subject{{Kind: "User", APIVersion: v1alpha1.SchemeGroupVersion.String(), Name: "bob"}},
    			},
    			expected: &rbacapi.RoleBinding{
    				RoleRef:  rbacapi.RoleRef{Name: "foo", APIGroup: v1alpha1.GroupName},
    				Subjects: []rbacapi.Subject{{Kind: "User", APIGroup: v1alpha1.GroupName, Name: "bob"}},
    			},
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 15:23:55 UTC 2017
    - 4K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/match_test.go

    		Subjects: []flowcontrol.Subject{{Kind: flowcontrol.SubjectKindUser,
    			User: &flowcontrol.UserSubject{Name: "goodu"}}},
    		ResourceRules: []flowcontrol.ResourcePolicyRule{{
    			Verbs:      []string{"goodverb"},
    			APIGroups:  []string{"goodapig"},
    			Resources:  []string{"goodrscs"},
    			Namespaces: []string{"goodns"}}}}, {
    		Subjects: []flowcontrol.Subject{{Kind: flowcontrol.SubjectKindGroup,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:35 UTC 2023
    - 13.3K bytes
    - Viewed (0)
  6. pkg/registry/rbac/validation/rule_test.go

    			index:     2,
    			testCase:  "multiple subjects with a service account that matches",
    		},
    		{
    			subjects: []rbacv1.Subject{
    				{Kind: rbacv1.UserKind, Name: "*"},
    			},
    			user:      &user.DefaultInfo{Name: "foobar"},
    			namespace: "default",
    			appliesTo: false,
    			testCase:  "* user subject name doesn't match all users",
    		},
    		{
    			subjects: []rbacv1.Subject{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap/default.go

    		ans[idx] = flowcontrol.Subject{
    			Kind: flowcontrol.SubjectKindUser,
    			User: &flowcontrol.UserSubject{
    				Name: name,
    			},
    		}
    	}
    	return ans
    }
    
    func kubeSystemServiceAccount(names ...string) []flowcontrol.Subject {
    	subjects := []flowcontrol.Subject{}
    	for _, name := range names {
    		subjects = append(subjects, flowcontrol.Subject{
    			Kind: flowcontrol.SubjectKindServiceAccount,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 20.5K bytes
    - Viewed (0)
  8. pkg/apis/rbac/v1beta1/helpers.go

    	for _, group := range groups {
    		r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, rbacv1beta1.Subject{Kind: rbacv1beta1.GroupKind, Name: group})
    	}
    	return r
    }
    
    func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder {
    	for _, user := range users {
    		r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, rbacv1beta1.Subject{Kind: rbacv1beta1.UserKind, Name: user})
    	}
    	return r
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 18 15:37:57 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  9. plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-role-bindings.yaml

        creationTimestamp: null
        labels:
          kubernetes.io/bootstrapping: rbac-defaults
        name: cluster-admin
      roleRef:
        apiGroup: rbac.authorization.k8s.io
        kind: ClusterRole
        name: cluster-admin
      subjects:
      - apiGroup: rbac.authorization.k8s.io
        kind: Group
        name: system:masters
    - apiVersion: rbac.authorization.k8s.io/v1
      kind: ClusterRoleBinding
      metadata:
        annotations:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 11 19:01:47 UTC 2020
    - 5.7K bytes
    - Viewed (0)
  10. plugin/pkg/auth/authorizer/rbac/rbac_test.go

    	}
    
    	r.Subjects = make([]rbacv1.Subject, len(subjects))
    	for i, subject := range subjects {
    		split := strings.SplitN(subject, ":", 2)
    		r.Subjects[i].Kind, r.Subjects[i].Name = split[0], split[1]
    
    		switch r.Subjects[i].Kind {
    		case rbacv1.ServiceAccountKind:
    			r.Subjects[i].APIGroup = ""
    		case rbacv1.UserKind, rbacv1.GroupKind:
    			r.Subjects[i].APIGroup = rbacv1.GroupName
    		default:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 24 15:14:54 UTC 2019
    - 21.1K bytes
    - Viewed (0)
Back to top