You'll want `:validate => :password` here and later in your code access the value with @key.value. For example, from the xmpp input:

* `config :password, :validate => :password, :required => :true` - https://github.com/logstash/logstash/blob/master/lib/logstash/inputs/xmpp.rb#L21
* `@password.value` - https://github.com/logstash/logstash/blob/master/lib/logstash/inputs/xmpp.rb#L42

The reason for this is to prevent logstash from accidentally logging the auth key itself.