Encryption sovereignty
Your KMS key encrypts all DEKs. Disable the key and DataRecs cannot decrypt your data — you have absolute control.
BYOK lets your organization encrypt all tenant data encryption keys (DEKs) with a KMS key you own and control in your own Google Cloud project. DataRecs uses envelope encryption — your KMS key wraps the DEKs, and only your tenant service account can access it.
Encryption sovereignty
Your KMS key encrypts all DEKs. Disable the key and DataRecs cannot decrypt your data — you have absolute control.
Zero-downtime migration
DEK re-encryption happens in the background. Your reconciliation jobs and API access continue uninterrupted.
Fully reversible
Revert to platform-managed encryption at any time — DEKs are re-encrypted with the platform KMS key.
Key rotation safe
KMS key rotation creates new versions. Old versions still decrypt existing DEKs — no data loss on rotation.
A Google Cloud KMS key in your own GCP project (any location).
Find your tenant service account — it’s shown in the Console under Settings → Encryption, or via the API:
curl -H "Authorization: Bearer $API_KEY" \ https://api.datarecs.io/tenant-encryption/configThe response includes tenant_service_account, a tenant-<your_tenant_id>@<project>.iam.gserviceaccount.com address — copy the exact value, don’t construct it yourself.
Grant access to that service account on your key:
gcloud kms keys add-iam-policy-binding YOUR_KEY_NAME \ --keyring=YOUR_KEYRING \ --location=global \ --project=YOUR_PROJECT \ --member="serviceAccount:<the tenant_service_account value from step 2>" \ --role="roles/cloudkms.cryptoKeyEncrypterDecrypter"Send the KMS key details to DataRecs. This validates access (round-trip encrypt/decrypt test) and immediately starts the migration:
curl -X POST \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "gcp_project_id": "your-gcp-project", "keyring_name": "your-keyring", "key_name": "your-key" }' \ https://api.datarecs.io/tenant-encryption/configResponse:
{ "status": "in_progress", "started_at": "2026-01-15T10:30:00.000Z", "message": "BYOK configuration saved and migration started. DEKs are being re-encrypted with your KMS key."}Check migration status at any time:
curl -H "Authorization: Bearer $API_KEY" \ https://api.datarecs.io/tenant-encryption/configThe byok_migration_status field shows:
in_progress — DEKs are being re-encryptedcompleted — All DEKs encrypted with your keyfailed — An error occurred (see byok_migration_error)not_started — No migration triggered yetTo revert back to platform-managed keys:
curl -X POST \ -H "Authorization: Bearer $API_KEY" \ https://api.datarecs.io/tenant-encryption/revertThis re-encrypts all DEKs with the platform KMS key. After completion, your KMS key is no longer used and you can revoke access.
| Action | Impact | Reversible? |
|---|---|---|
| Rotate key | None — old versions decrypt existing data | N/A |
| Disable key version | Data temporarily inaccessible | Yes — re-enable |
| Destroy key version | Permanent data loss | No |
| Revoke SA access | Data inaccessible until re-granted | Yes |