Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-485

Authentication degrade after 0.0.6

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.0.9
    • Affects Version/s: 0.0.8, 0.0.7
    • Component/s: Authentication
    • None

      in version 0.0.7 and 0.0.8 i get the following error when inserting into a collection:

      "auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed."

      i am running mongo in docker and have created a new database called "testdb" and added a user to it like so:

      db.createUser({user: "sut", pwd: "Password1", roles: [ "readWrite" ]});

      this code reproduces the error:

      func main() {
          client, err := mongo.NewClient("mongodb://sut:Password1@127.0.0.1:27017/testdb")
          if err != nil {
              log.Fatal(err)
          }
          err = client.Connect(context.TODO())
          if err != nil {
              log.Fatal(err)
          }
          collection := client.Database("testdb").Collection("qux")
          _, err = collection.InsertOne(context.Background(), map[string]string{"hello": "world"})
          if err != nil {
              log.Fatal(err)
          }
      }
      

      in 0.0.6 it works like a charm.

            Assignee:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Reporter:
            larshelmer lars helmer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: