adapter

package
v1.5.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KubernetesAuthorizerAttributes

func KubernetesAuthorizerAttributes(namespace string, user user.Info, oattrs oauthorizer.Action) kauthorizer.Attributes

KubernetesAuthorizerAttributes adapts Origin authorization attributes to Kubernetes authorization attributes The returned attributes can be passed to OriginAuthorizerAttributes to access extra information from the Origin attributes interface

func NewAuthorizer

func NewAuthorizer(originAuthorizer oauthorizer.Authorizer) (kauthorizer.Authorizer, error)

NewAuthorizer adapts an Origin Authorizer interface to a Kubernetes Authorizer interface

func OriginAuthorizerAttributes

func OriginAuthorizerAttributes(kattrs kauthorizer.Attributes) (kapi.Context, oauthorizer.Action)

OriginAuthorizerAttributes adapts Kubernetes authorization attributes to Origin authorization attributes Note that some info (like resourceName, apiVersion, apiGroup) is not available from the Kubernetes attributes

Types

type AdapterAttributes

type AdapterAttributes struct {
	// contains filtered or unexported fields
}

AdapterAttributes satisfies k8s authorizer.Attributes interfaces

func (AdapterAttributes) GetAPIGroup added in v1.3.0

func (a AdapterAttributes) GetAPIGroup() string

func (AdapterAttributes) GetAPIVersion added in v1.3.0

func (a AdapterAttributes) GetAPIVersion() string

func (AdapterAttributes) GetName added in v1.3.0

func (a AdapterAttributes) GetName() string

func (AdapterAttributes) GetNamespace

func (a AdapterAttributes) GetNamespace() string

GetNamespace satisfies the kubernetes authorizer.Attributes interface origin gets this value from the request context

func (AdapterAttributes) GetPath added in v1.1.2

func (a AdapterAttributes) GetPath() string

GetPath satisfies the kubernetes authorizer.Attributes interface

func (AdapterAttributes) GetResource added in v1.3.0

func (a AdapterAttributes) GetResource() string

func (AdapterAttributes) GetSubresource added in v1.3.0

func (a AdapterAttributes) GetSubresource() string

func (AdapterAttributes) GetUser added in v1.3.0

func (a AdapterAttributes) GetUser() user.Info

GetUserName satisfies the kubernetes authorizer.Attributes interface origin gets this value from the request context

func (AdapterAttributes) GetVerb added in v1.3.0

func (a AdapterAttributes) GetVerb() string

func (AdapterAttributes) IsReadOnly

func (a AdapterAttributes) IsReadOnly() bool

IsReadOnly satisfies the kubernetes authorizer.Attributes interface based on the verb

func (AdapterAttributes) IsResourceRequest added in v1.1.2

func (a AdapterAttributes) IsResourceRequest() bool

IsResourceRequest satisfies the kubernetes authorizer.Attributes interface

type AdapterAuthorizer

type AdapterAuthorizer struct {
	// contains filtered or unexported fields
}

func (*AdapterAuthorizer) Authorize

func (z *AdapterAuthorizer) Authorize(kattrs kauthorizer.Attributes) (bool, string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL