bindmanager

package
v0.0.0-...-9cdaeea Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EffectAllow                     = "Allow"
	ActionAssumeRoleWithWebIdentity = "sts:AssumeRoleWithWebIdentity"
	SidLabelFormat                  = "Allow Service Account %s %s"
	SubjectFormat                   = "system:serviceaccount:%s:%s"
)

Variables

This section is empty.

Functions

func SidLabel

func SidLabel(name, namespace string) string

Types

type BindManager

type BindManager struct {
	iamrole.Interface
	// contains filtered or unexported fields
}

func New

func New(p iamrole.Interface, oidcArn string) *BindManager

New returns a new BindManager instance

func (*BindManager) Bind

func (b *BindManager) Bind(ctx context.Context, binding *Binding) error

Bind will establish a trust relationship between a role and a service account by allowing the service account to AssumeRoleWithWebIdentity

type Binding

type Binding struct {
	Role            *v1alpha1.IamRole
	ServiceAccounts []corev1.ObjectReference
}

type Manager

type Manager interface {
	Bind(ctx context.Context, binding *Binding) error
}

Jump to

Keyboard shortcuts

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