sts

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package sts is doze-aws's local Security Token Service. STS is the identity hinge of the AWS SDK ecosystem: countless tools call GetCallerIdentity on startup and AssumeRole to build sessions, and fail hard when no endpoint answers. Locally there is exactly one identity and nothing to authenticate, so every operation answers instantly with the fixed doze-aws account and freshly minted throwaway credentials.

The service is stateless: Options.DataDir is accepted for constructor uniformity with the other services and never used.

See docs/api-support/sts.md for the operation-by-operation support table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// DataDir is accepted for uniformity with the stateful services; STS
	// stores nothing.
	DataDir string
	// Logf receives one line per handled request; nil discards.
	Logf func(format string, args ...any)
	// Clock overrides time.Now in tests.
	Clock func() time.Time
}

Options configures the service. All fields are optional.

type Server

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

Server is the STS service: an http.Handler speaking the Query/XML protocol, and an io.Closer for uniformity (closing is a no-op).

func New

func New(opts Options) (*Server, error)

New builds the service.

func (*Server) Close

func (s *Server) Close() error

Close is a no-op; STS holds no resources.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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