Skip to content

docs(key_manager): update documentation #2152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions api/key_manager/v1alpha1/key_manager_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type DataKeyAlgorithmSymmetricEncryption string

const (
DataKeyAlgorithmSymmetricEncryptionUnknownSymmetricEncryption = DataKeyAlgorithmSymmetricEncryption("unknown_symmetric_encryption")
// AES-GCM (256-bits) is the only key algorithm currently supported by Key Manager.
// AES-GCM (256-bits) is the only data key algorithm currently supported by Key Manager.
DataKeyAlgorithmSymmetricEncryptionAes256Gcm = DataKeyAlgorithmSymmetricEncryption("aes_256_gcm")
)

Expand Down Expand Up @@ -123,7 +123,7 @@ const (
KeyStateEnabled = KeyState("enabled")
// The key cannot be used for cryptographic operations.
KeyStateDisabled = KeyState("disabled")
// Key material must be imported before you can use it for cryptographic operations.
// Key material must be imported before the key can be used for cryptographic operations.
KeyStatePendingKeyMaterial = KeyState("pending_key_material")
)

Expand Down Expand Up @@ -215,7 +215,7 @@ type KeyRotationPolicy struct {

// KeyUsage: key usage.
type KeyUsage struct {
// SymmetricEncryption: algorithms used to encrypt and decrypt arbitrary payloads.
// SymmetricEncryption: see the `Key.Algorithm.SymmetricEncryption` enum for a description of values.
// Default value: unknown_symmetric_encryption
// Precisely one of SymmetricEncryption must be set.
SymmetricEncryption *KeyAlgorithmSymmetricEncryption `json:"symmetric_encryption,omitempty"`
Expand All @@ -235,10 +235,7 @@ type Key struct {
// Usage: keys with a usage set to `symmetric_encryption` are used to encrypt and decrypt data. The only key algorithm currently supported by Key Manager is AES-256-GCM.
Usage *KeyUsage `json:"usage"`

// State: current state of the key. Values include:
// * `unknown_state`: key is in an unknown state.
// * `enabled`: key can be used for cryptographic operations.
// * `disabled`: key cannot be used for cryptographic operations.
// State: see the `Key.State` enum for a description of values.
// Default value: unknown_state
State KeyState `json:"state"`

Expand Down Expand Up @@ -405,7 +402,7 @@ type GenerateDataKeyRequest struct {
// KeyID: ID of the key.
KeyID string `json:"-"`

// Algorithm: encryption algorithm of the data encryption key.
// Algorithm: see the `DataKey.Algorithm.SymmetricEncryption` enum for a description of values.
// Default value: unknown_symmetric_encryption
Algorithm DataKeyAlgorithmSymmetricEncryption `json:"algorithm"`

Expand Down
Loading