Rest / HTTP interface not working with AUTH and command

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.0.6, 2.1.0
    • Affects Version/s: 1.8.1
    • Component/s: HTTP Console
    • None
    • Environment:
      Linux 64-bit
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This bug happens both remote and localhost.

      To repro:
      ---------
      1. Configure single server with --rest and --auth.
      2. Add a user to the admin Database.
      > use admin
      > db.addUser("theadmin", "anadminpassword")
      3. Connect to HTTP UI from
      3.a. local : http://localhost:28017
      3.b. remote : http://1.2.3.4:28017

      According to the documentation 3.a. should work and 3.b. should ask for authentication.
      This works correctly.
      http://www.mongodb.org/display/DOCS/Http+Interface#HttpInterface-HTTPConsoleSecurity

      4. Use an admin-level command from the HTTP UI
      4.a. local: http://localhost:28017/listDatabases
      4.b. remote: http://1.2.3.4:28017/listDatabases

      In both cases MongoDB is throwing the following exception:
      "error loading page: unauthorized db:admin lock type:-1 client:(NONE)"

      In the case of 4.a, no authentication request is made, the http request simply fails.

              Assignee:
              Unassigned
              Reporter:
              Gaetan Voyer-Perrault (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: