๐ Encrypt your data with simplicity and flexibility
The encryption API supports multiple payload types:- Simple scalar strings
- Full nested object structures
- JSON/CSV file input based payloads
- External API destinations
- Partial field encryption via
sensitiveFields - Metadata & ACL support
Common Encryption Payload
File-Based Input Payloads
Selective Encryption Payload
External API-Based Encryption
SupportsdestinationURLs with embedded basic auth
(e.g.https://username:password@host/path)
๐ Sensitive Fields DSL โ Targeting Deep Structures
ThesensitiveFields array is a dot-notated DSL (Domain-Specific Language) that specifies which fields in a JSON payload should be encrypted or decrypted.
๐งญ Syntax Overview
| Pattern | Description |
|---|---|
. | Navigate through nested objects |
* | Wildcard that matches any key or array index at that level |
๐ฏ Examples of Patterns
| Feature | Example | Meaning |
|---|---|---|
| Dot notation | user.email | Targets the email inside the user object |
Wildcards * | users.*.ssn | Targets ssn inside every object in the users array |
| Nested arrays | users.*.address.zip | Targets zip inside address of each user |
| Mixed wildcards | *.credentials.*.secret | Targets secret at any nested level inside credentials objects |
๐งช Usage Examples
๐ธ Flat Payload
๐ธ Nested Object
๐ธ Array of Objects
- accounts[0].token
- accounts[1].token
๐ง Advanced Pattern Matching
You can mix wildcards across multiple levels:- Any object at root with a nested data.password
- All tokens of all users
โ ๏ธ Tips & Edge Cases
| Case | Behavior |
|---|---|
| Missing path | Ignored silently |
| Non-string values | Serialized to string, then encrypted |
| Nested objects/arrays | JSON-stringified and encrypted |
| Incorrect path | No exception thrown โ path is skipped |