deks

package
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Config() *schemaregistry.Config
	RegisterKek(name string, kmsType string, kmsKeyID string, kmsProps map[string]string, doc string, shared bool) (kek Kek, err error)
	GetKek(name string, deleted bool) (kek Kek, err error)
	RegisterDek(kekName string, subject string, algorithm string, encryptedKeyMaterial string) (dek Dek, err error)
	GetDek(kekName string, subject string, algorithm string, deleted bool) (dek Dek, err error)
	RegisterDekVersion(kekName string, subject string, version int, algorithm string, encryptedKeyMaterial string) (dek Dek, err error)
	GetDekVersion(kekName string, subject string, version int, algorithm string, deleted bool) (dek Dek, err error)
	Close() error
}

Client is an interface for clients interacting with the Confluent DEK Registry. The DEK Registry's REST interface is further explained in Confluent's Schema Registry API documentation https://github.com/confluentinc/schema-registry/blob/master/client/src/main/java/io/confluent/kafka/schemaregistry/client/SchemaRegistryClient.java

func NewClient

func NewClient(conf *schemaregistry.Config) (Client, error)

NewClient returns a Client implementation

type CreateDekRequest

type CreateDekRequest struct {
	// Subject
	Subject string `json:"subject,omitempty"`
	// Version
	Version int `json:"version,omitempty"`
	// Algorithm
	Algorithm string `json:"algorithm,omitempty"`
	// EncryptedKeyMaterial
	EncryptedKeyMaterial string `json:"encryptedKeyMaterial,omitempty"`
}

CreateDekRequest represents a request to create a dek

type CreateKekRequest

type CreateKekRequest struct {
	// Name
	Name string `json:"name,omitempty"`
	// KmsType
	KmsType string `json:"kmsType,omitempty"`
	// KmsKeyID
	KmsKeyID string `json:"kmsKeyId,omitempty"`
	// KmsProps
	KmsProps map[string]string `json:"kmsProps,omitempty"`
	// Doc
	Doc string `json:"doc,omitempty"`
	// Shared
	Shared bool `json:"shared,omitempty"`
}

CreateKekRequest represents a request to create a kek

type Dek

type Dek struct {
	// KekName
	KekName string `json:"kekName,omitempty"`
	// Subject
	Subject string `json:"subject,omitempty"`
	// Version
	Version int `json:"version,omitempty"`
	// Algorithm
	Algorithm string `json:"algorithm,omitempty"`
	// EncryptedKeyMaterial
	EncryptedKeyMaterial string `json:"encryptedKeyMaterial,omitempty"`
	// EncryptedKeyMaterialBytes
	EncryptedKeyMaterialBytes []byte `json:"-"`
	// KeyMaterial
	KeyMaterial string `json:"keyMaterial,omitempty"`
	// KeyMaterialBytes
	KeyMaterialBytes []byte `json:"-"`
	// Ts
	Ts int64 `json:"ts,omitempty"`
	// Deleted
	Deleted bool `json:"deleted,omitempty"`
}

Dek represents a Data Encryption Key

func (*Dek) GetEncryptedKeyMaterialBytes

func (d *Dek) GetEncryptedKeyMaterialBytes() ([]byte, error)

GetEncryptedKeyMaterialBytes returns the EncryptedKeyMaterialBytes

func (*Dek) GetKeyMaterialBytes

func (d *Dek) GetKeyMaterialBytes() ([]byte, error)

GetKeyMaterialBytes returns the KeyMaterialBytes

func (*Dek) SetKeyMaterial

func (d *Dek) SetKeyMaterial(keyMaterialBytes []byte)

SetKeyMaterial sets the KeyMaterial using the given bytes

type DekID

type DekID struct {
	// KekName
	KekName string
	// Subject
	Subject string
	// Version
	Version int
	// Algorithm
	Algorithm string
	// Deleted
	Deleted bool
}

DekID represents a Key Encryption Key ID

type Kek

type Kek struct {
	// Name
	Name string `json:"name,omitempty"`
	// KmsType
	KmsType string `json:"kmsType,omitempty"`
	// KmsKeyID
	KmsKeyID string `json:"kmsKeyId,omitempty"`
	// KmsProps
	KmsProps map[string]string `json:"kmsProps,omitempty"`
	// Doc
	Doc string `json:"doc,omitempty"`
	// Shared
	Shared bool `json:"shared,omitempty"`
	// Ts
	Ts int64 `json:"ts,omitempty"`
	// Deleted
	Deleted bool `json:"deleted,omitempty"`
}

Kek represents a Key Encryption Key

type KekID

type KekID struct {
	// Name
	Name string
	// Deleted
	Deleted bool
}

KekID represents a Key Encryption Key ID

Jump to

Keyboard shortcuts

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