[CSHARP-4442] Hide aws sdk in release package Created: 03/Dec/22  Updated: 12/Jan/24

Status: Backlog
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Dmitry Lukyanov (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 10
Labels: green-build-friday
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CSHARP-4911 Refactor AWS auth library to a separa... Backlog
is related to CSHARP-4635 Latest version of C# drivers depends ... Closed
Epic Link: Implement 3.0 release
Quarter: FY24Q4
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Comments   
Comment by Boris Dogadov [ 12/Jan/24 ]

Hi c.luening@reisewitz.com 

We are planning to make AWS auth an optional package in upcoming 3.0 release.
We'll be tracking this task in CSHARP-4911, please follow it for further updates.

Thanks.

Comment by Carste Luening [ 12/Jan/24 ]

Are there any news on this topic? 

the used version of AWSSDK.SecurityToken is only supporting .netcore31 we're planning to upgrade to .net8.

Would this dependency be removed in a future version or possibly updated to a newer version?

Comment by Eugenio Blabla [ 17/Apr/23 ]

cedric.luthi@gmail.com seems working, thanks for the temporary workaround. Let's hope it gets still addressed the main issue.

Comment by Cédric Luthi [ 17/Apr/23 ]

If you have full control on the connection strings and can be 100% sure that the authMechanism will never be MONGODB-AWS then you can use the following MSBuild trick to remove the AWS SDK from your build:

<Target Name="RemoveAwsSdk" AfterTargets="ResolvePackageAssets">
  <ItemGroup>
    <RuntimeCopyLocalItems Remove="@(RuntimeCopyLocalItems)" Condition="%(RuntimeCopyLocalItems.NuGetPackageId) == 'AWSSDK.Core'" />
    <RuntimeCopyLocalItems Remove="@(RuntimeCopyLocalItems)" Condition="%(RuntimeCopyLocalItems.NuGetPackageId) == 'AWSSDK.SecurityToken'" />
  </ItemGroup>
</Target>

But ideally, as already mentioned, the AWS support feature should be moved into its own NuGet package and the MongoDB.Driver.Core package should be free of the AWS SDK dependency,

Comment by Daniel Almeida [ 25/Feb/23 ]

One could not expect such a dependency in the MongoDB.Driver.Core project.

Completely agreed with @Eugenio. Supporting anything but the core functionalities should be done in a separate NuGet package, specially if the feature involves using third-party service providers packages such as AWS, Azure, etc.

Comment by Eugenio Blabla [ 15/Feb/23 ]

Please, make this happen. Right now I'm having a big problem, the solution now release the AWSSDK.dll and AWSSDK.SecurityToken.dll into the release

and automatically includes a new Analyzer

Which is an outreach having AWS in a solution that doesn't rely in any way on AWS services.

I can't understand why someone would want to integrate a third-party SDK into the core library of the DB driver(MongoDB.Driver.Core), why is this justified instead of publishing a dedicated library that covers the AWS integration? (like MongoDB.Driver.AWS)

Generated at Wed Feb 07 21:48:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.