Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1685

Refactor credential structure

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Authentication
    • None

      Our model of a credential is currently a struct that stores optional fields for the pieces of authentication information that may be provided as well as an authentication mechanism that determines how authentication should happen. The auth mechanism determines which fields should/should not be present, so we need to do checks to make sure the correct combination of fields is specified for each mechanism. This is both cumbersome internally and provides little clarity to a user constructing a credential as to which fields they need to provide depending upon their mechanism.

       

      We should refactor Credential instead to be an enum with each mechanism at the top level to provide for more static guarantees and simplify our internal auth implementation.

            Assignee:
            Unassigned Unassigned
            Reporter:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: