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

mongofiles inconsistent handling of --uri and --db

    XMLWordPrintable

    Details

    • Type: Investigation
    • Status: Accepted
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: 3.4.14
    • Fix Version/s: None
    • Component/s: mongofiles
    • Labels:

      Description

      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.

       

       

       

        Attachments

          Activity

            People

            Assignee:
            backlog-server-tools Backlog - Server Tools Team
            Reporter:
            jurax33 yan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: