<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:02:48 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-4718] Depend on AWS SDK for fetching credentials</title>
                <link>https://jira.mongodb.org/browse/JAVA-4718</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;&lt;b&gt;Proposal&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Add an optional dependency on both &lt;a href=&quot;https://github.com/aws/aws-sdk-java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;v1&lt;/a&gt; and &lt;a href=&quot;https://github.com/aws/aws-sdk-java-v2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;v2&lt;/a&gt; of the AWS SDK.  If v2 is present on the runtime classpath, the driver will use its &lt;tt&gt;software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider&lt;/tt&gt; to fetch credentials from the environment.  Otherwise, if v1 is present, the driver will use &lt;tt&gt;com.amazonaws.auth.DefaultAWSCredentialsProviderChain&lt;/tt&gt; to fetch the credentials.  If neither are present, the driver will use its existing code to fetch the credentials.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Motivation&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;By relying on the AWS SDK when it&apos;s available, users of AWS authentication can take advantage of all the features of the default credentials provider in the SDK, which is a superset of what&apos;s in the driver authentication spec.  The extra functionality includes:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;support for system properties in additional to environment variables&lt;/li&gt;
	&lt;li&gt;support for additional environment variables&lt;/li&gt;
	&lt;li&gt;support for additional providers, e.g. file-based configuration profiles&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="2126111">JAVA-4718</key>
            <summary>Depend on AWS SDK for fetching credentials</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Tue, 30 Aug 2022 21:25:17 +0000</created>
                <updated>Sat, 28 Oct 2023 11:20:36 +0000</updated>
                            <resolved>Wed, 19 Oct 2022 13:23:55 +0000</resolved>
                                                    <fixVersion>4.8.0</fixVersion>
                                    <component>Authentication</component>
                                        <votes>2</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4912437" author="xgen-internal-githook" created="Wed, 19 Oct 2022 13:23:35 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@mongodb.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: Use AWS SDK, if available, for AWS credential fetching (#1017)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Add optional dependencies for both AWS SDK v2 and v1&lt;/li&gt;
	&lt;li&gt;For credential fetching, use AWS SDK v2 if available. Otherwise use AWS SDK v1. Otherwise, use the existing driver implementations&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-4718&quot; title=&quot;Depend on AWS SDK for fetching credentials&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-4718&quot;&gt;&lt;del&gt;JAVA-4718&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/7b1904d3038e042ece2486b214971661da656334&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/7b1904d3038e042ece2486b214971661da656334&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4912255" author="jeff.yemin" created="Wed, 19 Oct 2022 11:59:19 +0000"  >&lt;p&gt;We&apos;re going to add v1 support to the current PR.  Thanks for the feedback.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="4910176" author="JIRAUSER1271313" created="Tue, 18 Oct 2022 16:01:51 +0000"  >&lt;p&gt;Hi Ross,&lt;/p&gt;

&lt;p&gt;While I can&apos;t find any concrete documentation for the jars provided by the Glue runtime, a very basic Glue job which does nothing but -&#160;&lt;/p&gt;

&lt;p&gt;Class.forName(&quot;software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider&quot;)&lt;/p&gt;

&lt;p&gt;fails with -&lt;/p&gt;

&lt;p&gt;ERROR &lt;span class=&quot;error&quot;&gt;&amp;#91;main&amp;#93;&lt;/span&gt; glue.ProcessLauncher (Logging.scala:logError(73)): Exception in User Class: java.lang.ClassNotFoundException : software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider&lt;/p&gt;

&lt;p&gt;which would suggest that v2 SDK is missing by default. Meanwhile, I have been able to successfully fetch AWS credentials using the v1 AWS SDK. In fact, we have actually created a custom MongoClientFactory implementation which fetches credentials using the v1 SDK as the DefaultMongoClientFactory implementation failed to fetch them. While this works fine as a workaround, we would rather prefer the default implementation to work. We have an open support ticket for this and this ticket was pointed out to us as the potential resolution. So, it would definitely help us out if v1 support was added as well.&lt;/p&gt;

&lt;p&gt;Mongo Spark docs for reference on the mongoClientFactory bit - &lt;a href=&quot;https://www.mongodb.com/docs/spark-connector/current/configuration/write/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/docs/spark-connector/current/configuration/write/&lt;/a&gt;&#160;&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Rohit Pant&lt;/p&gt;</comment>
                            <comment id="4909467" author="ross@10gen.com" created="Tue, 18 Oct 2022 12:40:25 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rohit.pant%40gs.com&quot; class=&quot;user-hover&quot; rel=&quot;rohit.pant@gs.com&quot;&gt;rohit.pant@gs.com&lt;/a&gt;,&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;I believe the Glue runtime only provides the v1 SDK by default.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Do you have any information or links regarding that? I understand that the namespaces are different for the different versions &lt;tt&gt;com.amazonaws.auth&lt;/tt&gt; and &lt;tt&gt;software.amazon.awssdk.auth&lt;/tt&gt; so it would be possible. Its just  v2 is stable and preferred by aws - it came out of beta in 2018.  So just wanted to clarify if new users would be wanting to support the older version.&lt;/p&gt;

&lt;p&gt;Many thanks,&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="4909183" author="JIRAUSER1271313" created="Tue, 18 Oct 2022 09:32:22 +0000"  >&lt;p&gt;Hi Jeffrey,&lt;/p&gt;

&lt;p&gt;Thanks for adding this feature to the Mongo Java Driver! This might help us resolve MONGODB-AWS authn issues that we have been facing with the Mongo Spark Connector in AWS Glue jobs. I was going through the MR that you have raised. Can you also consider adding support for the v1 of the AWS SDK as you have mentioned in the proposal? I believe the Glue runtime only provides the v1 SDK by default. While we could always package the additional jar on our own, this would definitely make it simpler.&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Rohit Pant&lt;/p&gt;</comment>
                            <comment id="4907897" author="jeff.yemin" created="Mon, 17 Oct 2022 18:18:33 +0000"  >&lt;p&gt;&lt;b&gt;Documentation&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Document that applications should add a dependency to &lt;tt&gt;software.amazon.awssdk:auth&lt;/tt&gt; to get access to all the different way to get credentials that are supported by &lt;tt&gt;software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider&lt;/tt&gt; but not supported natively by the Java driver.  See &lt;a href=&quot;https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/auth/credentials/DefaultCredentialsProvider.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/auth/credentials/DefaultCredentialsProvider.html&lt;/a&gt; for details.&lt;/p&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                        <issuelink>
            <issuekey id="2227337">JAVA-4836</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1870014">JAVA-4292</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2100942">JAVA-4690</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10250"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr3mmh:0400000942rf</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>