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

Add default empty string value for fields in MergeAuthzCollections command

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Accepted
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 100.6.0
    • Component/s: mongorestore
    • Labels:
      None

      Description

      SERVER-51866 introduced a small bug where the default empty string value for the `tempUsersCollection` and `tempRolesCollection` fields is not recognized, making both fields required. So if a mongorestore user wants to restore only the database users or only the database roles, they'll get the error described inĀ TOOLS-2946.

      Even though the server bug is fixed in SERVER-59515, we should make a redundant fix to maximize coverage for users with non-backported 4.9.0+ server binaries. We just need to add the default empty string value to the arguments if either the `users` or `roles` intents are null in (*MongoRestore).RestoreUsersOrRoles, i.e.

      bson.E{
          Key:   "tempUsersCollection", // and "tempRolesCollection" separately
          Value: "",
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              evgeni.dobranov Evgeni Dobranov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: