iamauth

package
v2.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package iamauth provides a way to interact with AWS IAM.

Index

Constants

View Source
const (
	// EC2NodeUserName is the username required for EC2 nodes.
	EC2NodeUserName = "system:node:{{EC2PrivateDNSName}}"
)

Variables

View Source
var (
	// ErrInvalidBackendType defines an error for an invalid backend type.
	ErrInvalidBackendType = errors.New("invalid backend type")

	// ErrClientRequired defines an error for when a k8s client is required but
	// not supplied.
	ErrClientRequired = errors.New("k8s client required")
)
View Source
var (
	// BackendTypeConfigMap is the Kubernetes config map backend.
	BackendTypeConfigMap = BackendType("config-map")
	// BackendTypeCRD is the CRD based backend.
	BackendTypeCRD = BackendType("crd")
)
View Source
var (
	// NodeGroups is the groups that are required for a node.
	NodeGroups = []string{"system:bootstrappers", "system:nodes"}
)

Functions

This section is empty.

Types

type AuthenticatorBackend

type AuthenticatorBackend interface {
	// MapRole is used to map a role ARN to a user and set of groups
	MapRole(mapping ekscontrolplanev1.RoleMapping) error
	// MapUser is used to map a user ARN to a user and set of groups
	MapUser(mapping ekscontrolplanev1.UserMapping) error
}

AuthenticatorBackend is the interface that represents an aws-iam-authenticator backend.

func NewBackend

func NewBackend(backendType BackendType, client crclient.Client) (AuthenticatorBackend, error)

NewBackend will create a new authenticate backend for a given type. Only use BackendTypeConfigMap with EKS.

type BackendType

type BackendType string

BackendType is a type that represents the different aws-iam-authenticator backends.

type Service

type Service struct {
	IAMClient iamiface.IAMAPI
	// contains filtered or unexported fields
}

Service defines the specs for a service.

func NewService

func NewService(iamScope scope.IAMAuthScope, backend BackendType, client client.Client) *Service

NewService will create a new Service object.

func (*Service) ReconcileIAMAuthenticator

func (s *Service) ReconcileIAMAuthenticator(ctx context.Context) error

ReconcileIAMAuthenticator is used to create the aws-iam-authenticator in a cluster.

Directories

Path Synopsis
Package mock_iamauth provides a mock implementation for the IAMAPI interface.
Package mock_iamauth provides a mock implementation for the IAMAPI interface.

Jump to

Keyboard shortcuts

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