Encryption and keys
Data in the Ontology is encrypted in transit and on every disk it touches. Connections use TLS, edge agents on the plant network sign every request and can be required to use mutual TLS, and everything at rest is encrypted with AES-256 under a key hierarchy that can be rooted in a key you hold in your own key management service. Revoke that key and the platform can no longer read your data; destroy it and the data is gone, including from backups
In the platform today
- Connections reach the platform service through a proxy or load balancer that accepts TLS 1.2 and 1.3 only
- Managed cloud encrypts the lake, file systems and their backups, secrets, logs, image repositories and the stream database with customer-managed KMS keys rotated yearly, and the lake refuses requests without TLS; see deployment
- Secrets kept beside the lake, such as signing secrets, are encrypted under a customer-managed AWS KMS key, and connector tokens stay in memory only
- Administrators read the key status and rotate with the endpoints below, and every key operation is audited
- Properties listed under
encryption.propertiesinontology.yamlare built as sealed properties: object sync and action edits write them as AES-256-GCM tokens under the data key for their access label, in the object tables, the active edits, the edit log, the action log and proposal parameters - The service opens sealed properties only for people who hold the label; everyone else, administrators included, gets the property withheld as a hidden property is
- Equality filters work on a sealed property, and range and text filters on it are refused
- Holders can aggregate it, raw SQL sees only tokens, and shares and search leave sealed properties out
- After a label key rotation,
POST /api/v2/admin/keys/labels/{label}/resealre-encrypts older tokens to the active key version, andencryption.sealPipelineOutputsseals the pipeline outputs behind sealed properties too; see sealed properties - Edge agents sign every request and can be required to use mutual TLS, as described below
- Erasure requests delete the rows that hold an erased person's sealed values, record each erased object as a keyed hash and stop the platform opening any sealed value bound to it again, so a restored backup reads it as null; audit entries name the person through subject references sealed under per-person keys, which erasure destroys
- The demo airline seals vendor payment terms, and the ice cream workspace farm producer numbers and customer account numbers
- The TLS 1.3-only policy, the service mesh, tenant and store keys, subject keys on object properties, keys in Azure, Google Cloud or an HSM, and crypto-shredding of a whole tenant
Encryption in transit
On request, every public endpoint, including the API, the web application, webhooks we receive and the connector endpoints, accepts TLS 1.3 only, and older protocol versions are refused at the load balancer, not negotiated down
| Setting | Value |
|---|---|
| Protocol | TLS 1.2 and 1.3; TLS 1.3 only on all endpoints on request |
| Outbound calls to your systems | TLS 1.2 minimum, TLS 1.3 preferred; certificate verified against public roots or a CA bundle you supply |
On request, services inside a deployment talk to each other over mutual TLS through a service mesh, with short-lived workload certificates, so a process that gains network access inside the cluster still cannot call another service without a valid workload identity
Outbound calls to systems you own, such as a writeback to your ERP or a webhook to your endpoint, use TLS 1.3 where the other side supports it and never fall below TLS 1.2. For older systems on the plant network that cannot do either, the edge agent terminates the modern connection and speaks the system's own protocol on the local segment only
Mutual TLS for edge agents
Built today: each edge agent has its own secret, shown once, and signs every request, with replay protection. Mutual TLS can be required, with the certificate pinned for that agent. The plant network never accepts an inbound connection: the agent dials out over port 443
On request, agents enrol with a one-time token, get short-lived certificates from your tenant's authority that rotate on their own, and encrypt their buffer on disk
Encryption at rest
Every place the platform stores your data is encrypted with AES-256 under keys in the region's key service. On request, per-file encryption inside the open tables, the object store and the search index
| Store | Contents | Encryption |
|---|---|---|
| Open tables | Raw and backing datasets as Delta Lake tables in Parquet | The storage provider's server-side encryption with a customer-managed key |
| Action log and audit log | Edits, before and after values, audit entries | Stored in the lake under the same key |
| Secrets | Signing secrets and other secrets kept beside the lake | Under a separate customer-managed key; connector tokens stay in memory only |
| Backups and snapshots | Copies of all of the above | Encrypted with customer-managed keys |
Envelope encryption
The platform uses envelope encryption. Data is encrypted with data keys, each layer of keys is protected by the one above it, and the top key lives in your key management service and never leaves it. Rotating or revoking a key above the data keys never requires re-encrypting the data itself, and every use of your key appears in your key service's own logs
Customer-managed keys
By default, the top of the key hierarchy is a platform-managed key in the region's key service. With customer-managed keys, it is a key in your own account instead, the customer master key (CMK). You keep control of the key's policy, rotation and deletion; we are granted only the permission to wrap and unwrap with it, and every use appears in your key service's own logs
| Key service | Key type | Permissions granted to the platform |
|---|---|---|
| AWS KMS | Symmetric, SYMMETRIC_DEFAULT, single or multi-region | kms:Encrypt, kms:Decrypt, kms:GenerateDataKey, kms:ReEncryptFrom, kms:ReEncryptTo, kms:DescribeKey, with an encryption context of the tenant id |
On request, keys in Azure Key Vault, Google Cloud KMS or an HSM on premises
On AWS, the key policy grants the platform's role use of the key only with an encryption context that names your tenant, so the grant is useless for any other purpose
resource "aws_kms_key" "ontology" {
description = "Markland Street Ontology tenant key, creamery, ca-central-1"
enable_key_rotation = true
rotation_period_in_days = 365
deletion_window_in_days = 30
}
data "aws_iam_policy_document" "ontology_key" {
statement {
sid = "AllowOntologyWrapUnwrap"
actions = ["kms:Encrypt", "kms:Decrypt", "kms:GenerateDataKey",
"kms:ReEncryptFrom", "kms:ReEncryptTo", "kms:DescribeKey"]
resources = ["*"]
principals {
type = "AWS"
identifiers = [var.ontology_service_role_arn] # from the tenant's key settings page
}
condition {
test = "StringEquals"
variable = "kms:EncryptionContext:msTenant"
values = ["creamery"]
}
}
}
Revocation
If you disable the CMK or remove the platform's permission, unwrap calls start failing. Services keep working from their in-memory key caches for at most 5 minutes, then reads and writes for the tenant fail closed: the API returns 503 with code SERVICE_UNAVAILABLE and reason TENANT_KEY_UNAVAILABLE, and the console shows a banner naming the key. No data is lost. Re-enabling the key restores service within a minute, as caches refill. Revocation is the strongest control you have over a managed deployment, and it is the one regulated organizations should test during onboarding
Sealed properties
Built. A property listed under encryption.properties is sealed under the data key of an access label. Its column in the object table holds AES-256-GCM tokens. People who hold the label read plaintext everywhere, and so do the Assistant and agents acting for them; everyone else, administrators included, gets the property withheld as a hidden property is
encryption:
properties: # {object type: {property: access label}}
farm: { producerNo: SUPPLIER-CONF }
customer: { accountNo: FINANCE }
# optional: pipeline outputs that back a type are written sealed too
sealPipelineOutputs: true
- Sync. An unchanged source value keeps its token and its object keeps its version
- Queries. Equality filters work: a bare value,
$eq,$ne,$in,$ninand$missing. Range, prefix, text, list and spatial filters, ordering, grouping and derived values on a sealed property are refused with aSEALED_PROPERTY_*reason. Sums, averages, minimums, maximums and distinct counts are computed for holders, and nothing opened is written - Never plaintext. Raw SQL sees tokens, partner shares leave sealed properties out, and search does not index them
- Sealed pipeline outputs. With
sealPipelineOutputs: true, a step whose output backs an object type writes the columns behind its sealed properties as the same tokens, after its expectations ran on the plaintext - Reseal. A label rotation adds a key version and changes no row.
POST /api/v2/admin/keys/labels/{label}/reseal, withdryRun,retireandbatchSize, then re-encrypts every token under older versions to the active one in object tables, edits, the action log, proposals and sealed pipeline outputs. It keeps object versions, can be resumed, is recorded and audited, and withretireit retires older versions once nothing uses them
Key rotation
Rotation limits how much data any single key version protects and how long a leaked key stays useful. Because of the envelope design, rotating a key never re-encrypts the data itself
- Your key. Rotated on your own policy in your key service; we recommend yearly automatic rotation. The platform picks up the new version without downtime
- Platform keys. Rotated automatically, and on demand by Administrators, for example after a suspected compromise
- Data keys. One per file, never reused, so they need no rotation
- Certificates. Workload and edge agent certificates are short-lived and renewed automatically
On-demand rotation of the tenant key is available to Administrators and through the API. It is the right response to a suspected compromise of platform infrastructure. Rotating the CMK in your own key service is the right response to a suspected compromise of your key service credentials
| Endpoint | Does |
|---|---|
GET /api/v2/admin/keys | Key status |
POST /api/v2/admin/keys/tenant/rotate | Rewraps every data key under the current root key; with the local provider, makes a new root key first |
POST /api/v2/admin/keys/labels/{label}/rotate | A new data key version for one access label, with older versions still decrypting |
POST /api/v2/admin/keys/labels/{label}/reseal | A reseal of that label's tokens to its active version |
PATCH /api/v2/admin/keys/cmk | Changes the CMK. Delivered on request |
Crypto-shredding on offboarding
Deleting data from every replica, cache, backup and snapshot of a distributed system is slow and hard to prove. Destroying the keys that encrypt it is fast and provable. The platform uses crypto-shredding for two cases: a whole tenant leaving, and, optionally, erasure of a single person's personal information
When a tenant leaves
Delivered on request, in five steps
- Export. Your open tables already live in storage you can read, and the audit log is already in your bucket. On notice, we confirm that the last export has completed and that you have everything you need
- Freeze. The tenant is set read-only for a grace period, during which you can still read and export
- Destroy the tenant key. At the end of the grace period, all versions of the tenant key encryption key are destroyed. If you use a CMK, you also schedule its deletion in your key service, and the platform's copy becomes unreadable the moment either step completes
- Expire. Backups encrypted under the destroyed keys age out on their normal schedule. They are unreadable from the moment the key is destroyed; ageing out only reclaims storage
- Certify. You receive a signed statement listing the key ids destroyed and the time of destruction, and the destruction events are the last entries in the tenant's audit chain, exported to your bucket
Erasing one person's personal information
In the platform today, an erasure request deletes the person's rows, clears their action log parameters and writeback payloads, and cuts each changed table's history, so the rows are gone from older versions and the change feed. Two parts use keys
- Audit entries. They hold sealed subject references, each sealed under a per-person key. Erasure deletes those keys, which crypto-shreds the references while the hash chain still verifies
- Sealed properties. They are deleted with their rows, and each erased object is recorded by keyed hash, so the platform refuses to open its sealed values in a restored backup or a lakeFS branch. That is a refusal on this platform; the access label's key itself is kept, so it is not crypto-shredding of the property
On request, subject keys on object properties. Privacy law gives people the right to have personal information deleted, and deleting rows from immutable Delta versions, action logs and backups is impractical
When subject keys are enabled for an object type, properties that carry the PII access label are encrypted with a key specific to the person they describe, such as an employee or a loyalty member. Erasing that person destroys their subject key: their personal information becomes unreadable in every version, log and backup at once, while the rest of each record, such as the shift a scoop shop employee worked or the tub count they recorded, stays intact and the audit chain stays verifiable
Properties encrypted with subject keys cannot be indexed for full-text search or used in aggregations other than counts, because the index cannot hold their plaintext. Use them for the personal fields that need erasure, not for whole object types
Keys in each deployment topology
| Topology | Root of the key hierarchy | Who can revoke |
|---|---|---|
| Managed cloud, default | Platform-managed key in the region's key service | Markland Street, on your request |
| Managed cloud with CMK | Your key in your AWS, Azure or GCP account | You, at any time |
| Your cloud | Your key service in the same account as the deployment | You |
| On-premises | Your HSM over PKCS#11, or a software key store sealed by your HSM | You |
| Disconnected site | A local HSM, with key ceremony records kept on site | You |
Limitations
- Customer-managed keys in AWS KMS are built. Keys in Azure Key Vault, Google Cloud KMS or an HSM are delivered on request
- An erasure request reaches the lake, its data branches and exports. Backups, object storage versions and lakeFS branches keep sealed values encrypted under the label's key, which the platform refuses to open for an erased object
- Revoking your key stops the tenant within about 5 minutes, when in-memory key caches expire. Requests already in flight in that window still complete
- Destroying the tenant key cannot be undone. Data, logs and backups encrypted under it are unreadable from that moment, including by us
- Properties encrypted with subject keys cannot be full-text searched and support only count aggregations
- Outbound connections to your own systems accept TLS 1.2 when the other side cannot do TLS 1.3. Systems that support neither need an edge agent on the local segment