Documentation ¶
Index ¶
- Constants
- Variables
- func AddToScheme(scheme *runtime.Scheme)
- type AuthorizationAttributes
- type ClusterPolicy
- type ClusterPolicyBinding
- type ClusterPolicyBindingList
- type ClusterPolicyList
- type ClusterRole
- type ClusterRoleBinding
- type ClusterRoleBindingList
- type ClusterRoleList
- type IsPersonalSubjectAccessReview
- type LocalResourceAccessReview
- type LocalSubjectAccessReview
- type NamedClusterRole
- type NamedClusterRoleBinding
- type NamedRole
- type NamedRoleBinding
- type Policy
- type PolicyBinding
- type PolicyBindingList
- type PolicyList
- type PolicyRule
- type ResourceAccessReview
- type ResourceAccessReviewResponse
- type Role
- type RoleBinding
- type RoleBindingList
- type RoleList
- type SubjectAccessReview
- type SubjectAccessReviewResponse
Constants ¶
const GroupName = ""
Variables ¶
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func AddToScheme ¶ added in v1.1.3
Types ¶
type AuthorizationAttributes ¶ added in v1.0.5
type AuthorizationAttributes struct { // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces Namespace string `json:"namespace" description:"namespace of the action being requested"` // Verb is one of: get, list, watch, create, update, delete Verb string `json:"verb" description:"one of get, list, watch, create, update, delete"` // Resource is one of the existing resource types Resource string `json:"resource" description:"one of the existing resource types"` // ResourceName is the name of the resource being requested for a "get" or deleted for a "delete" ResourceName string `json:"resourceName" description:"name of the resource being requested for a get or delete"` // Content is the actual content of the request for create and update Content kruntime.RawExtension `json:"content,omitempty" description:"actual content of the request for create and update"` }
AuthorizationAttributes describes a request to the API server
type ClusterPolicy ¶
type ClusterPolicy struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. kapi.ObjectMeta `json:"metadata,omitempty"` // LastModified is the last time that any part of the ClusterPolicy was created, updated, or deleted LastModified unversioned.Time `json:"lastModified" description:"last time any part of the object was created, updated, or deleted"` // Roles holds all the ClusterRoles held by this ClusterPolicy, mapped by ClusterRole.Name Roles []NamedClusterRole `json:"roles" description:"all the roles held by this policy, mapped by role name"` }
ClusterPolicy is a object that holds all the ClusterRoles for a particular namespace. There is at most one ClusterPolicy document per namespace.
func (*ClusterPolicy) GetObjectKind ¶ added in v1.1.3
func (obj *ClusterPolicy) GetObjectKind() unversioned.ObjectKind
type ClusterPolicyBinding ¶
type ClusterPolicyBinding struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. kapi.ObjectMeta `json:"metadata,omitempty"` // LastModified is the last time that any part of the ClusterPolicyBinding was created, updated, or deleted LastModified unversioned.Time `json:"lastModified" description:"last time any part of the object was created, updated, or deleted"` // PolicyRef is a reference to the ClusterPolicy that contains all the ClusterRoles that this ClusterPolicyBinding's RoleBindings may reference PolicyRef kapi.ObjectReference `json:"policyRef" description:"reference to the cluster policy that this cluster policy binding's role bindings may reference"` // RoleBindings holds all the ClusterRoleBindings held by this ClusterPolicyBinding, mapped by ClusterRoleBinding.Name RoleBindings []NamedClusterRoleBinding `json:"roleBindings" description:"all the role bindings held by this policy, mapped by role name"` }
ClusterPolicyBinding is a object that holds all the ClusterRoleBindings for a particular namespace. There is one ClusterPolicyBinding document per referenced ClusterPolicy namespace
func (*ClusterPolicyBinding) GetObjectKind ¶ added in v1.1.3
func (obj *ClusterPolicyBinding) GetObjectKind() unversioned.ObjectKind
type ClusterPolicyBindingList ¶
type ClusterPolicyBindingList struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. unversioned.ListMeta `json:"metadata,omitempty"` // Items is a list of ClusterPolicyBindings Items []ClusterPolicyBinding `json:"items" description:"list of cluster policy bindings"` }
ClusterPolicyBindingList is a collection of ClusterPolicyBindings
func (*ClusterPolicyBindingList) GetObjectKind ¶ added in v1.1.3
func (obj *ClusterPolicyBindingList) GetObjectKind() unversioned.ObjectKind
type ClusterPolicyList ¶
type ClusterPolicyList struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. unversioned.ListMeta `json:"metadata,omitempty"` // Items is a list of ClusterPolicies Items []ClusterPolicy `json:"items" description:"list of cluster policies"` }
ClusterPolicyList is a collection of ClusterPolicies
func (*ClusterPolicyList) GetObjectKind ¶ added in v1.1.3
func (obj *ClusterPolicyList) GetObjectKind() unversioned.ObjectKind
type ClusterRole ¶
type ClusterRole struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. kapi.ObjectMeta `json:"metadata,omitempty"` // Rules holds all the PolicyRules for this ClusterRole Rules []PolicyRule `json:"rules" description:"list of policy rules"` }
ClusterRole is a logical grouping of PolicyRules that can be referenced as a unit by ClusterRoleBindings.
func (*ClusterRole) GetObjectKind ¶ added in v1.1.3
func (obj *ClusterRole) GetObjectKind() unversioned.ObjectKind
type ClusterRoleBinding ¶
type ClusterRoleBinding struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. kapi.ObjectMeta `json:"metadata,omitempty"` // UserNames holds all the usernames directly bound to the role UserNames []string `json:"userNames" description:"all user names directly bound to the role"` // GroupNames holds all the groups directly bound to the role GroupNames []string `json:"groupNames" description:"all the groups directly bound to the role"` // Subjects hold object references to authorize with this rule Subjects []kapi.ObjectReference `` /* 147-byte string literal not displayed */ // RoleRef can only reference the current namespace and the global namespace // If the ClusterRoleRef cannot be resolved, the Authorizer must return an error. // Since Policy is a singleton, this is sufficient knowledge to locate a role RoleRef kapi.ObjectReference `json:"roleRef" description:"reference to the policy role"` }
ClusterRoleBinding references a ClusterRole, but not contain it. It can reference any ClusterRole in the same namespace or in the global namespace. It adds who information via Users and Groups and namespace information by which namespace it exists in. ClusterRoleBindings in a given namespace only have effect in that namespace (excepting the master namespace which has power in all namespaces).
func (*ClusterRoleBinding) GetObjectKind ¶ added in v1.1.3
func (obj *ClusterRoleBinding) GetObjectKind() unversioned.ObjectKind
type ClusterRoleBindingList ¶
type ClusterRoleBindingList struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. unversioned.ListMeta `json:"metadata,omitempty"` // Items is a list of ClusterRoleBindings Items []ClusterRoleBinding `json:"items" description:"list of cluster role bindings"` }
ClusterRoleBindingList is a collection of ClusterRoleBindings
func (*ClusterRoleBindingList) GetObjectKind ¶ added in v1.1.3
func (obj *ClusterRoleBindingList) GetObjectKind() unversioned.ObjectKind
type ClusterRoleList ¶
type ClusterRoleList struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. unversioned.ListMeta `json:"metadata,omitempty"` // Items is a list of ClusterRoles Items []ClusterRole `json:"items" description:"list of cluster roles"` }
ClusterRoleList is a collection of ClusterRoles
func (*ClusterRoleList) GetObjectKind ¶ added in v1.1.3
func (obj *ClusterRoleList) GetObjectKind() unversioned.ObjectKind
type IsPersonalSubjectAccessReview ¶
type IsPersonalSubjectAccessReview struct {
unversioned.TypeMeta `json:",inline"`
}
IsPersonalSubjectAccessReview is a marker for PolicyRule.AttributeRestrictions that denotes that subjectaccessreviews on self should be allowed
func (*IsPersonalSubjectAccessReview) GetObjectKind ¶ added in v1.1.3
func (obj *IsPersonalSubjectAccessReview) GetObjectKind() unversioned.ObjectKind
type LocalResourceAccessReview ¶ added in v1.0.5
type LocalResourceAccessReview struct { unversioned.TypeMeta `json:",inline"` // AuthorizationAttributes describes the action being tested. The Namespace element is FORCED to the current namespace. AuthorizationAttributes `json:",inline" description:"the action being tested"` }
LocalResourceAccessReview is a means to request a list of which users and groups are authorized to perform the action specified by spec in a particular namespace
func (*LocalResourceAccessReview) GetObjectKind ¶ added in v1.1.3
func (obj *LocalResourceAccessReview) GetObjectKind() unversioned.ObjectKind
type LocalSubjectAccessReview ¶ added in v1.0.5
type LocalSubjectAccessReview struct { unversioned.TypeMeta `json:",inline"` // AuthorizationAttributes describes the action being tested. The Namespace element is FORCED to the current namespace. AuthorizationAttributes `json:",inline" description:"the action being tested"` // User is optional. If both User and Groups are empty, the current authenticated user is used. User string `json:"user" description:"optional, if both user and groups are empty, the current authenticated user is used"` // Groups is optional. Groups is the list of groups to which the User belongs. GroupsSlice []string `json:"groups" description:"optional, list of groups to which the user belongs"` }
LocalSubjectAccessReview is an object for requesting information about whether a user or group can perform an action in a particular namespace
func (*LocalSubjectAccessReview) GetObjectKind ¶ added in v1.1.3
func (obj *LocalSubjectAccessReview) GetObjectKind() unversioned.ObjectKind
type NamedClusterRole ¶
type NamedClusterRole struct { // Name is the name of the cluster role Name string `json:"name" description:"name of the cluster role"` // Role is the cluster role being named Role ClusterRole `json:"role" description:"the cluster role"` }
NamedClusterRole relates a name with a cluster role
type NamedClusterRoleBinding ¶
type NamedClusterRoleBinding struct { // Name is the name of the cluster role binding Name string `json:"name" description:"name of the cluster role binding"` // RoleBinding is the cluster role binding being named RoleBinding ClusterRoleBinding `json:"roleBinding" description:"the cluster role binding"` }
NamedClusterRoleBinding relates a name with a cluster role binding
type NamedRole ¶
type NamedRole struct { // Name is the name of the role Name string `json:"name" description:"name of the role"` // Role is the role being named Role Role `json:"role" description:"the role"` }
NamedRole relates a Role with a name
type NamedRoleBinding ¶
type NamedRoleBinding struct { // Name is the name of the role binding Name string `json:"name" description:"name of the roleBinding"` // RoleBinding is the role binding being named RoleBinding RoleBinding `json:"roleBinding" description:"the roleBinding"` }
NamedRoleBinding relates a role binding with a name
type Policy ¶
type Policy struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. kapi.ObjectMeta `json:"metadata,omitempty"` // LastModified is the last time that any part of the Policy was created, updated, or deleted LastModified unversioned.Time `json:"lastModified" description:"last time that any part of the policy was created, updated, or deleted"` // Roles holds all the Roles held by this Policy, mapped by Role.Name Roles []NamedRole `json:"roles" description:"roles held by this policy"` }
Policy is a object that holds all the Roles for a particular namespace. There is at most one Policy document per namespace.
func (*Policy) GetObjectKind ¶ added in v1.1.3
func (obj *Policy) GetObjectKind() unversioned.ObjectKind
type PolicyBinding ¶
type PolicyBinding struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. kapi.ObjectMeta `json:"metadata,omitempty"` // LastModified is the last time that any part of the PolicyBinding was created, updated, or deleted LastModified unversioned.Time `json:"lastModified" description:"last time that any part of the object was created, updated, or deleted"` // PolicyRef is a reference to the Policy that contains all the Roles that this PolicyBinding's RoleBindings may reference PolicyRef kapi.ObjectReference `` /* 128-byte string literal not displayed */ // RoleBindings holds all the RoleBindings held by this PolicyBinding, mapped by RoleBinding.Name RoleBindings []NamedRoleBinding `json:"roleBindings" description:"all roleBindings held by this policyBinding"` }
PolicyBinding is a object that holds all the RoleBindings for a particular namespace. There is one PolicyBinding document per referenced Policy namespace
func (*PolicyBinding) GetObjectKind ¶ added in v1.1.3
func (obj *PolicyBinding) GetObjectKind() unversioned.ObjectKind
type PolicyBindingList ¶
type PolicyBindingList struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. unversioned.ListMeta `json:"metadata,omitempty"` // Items is a list of PolicyBindings Items []PolicyBinding `json:"items" description:"list of policy bindings"` }
PolicyBindingList is a collection of PolicyBindings
func (*PolicyBindingList) GetObjectKind ¶ added in v1.1.3
func (obj *PolicyBindingList) GetObjectKind() unversioned.ObjectKind
type PolicyList ¶
type PolicyList struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. unversioned.ListMeta `json:"metadata,omitempty"` // Items is a list of Policies Items []Policy `json:"items" description:"list of policies"` }
PolicyList is a collection of Policies
func (*PolicyList) GetObjectKind ¶ added in v1.1.3
func (obj *PolicyList) GetObjectKind() unversioned.ObjectKind
type PolicyRule ¶
type PolicyRule struct { // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. Verbs []string `` /* 160-byte string literal not displayed */ // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. AttributeRestrictions kruntime.RawExtension `` /* 200-byte string literal not displayed */ // APIGroups is the name of the APIGroup that contains the resources. If this field is empty, then both kubernetes and origin API groups are assumed. // That means that if an action is requested against one of the enumerated resources in either the kubernetes or the origin API group, the request // will be allowed APIGroups []string `json:"apiGroups" description:"list of API groups this rule applies to. * represents all API groups."` // Resources is a list of resources this rule applies to. ResourceAll represents all resources. Resources []string `json:"resources" description:"list of resources this rule applies to. * represents all resources."` // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. ResourceNames []string `` /* 147-byte string literal not displayed */ // NonResourceURLsSlice is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. NonResourceURLsSlice []string `` /* 163-byte string literal not displayed */ }
PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.
type ResourceAccessReview ¶
type ResourceAccessReview struct { unversioned.TypeMeta `json:",inline"` // AuthorizationAttributes describes the action being tested. AuthorizationAttributes `json:",inline" description:"the action being tested"` }
ResourceAccessReview is a means to request a list of which users and groups are authorized to perform the action specified by spec
func (*ResourceAccessReview) GetObjectKind ¶ added in v1.1.3
func (obj *ResourceAccessReview) GetObjectKind() unversioned.ObjectKind
type ResourceAccessReviewResponse ¶
type ResourceAccessReviewResponse struct { unversioned.TypeMeta `json:",inline"` // Namespace is the namespace used for the access review Namespace string `json:"namespace,omitempty" description:"namespace used for the access review"` // UsersSlice is the list of users who can perform the action UsersSlice []string `json:"users" description:"list of users who can perform the action"` // GroupsSlice is the list of groups who can perform the action GroupsSlice []string `json:"groups" description:"list of groups who can perform the action"` }
ResourceAccessReviewResponse describes who can perform the action
func (*ResourceAccessReviewResponse) GetObjectKind ¶ added in v1.1.3
func (obj *ResourceAccessReviewResponse) GetObjectKind() unversioned.ObjectKind
type Role ¶
type Role struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. kapi.ObjectMeta `json:"metadata,omitempty"` // Rules holds all the PolicyRules for this Role Rules []PolicyRule `json:"rules" description:"all the rules for this role"` }
Role is a logical grouping of PolicyRules that can be referenced as a unit by RoleBindings.
func (*Role) GetObjectKind ¶ added in v1.1.3
func (obj *Role) GetObjectKind() unversioned.ObjectKind
type RoleBinding ¶
type RoleBinding struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. kapi.ObjectMeta `json:"metadata,omitempty"` // UserNames holds all the usernames directly bound to the role UserNames []string `json:"userNames" description:"all the usernames directly bound to the role"` // GroupNames holds all the groups directly bound to the role GroupNames []string `json:"groupNames" description:"all the groups directly bound to the role"` // Subjects hold object references to authorize with this rule Subjects []kapi.ObjectReference `` /* 147-byte string literal not displayed */ // RoleRef can only reference the current namespace and the global namespace // If the RoleRef cannot be resolved, the Authorizer must return an error. // Since Policy is a singleton, this is sufficient knowledge to locate a role RoleRef kapi.ObjectReference `json:"roleRef" description:"a reference to a role"` }
RoleBinding references a Role, but not contain it. It can reference any Role in the same namespace or in the global namespace. It adds who information via Users and Groups and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace (excepting the master namespace which has power in all namespaces).
func (*RoleBinding) GetObjectKind ¶ added in v1.1.3
func (obj *RoleBinding) GetObjectKind() unversioned.ObjectKind
type RoleBindingList ¶
type RoleBindingList struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. unversioned.ListMeta `json:"metadata,omitempty"` // Items is a list of RoleBindings Items []RoleBinding `json:"items" description:"list of role bindings"` }
RoleBindingList is a collection of RoleBindings
func (*RoleBindingList) GetObjectKind ¶ added in v1.1.3
func (obj *RoleBindingList) GetObjectKind() unversioned.ObjectKind
type RoleList ¶
type RoleList struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. unversioned.ListMeta `json:"metadata,omitempty"` // Items is a list of Roles Items []Role `json:"items" description:"list of roles"` }
RoleList is a collection of Roles
func (*RoleList) GetObjectKind ¶ added in v1.1.3
func (obj *RoleList) GetObjectKind() unversioned.ObjectKind
type SubjectAccessReview ¶
type SubjectAccessReview struct { unversioned.TypeMeta `json:",inline"` // AuthorizationAttributes describes the action being tested. AuthorizationAttributes `json:",inline" description:"the action being tested"` // User is optional. If both User and Groups are empty, the current authenticated user is used. User string `json:"user" description:"optional, if both user and groups are empty, the current authenticated user is used"` // GroupsSlice is optional. Groups is the list of groups to which the User belongs. GroupsSlice []string `json:"groups" description:"optional, list of groups to which the user belongs"` }
SubjectAccessReview is an object for requesting information about whether a user or group can perform an action
func (*SubjectAccessReview) GetObjectKind ¶ added in v1.1.3
func (obj *SubjectAccessReview) GetObjectKind() unversioned.ObjectKind
type SubjectAccessReviewResponse ¶
type SubjectAccessReviewResponse struct { unversioned.TypeMeta `json:",inline"` // Namespace is the namespace used for the access review Namespace string `json:"namespace,omitempty" description:"the namespace used for the access review"` // Allowed is required. True if the action would be allowed, false otherwise. Allowed bool `json:"allowed" description:"true if the action would be allowed, false otherwise"` // Reason is optional. It indicates why a request was allowed or denied. Reason string `json:"reason,omitempty" description:"reason is optional, it indicates why a request was allowed or denied"` }
SubjectAccessReviewResponse describes whether or not a user or group can perform an action
func (*SubjectAccessReviewResponse) GetObjectKind ¶ added in v1.1.3
func (obj *SubjectAccessReviewResponse) GetObjectKind() unversioned.ObjectKind