[FLINK-39561][security] Extend sensitive key redaction with missing access key patterns and user-configurable additional keys#28058
Open
gaborgsomogyi wants to merge 1 commit intoapache:masterfrom
Open
Conversation
Collaborator
fb84e98 to
5b28ee2
Compare
Contributor
Author
|
@flinkbot run azure |
5b28ee2 to
5c88c48
Compare
…ccess key patterns and user-configurable additional keys
5c88c48 to
359b225
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.
What is the purpose of the change
Several cloud storage access key config names were not matched by the existing
SENSITIVE_KEYSpatterns and were therefore leaked in logs and REST API responses:fs.s3a.access.key,s3.access.key(missing access.key pattern)s3.access-key(missing access-key pattern)fs.oss.accessKeyId,fs.oss.accesskey(missing accesskey pattern)Additionally, there was no way for users to protect custom or vendor-specific sensitive keys beyond the hardcoded list.
Brief change log
SENSITIVE_KEYSarray in GlobalConfiguration:access-key,access.key,accesskey.SecurityOptions.ADDITIONAL_SENSITIVE_KEYS(security.redaction.additional-keys), a comma-separated list option that lets users extend redaction with their own key substrings. Matching is case-insensitive substring containment,consistent with the built-in behaviour.
3 call sites pass
Collections.emptyList()because they do not have access to the Flink Configuration:ActorSystemBootstrapTools.toMaskedMap— Pekko/Akka actor system debug logs will not apply user-defined additional keys.FlinkYarnSessionCli.encodeDynamicProperties— Dynamic properties passed via-Don the YARN CLI will not be redacted by user-defined additional keys in startup logs.EnvironmentInformation— Program argument logging will not apply user-defined additional keys; the built-in patterns still apply.Verifying this change
Existing + new automated tests.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude code