adapter

package
v1.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KubernetesAuthorizerAttributes

func KubernetesAuthorizerAttributes(namespace string, userName string, groups []string, oattrs oauthorizer.AuthorizationAttributes) 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.AuthorizationAttributes)

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) GetGroups

func (a AdapterAttributes) GetGroups() []string

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

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) GetUserName

func (a AdapterAttributes) GetUserName() string

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) error

Jump to

Keyboard shortcuts

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