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

Don't pull AWS SDK dependency if it's not necessary

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.6.0
    • Affects Version/s: 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.5.1
    • Component/s: Authentication, Internal
    • None
    • Environment:
      Any Go project that uses vendoring and MongoDB driver.
    • Minor Change
    • Needed

      I have recently updated the Mongo Go driver from v1.3.5 to v1.4.6 and I have noticed that the vendor directory pulled some 35.5k lines of code. After further inspection, I noticed that most of the updated code has nothing to do with Mongo driver, but its dependency on AWS SDK. Please note that I’m not using AWS to run my code.

      After deeper dive into the code, I noticed that AWS SDK is used only for AuthN/AuthZ. The driver is using an interface abstraction called Authenticator and AWS authenticator is used in the init method in auth package to register authenticator. That is - instead of registering all the Authenticators and recognizing which one to use by its name, Authenticator can be passed directly as a field in ClientOptions. That way, the user will be in control of choosing Authenticator implementation and pull AWS Authenticator only if needed. You can take a look at the forum discussion.

            Assignee:
            isabella.siu@mongodb.com Isabella Siu (Inactive)
            Reporter:
            dusan.borovcanin@mainflux.com Dušan Borovčanin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: