kvdb

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package kvdb contains authN server code for interacting with a persistent key-value store

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

Index

Constants

View Source
const (
	EmptyDB dbType = ""
	BuntDB  dbType = "BuntDB"
)
View Source
const KeyMetadataVersion = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthStorageDriver

type AuthStorageDriver interface {
	LoadKeyData() (*KeyData, error)
	PersistKeyData(m *KeyData) error
}

AuthStorageDriver loads and persists key metadata (JWKS and related fields) as one unit.

type Driver

type Driver struct {
	kvdb.Driver
}

Driver wraps a kvdb.Driver and adds authn-specific capabilities. It implements both cmn/kvdb.Driver (via embedding) and AuthStorageDriver.

func CreateDriver

func CreateDriver(cm *config.ConfManager) *Driver

func (*Driver) LoadKeyData

func (d *Driver) LoadKeyData() (*KeyData, error)

func (*Driver) PersistKeyData

func (d *Driver) PersistKeyData(m *KeyData) error

type KeyData

type KeyData struct {
	MetaVersion int     `json:"meta_version"`
	JWKS        jwk.Set `json:"-"`
}

KeyData is the single unit of storage for auth key state (JWKS and future fields). It is read/written atomically. MetaVersion is the schema version of this struct.

func (*KeyData) MarshalJSON

func (m *KeyData) MarshalJSON() ([]byte, error)

func (*KeyData) UnmarshalJSON

func (m *KeyData) UnmarshalJSON(data []byte) error

Directories

Path Synopsis
Package mock contains mocks for authN kvdb interfaces
Package mock contains mocks for authN kvdb interfaces

Jump to

Keyboard shortcuts

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