config

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package config manages config for the auth service

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

Package config manages config for the auth service

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

Index

Constants

View Source
const (
	SigningKeyUsage   = "sig"
	PublicKeyPEMType  = "PUBLIC KEY"
	PrivateKeyPEMType = "PRIVATE KEY"
	MinRSAKeyBits     = 2048
)

Constants for creating RSA keys and key set

View Source
const (
	ServiceName = "AuthN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfManager

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

ConfManager Used by AuthN to interface with the shared authN config used on both API and server-side Provides utilities used only by the authN service (not API)

func NewConfManager

func NewConfManager() *ConfManager

func (*ConfManager) GetConf

func (cm *ConfManager) GetConf() *authn.Config

func (*ConfManager) GetDefaultTimeout

func (cm *ConfManager) GetDefaultTimeout() time.Duration

func (*ConfManager) GetExpiry

func (cm *ConfManager) GetExpiry() time.Duration

func (*ConfManager) GetKeySet

func (cm *ConfManager) GetKeySet() jwk.Set

func (*ConfManager) GetLogDir

func (cm *ConfManager) GetLogDir() string

func (*ConfManager) GetPort

func (cm *ConfManager) GetPort() (s string)

func (*ConfManager) GetPrivateKey

func (cm *ConfManager) GetPrivateKey() *rsa.PrivateKey

func (*ConfManager) GetPublicKeyString

func (cm *ConfManager) GetPublicKeyString() *string

func (*ConfManager) GetSecret

func (cm *ConfManager) GetSecret() cmn.Censored

func (*ConfManager) GetSecretChecksum

func (cm *ConfManager) GetSecretChecksum() string

func (*ConfManager) GetServerCert

func (cm *ConfManager) GetServerCert() string

func (*ConfManager) GetServerKey

func (cm *ConfManager) GetServerKey() string

func (*ConfManager) GetSigConf

func (cm *ConfManager) GetSigConf() (*cmn.AuthSignatureConf, error)

func (*ConfManager) HasHMACSecret

func (cm *ConfManager) HasHMACSecret() bool

func (*ConfManager) Init

func (cm *ConfManager) Init(configPath string)

func (*ConfManager) IsHTTPS

func (cm *ConfManager) IsHTTPS() bool

func (*ConfManager) IsVerbose

func (cm *ConfManager) IsVerbose() bool

func (*ConfManager) ParseExternalURL

func (cm *ConfManager) ParseExternalURL() (*url.URL, error)

func (*ConfManager) SaveToDisk

func (cm *ConfManager) SaveToDisk(configPath string) error

func (*ConfManager) UpdateConf

func (cm *ConfManager) UpdateConf(cu *authn.ConfigToUpdate) error

type RSAKeyManager

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

RSAKeyManager is responsible for the lifecycle of RSA key pairs TODO: currently, only written at init time; key rotation will require sync

func NewRSAKeyManager

func NewRSAKeyManager(keyFilePath string, keySize int) *RSAKeyManager

func (*RSAKeyManager) GetPrivateKey

func (r *RSAKeyManager) GetPrivateKey() *rsa.PrivateKey

func (*RSAKeyManager) GetPublicKeyPEM

func (r *RSAKeyManager) GetPublicKeyPEM() 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

Jump to

Keyboard shortcuts

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