bundle

package
v1.16.6 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DefaultKeyThumbprintAlgorithm
	DefaultKeyThumbprintAlgorithm = crypto.SHA256
	// DefaultJWTSignatureAlgorithm is set to RS256 by default as it is the most compatible algorithm.
	DefaultJWTSignatureAlgorithm = jwa.RS256
)

Variables

This section is empty.

Functions

func GenerateWorkloadCert

func GenerateWorkloadCert(sig x509.SignatureAlgorithm, ttl, skew time.Duration, id *spiffe.Parsed) (*x509.Certificate, error)

GenerateWorkloadCert returns a CA issuing x509 Certificate.

Types

type Bundle

type Bundle struct {
	X509 *X509
	JWT  *JWT
}

Bundle is the bundle of certificates and keys used by the CA.

type JWT

type JWT struct {
	// SigningKey is the private key used to sign JWTs.
	SigningKey crypto.Signer
	// SigningKeyPEM is the PEM encoded private key used to sign JWTs.
	SigningKeyPEM []byte
	// JWKS is the JWK set used to verify JWTs.
	JWKS jwk.Set
	// JWKSJson is the JSON encoded JWK set used to verify JWTs.
	JWKSJson []byte
}

func GenerateJWT

func GenerateJWT(opts OptionsJWT) (*JWT, error)

type OptionsJWT

type OptionsJWT struct {
	TrustDomain string
	JWTRootKey  crypto.Signer
}

type OptionsX509

type OptionsX509 struct {
	X509RootKey      crypto.Signer
	TrustDomain      string
	AllowedClockSkew time.Duration
	OverrideCATTL    *time.Duration // Optional override for CA TTL
}

type X509

type X509 struct {
	// TrustAnchors is the PEM encoded trust anchors.
	TrustAnchors []byte
	// IssChainPEM is the PEM encoded issuer certificate chain.
	IssChainPEM []byte
	// IssKeyPEM is the PEM encoded issuer private key.
	IssKeyPEM []byte
	// IssChain is the issuer certificate chain.
	IssChain []*x509.Certificate
	// IssKey is the issuer private key.
	IssKey any
}

func GenerateX509

func GenerateX509(opts OptionsX509) (*X509, error)

Jump to

Keyboard shortcuts

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