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

Add option to disable writing shell history to .dbshell

    • Server Tooling & Methods

      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
      

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

              Created:
              Updated: