dynamicfile

package
v0.6.13 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RoleNotFound = errors.New("Role not found in dynamic file")

RoleNotFound is the error returned when the role is not found in the config map.

View Source
var UserNotFound = errors.New("User not found in dynamic file")

UserNotFound is the error returned when the user is not found in the config map.

Functions

This section is empty.

Types

type DynamicFileData

type DynamicFileData struct {
	// RoleMappings is a list of mappings from AWS IAM Role to
	// Kubernetes username + groups.
	RoleMappings []config.RoleMapping `json:"mapRoles"`

	// UserMappings is a list of mappings from AWS IAM User to
	// Kubernetes username + groups.
	UserMappings []config.UserMapping `json:"mapUsers"`
	// AutoMappedAWSAccounts is a list of AWS accounts that are allowed without an explicit user/role mapping.
	// IAM ARN from these accounts automatically maps to the Kubernetes username.
	AutoMappedAWSAccounts []string `json:"mapAccounts"`
}

type DynamicFileMapStore

type DynamicFileMapStore struct {
	// contains filtered or unexported fields
}

func NewDynamicFileMapStore

func NewDynamicFileMapStore(cfg config.Config) (*DynamicFileMapStore, error)

func (*DynamicFileMapStore) AWSAccount

func (ms *DynamicFileMapStore) AWSAccount(id string) bool

func (*DynamicFileMapStore) CallBackForFileDeletion added in v0.5.18

func (ms *DynamicFileMapStore) CallBackForFileDeletion() error

func (*DynamicFileMapStore) CallBackForFileLoad added in v0.5.18

func (ms *DynamicFileMapStore) CallBackForFileLoad(dynamicContent []byte) error

func (*DynamicFileMapStore) LogMapping

func (ms *DynamicFileMapStore) LogMapping()

func (*DynamicFileMapStore) RoleMapping

func (ms *DynamicFileMapStore) RoleMapping(arn string) (config.RoleMapping, error)

func (*DynamicFileMapStore) UserMapping

func (ms *DynamicFileMapStore) UserMapping(arn string) (config.UserMapping, error)

type DynamicFileMapper

type DynamicFileMapper struct {
	*DynamicFileMapStore
}

func NewDynamicFileMapper

func NewDynamicFileMapper(cfg config.Config) (*DynamicFileMapper, error)

func (*DynamicFileMapper) IsAccountAllowed

func (m *DynamicFileMapper) IsAccountAllowed(accountID string) bool

func (*DynamicFileMapper) Map

func (*DynamicFileMapper) Name

func (m *DynamicFileMapper) Name() string

func (*DynamicFileMapper) Start

func (m *DynamicFileMapper) Start(stopCh <-chan struct{}) error

func (*DynamicFileMapper) UsernamePrefixReserveList added in v0.5.15

func (m *DynamicFileMapper) UsernamePrefixReserveList() []string

type ErrParsingMap

type ErrParsingMap struct {
	// contains filtered or unexported fields
}

func (ErrParsingMap) Error

func (err ErrParsingMap) Error() string

Jump to

Keyboard shortcuts

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