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

Allow overriding auth source for auth mechanism PLAIN

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • 3.0.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Go Drivers

      Context

      The PLAIN specification says about auth source:

      MUST be specified. Defaults to the database name if supplied on the connection string or $external.

      However, the Go Driver currently ignores auth source and always passes "$external" (see here). We should follow the spec and actually pass the auth source, allowing users to override it if necessary.

      Definition of done

      • Pass the provided auth source through when initializing a PLAIN authenticator. If it's empty, default to "$external".

      Pitfalls

      Some users may currently be passing an incorrect auth source when using the PLAIN auth mechanism, but their auth is working because the incorrect auth source is ignored. If we "fix" the bug, we may inadvertently break that user's auth. As a result, we may need to do this in a minor or major version release.

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: