Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cipher ¶ added in v1.0.0
type Cipher interface {
Decrypt(ctx context.Context, content []byte, format DataFormat) ([]byte, error)
Encrypt(ctx context.Context, data []byte, config EncryptionConfig) ([]byte, error)
Rotate(ctx context.Context, encryptedContent []byte, newConfig EncryptionConfig) ([]byte, error)
UpdateKeys(ctx context.Context, encryptedContent []byte, newConfig EncryptionConfig) ([]byte, error)
ReadEncryptionContexts(content []byte, format DataFormat) ([]EncryptionContext, error)
}
type DataFormat ¶ added in v1.0.0
type DataFormat string
const ( FormatYAML DataFormat = "yaml" FormatJSON DataFormat = "json" FormatDotenv DataFormat = "dotenv" FormatINI DataFormat = "ini" FormatBinary DataFormat = "binary" )
type EncryptionConfig ¶
type EncryptionConfig struct {
Format DataFormat
// Keys is a legacy shorthand for a single key group. All keys in the group
// are alternatives: any one of them can decrypt the secret. It cannot be
// used together with KeyGroups.
Keys []entities.EncryptionKey
// KeyGroups defines SOPS key groups. One key from each required group is
// needed to recover the data key; ShamirThreshold controls the quorum.
KeyGroups [][]entities.EncryptionKey
UnencryptedSuffix string
EncryptedSuffix string
UnencryptedRegex string
EncryptedRegex string
UnencryptedCommentRegex string
EncryptedCommentRegex string
MACOnlyEncrypted bool
ShamirThreshold int
}
type EncryptionContext ¶ added in v1.0.3
EncryptionContext identifies the AWS KMS encryption context attached to a master key in a SOPS file. The context is part of the file's plaintext metadata; reading it does not decrypt or authenticate the file.
SOPS currently supports encryption contexts only for AWS KMS keys.
Click to show internal directories.
Click to hide internal directories.