Make Exception for '$' Character in '$external'

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.9.2
    • Affects Version/s: 1.9.1
    • Component/s: Security
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The C# driver cannot be used to create externally authenticated users, such as Kerberos users because the driver restricts the use of '$' in database names. An exception is needed to allow references to '$external' within the driver.

      When trying to get a reference to '$external' using the following code:

      var client = new MongoClient();
      var server = client.GetServer();
      var db = server.GetDatabase("$external");
      

      The following exception is thrown:

      Database name '$external' is not valid. The character 0x0024 '$' is not allowed in database names.Parameter name: name

      A possible patch would be inside MongoDB.Driver.MongoServer.IsDatabaseNameValid(string databaseName, out string message).

              Assignee:
              Robert Stam
              Reporter:
              Peter Garafano (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: