Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-529

Throw an Exception when Multiple Credentials are Used for the Same Database

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.4
    • Affects Version/s: 1.8.2
    • Component/s: None
    • Minor Change

      For the MONGO-CR authentication mode (old auth), we are permitted to cache credentials per database within a single instance of MongoClient. However, when a second set of credentials is applied to a given database the original user is actually getting logged out on the MongoDB side.

      Since we also greedily authenticate the entire connection pool (required for 2.4) this poses a bit of a problem for us.

      When a client attempts to authenticate with a second set of credentials against the same database we are currently just quietly replacing the original credentials in the cache but we should actually be throwing an explicit exception per the authentication spec.

      To use a different set of credentials on the same database, an explicit logout or a new MongoClient instance would be required.

            Assignee:
            brandon.black@10gen.com Brandon Black
            Reporter:
            brandon.black@10gen.com Brandon Black
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: