Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29103

Add option to disable writing shell history to .dbshell

    XMLWordPrintable

Details

    Description

      It would be desirable to have an explicit option to disable writing mongo shell history to a .dbshell file in the user's home directory. Although this history does not include sensitive information related to authentication, there may be personally identifiable data included in commands or queries.

      Possible use cases:

      • as a command line parameter for mongo (eg. --nohistory) when connecting to remote servers with sensitive data
      • as a variable that can be set in the user or global mongorc.js so it takes effect in every session

      A current workaround is to make the .dbshell history file read-only. The mongo shell will continue without error if the .dbshell file cannot be read or written (as per SERVER-26871).

      For example, on a Unix-like system:

         # Ensure an empty history file
         echo "" > ~/.dbshell
       
         # Remove rwx access to the history file
         chmod 0 ~/.dbshell
      

      Attachments

        Activity

          People

            backlog-server-stm Backlog - Server Tooling and Methods (STM)
            stephen.steneker@mongodb.com Stennie Steneker
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated: