Documentation ¶
Index ¶
- func KubernetesAuthorizerAttributes(namespace string, userName string, groups []string, ...) kauthorizer.Attributes
- func NewAuthorizer(originAuthorizer oauthorizer.Authorizer) (kauthorizer.Authorizer, error)
- func OriginAuthorizerAttributes(kattrs kauthorizer.Attributes) (kapi.Context, oauthorizer.AuthorizationAttributes)
- type AdapterAttributes
- func (a AdapterAttributes) GetAPIGroup() string
- func (a AdapterAttributes) GetAPIVersion() string
- func (a AdapterAttributes) GetGroups() []string
- func (a AdapterAttributes) GetName() string
- func (a AdapterAttributes) GetNamespace() string
- func (a AdapterAttributes) GetPath() string
- func (a AdapterAttributes) GetResource() string
- func (a AdapterAttributes) GetSubresource() string
- func (a AdapterAttributes) GetUserName() string
- func (a AdapterAttributes) GetVerb() string
- func (a AdapterAttributes) IsReadOnly() bool
- func (a AdapterAttributes) IsResourceRequest() bool
- type AdapterAuthorizer
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 ¶
func (a AdapterAttributes) GetAPIGroup() string
func (AdapterAttributes) GetAPIVersion ¶
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 ¶
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 ¶
func (a AdapterAttributes) GetResource() string
func (AdapterAttributes) GetSubresource ¶
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 ¶
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