kmsutil

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package kmsutil adapts an AWS KMS asymmetric key to crypto.Signer, so the private key never exists in this process. See docs/en/specs/assisted-claiming.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RSAPublicKey

func RSAPublicKey(ctx context.Context, keyID string) (*rsa.PublicKey, error)

func ResetPublicKeyCache

func ResetPublicKeyCache()

Types

type Signer

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

func NewRSASigner

func NewRSASigner(ctx context.Context, keyID string) (*Signer, error)

NewRSASigner needs only kms:Sign: minting reads no public half (the JWKS is published from RSAPublicKey by publish_discovery), so the key spec is enforced by KMS itself at Sign, keeping kms:GetPublicKey off every token-minting lambda.

func NewSigner

func NewSigner(ctx context.Context, keyID string) (*Signer, error)

func (*Signer) KeyID

func (s *Signer) KeyID() string

func (*Signer) Public

func (s *Signer) Public() crypto.PublicKey

func (*Signer) Sign

func (s *Signer) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)

Jump to

Keyboard shortcuts

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