Documentation
¶
Index ¶
- Constants
- type Cipher
- func (c *Cipher) DecryptField(ctx context.Context, value string) (string, error)
- func (c *Cipher) Enabled() (bool, error)
- func (c *Cipher) EncryptField(ctx context.Context, plaintext string) (string, error)
- func (c *Cipher) Parse(ctx context.Context, cred *buckets.Credential) (*buckets.Credential, error)
- func (c *Cipher) Prepare(ctx context.Context, cred *buckets.Credential) (*buckets.Credential, error)
- type CredentialKeyManager
- type WrappedDataKey
Constants ¶
View Source
const ( CredentialMasterKeyEnv = "DRS_CREDENTIAL_MASTER_KEY" CredentialLocalKeyFileEnv = "DRS_CREDENTIAL_LOCAL_KEY_FILE" DatabaseSQLiteFileEnv = "DRS_DB_SQLITE_FILE" CredentialKeyManagerEnv = "DRS_CREDENTIAL_KEY_MANAGER" CredentialKMSKeyIDEnv = "DRS_CREDENTIAL_KMS_KEY_ID" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cipher ¶ added in v0.4.2
type Cipher struct {
// contains filtered or unexported fields
}
Cipher encrypts and decrypts credential fields using the key manager selected at construction time. Key material is still loaded by the manager when an operation needs it.
func NewFromEnv ¶ added in v0.4.2
func (*Cipher) DecryptField ¶ added in v0.4.2
func (*Cipher) EncryptField ¶ added in v0.4.2
func (*Cipher) Parse ¶ added in v0.4.2
func (c *Cipher) Parse(ctx context.Context, cred *buckets.Credential) (*buckets.Credential, error)
func (*Cipher) Prepare ¶ added in v0.4.2
func (c *Cipher) Prepare(ctx context.Context, cred *buckets.Credential) (*buckets.Credential, error)
type CredentialKeyManager ¶
type WrappedDataKey ¶
Click to show internal directories.
Click to hide internal directories.