Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoImpersonationData is an error message for no impersonation data case ErrNoImpersonationData = errors.New("no impersonation data found") // ErrImpersonateUserRequired is an error message about required impersonate user to impersonate another info. ErrImpersonateUserRequired = errors.New("impersonate user is required to impersonate groups, UID, extra") )
Functions ¶
func HeaderMatcher ¶
HeaderMatcher matches the impersonation header for adding to GRPC metadata.
Types ¶
type Impersonation ¶
type Impersonation struct {
// contains filtered or unexported fields
}
Impersonation represents component to add Kubernetes impersonation header processing, make impersonation access check and RBAC for Tekton results resources with impersonated user data
func NewImpersonation ¶
func NewImpersonation(md metadata.MD) (*Impersonation, error)
NewImpersonation returns an impersonation request if any impersonation data is found, returns error otherwise.
func (*Impersonation) Check ¶
func (i *Impersonation) Check(ctx context.Context, authorizer authorizationclient.AuthorizationV1Interface, requester string) error
Check checks if the requester has permission to impersonate every resource.
func (*Impersonation) GetUserInfo ¶
func (i *Impersonation) GetUserInfo() *user.DefaultInfo
GetUserInfo returns the impersonated user information.
Click to show internal directories.
Click to hide internal directories.