<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:25:30 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-11329] Authentication Error number does not match the error code in error message</title>
                <link>https://jira.mongodb.org/browse/SERVER-11329</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We found that some of the Error numbers do not match the error codes in the error message body, for example:&lt;/p&gt;

&lt;p&gt;Error: 18 &lt;/p&gt;
{ ok: 0.0, errmsg: &quot;X.509 authentication must always use the $external database.&quot;, code: 17 }

&lt;p&gt;Error: 18 &lt;/p&gt;
{ ok: 0.0, errmsg: &quot;User not found&quot;, code: 11 }

&lt;p&gt;Should they be the same or it is expected behavior?&lt;/p&gt;

&lt;p&gt;You can observe the above output by running the test case found here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/10gen/QA/blob/master/QA-335/auth_error_code_X509.js&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/QA/blob/master/QA-335/auth_error_code_X509.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can uncomment line 25 to see a detailed error message.&lt;/p&gt;</description>
                <environment></environment>
        <key id="95404">SERVER-11329</key>
            <summary>Authentication Error number does not match the error code in error message</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="andreas.nilsson">Andreas Nilsson</assignee>
                                    <reporter username="bin.lan">Bin Lan</reporter>
                        <labels>
                            <label>26qa</label>
                    </labels>
                <created>Wed, 23 Oct 2013 14:29:55 +0000</created>
                <updated>Mon, 11 Jul 2016 17:39:49 +0000</updated>
                            <resolved>Wed, 30 Oct 2013 20:02:52 +0000</resolved>
                                    <version>2.5.3</version>
                                    <fixVersion>2.5.4</fixVersion>
                                    <component>Logging</component>
                    <component>Security</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="449021" author="auto" created="Wed, 30 Oct 2013 20:00:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;agralius&apos;, u&apos;name&apos;: u&apos;Andreas Nilsson&apos;, u&apos;email&apos;: u&apos;andreas.nilsson@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-11329&quot; title=&quot;Authentication Error number does not match the error code in error message&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-11329&quot;&gt;&lt;del&gt;SERVER-11329&lt;/del&gt;&lt;/a&gt; Display correct auth return values in the shell&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a154946a48b3fea77747f810ff60dce734e9b0dd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a154946a48b3fea77747f810ff60dce734e9b0dd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="446894" author="andreas.nilsson@10gen.com" created="Fri, 25 Oct 2013 19:26:44 +0000"  >&lt;p&gt;In the shell (client/dbclient.cpp) lines 553 and 580 we call auth and uasserts with ErrorCodes::AuthenticationFailed and the errmsg from the auth call. That error message might contain a different error code as displayed above.&lt;/p&gt;

&lt;p&gt;Alternative ways forward:&lt;br/&gt;
1. Keep the current behavior&lt;br/&gt;
2. Change the error code of the uassert to reflect the return value&lt;br/&gt;
3. Change the return code to always be AuthenticationFailed for auth failures.&lt;/p&gt;</comment>
                            <comment id="446873" author="andreas.nilsson@10gen.com" created="Fri, 25 Oct 2013 18:43:06 +0000"  >&lt;p&gt;Here is another one when using a disabled auth mechanism:&lt;/p&gt;

&lt;p&gt;Error: 18 &lt;/p&gt;
{ ok: 0.0, errmsg: &quot;Challenge-response authentication using getnonce and authenticate commands is disabled.&quot;, code: 2 }</comment>
                            <comment id="446100" author="andreas.nilsson@10gen.com" created="Thu, 24 Oct 2013 15:55:53 +0000"  >&lt;p&gt;So these correctly corresponds to:&lt;br/&gt;
ErrorCodes::ProtocolError (17)&lt;br/&gt;
ErrorCodes::UserNotFound (11)&lt;/p&gt;

&lt;p&gt;and they get wrapped into an AuthenticationFailed 18. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schwerin&quot; class=&quot;user-hover&quot; rel=&quot;schwerin&quot;&gt;schwerin&lt;/a&gt;, what do you want to do about this? I remember us specifically choosing ProtocolError over AuthenticationFailed in the x.509 case.&lt;/p&gt;
</comment>
                            <comment id="445675" author="bin.lan@10gen.com" created="Wed, 23 Oct 2013 21:30:04 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andreas.nilsson%4010gen.com&quot; class=&quot;user-hover&quot; rel=&quot;andreas.nilsson@10gen.com&quot;&gt;andreas.nilsson@10gen.com&lt;/a&gt;, I updated the ticket with the actual test case we uploaded to github.&lt;/p&gt;</comment>
                            <comment id="445632" author="andreas.nilsson@10gen.com" created="Wed, 23 Oct 2013 20:37:57 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bin.lan%4010gen.com&quot; class=&quot;user-hover&quot; rel=&quot;bin.lan@10gen.com&quot;&gt;bin.lan@10gen.com&lt;/a&gt; can you please provide the scenarios to reproduce these error messages.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="68472">SERVER-8983</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 23 Oct 2013 20:37:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 16 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, 16 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andreas.nilsson</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>bin.lan</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrm9yv:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>87368</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_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|hsp7qv:</customfieldvalue>

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