Module: Mongo::Monitoring::Event::Secure
- Included in:
- CommandStarted, CommandSucceeded
- Defined in:
- lib/mongo/monitoring/event/secure.rb
Overview
Provides behaviour to redact sensitive information from commands and replies.
Constant Summary collapse
- REDACTED_COMMANDS =
The list of commands that has the data redacted for security.
[ 'authenticate', 'saslStart', 'saslContinue', 'getnonce', 'createUser', 'updateUser', 'copydbgetnonce', 'copydbsaslstart', 'copydb' ].freeze
Instance Method Summary collapse
-
#redacted(command_name, document) ⇒ BSON::Document
Redact secure information from the document if it’s command is in the list.
Instance Method Details
#redacted(command_name, document) ⇒ BSON::Document
Redact secure information from the document if it’s command is in the list.
52 53 54 |
# File 'lib/mongo/monitoring/event/secure.rb', line 52 def redacted(command_name, document) REDACTED_COMMANDS.include?(command_name.to_s) ? BSON::Document.new : document end |