Help us shape the future of Go! Take the 2026 Go Developer Survey

backendauth

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCredentialMissing = errors.New("per-request credential missing")

ErrCredentialMissing is returned when the per-request credential source is configured, the source is absent, and FallbackToConfigured is false. ProcessRequestHeaders converts this to a 401 ImmediateResponse.

View Source
var ErrIncompleteAWSCredential = errors.New("incomplete per-request AWS credential: access key ID and secret access key must both be present")

ErrIncompleteAWSCredential means the source carried some but not all of the SigV4 inputs. Failing beats falling back: the filter upstream is misconfigured, and signing with the gateway's own identity would attribute the request to the wrong principal.

Functions

func NewHandler

NewHandler returns a new implementation of filterapi.BackendAuthHandler based on the configuration. When config.CredentialOverride is set, the returned handler sources the upstream credential per-request and falls back to the static credential (or returns 401) as configured.

func WithEnvoyMetadata added in v1.1.0

func WithEnvoyMetadata(ctx context.Context, md *corev3.Metadata) context.Context

WithEnvoyMetadata stores the Envoy dynamic metadata context so the credential override handler can read it without changing the BackendAuthHandler interface. When md is nil (Envoy sent no metadata), ctx is returned unchanged so that envoyMetadataFromContext still returns nil — the handler then follows its fallback path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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