Skip to content
This repository was archived by the owner on Jan 1, 2020. It is now read-only.
This repository was archived by the owner on Jan 1, 2020. It is now read-only.

Visible password at sensu-client logs after restart #1804

@pdebashis

Description

@pdebashis

Configuring single rabbitmq, sensu is able to redact the password in client logs after restart.
But when configuring multiple rabbitmqs, plain text password is visible.

Logs for single rabbitmq config :

{
   "timestamp":"2016-04-08T16:41:35.699673-0700",
   "level":"warn",
   "message":"config file applied changes",
   "file":"/etc/sensu/conf.d/rabbitmq.json",
   "changes":{
      "rabbitmq":[
         null,
         {
            "host":"1.1.1.1",
            "port":"5671",
            "user":"sensu",
            "password":"REDACTED"
         }
      ]
   }
}

Logs for multiple rabbitmq config :

{
   "timestamp":"2016-04-08T16:41:35.699673-0700",
   "level":"warn",
   "message":"config file applied changes",
   "file":"/etc/sensu/conf.d/rabbitmq.json",
   "changes":{
      "rabbitmq":[
         null,
         [
            {
               "host":"1.1.1.1",
               "port":"5671",
               "user":"sensu",
               "password":"abc123"
            },
            {
               "host":"1.1.1.2",
               "port":"5671",
               "user":"sensu",
               "password":"abc123"
            }
         ]
      ]
   }
}

This issue seems to occur because multilpe rabbitmq config is stored in a nested array format. Sensu is not able to look up the password keyword inside the hash, inside the array and hence, not able to redact the password in logs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions