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

Add default empty string value for fields in MergeAuthzCollections command

    XMLWordPrintableJSON

Details

    • Task
    • Status: Accepted
    • Major - P3
    • Resolution: Unresolved
    • None
    • 100.7.1
    • mongorestore
    • 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

              Unassigned Unassigned
              evgeni.dobranov@mongodb.com Evgeni Dobranov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: