[FLINK-40539][sql-gateway] Redact sensitive values in SET; and session config responses - #29071
Merged
Merged
Conversation
…n config responses
Collaborator
mbalassi
self-requested a review
September 2, 2026 14:59
mbalassi
approved these changes
Sep 2, 2026
This was referenced Sep 3, 2026
Merged
Merged
Merged
Merged
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.
What is the purpose of the change
The SQL Gateway seeds each session's configuration with a full clone of the cluster configuration (loaded from
config.yaml), which needs redaction:SET;statement returns every session/table config entry as result rows (OperationExecutor#callSetOperation).GET /sessions/:sessionHandlereturns the session configuration as-is (GetSessionConfigHandler).Brief change log
OperationExecutor#callSetOperationnow passes the configuration map throughConfigurationUtils#hideSensitiveValuesbefore building theSET;result rows, mirroringConfigurationInfo#from.GetSessionConfigHandler#handleRequestnow redacts sensitive keys in the session configuration before returning it in theGET /sessions/:sessionHandleresponse. The redaction is applied only at this REST response boundary, not insideSession#getSessionConfig/SqlGatewayServiceImpl#getSessionConfig, since those are also used internally (e.g. materialized table script deployment, result timezone conversion) where the real, unredacted values are required.Verifying this change
This change added tests and can be verified as follows:
SqlGatewayServiceStatementITCase#testSetHidesSensitiveValues, which sets a sensitive key (s3.secret-key) viaSET, executes a bareSET;, and asserts the returned value is masked.SessionRelatedITCase#testGetSessionConfigurationHidesSensitiveValues, which opens a session with a sensitive property and assertsGET /sessions/:sessionHandlereturns the masked value.SqlGatewayServiceITCase,SqlGatewayServiceStatementITCase,SqlGatewayRestEndpointStatementITCase, andSessionRelatedITCasein full to confirm no regressions in existingSET/RESET/session-config behavior.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?