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 under a data key that belongs to that team. By default Joring holds the key that wraps it. On Enterprise, you can supply a KMS key in your own AWS account instead, and Joring's copy of your team's data key is wrapped under yours.
The practical consequence is the one that matters: disabling or deleting your key ends Joring's ability to read your team's stored content, immediately and without Joring's cooperation.
This is separate from LLM keys, which decide whose provider account inference runs against. The two are independent and can be used together.
What this protects, and what it does not
| Stored content is unreadable after you revoke | Yes |
| Stored content is unreadable if disclosed offline, without your key | Yes |
| You can end Joring's access without asking Joring | Yes |
| Joring is unable to read your content while the key is live | No |
| Prompt text stays inside your infrastructure | 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. Prompt text is also sent to OpenAI and Anthropic for inference, under agreements that exclude customer data from training. A customer-managed key does not change either of those facts.
It changes what happens after the relationship ends, and what happens outside the running system. A backup, a snapshot, a subpoena served on Joring, or a Joring acquirer yields no readable content once the key is revoked, and the decision to revoke sits with the key holder rather than in a contract term.
Sign-in and identity data are not under your key
Authentication and identity records, including OAuth tokens and your SSO client secret, stay under Joring's platform key by design. If they were under your key, revoking it would lock administrators out of the settings needed to respond. Revocation makes your team's content unreadable. It does not lock people out of signing in.
Before you start
- An AWS account you control, and permission to create a KMS key in it.
- Your Joring team ID, shown on the setup screen. Copy it rather than retyping it. It is written into the key policy as a case-sensitive condition value.
The key can be created in any AWS region. Joring reads the region from the key ARN and calls KMS there, so no additional configuration is needed.
Key residency is not data residency
Keeping the key in a particular region controls where the key material lives and where the KMS calls are made. It does not move your stored content, which remains in Joring's own database region. If a regulation requires the content itself to reside in a specific region, a key region alone does not satisfy it.
Set up the key
Create the key in your account
Joring publishes the key policy as a CloudFormation template and as a Terraform module. They are equivalent. Pick the one that matches how you manage infrastructure.
Settings → Encryption has a Create the key in AWS button. It opens the CloudFormation review screen in your own console, in your own session, with this team's ID already filled in as the stack parameter. Nothing is created until you approve it.
The button defaults to us-east-1. To put the key in a different region, change
the region value in the address bar before approving, or pick the region in
the console. Joring reads the region from the key ARN either way.
The template itself is public, so you can read it before launching, or host your own copy and launch from that instead:
https://joring-byok-templates-800153535945.s3.us-east-1.amazonaws.com/joring-byok-key.yamlSubstituting your own copy changes nothing about how Joring uses the key.
Parameters:
| Parameter | Default | |
|---|---|---|
JoringTeamId | required | Your team ID. Lowercase UUID. |
KeyAlias | joring-encryption | Console label. Joring uses the ARN. |
EnableRotation | true | AWS automatic annual rotation. |
Both set the key resource to retain. Deleting the stack, or destroying the Terraform state, leaves the key in place. Removing infrastructure and revoking access are different decisions, so they are different actions.
Give Joring the ARN
Copy the KeyArn output into Settings → Encryption.
Joring validates the key before anything depends on it, and shows you each step:
- The key is in your account, not Joring's. A key in Joring's account is rejected, because you would not actually hold revocation.
- The key is enabled, symmetric, and customer-managed.
- Joring can wrap a data key under it, using your tenant's encryption context.
- Joring can unwrap what it just wrapped.
- Joring cannot unwrap it while naming a different tenant. This step is expected to fail, and is described below.
- Whether automatic rotation is on.
Switch the team over
On success, Joring generates a new team data key wrapped under your key. New writes use it.
Content that already existed is not re-encrypted. Every stored value records the key version that encrypted it, so earlier records stay readable under the version they were written with, which for a team moving over from platform-managed keys is Joring's platform key. Your key governs content written from the switch onward, not retroactively.
Bringing existing records under your key requires re-encrypting stored content rather than rewrapping a key. Contact Joring before switching if that is a requirement. Teams that configure a key before rollout avoid this entirely.
The key policy
The key policy has four statements. Two of them carry the security properties described above.
Joring is granted six actions and no others: kms:Encrypt, kms:Decrypt,
kms:GenerateDataKey, kms:DescribeKey, kms:ReEncryptFrom, and
kms:ReEncryptTo. There is no kms:* anywhere in Joring's grant.
The tenant condition
The five cryptographic actions carry a condition:
"Condition": {
"StringEquals": {
"kms:EncryptionContext:joring:tenant": "<your team id>"
}
}Joring's encryption layer binds the tenant into the KMS encryption context on every wrap and unwrap. This condition requires that value to be yours. A request from Joring that named another tenant, through a bug, a misrouted job, or a deliberate act, is refused by KMS before any cryptography happens.
Without the condition, cross-tenant use of your key is prevented by Joring's code. With it, it is refused by AWS, evaluated in your account, under a policy only you can change.
Joring does not assume the condition is present. During validation it attempts
a decrypt with a deliberately wrong tenant value and requires the call to fail
with AccessDenied. The distinction is exact: a wrong encryption context fails
on its own cryptographic merits and returns InvalidCiphertext, which proves
nothing about your policy. Only AccessDenied proves the condition is there
and enforced. If Joring sees the weaker result, it accepts the key but records
that the condition is absent and says so on the setup screen.
kms:DescribeKey sits in its own statement without the condition, because
DescribeKey carries no encryption context and a condition on one could never
match it.
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 omits all of these, so nothing in the deny list is reachable today. The deny exists so that it stays unreachable through a future policy edit that widens the grant, a change to Joring's own IAM, a support engineer with elevated access, or a change of ownership of Joring.
An explicit deny in a key policy cannot be overridden by any allow, in any
policy, in either account. So Joring cannot cancel a deletion you schedule or
re-enable a key you disable. And because kms:CreateGrant is denied, Joring
cannot mint a grant to widen its own access or escape the tenant condition.
Revoking access
Disable or delete the key in KMS. Nothing is required from Joring, and Joring cannot delay it.
Joring probes your key every 60 seconds and locks the team after three consecutive failures, so a revocation is confirmed in about three minutes. Errors that indicate a temporary problem rather than a revoked key, such as throttling or a network fault, do not count toward that total, so a passing outage does not lock your team.
Unwrapped key material is cached for up to 300 seconds on top of that, so the lock is fully in effect within roughly ten minutes at worst, and usually much sooner.
While a team is locked:
- The API returns
423for any request that would read or write protected content. - Capture clients pause until the team is unlocked.
- Sign-in and team administration keep working, so you can see the state and act on it.
There is no escrow. Deletion cannot be undone.
Joring holds 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 reading the content wrapped under it. Re-enabling the same key restores access, so this is the reversible way to cut Joring off.
Deleting the key is permanent. The 30 day pending window is the only chance to cancel it. After that, the content wrapped under that key cannot be read by Joring, by you, or by anyone. Scheduling deletion destroys that team's content in Joring.
Rotation
Three different things get called rotation. They have different effects, and only one of them needs anything from you.
AWS rotates your key automatically
Nothing happens on Joring's side. Automatic rotation changes the backing material behind the same key, and the ARN does not change. KMS selects the correct backing key when decrypting older ciphertext. Joring does not need to know it happened, and there is nothing to do.
You replace the key with a different one
Enter the new ARN in Settings → Encryption. Joring validates it the same
way, then rewraps your team's data key from the old key to the new one using
ReEncryptFrom and ReEncryptTo.
Your data is not migrated or re-encrypted. Only the wrapped data key changes, which is a few hundred bytes, so the operation completes in under a second regardless of how much content the team has.
Joring rotates the team data key
Joring can issue a new version of your team's data key, wrapped under your current key. New content uses the new version. Existing content keeps the version it was written under and stays readable, because every stored value records which version encrypted it. Nothing is rewritten and no content becomes unreadable.
Order matters when replacing 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 the rewrap completed, then disable the old key.
If you have already disabled the old key and the team is locked, re-enable it in KMS. The next successful probe unlocks the team on its own, within about a minute. Then run the rewrap, and disable the old key afterwards.
That recovery works only while the old key still exists. If it was deleted rather than disabled and the pending window has closed, there is no recovery.
What is recorded
Every change to this configuration lands in the audit log:
| Action | |
|---|---|
encryption.byok.activated | A customer-managed key was put into use |
encryption.byok.deactivated | The team moved back to platform-managed keys |
encryption.byok.rewrapped | The data key was rewrapped onto a different key |
encryption.key.rotated | A new team data key version was issued |
encryption.tenant.locked | The key stopped being usable and the team locked |
encryption.tenant.unlocked | The key became usable again and the team unlocked |
encryption.tenant.locked is the one to alert on. It means Joring can no
longer reach your key, whether or not anyone intended that.
Review the administrative actions Joring records.