iam

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package iam implements various IAM components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate added in v0.6.7

func Validate(
	lg *zap.Logger,
	iamAPI iamiface.IAMAPI,
	roleName string,
	requiredSPs []string,
	requiredPolicyARNs []string,
) error

Validate validates IAM role.

func ValidateV2 added in v1.6.1

func ValidateV2(
	lg *zap.Logger,
	iamAPIV2 *aws_iam_v2.Client,
	roleName string,
	requiredSPs []string,
	requiredPolicyARNs []string,
) error

Validate validates IAM role.

Types

type AssumeRolePolicyDocument added in v0.6.7

type AssumeRolePolicyDocument struct {
	Version   string                               `json:"Version"`
	Statement []*AssumeRolePolicyDocumentStatement `json:"Statement"`
}

type AssumeRolePolicyDocumentSingle added in v0.6.9

type AssumeRolePolicyDocumentSingle struct {
	Version   string                                     `json:"Version"`
	Statement []*AssumeRolePolicyDocumentStatementSingle `json:"Statement"`
}

type AssumeRolePolicyDocumentStatement added in v0.6.7

type AssumeRolePolicyDocumentStatement struct {
	Effect    string          `json:"Effect"`
	Principal *PrincipalEntry `json:"Principal,omitempty"`
}

type AssumeRolePolicyDocumentStatementSingle added in v0.6.9

type AssumeRolePolicyDocumentStatementSingle struct {
	Effect    string                `json:"Effect"`
	Principal *PrincipalEntrySingle `json:"Principal,omitempty"`
}

type PolicyDocument

type PolicyDocument struct {
	Version   string
	Statement []StatementEntry
}

PolicyDocument is the IAM policy document.

type PrincipalEntry

type PrincipalEntry struct {
	Service []string `json:"Service,omitempty"`
}

PrincipalEntry represents the policy document Principal.

type PrincipalEntrySingle added in v0.6.9

type PrincipalEntrySingle struct {
	Service string `json:"Service,omitempty"`
}

PrincipalEntrySingle represents the policy document Principal.

type StatementEntry

type StatementEntry struct {
	Effect    string          `json:"Effect,omitempty"`
	Action    []string        `json:"Action,omitempty"`
	Resource  string          `json:"Resource,omitempty"`
	Principal *PrincipalEntry `json:"Principal,omitempty"`
}

StatementEntry is the entry in IAM policy document "Statement" field.

Jump to

Keyboard shortcuts

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