Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Merge "sanitize pass but not sanitize 'mysql' for varz" into services…
Browse files Browse the repository at this point in the history
…-r11
  • Loading branch information
figo authored and Gerrit Code Review committed Apr 26, 2012
2 parents 349f417 + 627fa3e commit 2bae26e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion common/lib/vcap/component.rb
Expand Up @@ -45,7 +45,7 @@ def call(env)
class Component

# We will suppress these from normal varz reporting by default.
CONFIG_SUPPRESS = Set.new([:mbus, :service_mbus, :keys, :database_environment, :mysql, :password])
CONFIG_SUPPRESS = Set.new([:mbus, :service_mbus, :keys, :database_environment, :password, :pass])

class << self

Expand Down
16 changes: 9 additions & 7 deletions common/spec/functional/component_spec.rb
Expand Up @@ -65,8 +65,8 @@
options[:config] = {
:mbus => 'nats://user:pass@localhost:4223',
:keys => 'sekret!keys',
:mysql => { :user => 'derek', :password => 'sekret!' },
:password => 'crazy',
:pass => 'crazy',
:database_environment => { :stuff => 'should not see' }
}
VCAP::Component.register(options)
Expand All @@ -81,10 +81,10 @@
options[:config] = {
:mbus => 'nats://user:pass@localhost:4223',
:keys => 'sekret!keys',
:mysql => { :user => 'derek', :password => 'sekret!' },
:password => 'crazy',
:pass => 'crazy',
:database_environment => { :stuff => 'should not see' },
:this_is_ok => { :password => 'sekret!', :mysql => 'sekret!', :test => 'ok'}
:this_is_ok => { :password => 'sekret!', :pass => 'sekret!', :test => 'ok'}
}
VCAP::Component.register(options)
done
Expand All @@ -98,20 +98,22 @@
options[:config] = {
:mbus => 'nats://user:pass@localhost:4223',
:keys => 'sekret!keys',
:mysql => { :user => 'derek', :password => 'sekret!' },
:mysql => { :user => 'derek', :password => 'sekret!', :pass => 'sekret!' },
:password => 'crazy',
:pass => 'crazy',
:database_environment => { :stuff => 'should not see' },
:this_is_ok => { :password => 'sekret!', :mysql => 'sekret!', :test => 'ok'}
:this_is_ok => { :password => 'sekret!', :pass => 'sekret!', :mysql => 'sekret!', :test => 'ok'}
}
VCAP::Component.register(options)

options.should include(:config => {
:mbus => 'nats://user:pass@localhost:4223',
:keys => 'sekret!keys',
:mysql => { :user => 'derek', :password => 'sekret!' },
:mysql => { :user => 'derek', :password => 'sekret!', :pass => 'sekret!' },
:password => 'crazy',
:pass => 'crazy',
:database_environment => { :stuff => 'should not see' },
:this_is_ok => { :password => 'sekret!', :mysql => 'sekret!', :test => 'ok'}
:this_is_ok => { :password => 'sekret!', :pass => 'sekret!', :mysql => 'sekret!', :test => 'ok'}
})
done
end
Expand Down

0 comments on commit 2bae26e

Please sign in to comment.