Skip to content

Encryption

OpenSearch implementation of encryption capability.

Authors

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

References

NONE

OpenSearchEncryptionCapability(encryptor, encrypted_fields)

Bases: EncryptionCapabilityMixin

OpenSearch implementation of EncryptionCapability.

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

Initialize the OpenSearch 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