From af15e22f6f0d15aa7da4cd1f17659c76655e0f40 Mon Sep 17 00:00:00 2001 From: TAGOMORI Satoshi Date: Tue, 6 Sep 2016 19:31:04 +0900 Subject: [PATCH 1/2] add :secret option to show the list of optiosn for config_param --- lib/fluent/config/configure_proxy.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/fluent/config/configure_proxy.rb b/lib/fluent/config/configure_proxy.rb index 38e95489d8..913f58733d 100644 --- a/lib/fluent/config/configure_proxy.rb +++ b/lib/fluent/config/configure_proxy.rb @@ -235,6 +235,7 @@ def parameter_configuration(name, type = nil, **kwargs, &block) option_value_type!(name, opts, :desc, String) option_value_type!(name, opts, :alias, Symbol) + option_value_type!(name, opts, :secret, Object) # TrueClass or FalseClass... option_value_type!(name, opts, :deprecated, String) option_value_type!(name, opts, :obsoleted, String) if type == :enum From 2e3d3bf67a7ba3a57375e2254ad6a9c460a629be Mon Sep 17 00:00:00 2001 From: TAGOMORI Satoshi Date: Tue, 6 Sep 2016 19:31:44 +0900 Subject: [PATCH 2/2] add :secret option to protect secret values --- lib/fluent/plugin/in_forward.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/fluent/plugin/in_forward.rb b/lib/fluent/plugin/in_forward.rb index 468ac0a4b6..9491f38b32 100644 --- a/lib/fluent/plugin/in_forward.rb +++ b/lib/fluent/plugin/in_forward.rb @@ -58,7 +58,7 @@ def initialize desc 'The hostname' config_param :self_hostname, :string desc 'Shared key for authentication' - config_param :shared_key, :string + config_param :shared_key, :string, secret: true desc 'If true, use user based authentication' config_param :user_auth, :bool, default: false desc 'Allow anonymous source. sections required if disabled.' @@ -69,7 +69,7 @@ def initialize desc 'The username for authentication' config_param :username, :string desc 'The password for authentication' - config_param :password, :string + config_param :password, :string, secret: true end ### Client ip/network authentication & per_host shared key @@ -79,7 +79,7 @@ def initialize desc 'Network address specification' config_param :network, :string, default: nil desc 'Shared key per client' - config_param :shared_key, :string, default: nil + config_param :shared_key, :string, default: nil, secret: true desc 'Array of username.' config_param :users, :array, default: [] end