Skip to content

Encryption

Elasticsearch implementation of encryption capability.

Authors

Kadek Denaya (kadek.d.r.diana@gdplabs.id)

References

NONE

ElasticsearchEncryptionCapability(encryptor, encrypted_fields)

Bases: EncryptionCapabilityMixin

Elasticsearch implementation of EncryptionCapability.

This class provides Elasticsearch-specific encryption capability implementation. It inherits all encryption/decryption logic from EncryptionCapabilityMixin. The encryption capability doesn't need Elasticsearch-specific context since it only transforms values using the encryptor, without interacting with Elasticsearch directly.

Initialize the Elasticsearch encryption capability.

Parameters:

Name Type Description Default
encryptor BaseEncryptor

The encryptor instance to use for encryption.

required
encrypted_fields set[str]

The set of fields to encrypt. Supports: 1. Content field: "content" 2. Metadata fields using dot notation: "metadata.secret_key", "metadata.secret_value" Example: {"content", "metadata.secret_key", "metadata.secret_value"}

required