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

shared

package
v0.0.0-...-7984a60 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertWIT

func AssertWIT(wit string) error

AssertWIT takes a string representation of the workload identity token and asserts its contents based on the WIMSE S2S draft conditions for the JWS claims https://www.ietf.org/archive/id/draft-ietf-wimse-s2s-protocol-07.html#name-the-workload-identity-token

func GetWITHTTPSigner

func GetWITHTTPSigner(witSVIDKey string, signedHeaders []string, opts ...SignerOption) (*httpsign.Signer, error)

GetWITHTTPSigner takes a witSVIDKey (i.e. the private key provided by the identity server issuing WIT-SVIDs) in string format and a slice of signed headers before returning an httpsign.Signer instance to make WIMSE HTTP signatures requests with

func GetWITSVID

func GetWITSVID(spireAddr string) (*pb.WITSVID, error)

GetWITSVID retrieves a WIT SVID for the calling workload from an identity server implementing a WIMSE-compliant SPIFFE workload API. Running with minispire defaults to this address being unix:///tmp/spire.sock

Types

type SignerOption

type SignerOption func(*httpsign.SignConfig)

func WithClaims

func WithClaims(claims *jwt.Claims) SignerOption

WithClaims sets expiry based on JWT claims

func WithNonce

func WithNonce(nonce string) SignerOption

WithNonce sets the nonce in the signer config Note that a unique nonce is the responsibility of the request sender per the WIMSE S2S draft https://www.ietf.org/archive/id/draft-ietf-wimse-s2s-protocol-07.html#section-3.3-14

Jump to

Keyboard shortcuts

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