aws

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package aws resolves secret.KindAWS refs by fetching from AWS Secrets Manager. SigV4 signing uses only the Go standard library (no AWS SDK). Fetch-only: plaintext is held in memory, never written to Postgres.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Region      string
	Credentials Credentials
	// HTTPClient is optional; defaults to a 30s timeout client.
	HTTPClient *http.Client
	// Endpoint overrides the SM API host (tests only). Empty → regional endpoint.
	Endpoint string
	Now      func() time.Time
}

Config holds region and credentials for Secrets Manager fetch-only resolution.

func ConfigFromEnv

func ConfigFromEnv() (Config, error)

ConfigFromEnv reads AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and optional AWS_SESSION_TOKEN. Returns an error when required vars are missing.

type Credentials

type Credentials struct {
	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
}

Credentials are static AWS API keys (no instance profile / SSO chain).

type Resolver

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

Resolver fetches secrets from AWS Secrets Manager (KindAWS only).

func New

func New(cfg Config) *Resolver

New returns a Resolver for secret.KindAWS refs.

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, ref secret.Ref) ([]byte, error)

Jump to

Keyboard shortcuts

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