Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AesService ¶
type Base64Service ¶
type EncryptedContentService ¶
type EncryptedContentService interface {
Serialize(encryptedContent *content.EncryptedContent) ([]byte, error)
Deserialize(encoded []byte) (*content.EncryptedContent, error)
Encrypt(
passphrase *passphrase.Passphrase,
content *content.Content,
) (*content.EncryptedContent, error)
Decrypt(
passphrase *passphrase.Passphrase,
encryptedContent *content.EncryptedContent,
) (*content.Content, error)
}
type EncryptedPassphraseService ¶
type EncryptedPassphraseService interface {
GeneratePassphrase(length int) (*passphrase.Passphrase, error)
Serialize(encryptedPassphrase *passphrase.EncryptedPassphrase) ([]byte, error)
Deserialize(encoded []byte) (*passphrase.EncryptedPassphrase, error)
Encrypt(publicKey *stdRsa.PublicKey, passphrase *passphrase.Passphrase) (*passphrase.EncryptedPassphrase, error)
Decrypt(
privateKey *stdRsa.PrivateKey,
encryptedPassphrase *passphrase.EncryptedPassphrase,
) (*passphrase.Passphrase, error)
}
type EncryptedPayloadService ¶
type EncryptedPayloadService interface {
Encrypt(publicKey *stdRsa.PublicKey, payload *payload.Payload) (*payload.EncryptedPayload, error)
Decrypt(privateKey *stdRsa.PrivateKey, encryptedPayload *payload.EncryptedPayload) (*payload.Payload, error)
Serialize(encryptedPayload *payload.EncryptedPayload) ([]byte, error)
Deserialize(encodedContent []byte) (*payload.EncryptedPayload, error)
}
type IniService ¶
type RsaService ¶
type RsaService interface {
ReadPublicKeyFromPath(publicKeyPath string) (*stdRsa.PublicKey, error)
ReadPrivateKeyFromPath(privateKeyPath string) (*stdRsa.PrivateKey, error)
DecryptPKCS1v15(rand io.Reader, priv *stdRsa.PrivateKey, ciphertext []byte) ([]byte, error)
EncryptPKCS1v15(rand io.Reader, pub *stdRsa.PublicKey, msg []byte) ([]byte, error)
}
type TerraformEncryptionMigrationService ¶
type TerraformEncryptionMigrationService interface {
ConvertIniContentToLegacyTerraformContent(
passphraseLength int,
iniContent *ini.Content,
pubKey *stdRsa.PublicKey,
encryptedPassphraseSvc terraform_encryption_migration.EncryptedPassphraseService,
encryptedContentSvc terraform_encryption_migration.EncryptedContentService,
) (*terraform.Content, error)
ConvertIniContentToV1TerraformContent(
passphraseLength int,
iniContent *ini.Content,
pubKey *stdRsa.PublicKey,
encryptedPassphraseSvc terraform_encryption_migration.EncryptedPassphraseService,
encryptedPayloadSvc terraform_encryption_migration.EncryptedPayloadService,
) (*terraform.Content, error)
MigrateEncryptedTerraformResourceHcl(
hclParser hcl.Parser,
hclBytes []byte,
privKey *stdRsa.PrivateKey,
pubKey *stdRsa.PublicKey,
legacyEncryptedContentSvc terraform_encryption_migration.EncryptedContentService,
encryptedPassphraseSvc terraform_encryption_migration.EncryptedPassphraseService,
encryptedPayloadSvc terraform_encryption_migration.EncryptedPayloadService,
) (*ast.File, error)
RotateOrRekeyEncryptedTerraformResourceHcl(
hclParser hcl.Parser,
hclBytes []byte,
privKey *stdRsa.PrivateKey,
pubKey *stdRsa.PublicKey,
encryptedPassphraseSvc terraform_encryption_migration.EncryptedPassphraseService,
encryptedPayloadSvc terraform_encryption_migration.EncryptedPayloadService,
) (*ast.File, error)
}
type TerraformService ¶
type TerraformService interface {
TerraformContentToHCLfile(hclParser hcl.Parser, terraformContent *terraform.Content) (*ast.File, error)
WriteHCLfile(hclPrinter hcl.Printer, hclFile *ast.File, output io.Writer) error
TerraformResourceToHCLfile(hclParser hcl.Parser, resource terraform.Resource) (*ast.File, error)
}
Click to show internal directories.
Click to hide internal directories.