secretsmanager

package
v0.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package secretsmanager provides emulation of AWS Secrets Manager. See docs/services/secretsmanager.md for the support matrix.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler holds Secrets Manager handler dependencies.

func (*Handler) BatchGetSecretValue

func (h *Handler) BatchGetSecretValue(w http.ResponseWriter, r *http.Request)

func (*Handler) CancelRotateSecret

func (h *Handler) CancelRotateSecret(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateSecret

func (h *Handler) CreateSecret(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteResourcePolicy

func (h *Handler) DeleteResourcePolicy(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteSecret

func (h *Handler) DeleteSecret(w http.ResponseWriter, r *http.Request)

func (*Handler) DescribeSecret

func (h *Handler) DescribeSecret(w http.ResponseWriter, r *http.Request)

func (*Handler) GetRandomPassword

func (h *Handler) GetRandomPassword(w http.ResponseWriter, r *http.Request)

func (*Handler) GetResourcePolicy

func (h *Handler) GetResourcePolicy(w http.ResponseWriter, r *http.Request)

func (*Handler) GetSecretValue

func (h *Handler) GetSecretValue(w http.ResponseWriter, r *http.Request)

func (*Handler) ListSecretVersionIds

func (h *Handler) ListSecretVersionIds(w http.ResponseWriter, r *http.Request)

func (*Handler) ListSecrets

func (h *Handler) ListSecrets(w http.ResponseWriter, r *http.Request)

func (*Handler) PutResourcePolicy

func (h *Handler) PutResourcePolicy(w http.ResponseWriter, r *http.Request)

func (*Handler) PutSecretValue

func (h *Handler) PutSecretValue(w http.ResponseWriter, r *http.Request)

func (*Handler) RemoveRegionsFromReplication

func (h *Handler) RemoveRegionsFromReplication(w http.ResponseWriter, r *http.Request)

func (*Handler) ReplicateSecretToRegions

func (h *Handler) ReplicateSecretToRegions(w http.ResponseWriter, r *http.Request)

func (*Handler) RestoreSecret

func (h *Handler) RestoreSecret(w http.ResponseWriter, r *http.Request)

func (*Handler) RotateSecret

func (h *Handler) RotateSecret(w http.ResponseWriter, r *http.Request)

func (*Handler) TagResource

func (h *Handler) TagResource(w http.ResponseWriter, r *http.Request)

func (*Handler) UntagResource

func (h *Handler) UntagResource(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateSecret

func (h *Handler) UpdateSecret(w http.ResponseWriter, r *http.Request)

func (*Handler) ValidateResourcePolicy

func (h *Handler) ValidateResourcePolicy(w http.ResponseWriter, r *http.Request)

type RotationRules

type RotationRules struct {
	AutomaticallyAfterDays int64 `json:"AutomaticallyAfterDays,omitempty" cbor:"AutomaticallyAfterDays,omitempty"`
}

RotationRules describes the automatic rotation schedule.

type Secret

type Secret struct {
	ARN               string          `json:"ARN"`
	Name              string          `json:"Name"`
	Description       string          `json:"Description,omitempty"`
	Tags              []Tag           `json:"Tags,omitempty"`
	Versions          []SecretVersion `json:"Versions"`
	CurrentVersionId  string          `json:"CurrentVersionId"`
	CreatedDate       float64         `json:"CreatedDate"`
	LastChangedDate   float64         `json:"LastChangedDate"`
	RotationEnabled   bool            `json:"RotationEnabled,omitempty"`
	RotationRules     *RotationRules  `json:"RotationRules,omitempty"`
	RotationLambdaARN string          `json:"RotationLambdaARN,omitempty"`
}

Secret is the full domain model stored for each secret.

type SecretVersion

type SecretVersion struct {
	VersionId    string   `json:"VersionId" cbor:"VersionId"`
	SecretString string   `json:"SecretString,omitempty" cbor:"SecretString,omitempty"`
	SecretBinary string   `json:"SecretBinary,omitempty" cbor:"SecretBinary,omitempty"` // base64-encoded
	Stages       []string `json:"VersionStages" cbor:"VersionStages"`
	CreatedDate  float64  `json:"CreatedDate" cbor:"CreatedDate"`
}

SecretVersion holds the payload for one version of a secret.

type Service

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

Service implements router.Service for Secrets Manager.

func New

func New(cfg *config.Config, store state.Store, logger *zap.Logger, clk clock.Clock) *Service

New returns a configured Secrets Manager Service.

func (*Service) Dispatch

func (s *Service) Dispatch(w http.ResponseWriter, r *http.Request)

Dispatch routes to the correct Secrets Manager handler based on X-Amz-Target.

func (*Service) InitBus

func (s *Service) InitBus(bus *events.Bus)

InitBus wires the event bus for secret lifecycle events.

func (*Service) Name

func (s *Service) Name() string

Name returns the service identifier.

func (*Service) Operations

func (s *Service) Operations() []op.Operation

Operations implements router.ProtocolService.

func (*Service) RegisterRoutes

func (s *Service) RegisterRoutes(r chi.Router)

RegisterRoutes mounts admin endpoints for the web console.

func (*Service) SupportedProtocols

func (s *Service) SupportedProtocols() []codec.Codec

SupportedProtocols implements router.ProtocolService.

func (*Service) TargetPrefix

func (s *Service) TargetPrefix() string

TargetPrefix returns the X-Amz-Target prefix for Secrets Manager dispatch.

type Tag

type Tag struct {
	Key   string `json:"Key" cbor:"Key"`
	Value string `json:"Value" cbor:"Value"`
}

Tag represents a key-value tag on a secret.

Jump to

Keyboard shortcuts

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