kubernetes: k8s.io/kubernetes/pkg/apis/authorization Index | Files | Directories

package authorization

import "k8s.io/kubernetes/pkg/apis/authorization"

Index

Package Files

doc.go register.go types.go zz_generated.deepcopy.go

Constants

const GroupName = "authorization.k8s.io"

GroupName is the group name use in this package

Variables

var (
    // SchemeBuilder points to a list of functions added to Scheme.
    SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
    // AddToScheme applies all the stored functions to the scheme.
    AddToScheme = SchemeBuilder.AddToScheme
)
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

func Kind Uses

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func Resource Uses

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

type ExtraValue Uses

type ExtraValue []string

ExtraValue masks the value so protobuf can generate +protobuf.nullable=true

func (ExtraValue) DeepCopy Uses

func (in ExtraValue) DeepCopy() ExtraValue

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue.

func (ExtraValue) DeepCopyInto Uses

func (in ExtraValue) DeepCopyInto(out *ExtraValue)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LocalSubjectAccessReview Uses

type LocalSubjectAccessReview struct {
    metav1.TypeMeta
    metav1.ObjectMeta

    // Spec holds information about the request being evaluated.  spec.namespace must be equal to the namespace
    // you made the request against.  If empty, it is defaulted.
    Spec SubjectAccessReviewSpec

    // Status is filled in by the server and indicates whether the request is allowed or not
    Status SubjectAccessReviewStatus
}

LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.

func (*LocalSubjectAccessReview) DeepCopy Uses

func (in *LocalSubjectAccessReview) DeepCopy() *LocalSubjectAccessReview

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSubjectAccessReview.

func (*LocalSubjectAccessReview) DeepCopyInto Uses

func (in *LocalSubjectAccessReview) DeepCopyInto(out *LocalSubjectAccessReview)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LocalSubjectAccessReview) DeepCopyObject Uses

func (in *LocalSubjectAccessReview) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NonResourceAttributes Uses

type NonResourceAttributes struct {
    // Path is the URL path of the request
    Path string
    // Verb is the standard HTTP verb
    Verb string
}

NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface

func (*NonResourceAttributes) DeepCopy Uses

func (in *NonResourceAttributes) DeepCopy() *NonResourceAttributes

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonResourceAttributes.

func (*NonResourceAttributes) DeepCopyInto Uses

func (in *NonResourceAttributes) DeepCopyInto(out *NonResourceAttributes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NonResourceRule Uses

type NonResourceRule struct {
    // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options.  "*" means all.
    Verbs []string

    // NonResourceURLs 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.  "*" means all.
    NonResourceURLs []string
}

NonResourceRule holds information that describes a rule for the non-resource

func (*NonResourceRule) DeepCopy Uses

func (in *NonResourceRule) DeepCopy() *NonResourceRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonResourceRule.

func (*NonResourceRule) DeepCopyInto Uses

func (in *NonResourceRule) DeepCopyInto(out *NonResourceRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceAttributes Uses

type ResourceAttributes struct {
    // Namespace is the namespace of the action being requested.  Currently, there is no distinction between no namespace and all namespaces
    // "" (empty) is defaulted for LocalSubjectAccessReviews
    // "" (empty) is empty for cluster-scoped resources
    // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
    Namespace string
    // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy.  "*" means all.
    Verb string
    // Group is the API Group of the Resource.  "*" means all.
    Group string
    // Version is the API Version of the Resource.  "*" means all.
    Version string
    // Resource is one of the existing resource types.  "*" means all.
    Resource string
    // Subresource is one of the existing resource types.  "" means none.
    Subresource string
    // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
    Name string
}

ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface

func (*ResourceAttributes) DeepCopy Uses

func (in *ResourceAttributes) DeepCopy() *ResourceAttributes

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAttributes.

func (*ResourceAttributes) DeepCopyInto Uses

func (in *ResourceAttributes) DeepCopyInto(out *ResourceAttributes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceRule Uses

type ResourceRule struct {
    // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy.  "*" means all.
    Verbs []string
    // APIGroups is the name of the APIGroup that contains the resources.  If multiple API groups are specified, any action requested against one of
    // the enumerated resources in any API group will be allowed.  "*" means all.
    APIGroups []string
    // Resources is a list of resources this rule applies to.  "*" means all in the specified apiGroups.
    //  "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups.
    Resources []string
    // ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.  "*" means all.
    ResourceNames []string
}

ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.

func (*ResourceRule) DeepCopy Uses

func (in *ResourceRule) DeepCopy() *ResourceRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRule.

func (*ResourceRule) DeepCopyInto Uses

func (in *ResourceRule) DeepCopyInto(out *ResourceRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SelfSubjectAccessReview Uses

type SelfSubjectAccessReview struct {
    metav1.TypeMeta
    metav1.ObjectMeta

    // Spec holds information about the request being evaluated.
    Spec SelfSubjectAccessReviewSpec

    // Status is filled in by the server and indicates whether the request is allowed or not
    Status SubjectAccessReviewStatus
}

SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means "in all namespaces". Self is a special case, because users should always be able to check whether they can perform an action

func (*SelfSubjectAccessReview) DeepCopy Uses

func (in *SelfSubjectAccessReview) DeepCopy() *SelfSubjectAccessReview

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReview.

func (*SelfSubjectAccessReview) DeepCopyInto Uses

func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SelfSubjectAccessReview) DeepCopyObject Uses

func (in *SelfSubjectAccessReview) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SelfSubjectAccessReviewSpec Uses

type SelfSubjectAccessReviewSpec struct {
    // ResourceAttributes describes information for a resource access request
    ResourceAttributes *ResourceAttributes
    // NonResourceAttributes describes information for a non-resource access request
    NonResourceAttributes *NonResourceAttributes
}

SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAttributes and NonResourceAttributes must be set

func (*SelfSubjectAccessReviewSpec) DeepCopy Uses

func (in *SelfSubjectAccessReviewSpec) DeepCopy() *SelfSubjectAccessReviewSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectAccessReviewSpec.

func (*SelfSubjectAccessReviewSpec) DeepCopyInto Uses

func (in *SelfSubjectAccessReviewSpec) DeepCopyInto(out *SelfSubjectAccessReviewSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SelfSubjectRulesReview Uses

type SelfSubjectRulesReview struct {
    metav1.TypeMeta
    metav1.ObjectMeta

    // Spec holds information about the request being evaluated.
    Spec SelfSubjectRulesReviewSpec

    // Status is filled in by the server and indicates the set of actions a user can perform.
    Status SubjectRulesReviewStatus
}

SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.

func (*SelfSubjectRulesReview) DeepCopy Uses

func (in *SelfSubjectRulesReview) DeepCopy() *SelfSubjectRulesReview

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReview.

func (*SelfSubjectRulesReview) DeepCopyInto Uses

func (in *SelfSubjectRulesReview) DeepCopyInto(out *SelfSubjectRulesReview)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SelfSubjectRulesReview) DeepCopyObject Uses

func (in *SelfSubjectRulesReview) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SelfSubjectRulesReviewSpec Uses

type SelfSubjectRulesReviewSpec struct {
    // Namespace to evaluate rules for. Required.
    Namespace string
}

SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.

func (*SelfSubjectRulesReviewSpec) DeepCopy Uses

func (in *SelfSubjectRulesReviewSpec) DeepCopy() *SelfSubjectRulesReviewSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReviewSpec.

func (*SelfSubjectRulesReviewSpec) DeepCopyInto Uses

func (in *SelfSubjectRulesReviewSpec) DeepCopyInto(out *SelfSubjectRulesReviewSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubjectAccessReview Uses

type SubjectAccessReview struct {
    metav1.TypeMeta
    metav1.ObjectMeta

    // Spec holds information about the request being evaluated
    Spec SubjectAccessReviewSpec

    // Status is filled in by the server and indicates whether the request is allowed or not
    Status SubjectAccessReviewStatus
}

SubjectAccessReview checks whether or not a user or group can perform an action. Not filling in a spec.namespace means "in all namespaces".

func (*SubjectAccessReview) DeepCopy Uses

func (in *SubjectAccessReview) DeepCopy() *SubjectAccessReview

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReview.

func (*SubjectAccessReview) DeepCopyInto Uses

func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SubjectAccessReview) DeepCopyObject Uses

func (in *SubjectAccessReview) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SubjectAccessReviewSpec Uses

type SubjectAccessReviewSpec struct {
    // ResourceAttributes describes information for a resource access request
    ResourceAttributes *ResourceAttributes
    // NonResourceAttributes describes information for a non-resource access request
    NonResourceAttributes *NonResourceAttributes

    // User is the user you're testing for.
    // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
    User string
    // Groups is the groups you're testing for.
    Groups []string
    // Extra corresponds to the user.Info.GetExtra() method from the authenticator.  Since that is input to the authorizer
    // it needs a reflection here.
    Extra map[string]ExtraValue
    // UID information about the requesting user.
    UID string
}

SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAttributes and NonResourceAttributes must be set

func (*SubjectAccessReviewSpec) DeepCopy Uses

func (in *SubjectAccessReviewSpec) DeepCopy() *SubjectAccessReviewSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewSpec.

func (*SubjectAccessReviewSpec) DeepCopyInto Uses

func (in *SubjectAccessReviewSpec) DeepCopyInto(out *SubjectAccessReviewSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubjectAccessReviewStatus Uses

type SubjectAccessReviewStatus struct {
    // Allowed is required. True if the action would be allowed, false otherwise.
    Allowed bool
    // Denied is optional. True if the action would be denied, otherwise
    // false. If both allowed is false and denied is false, then the
    // authorizer has no opinion on whether to authorize the action. Denied
    // may not be true if Allowed is true.
    Denied bool
    // Reason is optional.  It indicates why a request was allowed or denied.
    Reason string
    // EvaluationError is an indication that some error occurred during the authorization check.
    // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
    // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
    EvaluationError string
}

SubjectAccessReviewStatus represents the current state of a SubjectAccessReview.

func (*SubjectAccessReviewStatus) DeepCopy Uses

func (in *SubjectAccessReviewStatus) DeepCopy() *SubjectAccessReviewStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewStatus.

func (*SubjectAccessReviewStatus) DeepCopyInto Uses

func (in *SubjectAccessReviewStatus) DeepCopyInto(out *SubjectAccessReviewStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubjectRulesReviewStatus Uses

type SubjectRulesReviewStatus struct {
    // ResourceRules is the list of actions the subject is allowed to perform on resources.
    // The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
    ResourceRules []ResourceRule
    // NonResourceRules is the list of actions the subject is allowed to perform on non-resources.
    // The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
    NonResourceRules []NonResourceRule
    // Incomplete is true when the rules returned by this call are incomplete. This is most commonly
    // encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.
    Incomplete bool
    // EvaluationError can appear in combination with Rules. It indicates an error occurred during
    // rule evaluation, such as an authorizer that doesn't support rule evaluation, and that
    // ResourceRules and/or NonResourceRules may be incomplete.
    EvaluationError string
}

SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.

func (*SubjectRulesReviewStatus) DeepCopy Uses

func (in *SubjectRulesReviewStatus) DeepCopy() *SubjectRulesReviewStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectRulesReviewStatus.

func (*SubjectRulesReviewStatus) DeepCopyInto Uses

func (in *SubjectRulesReviewStatus) DeepCopyInto(out *SubjectRulesReviewStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

PathSynopsis
fuzzer
installPackage install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery.
v1
v1beta1
validation

Package authorization imports 3 packages (graph) and is imported by 306 packages. Updated 2019-05-01. Refresh now. Tools for package owners.