[gateway] Validate configuration and redact secrets - #3970
Merged
fresh-borzoni merged 5 commits intoAug 21, 2026
Conversation
beryllw
force-pushed
the
codex/gateway-config-validation-3969
branch
from
August 19, 2026 07:47
e39da12 to
0f10251
Compare
beryllw
marked this pull request as ready for review
August 19, 2026 10:40
beryllw
force-pushed
the
codex/gateway-config-validation-3969
branch
from
August 20, 2026 05:58
74b9853 to
4112339
Compare
beryllw
force-pushed
the
codex/gateway-config-validation-3969
branch
from
August 20, 2026 07:41
cae7418 to
082458b
Compare
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR strengthens the Fluss Gateway’s configuration layer by adding typed per-cluster settings, cross-field validation, and consistent secret redaction in logs/errors/diagnostics, building on the gateway runtime foundation added previously.
Changes:
- Introduces typed cluster, security, metrics, and request-limit configuration parsing/validation, including cluster declaration enforcement and reserved-but-unsupported
gateway.cluster.<id>.client.*overrides. - Adds a
Secretnewtype and ensures sensitive values are redacted in startup diagnostics and failure paths; logs the effective redacted configuration at startup. - Expands process/config tests for invalid configs and redaction guarantees; updates gateway CI and dependency metadata to account for the new
fluss-rsworkspace dependency.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| fluss-gateway/tests/process.rs | Adds process-level tests for invalid config exit codes and secret redaction behavior. |
| fluss-gateway/src/lifecycle.rs | Logs the effective (redacted) configuration at debug level during startup. |
| fluss-gateway/src/config.rs | Implements typed config loading with precedence, per-cluster config model, validation, reserved client override rejection, and secret redaction. |
| fluss-gateway/justfile | Normalizes dependency inventory generation to avoid trailing whitespace drift. |
| fluss-gateway/DEPENDENCIES.rust.tsv | Updates the checked-in dependency/license inventory after dependency graph changes. |
| fluss-gateway/Cargo.toml | Adds a path dependency on fluss-rs to build native client connection settings from typed config. |
| fluss-gateway/Cargo.lock | Updates lockfile for the new fluss-rs dependency and its transitive crates. |
| .github/workflows/gateway-ci.yml | Extends CI path triggers for fluss-rs/protos and ensures protoc is installed for builds/checks; updates inventory drift check. |
Suppressed comments (2)
fluss-gateway/src/config.rs:962
- This error message for
identity-mode: userrefers to{CLUSTER_SERVICE_ACCOUNT_KEY}/{CLUSTER_SERVICE_SECRET_KEY}without the cluster prefix, so the rendered message won’t clearly point to the public config keys. Prefer printing the fully qualified keys for all referenced options.
problems.push(format!(
"{} user requires {CLUSTER_SERVICE_ACCOUNT_KEY} and {CLUSTER_SERVICE_SECRET_KEY}",
cluster_key(id, CLUSTER_IDENTITY_MODE_KEY)
));
fluss-gateway/src/config.rs:1047
- This startup warning mixes a fully-qualified key with bare suffix keys (
connection.idle-timeout,connection.identity-mode). Since this is operator-facing diagnostics, it should consistently print the full public keys (including the cluster prefix) for all referenced options.
warnings.push(format!(
"{} and {CLUSTER_CONNECTION_IDLE_TIMEOUT_KEY} are ignored because \
{CLUSTER_IDENTITY_MODE_KEY} is service",
cluster_key(id, CLUSTER_CONNECTION_MAX_KEY)
));
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fresh-borzoni
left a comment
Member
There was a problem hiding this comment.
@beryllw Thank you for the PR, left some comments , PTAL
fresh-borzoni
approved these changes
Aug 21, 2026
fresh-borzoni
left a comment
Member
There was a problem hiding this comment.
@beryllw Thank you, LGTM 👍
I'll merge once CI passes.
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.
Purpose
Linked issue: close #3969
Adds the typed, validated and redacted Gateway configuration on top of #3963.
Brief change log
gateway.clustersdeclaring which clusters may be configured.client.security.protocol: sasl.connection.service.account/.secretbecome canonical; the legacy SASL keys keep last-wins precedence and warn once per cluster.Secretnewtype, redacted in logs, errors and the startup dump.Documentation
Module rustdoc only; user documentation lands with the delivery task in #3957.