Skip to content

config: fix secret parameters written with their alias not being masked - #5694

Closed
Watson1978 wants to merge 1 commit into
fluent:masterfrom
Watson1978:config-secret-alias-mask
Closed

Watson1978 wants to merge 1 commit into
fluent:masterfrom
Watson1978:config-secret-alias-mask

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:
Fixes #

What this PR does / why we need it:
A secret parameter written with its alias is not masked, because Element#secret_param? looks up only the parameter name. For example, with config_param :token, :string, secret: true, alias: :legacy_token, the value of legacy_token appears in plain text in the using configuration file log at startup and in the config error in: log. This PR looks up the alias too. It was found in the review of #5693.

Docs Changes:
N/A

Release Note:
config: fix secret parameters written with their alias not being masked

🤖 Generated with Claude Code

Element#secret_param? looked up only the parameter name. So a secret
parameter written with its alias was shown in plain text, for example
in the "using configuration file" log at startup and in the
"config error in:" log. Look up the alias too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978

Copy link
Copy Markdown
Contributor Author

I moved this fix into #5693, because the fixes depend on each other.

@Watson1978 Watson1978 closed this Nov 27, 2026
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.

1 participant