aws

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManagerWithDefaultConfig

func NewManagerWithDefaultConfig(
	rolePrefix string,
	secretPrefix string,
	region string,
) *Manager

func NewManagerWithWebIdToken

func NewManagerWithWebIdToken(
	rolePrefix string,
	secretPrefix string,
	region string,
	roleARN string,
	tokenPath string,
) *Manager

func (*Manager) AttachIAMPolicy

func (m *Manager) AttachIAMPolicy(namespace, name, serviceAccountName string) error

Attach a secret's IAM policy to a service account IAM role

func (*Manager) CreateSecret

func (m *Manager) CreateSecret(namespace, name, value string) error

Create a secret with the given string value. The secret will be logically scoped to the provided namespace (i.e. will only bind to service account roles also in that namespace).

func (*Manager) CreateSecretIAMPolicy

func (m *Manager) CreateSecretIAMPolicy(namespace, name, arn string) error

Create an IAM policy that allows reading a secret with the provided namespace/name and ARN

func (*Manager) DeleteSecret

func (m *Manager) DeleteSecret(namespace, name string) error

Delete a secret with the given name.

func (*Manager) DeleteSecretIAMPolicy

func (m *Manager) DeleteSecretIAMPolicy(namespace, name string) error

Delete IAM Policy for a secret with the given name.

func (*Manager) GetIAMPolicy

func (m *Manager) GetIAMPolicy(namespace, name string) (*iam.GetPolicyOutput, error)

Gets the IAM policy with namesapce and name.

func (*Manager) GetSecret

func (m *Manager) GetSecret(namespace, name string) (*sm.DescribeSecretOutput, error)

Gets the secret with namesapce and name.

func (*Manager) ListSecrets

func (m *Manager) ListSecrets(namespace string) ([]string, error)

Returns a list of all secret names for given namespace. It uses the short name defined in tags rather than the full secret name used in AWS.

func (*Manager) UpdateSecret

func (m *Manager) UpdateSecret(namespace, name, value string) error

Update a secret with the given string value in the namespace provided.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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