<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:19:45 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>[SERVER-9226] Cannot authenticate in 2.4.1</title>
                <link>https://jira.mongodb.org/browse/SERVER-9226</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I cannot log into mongos (authenticate) after creating a user.&lt;/p&gt;</description>
                <environment>UNIX Deb</environment>
        <key id="70616">SERVER-9226</key>
            <summary>Cannot authenticate in 2.4.1</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="9">Done</resolution>
                                        <assignee username="spencer@mongodb.com">Spencer Brody</assignee>
                                    <reporter username="ddumais@dyn.com">Donald Dumais</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Apr 2013 17:14:29 +0000</created>
                <updated>Wed, 10 Dec 2014 23:11:28 +0000</updated>
                            <resolved>Wed, 3 Apr 2013 18:44:50 +0000</resolved>
                                    <version>2.4.1</version>
                                                    <component>Security</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="305291" author="ddumais@dyn.com" created="Wed, 3 Apr 2013 18:39:32 +0000"  >&lt;p&gt;Did not realize mongos had to be started with keyFile.  That was that the issue, I am now able to authenticate the user.  As a side note, an earlier attempted to start the mongos with --keyFile and --auth  failed, instead of excluding the --auth parameter, I inadvertently excluded both keyFile and auth parameters.  Thank you.&lt;/p&gt;</comment>
                            <comment id="305220" author="spencer" created="Wed, 3 Apr 2013 17:21:48 +0000"  >&lt;p&gt;From the command lines you posted, it doesn&apos;t look like you started mongos with --keyFile.  All components of the sharded system, including all mongoses, need to be started with identical keyFiles.  Can you try adding the keyFile to mongos and see if that fixes things for you?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 3 Apr 2013 17:21:48 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 46 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 46 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>ddumais@dyn.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmylb:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>48346</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1. Start first set of core mongod nodes using auth and keyFile:&lt;br/&gt;
mongod --replSet s1 --logpath /data/logmongo/s1-a.log --dbpath /data/datamongo/s1-a --port 37017 --oplogSize 200 --fork --shardsvr --auth --keyFile /data/keyFile.txt&lt;br/&gt;
mongod --replSet s1 --logpath /data/logmongo/s1-b.log --dbpath /data/datamongo/s1-b --port 37018 --oplogSize 200 --fork --shardsvr --auth --keyFile /data/keyFile.txt&lt;br/&gt;
mongod --replSet s1 --logpath /data/logmongo/s1-c.log --dbpath /data/datamongo/s1-c --port 37019 --oplogSize 200 --fork --shardsvr --auth --keyFile /data/keyFile.txt&lt;/p&gt;

&lt;p&gt;2. Setup replica set s1:&lt;br/&gt;
mongo --port 37017&lt;br/&gt;
config = &lt;/p&gt;
{&quot;_id&quot;: &quot;s1&quot;, &quot;members&quot; : [
{&quot;_id&quot; : 0, &quot;host&quot; : &quot;localhost:37017&quot;}
&lt;p&gt;,&lt;/p&gt;
{&quot;_id&quot; : 1, &quot;host&quot; : &quot;localhost:37018&quot;}
&lt;p&gt;,&lt;/p&gt;
{&quot;_id&quot; : 2, &quot;host&quot; : &quot;localhost:37019&quot;}
&lt;p&gt;]&lt;br/&gt;
}&lt;br/&gt;
rs.initiate(config);&lt;/p&gt;

&lt;p&gt;3. Start second set of core mongod nodes using auth and keyFile:&lt;br/&gt;
mongod --replSet s2 --logpath /data/logmongo/s2-a.log --dbpath /data/datamongo/s2-a --port 47017 --oplogSize 200 --fork --shardsvr --auth --keyFile /data/keyFile.txt&lt;br/&gt;
mongod --replSet s2 --logpath /data/logmongo/s2-b.log --dbpath /data/datamongo/s2-b --port 47018 --oplogSize 200 --fork --shardsvr --auth --keyFile /data/keyFile.txt&lt;br/&gt;
mongod --replSet s2 --logpath /data/logmongo/s2-c.log --dbpath /data/datamongo/s2-c --port 47019 --oplogSize 200 --fork --shardsvr --auth --keyFile /data/keyFile.txt&lt;/p&gt;

&lt;p&gt;4. Setup replica set s2:&lt;br/&gt;
mongo --port 47017&lt;br/&gt;
config = &lt;/p&gt;
{&quot;_id&quot;: &quot;s2&quot;, &quot;members&quot; : [
{&quot;_id&quot; : 0, &quot;host&quot; : &quot;localhost:47017&quot;}
&lt;p&gt;,&lt;/p&gt;
{&quot;_id&quot; : 1, &quot;host&quot; : &quot;localhost:47018&quot;}
&lt;p&gt;,&lt;/p&gt;
{&quot;_id&quot; : 2, &quot;host&quot; : &quot;localhost:47019&quot;}
&lt;p&gt;]&lt;br/&gt;
}&lt;br/&gt;
rs.initiate(config);&lt;/p&gt;

&lt;p&gt;5. Start config servers using --auth and --keyFile:&lt;br/&gt;
mongod --logpath /data/logmongo/cfg-1.log --dbpath /data/configmongo/cfg-a --port 57017 --oplogSize 200 --fork --configsvr --auth --keyFile /data/keyFile.txt&lt;br/&gt;
mongod --logpath /data/logmongo/cfg-2.log --dbpath /data/configmongo/cfg-b --port 57018 --oplogSize 200 --fork --configsvr --auth --keyFile /data/keyFile.txt&lt;br/&gt;
mongod --logpath /data/logmongo/cfg-3.log --dbpath /data/configmongo/cfg-c --port 57019 --oplogSize 200 --fork --configsvr --auth --keyFile /data/keyFile.txt&lt;/p&gt;

&lt;p&gt;6. Start mongos process:&lt;br/&gt;
mongos --port 27017 --fork --logpath &quot;mongos-1.log&quot; --configdb localhost:57017,localhost:57018,localhost:57019&lt;/p&gt;

&lt;p&gt;7. Add shards:&lt;br/&gt;
mongos&amp;gt; db.adminCommand(&lt;/p&gt;
{&quot;addshard&quot; : &quot;s1/localhost:37017&quot;}
&lt;p&gt;);&lt;br/&gt;
mongos&amp;gt; db.adminCommand(&lt;/p&gt;
{&quot;addshard&quot; : &quot;s2/localhost:47017&quot;}
&lt;p&gt;);&lt;/p&gt;

&lt;p&gt;8. Switch to use admin database:&lt;br/&gt;
mongos&amp;gt; use admin;&lt;/p&gt;

&lt;p&gt;9. Add user (I try to add an admin user with full access for testing purposes):&lt;br/&gt;
mongos&amp;gt; db.addUser( &lt;/p&gt;
{user: &quot;admin&quot;,pwd: &quot;admin&quot;,roles: [&quot;read&quot;,&quot;readWrite&quot;,&quot;dbAdmin&quot;,&quot;userAdmin&quot;,&quot;clusterAdmin&quot;,&quot;readAnyDatabase&quot;,&quot;readWriteAnyDatabase&quot;,&quot;userAdminAnyDatabase&quot;,&quot;dbAdminAnyDatabase&quot;], otherDBRoles:
{
    config:[&quot;read&quot;,&quot;readWrite&quot;,&quot;dbAdmin&quot;,&quot;userAdmin&quot;,&quot;clusterAdmin&quot;,&quot;readAnyDatabase&quot;,&quot;readWriteAnyDatabase&quot;,&quot;userAdminAnyDatabase&quot;,&quot;dbAdminAnyDatabase&quot;],
 admin: [&quot;read&quot;,&quot;readWrite&quot;,&quot;dbAdmin&quot;,&quot;userAdmin&quot;,&quot;clusterAdmin&quot;,&quot;readAnyDatabase&quot;,&quot;readWriteAnyDatabase&quot;,&quot;userAdminAnyDatabase&quot;,&quot;dbAdminAnyDatabase&quot;]
}}
&lt;p&gt;);&lt;/p&gt;

&lt;p&gt;10. Attempt to log in as the user I just created. This is where the problem seems to be, mongo will not authenticate the user and returns an error&lt;br/&gt;
mongos&amp;gt; db.auth(&quot;admin&quot;,&quot;admin&quot;);&lt;br/&gt;
Error: 18 { code: 13106, ok: 0.0, errmsg: &quot;exception: nextSafe(): &lt;/p&gt;
{ $err: &quot;not authorized for query on admin.system.users&quot;, code: 16550 }
&lt;p&gt;&quot; }&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht036v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>