Documentation
¶
Overview ¶
Package awscheck is `dormeto aws check`: which permissions the profile lacks for each `dormeto aws` method, from IAM's simulation of its policies (iam:SimulatePrincipalPolicy). A caller of the manager's API is an administrator in the manager, so IAM is its only limit: apigateway:GET to find the API, execute-api:Invoke on the routes a method calls (fleet.Routes), and the install's and the estimate's own actions. It reads; it never writes.
Index ¶
Constants ¶
const Invoke = "execute-api:Invoke"
Invoke is the permission of a route.
Variables ¶
This section is empty.
Functions ¶
func EstimateActions ¶
func EstimateActions() []string
EstimateActions are the estimate's read actions: the adapters' operations (internal/aws.ReadOnlyOperations) as IAM names them.
Types ¶
type CommandReport ¶
type CommandReport struct {
Command string `json:"command"`
Checked bool `json:"checked"`
Held []string `json:"held"`
Missing []string `json:"missing"`
}
CommandReport is the verdict for one method: what it needs, held or missing; Checked false when IAM's simulation could not tell (a warning says why).
func (CommandReport) OK ¶
func (c CommandReport) OK() bool
OK tells a method not known to lack a permission.
type IAM ¶
type IAM interface {
install.Simulator
ListAccountAliases(ctx context.Context, in *iam.ListAccountAliasesInput, optFns ...func(*iam.Options)) (*iam.ListAccountAliasesOutput, error)
}
IAM is the iam client's calls the check makes: the simulation, and the account's alias.
type Manager ¶
Manager is the manager the command found: its API (its name when found by name, else the URL given), the API's id ("" when the URL is not an execute-api one) and region, its version ("" when it could not be read, VersionErr says why), and whether it was found by name, which needs apigateway:GET.
type ManagerReport ¶
ManagerReport is the manager as the report names it.
type Report ¶
type Report struct {
Account string `json:"account"`
Caller string `json:"caller"`
Manager *ManagerReport `json:"manager"`
Commands []CommandReport `json:"commands"`
Warnings []string `json:"warnings"`
// contains filtered or unexported fields
}
Report is the result of Check.