Skip to content

Add encryption config with validation - #260

Open
pseudomuto wants to merge 1 commit into
mainfrom
encryption-config
Open

Add encryption config with validation#260
pseudomuto wants to merge 1 commit into
mainfrom
encryption-config

Conversation

@pseudomuto

Copy link
Copy Markdown

Adds an encryption block to cluster connections, configuring envelope encryption of replication payloads: a data encryption key seals the payload and a customer-managed KMS key wraps the DEK. A default key policy applies to every namespace, with per-namespace overrides.

Validation composes from S2SProxyConfig down through each cluster connection, so a bad key URI surfaces as
clusterConnections[0].encryption.overrides[ns].uri rather than a message the operator has to go hunting for. NewProxy runs it before building anything, which is the one point every ConfigProvider passes through, and means an invalid config costs no listeners.

Note

In #248 we pinned server to v1.31.2. The temporal-proxy module uses
api v1.63 which would bump server to v1.32.0. In order to avoid that,
since I'm assuming the rollback/pin is still necessary, I've ensured
server v1.31.2 remains by forcing v1.62.8 in go.mod.

Adds an encryption block to cluster connections, configuring envelope
encryption of replication payloads: a data encryption key seals the
payload and a customer-managed KMS key wraps the DEK. A default key
policy applies to every namespace, with per-namespace overrides.

Validation composes from `S2SProxyConfig` down through each cluster
connection, so a bad key URI surfaces as
`clusterConnections[0].encryption.overrides[ns].uri` rather than a
message the operator has to go hunting for. `NewProxy` runs it before
building anything, which is the one point every `ConfigProvider` passes
through, and means an invalid config costs no listeners.

> [!NOTE]
> In #248 we pinned server to v1.31.2. The temporal-proxy module uses
> api v1.63 which would bump server to v1.32.0. In order to avoid that,
> since I'm assuming the rollback/pin is still necessary, I've ensured
> server v1.31.2 remains by forcing v1.62.8 in go.mod.
@pseudomuto
pseudomuto requested a review from a team as a code owner August 24, 2026 16:21
Comment thread go.mod
github.com/temporalio/temporal-proxy v0.5.1
github.com/urfave/cli/v2 v2.27.7
go.temporal.io/api v1.62.8
go.temporal.io/api v1.63.5

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See replace above for why this is safe

@liam-lowe liam-lowe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

package config

import (
"github.com/temporalio/temporal-proxy/pkg/validation"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Comment thread go.mod
Comment on lines +5 to +10
// go.temporal.io/server v1.31.2 is built against api v1.62.8, and its
// client/frontend wrappers don't implement the WorkflowServiceClient methods
// added in api v1.63 (CountNexusOperationExecutions). temporal-proxy requires
// api v1.63.5, so without this pin MVS picks v1.63.5 and cmd/proxy stops
// compiling. Drop the pin once we move off server v1.31.2, which was itself a
// rollback: https://github.com/temporalio/s2s-proxy/pull/248

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the pin once we move off server v1.31.2

1.31.2 is the latest server release - should we update temporal proxy instead, so that we aren't using pre-release APIs until we get into a proper release / tagging process that aligns with temporal server.

Unsure if there's any value or strict requirement to keeping temporal proxy at pre-release versions given it will be used by OSS customers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants