Repository navigation
Seal and open payloads on workflow and operator traffic - #303
Open
pseudomuto wants to merge 1 commit into
Open
pseudomuto wants to merge 1 commit into
pseudomuto wants to merge 1 commit into
Conversation
pseudomuto
added this pull request to stack #304
October 6, 2026 14:28
pseudomuto
force-pushed
the
wireup-encryption
branch
from
October 10, 2026 13:40
3f6bd86 to
71f66b8
Compare
The encryptor existed but nothing installed it, so payloads still crossed the connection in the clear. This puts it on the workflow and operator clients of both servers. Admin traffic (including replication streams), goes out on the bare client still. The payload visitor cannot see inside it yet, but I will follow up with another PR for that. The two sides are mirror images so the peer only ever holds sealed data and the local cluster only ever sees it opened. Outbound seals requests and opens responses, as before. Inbound needs the reverse, opening what the peer sends and sealing what the local cluster returns, which is what the new Reverse option does. Both share one vault per connection. Enabled now only decides whether anything is sealed. As long as a default key policy is configured, both sides keep opening, so turning encryption off does not strand payloads sealed while it was on. A disabled config that still names keys opens payloads, and so contacts the KMS, at startup (see note at the end). Payloads that are already encrypted are not sealed again. A second layer round-trips through the proxy, but anything opening the data outside it, such as a codec in front of workers after handoff, would peel one layer and find another. Our own payloads are recognized by the full key-material contract rather than the encoding name, since other codecs use the same name. Encodings the customer's codec produces can be listed in alreadySealedEncodings. Anything unrecognized is still sealed, so a gap in that list costs an extra layer rather than putting plaintext on the wire (fail closed and all). NB: A proxy with keys tries to open every payload carrying our sealed contract and fails the call if it cannot. A Cloud-side proxy must therefore have no encryption block, and a customer proxy must list every key URI its data was sealed under.
pseudomuto
force-pushed
the
wireup-encryption
branch
from
October 11, 2026 12:15
71f66b8 to
74fc4f4
Compare
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.
The encryptor existed, but nothing installed it, so payloads still crossed the connection in the clear. This puts it on the workflow and operator clients of both servers. Admin traffic (including replication streams), goes out on the bare client still. The payload visitor cannot see inside it yet, but I will follow up with another PR for that.
The two sides are mirror images, so the peer only ever holds sealed data and the local cluster only ever sees it opened. Outbound seals requests and opens responses, as before. Inbound needs the reverse, opening what the peer sends and sealing what the local cluster returns, which is what the new Reverse option does. Both share one vault per connection.
Enabled now only decides whether to seal anything. As long as a default key policy is configured, both sides keep opening, so turning encryption off does not strand payloads sealed while it was on. A disabled config that still names keys opens payloads, and so contacts the KMS at startup (see note at the end).
Payloads that are already encrypted are not sealed again. A second layer round-trips through the proxy, but anything opening the data outside it, such as a codec in front of workers after handoff, would peel one layer and find another. Our own payloads are recognized by the full key-material contract rather than the encoding name, since other codecs use the same name. Encodings the customer's codec produces can be listed in alreadySealedEncodings. Anything unrecognized is still sealed, so a gap in that list costs an extra layer rather than putting plaintext on the wire (fail closed and all).
Note
A proxy with keys tries to open every payload carrying our sealed contract and fails the call if it cannot. A Cloud-side proxy must therefore have no encryption block (couldn't access the customer KMS anyway), and a customer proxy must list every key URI its data was sealed under.