kv

package
v0.0.0-...-5004fd2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzKeyVaultServiceContextKey internalContextKey = iota
)

Variables

View Source
var (
	ErrAzKeyVaultItemNotFound = errors.New("az key vault key not found")
)

Functions

func GetMaterialName

func GetMaterialName(
	kind MaterialNameKind,
	nsProvider models.NamespaceProvider, nsID string, policyID string) string

func HandleAzKeyVaultError

func HandleAzKeyVaultError(err error) error

func NewAzCertSelfSigner

func NewAzCertSelfSigner(pCsr CSRProviderParams, pSigning SigningParams) *azcertKeyPair

func WithDelegatedAzSecretsClient

func WithDelegatedAzSecretsClient(c ctx.RequestContext, keyvaultEndpoint string) (ctx.RequestContext, *azsecrets.Client, error)

Types

type AzCertCSRProvider

type AzCertCSRProvider interface {
	GetCSRPublicKey(context.Context) (crypto.PublicKey, error)
	CollectCerts(context.Context, [][]byte) (*azcertificates.MergeCertificateResponse, error)
	Cleanup(context.Context)
}

func NewAzCSRProvider

func NewAzCSRProvider(pCsr CSRProviderParams) AzCertCSRProvider

type AzCertSigner

type AzCertSigner interface {
	crypto.Signer
	Load(context.Context) error
}

func NewAzCertSigner

func NewAzCertSigner(pSigning SigningParams, publicKey crypto.PublicKey) AzCertSigner

type AzKeyVaultService

type AzKeyVaultService interface {
	AzKeysClient() *azkeys.Client
	AzCertificatesClient() *azcertificates.Client
	AzSecretsClient() *azsecrets.Client
}

func GetAzKeyVaultService

func GetAzKeyVaultService(c context.Context) AzKeyVaultService

type CSRProviderParams

type CSRProviderParams struct {
	CertName      string
	KeyProperties azcertificates.KeyProperties
}

type MaterialNameKind

type MaterialNameKind string
const (
	MaterialNameKindCertificate    MaterialNameKind = "c"
	MaterialNameKindKey            MaterialNameKind = "k"
	MaterialNameKindSecret         MaterialNameKind = "s"
	MaterialNameKindCertificateKey MaterialNameKind = "ck"
)

type SigningParams

type SigningParams struct {
	CertID azcertificates.ID
	SigAlg azkeys.SignatureAlgorithm
}

Jump to

Keyboard shortcuts

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