<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:04:51 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-66238] Unable to view system.views on mongos </title>
                <link>https://jira.mongodb.org/browse/SERVER-66238</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;For a sharded cluster with auth enabled, running any operation on &lt;tt&gt;system.views&lt;/tt&gt; results in an authentication error despite being connected as a user with the following roles:&#160;&lt;/p&gt;

{
&#160; &#160; &#160; &#160; &quot;role&quot; : &quot;backup&quot;,
&#160; &#160; &#160; &#160; &quot;db&quot; : &quot;admin&quot;
&#160; &#160; &#160; }
&lt;p&gt;,&lt;br/&gt;
&#160; &#160; &#160; &lt;/p&gt;
{
&#160; &#160; &#160; &#160; &quot;role&quot; : &quot;clusterMonitor&quot;,
&#160; &#160; &#160; &#160; &quot;db&quot; : &quot;admin&quot;
&#160; &#160; &#160; }
&lt;p&gt;,&lt;br/&gt;
&#160; &#160; &#160; &lt;/p&gt;
{
&#160; &#160; &#160; &#160; &quot;role&quot; : &quot;dbAdminAnyDatabase&quot;,
&#160; &#160; &#160; &#160; &quot;db&quot; : &quot;admin&quot;
&#160; &#160; &#160; }
&lt;p&gt;,&lt;br/&gt;
&#160; &#160; &#160; &lt;/p&gt;
{
&#160; &#160; &#160; &#160; &quot;role&quot; : &quot;enableSharding&quot;,
&#160; &#160; &#160; &#160; &quot;db&quot; : &quot;admin&quot;
&#160; &#160; &#160; }
&lt;p&gt;,&lt;br/&gt;
&#160; &#160; &#160; &lt;/p&gt;
{
&#160; &#160; &#160; &#160; &quot;role&quot; : &quot;readWriteAnyDatabase&quot;,
&#160; &#160; &#160; &#160; &quot;db&quot; : &quot;admin&quot;
&#160; &#160; &#160; }

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Additionally, when I run &lt;tt&gt;show collections&lt;/tt&gt; on a database with views, the &lt;tt&gt;system.views&lt;/tt&gt; collection is not shown. This behavior differs from that of a replica set. When I create a replica set with auth and authenticate as a user with the same roles as above, I see the &lt;tt&gt;system.views&lt;/tt&gt; collection and am able to run operations on the collection accordingly. &lt;/p&gt;

&lt;p&gt;Is this difference in behavior between mongos and mongod intentional? &lt;/p&gt;</description>
                <environment></environment>
        <key id="2040272">SERVER-66238</key>
            <summary>Unable to view system.views on mongos </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="11262" iconUrl="https://jira.mongodb.org/images/icons/statuses/generic.png" description="">Investigating</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="julia.ruddy@mongodb.com">Julia Ruddy</assignee>
                                    <reporter username="julia.ruddy@mongodb.com">Julia Ruddy</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 May 2022 14:13:33 +0000</created>
                <updated>Tue, 17 May 2022 16:15:24 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="4553584" author="sara.golemon" created="Tue, 17 May 2022 16:12:30 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=julia.ruddy%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;julia.ruddy@mongodb.com&quot;&gt;julia.ruddy@mongodb.com&lt;/a&gt; I&apos;m not seeing the behavior you describe in my attempts to reproduce based on the information you provided: &lt;a href=&quot;https://github.com/10gen/mongo/commit/5c022b45fc2e492d14305b3b6305994d6ae7fa9d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo/commit/5c022b45fc2e492d14305b3b6305994d6ae7fa9d&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;m getting the expected &quot;Unauthorized to run find on test.system.views&quot; exception for standalone, replset, and sharding.  Could you take a look at my test case and advice where I&apos;m diverging from yours?  Or perhaps provide your own repro script?&lt;/p&gt;</comment>
                            <comment id="4539969" author="JIRAUSER1265262" created="Tue, 10 May 2022 21:31:52 +0000"  >&lt;p&gt;Issue appears to be related to authentication on mongos. In &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27554&quot; title=&quot;Authorization error when using the find() method on the system.views collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27554&quot;&gt;&lt;del&gt;SERVER-27554&lt;/del&gt;&lt;/a&gt;, built-in roles generally do not provide permission to run .find() and usually require custom roles it seems. A normal workaround appears to be in FREE-189645 (or &lt;a href=&quot;https://dba.stackexchange.com/questions/247324/mongodb-admin-user-cannot-access-system-views-collection&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this stackoverflow link&lt;/a&gt;), which shows creating a custom role to get this query to work. Not sure if that may be of any help in this case since we are only seeing this behavior in mongos.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 10 May 2022 21:31:52 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 38 weeks, 1 day 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>sara.golemon@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 38 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>chris.kelly@mongodb.com</customfieldvalue>
            <customfieldvalue>julia.ruddy@mongodb.com</customfieldvalue>
            <customfieldvalue>sara.golemon@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0tsc7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0cpg8:</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>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5992">Security 2022-05-30</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;ol&gt;
	&lt;li&gt;Create a sharded cluster with auth&lt;/li&gt;
	&lt;li&gt;Create a user with the roles listed above&#160;&lt;/li&gt;
	&lt;li&gt;Connect to the mongos&#160;&lt;/li&gt;
	&lt;li&gt;Create a view on any collection&#160;&lt;/li&gt;
	&lt;li&gt;Try to run any command (i.e. &lt;tt&gt;db.system.views.find()&lt;/tt&gt; and see the&#160; authentication error&lt;/li&gt;
	&lt;li&gt;Repeat the above steps on a replica set and see that there is no error when running commands on &lt;tt&gt;system.views&lt;/tt&gt;&#160;&lt;/li&gt;
&lt;/ol&gt;
</customfieldvalue>

                        </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|i0tehj:</customfieldvalue>

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