adapter

package
Version: v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2015 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, 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 {
	oauthorizer.AuthorizationAttributes
	// contains filtered or unexported fields
}

AdapterAttributes satisfies both origin authorizer.AuthorizationAttributes and k8s authorizer.Attributes interfaces

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

func (a AdapterAttributes) GetNamespace() string

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

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

func (a AdapterAttributes) IsReadOnly() bool

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

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL