Module Mongo::Monitoring::Event::Secure
In: lib/mongo/monitoring/event/secure.rb

Provides behavior to redact sensitive information from commands and replies.

@since 2.1.0

Methods

Constants

REDACTED_COMMANDS = [ 'authenticate', 'saslStart', 'saslContinue', 'getnonce', 'createUser', 'updateUser', 'copydbgetnonce', 'copydbsaslstart', 'copydb'   The list of commands that has the data redacted for security.

@since 2.1.0

Public Instance methods

Is compression allowed for a given command message.

@example Determine if compression is allowed for a given command.

  secure.compression_allowed?(selector)

@param [ String, Symbol ] command_name The command name.

@return [ true, false ] Whether compression can be used.

@since 2.5.0

Redact secure information from the document if it‘s command is in the list.

@example Get the redacted document.

  secure.redacted(command_name, document)

@param [ String, Symbol ] command_name The command name. @param [ BSON::Document ] document The document.

@return [ BSON::Document ] The redacted document.

@since 2.1.0

[Validate]