Add option to disable writing shell history to .dbshell

XMLWordPrintableJSON

    • Server Tooling & Methods
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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 Tooling and Methods (STM) (Inactive)
            Reporter:
            Stennie Steneker (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: