<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:12 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-840] Java driver doesn&apos;t read the authentication level of the server</title>
                <link>https://jira.mongodb.org/browse/JAVA-840</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I&apos;m configuring the driver to authenticate to a mongoDB server.&lt;br/&gt;
The mongoDB server doesn&apos;t require authentication. While the driver tries to authenticate it gets this error:&lt;br/&gt;
com.mongodb.CommandFailureException: &lt;/p&gt;
{ &quot;serverUsed&quot; : &quot;/127.0.0.1:27115&quot; , &quot;errmsg&quot; : &quot;auth fails&quot; , &quot;ok&quot; : 0.0}
&lt;p&gt;Since the mongoDB default option is not to authenticate most of our db&apos;s doesn&apos;t require any authentication. Supporting this will allow us to gradually add authentication to our cluster without any down time.&lt;/p&gt;</description>
                <environment></environment>
        <key id="77637">JAVA-840</key>
            <summary>Java driver doesn&apos;t read the authentication level of the server</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="noamal">Noam Almog</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Mon, 3 Jun 2013 12:24:47 +0000</created>
                <updated>Tue, 25 Jun 2013 04:21:17 +0000</updated>
                            <resolved>Tue, 25 Jun 2013 04:21:17 +0000</resolved>
                                    <version>2.11.1</version>
                                                    <component>Authentication</component>
                    <component>Configuration</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="352373" author="jeff.yemin" created="Tue, 4 Jun 2013 12:31:15 +0000"  >&lt;p&gt;No, it will succeed.  That&apos;s the only way to do what you want to do.  The driver has no way to detect whether a server was started with --auth.&lt;/p&gt;</comment>
                            <comment id="352336" author="noamal" created="Tue, 4 Jun 2013 11:30:03 +0000"  >&lt;p&gt;Hi Jeff,&lt;/p&gt;

&lt;p&gt;I&apos;m trying to authenticate against a server without the user that i didn&apos;t start with --auth.&lt;br/&gt;
If there is a user defined in the DB and I&apos;m not starting the server with --auth, will the authentication fail ?&lt;/p&gt;</comment>
                            <comment id="352332" author="jeff.yemin" created="Tue, 4 Jun 2013 11:18:08 +0000"  >&lt;p&gt;What do you mean by an &quot;unauthenticated&quot; server?  One that doesn&apos;t have the user created yet, one started without --auth, or both?&lt;/p&gt;</comment>
                            <comment id="352219" author="noamal" created="Tue, 4 Jun 2013 07:00:06 +0000"  >&lt;p&gt;Our problem right now is that if we start the client (using the java driver) it fails to authenticate against an unauthenticated server. The only way to override this behavior is by overriding that java driver code.&lt;br/&gt;
If we had driver that could recognize when the server is using authentication or at least bypass the authentication failure in this case we could have upgraded all the clients and then restart the entire mongo cluster which would make the entire cluster to use authentication with minimal down time.&lt;br/&gt;
To do that we need at least a more relaxed authentication method.&lt;/p&gt;</comment>
                            <comment id="351845" author="jeff.yemin" created="Mon, 3 Jun 2013 19:26:09 +0000"  >&lt;p&gt;There is no real way for the driver to support this without server support, except for standalone MongoDB servers (no replica set, no sharding).  For the standalone case, the upgrade path is as follows:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Add users to whatever databases you need&lt;/li&gt;
	&lt;li&gt;Start authenticating with the driver, e.g. use a URI like &quot;mongodb://user:pwd@localhost:27017/admin&quot;&lt;/li&gt;
	&lt;li&gt;Re-start the server with --auth flag&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The problem is that for replica sets and sharded clusters, there is no way to do add a keyfile without downtime.  See &lt;a href=&quot;http://docs.mongodb.org/manual/core/replication/#security&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/core/replication/#security&lt;/a&gt;.  This will most likely be changed in the next server release, 2.6, so that you&apos;ll be able to do rolling upgrades.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10012"><![CDATA[Major Change]]></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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrqxjr:</customfieldvalue>

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