[SERVER-30811] short analog for authenticationDatabase Created: 24/Aug/17  Updated: 20/Oct/23  Resolved: 20/Oct/23

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

Type: Improvement Priority: Minor - P4
Reporter: Aleksey Shirokih Assignee: Backlog - Security Team
Resolution: Won't Do Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Security
Participants:

 Description   

Please provide short analog for command --authenticationDatabase.
current one is too long.
I have to type it several times a day in different places.

--authdb will be much better.

Tnx



 Comments   
Comment by Mark Callaghan (Inactive) [ 10/Jan/20 ]

I would love to get something like -A to save time and typing. For comparison, the MySQL client (mysql) has single letter variants for most options and all of the ones I need to authenticate. The Postgres client (psql) has single letter variants for all options.

The Mongo client (mongo) only has single letter variants for user and password.

AFAIK the only way to avoid this is setup auth per database, so the database I want to use is the one that has the auth credentials. I'd rather not do that.

Comment by Matt Lord (Inactive) [ 02/Oct/18 ]

We've decided not to do this as we have a project to make fairly major overhauls to Auth in which we hope to address many of the challenges and difficulties around using auth. One of the things that this would likely remove is the necessity to specify an authenticationDB at all. 

Comment by Aleksey Shirokih [ 13/Sep/17 ]

so it seems eta for 3.8 going to staging area in 2019-2020.
tnx guys

Comment by Andrew Morrow (Inactive) [ 13/Sep/17 ]

Hi freeseacher - Thanks for filing this ticket. I understand that the parameter is somewhat lengthy. The window for non-bug-fix changes (even small ones) for 3.6 is basically closed, and we are planning some significant improvements to the auth system for MongoDB 3.8, so I am queueing this ticket up for work during 3.7 (the unstable release preceding MongoDb 3.8). If we do end up implementing this suggestion, we will consider backporting it then. In the meantime, I think your best workarounds are relying on Ctrl-R in the UNIX shell, or, potentially, writing your own shell script wrapper around the mongo shell that expands this parameter for you. I realize those aren't exactly the most appealing options, especially if you are SSH'ing into systems where you may not have extensive shell history or aliases configured, but they could both definitely save you some serious typing with a little setup.

Comment by Aleksey Shirokih [ 24/Aug/17 ]

please add that key to earliest version possible. 3.2+ will be great!

Comment by Kelsey Schubert [ 24/Aug/17 ]

Hi freeseacher,

Thanks for the improvement request – I've marked this ticket for consideration.

Kind regards,
Thomas

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