MCPcopy
hub / github.com/getsops/sops / MasterKey

Struct MasterKey

hckms/keysource.go:43–60  ·  view source on GitHub ↗

MasterKey is a HuaweiCloud KMS key used to encrypt and decrypt SOPS' data key.

Source from the content-addressed store, hash-verified

41
42// MasterKey is a HuaweiCloud KMS key used to encrypt and decrypt SOPS' data key.
43type MasterKey struct {
44 // KeyID is the full key identifier in format "region:key-uuid"
45 KeyID string
46 // Region is the HuaweiCloud region (e.g., "tr-west-1")
47 Region string
48 // KeyUUID is the UUID of the KMS key
49 KeyUUID string
50 // EncryptedKey stores the data key in its encrypted form.
51 EncryptedKey string
52 // CreationDate is when this MasterKey was created.
53 CreationDate time.Time
54
55 // credentials contains the HuaweiCloud credentials used by the KMS client.
56 // It can be injected by a (local) keyservice.KeyServiceServer using
57 // Credentials.ApplyToMasterKey.
58 // If nil, the default credential provider chain is used.
59 credentials auth.ICredential
60}
61
62// NewMasterKey creates a new MasterKey from a region:key-id string, setting
63// the creation date to the current date.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected