Documentation ¶
Index ¶
- func KubernetesAuthorizerAttributes(namespace string, user user.Info, oattrs oauthorizer.Action) kauthorizer.Attributes
- func NewAuthorizer(originAuthorizer oauthorizer.Authorizer) (kauthorizer.Authorizer, error)
- func OriginAuthorizerAttributes(kattrs kauthorizer.Attributes) (kapi.Context, oauthorizer.Action)
- type AdapterAttributes
- func (a AdapterAttributes) GetAPIGroup() string
- func (a AdapterAttributes) GetAPIVersion() 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) GetUser() user.Info
- 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, 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)