fle
Installation
SKILL.md
Field-Level Encryption (FLE)
FLE encrypts specific document fields on the client before the data reaches Couchbase Server. The server stores ciphertext — it never sees plaintext for encrypted fields. Decryption happens on the client when reading.
When to Use FLE
- Regulatory compliance (PCI-DSS, HIPAA, GDPR) requiring field-level protection
- Encrypting PII (SSNs, credit card numbers, health data) while keeping other fields queryable
- Multi-tenant environments where different tenants need different encryption keys
FLE is not a substitute for TLS (in-transit encryption) or server-side encryption at rest — use all three for defence in depth.
How It Works
- Configure a
CryptoManagerwith aKeyProviderthat holds your encryption keys. - Register the
CryptoManagerwith the cluster at connection time. - Annotate fields (or specify field names at write time) to encrypt.
- On
upsert, the SDK encrypts annotated fields and stores them as{"alg":"...", "ciphertext":"..."}objects. - On
get, the SDK decrypts annotated fields transparently.