iam

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolvePolicyARN added in v0.3.1

func ResolvePolicyARN(role string) string

ResolvePolicyARN expands a bare policy name (e.g. "AdministratorAccess") into its AWS-managed ARN. ARNs are returned untouched. Used so callers can pass either form to the role-binding-check payload.

Types

type Driver added in v0.0.9

type Driver struct {
	Client        *api.Client
	Region        string
	DefaultRegion string
	Username      string
	Password      string
}

func (*Driver) AddUser added in v0.0.9

func (d *Driver) AddUser() (schema.IAMResult, error)

func (*Driver) AttachPolicy added in v0.3.1

func (d *Driver) AttachPolicy(ctx context.Context, userName, policyARN string) error

AttachPolicy binds policyARN to userName.

func (*Driver) CreateAccessKey added in v0.3.1

func (d *Driver) CreateAccessKey(ctx context.Context, userName string) (schema.IAMCredential, string, error)

CreateAccessKey mints a new IAM access key for userName. The secret is returned once and only once on creation; callers must capture it.

func (*Driver) DelUser added in v0.0.9

func (d *Driver) DelUser() (schema.IAMResult, error)

func (*Driver) DeleteAccessKey added in v0.3.1

func (d *Driver) DeleteAccessKey(ctx context.Context, userName, accessKeyID string) error

DeleteAccessKey revokes an IAM access key by ID.

func (*Driver) DetachPolicy added in v0.3.1

func (d *Driver) DetachPolicy(ctx context.Context, userName, policyARN string) error

DetachPolicy removes policyARN from userName.

func (*Driver) ListAccessKeys added in v0.3.1

func (d *Driver) ListAccessKeys(ctx context.Context, userName string) ([]schema.IAMCredential, error)

ListAccessKeys enumerates IAM access keys for userName. AWS requires the user name when the caller is not the same principal; an empty userName lets AWS fall back to the current user.

func (*Driver) ListRoleBindings added in v0.3.1

func (d *Driver) ListRoleBindings(ctx context.Context, userName string) ([]schema.RoleBinding, error)

ListRoleBindings returns the managed policies attached to userName. AWS IAM has no account-wide enumeration of attachments; userName is required.

func (*Driver) ListUsers added in v0.1.7

func (d *Driver) ListUsers(ctx context.Context) ([]schema.User, error)

Jump to

Keyboard shortcuts

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