Customer-managed encryption keys
Supply a KMS key from your own AWS account, understand what it protects, and know exactly what happens when you revoke it.
Joring encrypts each team's stored content with a data key that belongs to that team. By default, Joring holds the key that wraps (encrypts) the data key. On the Enterprise plan, you can supply a key from AWS KMS (Key Management Service) in your own AWS account instead. Joring's copy of your team's data key is then wrapped with your key.
This matters for one reason: if you disable or delete your key, Joring can no longer read your team's encrypted content, and Joring does not have to agree. It takes effect within about ten minutes (see Revoking access).
The Owner and Co-owners manage the key, in Settings → Security & data → Encryption. This is separate from LLM keys, which decide whose AI provider account processes the team's content. You can use both together.
What this protects, and what it does not
| Encrypted content is unreadable after you revoke the key | Yes |
| Encrypted content is unreadable without your key, if it leaks | Yes |
| You can end Joring's access without asking Joring | Yes |
| Embeddings are under your key | No. See below |
| Joring cannot read your content while the key works | No |
| Prompt text stays inside your own systems | No |
Joring is not zero-knowledge. To score a conversation, coach a prompt or build a trail, Joring decrypts content in memory, in its own environment. Joring also sends prompt text to an AI provider for analysis (see Your own AI provider keys), under agreements that exclude customer data from training. A customer-managed key does not change either of these facts.
Embeddings are the lists of numbers that Joring uses to find related work. Search needs their raw form, so Joring stores them without encryption. They are not under your key. When a team has been locked for 24 hours, Joring deletes its embeddings. Copies stay in the database backups until the backups expire, after 35 days.
What the key changes is what happens after the relationship ends, and outside the running system. Once you revoke the key, a backup, a snapshot, a subpoena served on Joring, or a company that buys Joring gets no readable encrypted content. And the choice to revoke belongs to the key holder, not to a contract term.
Sign-in and identity data are not under your key
Joring keeps authentication and identity records, including OAuth tokens and your SSO client secret, under its own platform key. If they were under your key, revoking it would lock administrators out of the settings they need to respond. Revoking makes your team's encrypted content unreadable. It does not stop people from signing in.
Before you start
- An AWS account that you control, with permission to create a KMS key in it.
- Your Joring team ID, which the setup screen shows. Copy it instead of typing it. It goes into the key policy as a condition value, and it is case-sensitive.
The key can be in any AWS region. Joring reads the region from the key's ARN (Amazon Resource Name) and calls KMS there, so you need no extra configuration.
Key residency is not data residency
The key's region controls where the key material lives and where the KMS calls go. It does not move your stored content, which stays in the region of Joring's own database. If a regulation requires the content itself to stay in a specific region, the key's region alone does not meet it.
Set up the key
Create the key in your account
Joring publishes the key policy as a CloudFormation template.
Settings → Security & data → Encryption has a Create the key in AWS button. It opens the CloudFormation review screen in your own AWS console, in your own session, with this team's ID filled in as the stack parameter. Nothing is created until you approve it.
The button opens the console in us-east-1. The template is public, so you can read it first, or host your own copy, for example in another region, and launch from that:
https://joring-byok-templates-800153535945.s3.us-east-1.amazonaws.com/joring-byok-key.yamlUsing your own copy changes nothing about how Joring uses the key.
Parameters:
| Parameter | Default | |
|---|---|---|
JoringTeamId | Required | Your team ID, as a lowercase UUID. |
KeyAlias | joring-encryption | A label for the console. Joring uses the ARN. |
EnableRotation | true | AWS automatic yearly rotation. |
The template keeps the key when the stack is deleted. Deleting the stack leaves the key in place, because removing infrastructure and revoking access are different decisions.
Give Joring the ARN
Copy the KeyArn output into Settings → Security & data → Encryption.
Joring checks the key before anything depends on it, and shows you each check:
- The key is in your account, not Joring's. Joring refuses a key in its own account, because you would not really control revocation.
- The key is enabled, symmetric and customer-managed.
- Joring can wrap a data key with it, using your team's encryption context.
- Joring can unwrap what it just wrapped.
- Joring cannot unwrap it while naming a different team. This check is expected to fail; see The tenant condition.
- Whether automatic rotation is on.
Switch the team over
When the checks pass, Joring rewraps every version of your team's data key with your key. If the team has no data key yet, Joring creates one. Your key then protects all of the team's encrypted content, including the content that existed before the switch. Joring does not touch the content itself, only the wrapped data keys, so the switch takes seconds.
The key policy
The key policy has four statements. Two of them carry the security properties described above.
Joring gets seven actions and no others: kms:Encrypt, kms:Decrypt,
kms:GenerateDataKey, kms:ReEncryptFrom, kms:ReEncryptTo,
kms:DescribeKey and kms:GetKeyRotationStatus. Joring's grant has no
kms:* anywhere.
The tenant condition
The five cryptographic actions carry a condition:
"Condition": {
"StringEquals": {
"kms:EncryptionContext:joring:tenant": "<your team id>"
}
}Joring's encryption layer puts the team (tenant) into the KMS encryption context on every wrap and unwrap. This condition requires that value to be yours. If a request from Joring named another team, through a bug, a misrouted job or a deliberate act, KMS refuses it before any cryptography happens.
Without the condition, Joring's code prevents other teams from using your key. With it, AWS refuses such use, in your account, under a policy that only you can change.
Joring does not assume that the condition is there. During the checks, it
tries a decrypt with a wrong team value, and requires the call to fail with
AccessDenied. The difference matters. A wrong encryption context fails on
its own and returns InvalidCiphertext, which proves nothing about your
policy. Only AccessDenied proves that the condition is there and enforced.
If Joring gets the weaker result, it accepts the key, records that the
condition is missing, and says so on the setup screen.
kms:DescribeKey and kms:GetKeyRotationStatus are in their own statement,
without the condition. These calls carry no encryption context, so the
condition could never match them.
The administration deny
The policy then denies Joring, by name, every key administration action:
kms:ScheduleKeyDeletion, kms:CancelKeyDeletion, kms:DisableKey,
kms:EnableKey, kms:PutKeyPolicy, kms:CreateGrant, kms:RetireGrant,
kms:RevokeGrant, kms:TagResource, kms:UntagResource, the rotation
controls, alias management, replication and key material import.
The grant already leaves all of these out, so nothing in the deny list is reachable today. The deny keeps them unreachable if anything changes later: a policy edit that widens the grant, a change to Joring's own IAM, a support engineer with raised access, or a new owner of Joring.
An explicit deny in a key policy wins over every allow, in any policy, in
either account. So Joring cannot cancel a deletion that you schedule, or
enable a key that you disabled. And because kms:CreateGrant is denied,
Joring cannot create a grant to widen its own access or get around the tenant
condition.
Revoking access
Disable or delete the key in KMS. Joring does not need to do anything, and it cannot delay it.
Joring checks your key every 60 seconds, and locks the team after three failures in a row, so a revocation takes effect in about three minutes. Errors that show a passing problem, such as throttling or a network fault, do not count, so a short outage does not lock your team. On top of that, Joring caches unwrapped key material for up to 300 seconds. So the lock is complete within about ten minutes at worst, and usually much sooner.
While a team is locked:
- The API returns
423for every team area except encryption, the audit log, billing, member management, data deletion and team deletion. Sign-in keeps working, so you can see the state and act on it. Everything else, including SSO, SCIM, groups, LLM keys, API keys, devices, data collection and policies, returns423until the team is unlocked. - Capture clients pause until the team is unlocked.
- After 24 hours, Joring deletes the team's embeddings.
There is no escrow. Deletion cannot be undone.
Joring keeps no copy of your key and no copy of the unwrapped data key. There is no support path, no recovery request, and no backup of your key material anywhere in Joring.
Disabling the key stops Joring from reading the content wrapped under it. Enabling the same key again restores access, so this is the reversible way to cut Joring off.
Deleting the key is permanent. When you schedule the deletion, AWS makes the key unusable at once, and the team locks. AWS then waits 7 to 30 days, which you choose when you schedule it (30 by default). During that time you can cancel the deletion and restore access. When the waiting period ends, nobody can read the content wrapped under that key: not Joring, not you, not anyone.
When a team is deleted
Deleting the team deletes its wrapped data keys from Joring's database. Copies of the wrapped data keys stay in the database backups for up to 35 days, and in Joring's key copies for up to 30 days. They can be used only while Joring's role is in your key policy. So, after the team is gone, remove Joring's role from the key policy.
If your key is used only for Joring, scheduling its deletion in KMS after the team is gone makes every copy of the encrypted content unreadable, including the copies in backups, once the waiting period ends. That is the only way that is faster than 35 days. Also rotate the client secret of any single sign-on connection that the team used, and remove the SCIM app from your identity provider. For everything else that happens when a team is deleted, see Data deletion.
Rotation
Three different things are called rotation. They have different effects, and two of them need you to act.
AWS rotates your key automatically
Nothing happens in Joring. Automatic rotation changes the key material behind the same key, and the ARN stays the same. KMS picks the right key material when it decrypts older data. Joring does not need to know, and you do not need to do anything.
You replace the key with a different one
Enter the new ARN in Settings → Security & data → Encryption. Joring
checks it the same way, then rewraps your team's data keys from the old key to
the new one. When both keys are in the same region, it uses ReEncryptFrom
and ReEncryptTo, so the data key stays inside KMS. When the regions differ,
it decrypts with the old key and encrypts with the new one, so the data key is
briefly in Joring's memory.
Your content is not moved or encrypted again. Only the wrapped data keys change, so this takes seconds, however much content the team has.
You issue a new version of the team data key
An Owner or Co-owner can choose Issue a new version to create a new version of the team's data key, wrapped with your current key. New content uses the new version. Existing content keeps the version that it was written with, and stays readable, because every stored value records which version encrypted it. Nothing is rewritten. Joring does not do this on a schedule.
Order matters when you replace a key
Rewrap first, then disable the old key. Never the other way around.
Joring needs the old key to unwrap your team's data key, and the new key to wrap it again. If you disable or delete the old key before the rewrap, Joring can do neither: the rewrap fails, and the team locks.
The right order is: add the new key in Joring, confirm that the rewrap finished, then disable the old key.
If you already disabled the old key and the team is locked, enable it again in KMS. The next successful check unlocks the team on its own, within about a minute. Then run the rewrap, and disable the old key afterwards.
This recovery works only while the old key still exists. If you deleted it instead of disabling it, and the waiting period has ended, there is no recovery.
What is recorded
The audit log records every change to this setup:
| Action | Meaning |
|---|---|
encryption.byok.activated | A customer-managed key was put into use |
encryption.byok.deactivated | The team moved back to keys that Joring manages |
encryption.byok.rewrapped | The data keys were rewrapped with a different key |
encryption.key.rotated | A new version of the team data key was issued |
encryption.tenant.locked | The team was locked |
encryption.tenant.unlocked | The team was unlocked |
Each lock and unlock entry has a source. With source: probe, Joring's
check found that your key stopped working, or started working again. With
source: in_app, an owner locked the team, or cleared a lock, in Joring.
Alert on encryption.tenant.locked with source: probe. It means that Joring
can no longer reach your key, whether or not anyone meant that to happen.
The administrative actions that Joring records, and how to export them.