Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4503

Refactor AWS authenticator to postpone feching credentials to actual auth call

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Unknown Unknown
    • None
    • None
    • None

    Description

      Currently we fetch aws credentials right in the ctor during creatinghttps://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Driver.Core/Core/Authentication/MongoAWSAuthenticator.cs#L75 aws authenticator.
      It's not the best approach for 2 reasons:
      1. In the current code, we can't use async code path to fetch aws creds as well as cancellation token.
      2. It technically contradicts to what is required by the spec where we need to fetch credentials right before actual authentication call. The reason why it's not a big problem is only coincidence that we create MongoAWSAuthenticator few lines above before actual auth call. In case we we move creating MongoAWSAuthenticator to let's say ClusterBuilder (which at first glance the right place to do it) we will break the spec intention

      Attachments

        Activity

          People

            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: