[SERVER-46629] Write all shell commands to history Created: 04/Mar/20  Updated: 20/Oct/23  Resolved: 20/Oct/23

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Oleg Pudeyev (Inactive) Assignee: Backlog - Security Team
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-11981 calls to db.createUser() function not... Closed
Related
related to SERVER-44008 Create User commands are not added to... Closed
Assigned Teams:
Server Security
Sprint: Security 2020-03-23
Participants:

 Description   

Currently the shell will not write some user entered commands to history. This makes using those commands in the shell painful, as any mistake in them requires the user to type the entire command out again (or use a separate editor to store & edit them).

Expected behavior:

As a user of MongoDB shell, I want all commands that I enter to be stored in history, so that I can quickly revise these commands if I made a mistake in them or they failed for any reason.

Actual behavior:

createUser commands are not recorded.



 Comments   
Comment by Spencer Jackson [ 31/Mar/20 ]

The current UX on this is a little rough, and this has bitten me quite a few times. I've known people to define their own aliases which wrap redacted commands, so that the redactor won't see them. However, I know that some people really care about the redaction occurring, even if it's imperfect. I've spoken this over with salman.baset in Product Management, and we came to the conclusion that having a mechanism to keep raw passwords out of plaintexts files is important. There might be some implementations of such a mitigation which are more friendly for debugging.

Comment by Eric Milkie [ 05/Mar/20 ]

You're right, I forgot about that. We should reconsider this.

Comment by Oleg Pudeyev (Inactive) [ 05/Mar/20 ]

milkie In the comment in https://jira.mongodb.org/browse/SERVER-44008?focusedCommentId=2485461&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-2485461 you suggested I opened a new ticket to request that all shell commands are added to history, which is what I have done with this ticket, stating:

> It sounds like you could file a new SERVER ticket against the shell requesting the removal of history munging for all of the cases where we hide it today, for consideration.

Was this ticket "considered" in the way you meant in this comment?

Generated at Thu Feb 08 05:12:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.