signing

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package signing manages keys the auth service uses for signing and verification

  • Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.

Package signing manages keys the auth service uses for signing and verification

  • Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.

Index

Constants

View Source
const (
	MinPassphraseLength  = 8
	MinPassphraseEntropy = 3
)

Constants for creating RSA keys and key set

Variables

This section is empty.

Functions

func NewHMACSigner

func NewHMACSigner(secret cmn.Censored) tok.Signer

Types

type AsymmetricKeySigner

type AsymmetricKeySigner interface {
	GetPubKey() string
	RotateKey() error
}

type JWKSProvider

type JWKSProvider interface {
	GetJWKS() (jwk.Set, error)
}

type RSAKeyManager

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

RSAKeyManager is responsible for the lifecycle of RSA key pairs

func NewRSAKeyManager

func NewRSAKeyManager(conf *config.RSAKeyConfig, passphrase cmn.Censored, db kvdb.AuthStorageDriver) *RSAKeyManager

func (*RSAKeyManager) GetJWKS

func (r *RSAKeyManager) GetJWKS() (jwk.Set, error)

func (*RSAKeyManager) GetPubKey

func (r *RSAKeyManager) GetPubKey() string

func (*RSAKeyManager) Init

func (r *RSAKeyManager) Init() error

Init sets up an RSA key pair, using one from disk if provided Must only be called at init time -- key rotation not yet implemented

func (*RSAKeyManager) ResolveKey

func (r *RSAKeyManager) ResolveKey(_ context.Context, t *jwt.Token) (any, error)

func (*RSAKeyManager) RotateKey

func (r *RSAKeyManager) RotateKey() error

func (*RSAKeyManager) SignToken

func (r *RSAKeyManager) SignToken(c jwt.Claims) (string, error)

SignToken signs JWT claims with the current RSA private key and includes the key ID header

func (*RSAKeyManager) ValidationConf

func (r *RSAKeyManager) ValidationConf() *authn.ServerConf

Jump to

Keyboard shortcuts

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