<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:55:58 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-1958] SCRAM-SHA1 authentication is not available on Android</title>
                <link>https://jira.mongodb.org/browse/JAVA-1958</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Newdescription%3A&quot;&gt;&lt;/a&gt;New description:&lt;/h4&gt;

&lt;p&gt;As of MongoDB 3.0, the default authentication protocol is a SASL implementation of SCRAM-SHA1.  The driver relies on the following classes to implement it:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; javax.crypto.Mac;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; javax.crypto.SecretKeyFactory;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; javax.crypto.spec.PBEKeySpec;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; javax.crypto.spec.SecretKeySpec;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; javax.security.sasl.SaslClient;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; javax.security.sasl.SaslException&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Some or all of these are not available on Android, which does not offer a full implementation of the JRE. &lt;/p&gt;

&lt;p&gt;Also of note is that PLAIN and GSSAPI authentication mechanisms also rely on the availability of a SASL library, so those won&apos;t function properly either.&lt;/p&gt;


&lt;h4&gt;&lt;a name=&quot;Previousdescription%3A&quot;&gt;&lt;/a&gt;Previous description:&lt;/h4&gt;

&lt;p&gt;I&apos;m developing an Android app that use the java mongodb driver 3.0.3 to connect to every instance of mongodb.&lt;/p&gt;

&lt;p&gt;At runtime I have some error:&lt;/p&gt;

&lt;p&gt;09-11 19:13:50.898 7418-7418/it.mysite.mongodbviewer W/org.bson.ObjectId&#65109; Failed to get process identifier from JMX, using random number instead java.lang.NoClassDefFoundError: Failed resolution of: Ljava/lang/management/ManagementFactory;&lt;/p&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;p&gt;com.mongodb.MongoException: java.lang.NoClassDefFoundError: com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient&lt;br/&gt;
that generate a loop with this:&lt;/p&gt;

&lt;p&gt;I/art&#65109; Rejecting re-init on previously-failed class java.lang.Class&lt;/p&gt;

&lt;p&gt;Anyone has a solution? java/lang/management/ManagementFactory seems not to exist for Android, how can you solve? If this is the center of the problem.&lt;/p&gt;


&lt;p&gt;More information at &lt;a href=&quot;http://stackoverflow.com/questions/32529484/mongodb-3-x-driver-android-compatibility/32531278#32531278&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://stackoverflow.com/questions/32529484/mongodb-3-x-driver-android-compatibility/32531278#32531278&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Android 21</environment>
        <key id="229451">JAVA-1958</key>
            <summary>SCRAM-SHA1 authentication is not available on Android</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="matfur92">Matteo Furlan</reporter>
                        <labels>
                            <label>Android</label>
                    </labels>
                <created>Fri, 11 Sep 2015 22:52:36 +0000</created>
                <updated>Thu, 1 Mar 2018 09:24:44 +0000</updated>
                            <resolved>Tue, 4 Oct 2016 19:19:26 +0000</resolved>
                                    <version>3.0.3</version>
                    <version>2.13.3</version>
                                                    <component>Authentication</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1400046" author="ross@10gen.com" created="Tue, 4 Oct 2016 19:19:26 +0000"  >&lt;p&gt;Due to the limitations of Android JRE the classes aren&apos;t available. Currently, there are no plans to support this, so I&apos;m closing the ticket as Won&apos;t Fix.&lt;/p&gt;</comment>
                            <comment id="1043115" author="tzachi_dar" created="Fri, 25 Sep 2015 07:12:36 +0000"  >&lt;p&gt;Seems like I was able to find something very limited that work:&lt;br/&gt;
This &quot;s=%7B%22CaptureDateTime%22:%20-1%7D&amp;amp;l=1&quot; does a query that gets one object (l=1) ordered by CaptureDateTime.&lt;/p&gt;</comment>
                            <comment id="1042891" author="tzachi_dar" created="Fri, 25 Sep 2015 00:26:07 +0000"  >&lt;p&gt;Hi, I have tried to use the rest api instead of the mongodb on android.&lt;/p&gt;

&lt;p&gt;Storing objects seems to work fine (using the rest api). but when doing a query I can&apos;t seem to have the query details actually work.&lt;/p&gt;

&lt;p&gt;I try to follow the rules on &lt;a href=&quot;http://docs.mongolab.com/data-api/#utf-8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongolab.com/data-api/#utf-8&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;for example, I try to follow this example:&lt;/p&gt;

&lt;p&gt;&quot;f&quot; example (include) - return all documents but include only the &quot;firstName&quot; and &quot;lastName&quot; fields:&lt;br/&gt;
&lt;a href=&quot;https://api.mongolab.com/api/1/databases/my-db/collections/my-coll?f=&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://api.mongolab.com/api/1/databases/my-db/collections/my-coll?f=&lt;/a&gt;&lt;/p&gt;
{&quot;firstName&quot;: 1, &quot;lastName&quot;: 1}
&lt;p&gt;&amp;amp;apiKey=myAPIKey&lt;/p&gt;

&lt;p&gt;and it does not work.&lt;br/&gt;
I get all the objects.&lt;/p&gt;

&lt;p&gt;My query is  &quot;f=&lt;/p&gt;
{\&quot;CaptureDateTime\&quot;: 1}
&lt;p&gt;&quot;;&lt;/p&gt;

&lt;p&gt;This is being translated to f%3D%7B%22CaptureDateTime%22%3A%201%7D&lt;/p&gt;

&lt;p&gt;and so my query is:&lt;/p&gt;

&lt;p&gt;        String url = BASE_URL + dbName + &quot;/collections/&quot; + collectionName &lt;ins&gt;&quot;?&quot; +   f%3D%7B%22CaptureDateTime%22%3A%201%7D&lt;/ins&gt; &quot;apiKey=&quot; + apiKey;&lt;/p&gt;

&lt;p&gt;but I get all thoughts of objects.&lt;/p&gt;

&lt;p&gt;Do you know what I&apos;m doing wrong?&lt;br/&gt;
Can you please give me examples to queries that work in java. (or maybe in other languages)?&lt;/p&gt;</comment>
                            <comment id="1028365" author="jeff.yemin" created="Mon, 14 Sep 2015 01:11:36 +0000"  >&lt;p&gt;As I stated earlier we don&apos;t consider this a bug, but we will consider this as a feature request.&lt;/p&gt;</comment>
                            <comment id="1028153" author="matfur92" created="Sat, 12 Sep 2015 10:08:51 +0000"  >&lt;p&gt;Hi Jeff,&lt;br/&gt;
excuse me, I answered just now on Stack Overflow. I haven&apos;t received any mail from the site.&lt;br/&gt;
Did you know if is scheduled for the addition of compatibility for Android? Can I require it?&lt;br/&gt;
Thanks alot for the disponibility&lt;/p&gt;</comment>
                            <comment id="1028066" author="jeff.yemin" created="Fri, 11 Sep 2015 23:34:38 +0000"  >&lt;p&gt;Hi Matteo,&lt;/p&gt;

&lt;p&gt;The Java driver documentation has never claimed Android support, so I don&apos;t consider this to be a bug.  As I answered on &lt;a href=&quot;http://stackoverflow.com/questions/32529484/mongodb-3-x-driver-android-compatibility&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Stack Overflow&lt;/a&gt;, the reason it doesn&apos;t work is because Android does not contain the full set of classes required by a compliant implementation of the JRE.  That said, I offered several workarounds and suggestions on Stack Overflow, and I&apos;m happy to continue discussing the available options.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="502295">JAVA-2792</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="237664">JAVA-2026</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsd233:</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>