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

Deprecate the 'save_auth' option for authentication

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.10.0
    • Affects Version/s: None
    • Component/s: None

      The origin of this option is a little ambiguous, but there isn't really a valid use case for it that doesn't cause greater issues than it solves. No one has ever asked for this functionality, its just been part of our authentication code path since the very beginning.

      "I want to authenticate and login to MongoDB, but then I want the driver to immediately forget about it so that everything will be completely ruined when a problem occurs and I need to reconnect." No One Ever

      There are two main problems here when save_auth is disabled:

      1. The driver loses its ability to reconnect automatically in the event of a failover or a dirty socket instance. This is the largest problem with this bug feature.
      2. We don't have any way to reliably tell which credential sets have been applied to any given socket. This complicates things like logout which on some versions of MongoDB raises an error if you logout when you're not already logged in or vice versa.

      To resolve this, I'm going to be deprecating the save_auth option with our next release. We'll keep the API intact, but disabling save_auth will no longer have any effect on what we do underneath the hood.

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

              Created:
              Updated:
              Resolved: