Skip to content

Commit

Permalink
Merge pull request #1209 from fluent/mark-secret-parameters-of-forwar…
Browse files Browse the repository at this point in the history
…d-plugins-as-secret

Mark secret parameters of forward plugins as secret
  • Loading branch information
tagomoris authored Sep 7, 2016
2 parents d8a40cd + 2e3d3bf commit de4428f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/fluent/config/configure_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/fluent/plugin/in_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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. <client> sections required if disabled.'
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit de4428f

Please sign in to comment.