sts

package
v0.0.1-alpha.21 Latest Latest
Warning

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

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

Documentation

Overview

Package sts provides emulation of AWS Security Token Service (STS).

Uses the AWS Query protocol: form-encoded POST body, XML responses. Supported operations:

  • GetCallerIdentity
  • GetSessionToken
  • GetFederationToken
  • AssumeRole
  • AssumeRoleWithWebIdentity

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 STS handler dependencies.

func (*Handler) AssumeRole

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

AssumeRole returns temporary credentials for the assumed role.

func (*Handler) AssumeRoleWithWebIdentity

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

AssumeRoleWithWebIdentity returns temporary credentials for a web identity.

func (*Handler) GetCallerIdentity

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

GetCallerIdentity returns the account/user identity for the request.

func (*Handler) GetFederationToken

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

GetFederationToken returns temporary credentials for a federated user.

func (*Handler) GetSessionToken

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

GetSessionToken returns temporary credentials.

type Service

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

Service implements router.Service and router.QueryDispatcher for STS.

func New

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

New returns a configured STS Service.

func (*Service) DispatchQuery

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

DispatchQuery satisfies router.QueryDispatcher. STS uses the AWS Query protocol: form-encoded POST body with Action field, XML responses.

func (*Service) InitBus

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

InitBus wires the event bus for informational events.

func (*Service) Name

func (s *Service) Name() string

Name satisfies router.Service.

func (*Service) Operations

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

Operations implements router.ProtocolService.

func (*Service) OwnsAction

func (s *Service) OwnsAction(action string) bool

OwnsAction satisfies router.QueryActionOwner.

func (*Service) RegisterRoutes

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

RegisterRoutes satisfies router.Service. STS has no path-routed endpoints.

func (*Service) SupportedProtocols

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

SupportedProtocols implements router.ProtocolService.

Jump to

Keyboard shortcuts

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