Repository navigation
Remove the readers for secrets from before the keyrings - #447
Merged
Merged
Conversation
Runtime values sealed with the raw key, app keys wrapped with AES-KW and control-plane JWEs whose kid names only a key version were readable until rewritten. The runtime rewrite and secret-encryption reencrypt move them to the keyring format, so their readers go. A control-plane value still in the earlier format now counts as failed in secret-encryption status. The workerd test of the rewrite route moves a value from a read-only key version to the active one instead of a value from before the keyring.
The algorithm and missing-key cases used kids that name only a key version, so key lookup rejected them before the property under test mattered. Each case now differs from a readable value in one header field, and missing-key values are sealed by a keyring that the reader does not hold. Fixtures no longer write the retired app key record shape.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | ae6ab07 | Nov 27 2026, 09:48 AM |
The derived key fails A128GCM and A256KW on its own, so the rejection test passed without the allowlist. It now expects the allowlist's error from the shared sealing core for both.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Values stored before the runtime keyring (#428) and before the control plane's keys per kind (#435) stayed readable through temporary readers until they were rewritten. This removes those readers.
Changes
legacy-runtime-ciphertext.tsgoes: values sealed with the raw key and app keys wrapped with AES-KW no longer open. Stored values and app keys accept only the keyring format, so the rewrite no longer special-cases app key records.kidnames only a key version goes, together withearlierFormatinsecret-encryption status. A value still in that format counts asfailed.Upgrade
Rewrite both stores on the previous release before upgrading:
0 rewritten, 0 unreadable, 0 conflicts.node tools/secret-encryption.ts statusreportsearlierFormat: 0andfailed: 0.Managed OAuth values that clients still hold from before the runtime keyring are no longer accepted; those connections need a new authorization.
Testing
svelte-check(control plane),tsc(app runtime),oxlint,oxfmtpackages/app-runtime:secrets.test.ts,keys.test.ts,rekey.test.ts,oauth.test.ts,workload-keys.test.tsapps/control-plane:secret-encryption.test.ts,secret-reencryption.integration.test.ts,runtime-rekey.test.ts,app-services-runtime.test.tswithRUN_SERVICE_TESTS=1(workerd and celld),cloudflare/deployment.test.ts -t "removes an undeployed app"withRUN_CLOUDFLARE_TESTS=1