Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2037

mongofiles inconsistent handling of --uri and --db

    • Type: Icon: Investigation Investigation
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.4.14
    • Component/s: mongofiles

      Updated: mongofiles handling of the --db argument is different from other tools:

      • mongofiles allows it with a URI, whereas other tools prohibits it
      • mongofiles has --db supersede a database in the URI
      • mongofiles provides a default for --db ('test') that still supersedes the URI

      This can result in a surprising auth failure, as users may not realize they need to add an authSource parameter to work around the behaviors above.

      Original

       

      The mongofiles command with --uri argument returns an SASL authentication failed, tested in replicaSet context (same uri with mongo shell grants access) :

      mongofiles --uri mongodb://user:pass@primary:port,secondary:port,monitor:port/database?replicaSet=replica search test

      Failed: error connecting to db server: server returned error on SASL authentication step: Authentication failed.

       

       

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            jurax33 yan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: