aws_config_server

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRouter

func GetRouter(
	ctx context.Context,
	config *RouterConfig,
) *httprouter.Router

func Health

func Index

func Index(
	awsGenerationParams *AWSConfigGenerationParams,
	cachedClientIDtoProfiles *CachedGetClientIDToProfiles,
	oktaClient okta.AppResource,
) httprouter.Handle

func MapClientIDRoleARN

func MapClientIDRoleARN(ctx context.Context, acctName, oidcProvider string, svc iamiface.IAMAPI, clientRoleMapping map[string][]ConfigProfile) error

Types

type AWSConfigGenerationParams

type AWSConfigGenerationParams struct {
	OIDCProvider   string
	AWSWorkerRole  string
	AWSMasterRoles []string
}

type Action

type Action []string

func (*Action) UnmarshalJSON

func (s *Action) UnmarshalJSON(data []byte) error

type CachedGetClientIDToProfiles

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

func NewCachedGetClientIDToProfiles

func NewCachedGetClientIDToProfiles(
	ctx context.Context,
	configParams *AWSConfigGenerationParams,
	awsSession *session.Session,
) (*CachedGetClientIDToProfiles, error)

func (*CachedGetClientIDToProfiles) Get

Get returns the cached values

type ClientIDToAWSRoles

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

type Condition

type Condition struct {
	StringEquals map[string]string `json:"StringEquals"`
}

We only care about the "StringEquals" field in Condition

type ConfigProfile

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

type PolicyDocument

type PolicyDocument struct {
	Version    string           `json:"Version"`
	Statements []StatementEntry `json:"Statement"`
}

type Principal

type Principal struct {
	Federated string `json:"Federated"`
}

We only care about the "Federated" field in Principal

type RouterConfig

type RouterConfig struct {
	Verifier              oidcVerifier
	AwsGenerationParams   *AWSConfigGenerationParams
	OktaAppClient         okta.AppResource
	GetClientIDToProfiles *CachedGetClientIDToProfiles
}

type StatementEntry

type StatementEntry struct {
	Effect    string    `json:"Effect"`
	Action    Action    `json:"Action"`
	Sid       string    `json:"Sid"`
	Principal Principal `json:"Principal"`
	Condition Condition `json:"Condition"`
}

Jump to

Keyboard shortcuts

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