Documentation
¶
Index ¶
- Constants
- Variables
- type Condition
- type Document
- func AssumeRolePolicyDocument(principal *Principal) *Document
- func ExtraAdministratorAssumeRolePolicy() (*Document, error)
- func ExtraAuditorAssumeRolePolicy() (*Document, error)
- func Merge(docs ...*Document) *Document
- func Unmarshal(b []byte) (*Document, error)
- func UnmarshalString(s string) (*Document, error)
- type Effect
- type Principal
- type Statement
Constants ¶
View Source
const ( AdministratorAccess = "arn:aws:iam::aws:policy/AdministratorAccess" ReadOnlyAccess = "arn:aws:iam::aws:policy/ReadOnlyAccess" AmazonAPIGatewayPushToCloudWatchLogs = "arn:aws:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" )
View Source
const ( ExtraAdministratorAssumeRolePolicyFilename = "substrate.Administrator.assume-role-policy.json" ExtraAuditorAssumeRolePolicyFilename = "substrate.Auditor.assume-role-policy.json" )
View Source
const ( AllowAssumeRoleName = "SubstrateAllowAssumeRole" DenySensitiveReadsName = "SubstrateDenySensitiveReads" )
Variables ¶
View Source
var ( AllowAssumeRole = &Document{ Statement: []Statement{{ Action: []string{"sts:AssumeRole"}, Effect: Allow, Resource: []string{"*"}, }}, } DenySensitiveReads = &Document{ Statement: []Statement{{ Action: []string{ "cloudformation:GetTemplate", "dynamodb:BatchGetItem", "dynamodb:GetItem", "dynamodb:Query", "dynamodb:Scan", "ec2:GetConsoleOutput", "ec2:GetConsoleScreenshot", "ecr:BatchGetImage", "ecr:GetAuthorizationToken", "ecr:GetDownloadUrlForLayer", "kinesis:Get*", "lambda:GetFunction", "logs:GetLogEvents", "s3:GetObject", "s3:GetObjectVersion", "sdb:Select*", "sqs:ReceiveMessage", }, Effect: Deny, Resource: []string{"*"}, }}, } )
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { Version version Statement []Statement // annoyingly signular because AWS made it singular }
func UnmarshalString ¶
func (*Document) MustMarshal ¶
type Principal ¶
type Principal struct { AWS jsonutil.StringSlice `json:",omitempty"` Federated jsonutil.StringSlice `json:",omitempty"` Service jsonutil.StringSlice `json:",omitempty"` }
type Statement ¶
type Statement struct { Effect Effect Principal *Principal `json:",omitempty"` Action jsonutil.StringSlice Resource jsonutil.StringSlice `json:",omitempty"` // omitempty for AssumeRolePolicyDocument Condition Condition `json:",omitempty"` Sid string `json:",omitempty"` }
Click to show internal directories.
Click to hide internal directories.