<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:40:05 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-56741] How was _schema collection created?</title>
                <link>https://jira.mongodb.org/browse/SERVER-56741</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;We are using trinodb to fetch the data from our existing MongoDB cluster.&lt;/p&gt;

&lt;p&gt;In order to make connection, we created a user with readonly privileges as:&lt;/p&gt;

&lt;p&gt;&quot;_id&quot; : &quot;admin.readonly&quot;, &quot;_id&quot; : &quot;admin.readonly&quot;, &quot;userId&quot; : UUID(&quot;***&quot;), &quot;user&quot; : &quot;readonly&quot;, &quot;db&quot; : &quot;admin&quot;, &quot;roles&quot; : [ { &quot;role&quot; : &quot;clusterMonitor&quot;, &quot;db&quot; : &quot;admin&quot; }, { &quot;role&quot; : &quot;readAnyDatabase&quot;, &quot;db&quot; : &quot;admin&quot; } ],&lt;/p&gt;

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

&lt;p&gt;When we make connection using trinodb, we found a collection named &quot;_schema&quot; is created and we found metadata information like data type and collections name inside it.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://trino.io/docs/current/connector/mongodb.html#mongodb-schema-collection&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://trino.io/docs/current/connector/mongodb.html#mongodb-schema-collection&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we are wondering with readonly, how it allow to create &quot;_schema&quot; collection.&lt;/p&gt;

&lt;p&gt;Please help us to understand if we are having any leakage/missing in our user management or anything.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1706340">SERVER-56741</key>
            <summary>How was _schema collection created?</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="eric.sedor@mongodb.com">Eric Sedor</assignee>
                                    <reporter username="aayushi.mangal@visiblealpha.com">Aayushi  Mangal</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 May 2021 08:46:58 +0000</created>
                <updated>Wed, 1 Jun 2022 17:27:41 +0000</updated>
                            <resolved>Thu, 13 May 2021 16:57:17 +0000</resolved>
                                    <version>4.2.8</version>
                                                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="3772113" author="eric.sedor" created="Thu, 13 May 2021 16:56:33 +0000"  >&lt;p&gt;Other lines logged by &lt;tt&gt;conn557970&lt;/tt&gt; include operations I would expect to see from the &lt;a href=&quot;https://docs.mongodb.com/v4.2/core/sharding-balancer-administration/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sharded cluster balancer&lt;/a&gt; which runs on the CSRS primary.&lt;/p&gt;

&lt;p&gt;Unfortunately I will need to defer to the community forums for further discussion about how to best address your questions.&lt;/p&gt;</comment>
                            <comment id="3772057" author="JIRAUSER1269214" created="Thu, 13 May 2021 16:41:16 +0000"  >&lt;p&gt;Thanks Eric, I will back trace this logs, but before closing it can you highlight that line that is coming from config primary , and also user name at least that it is creating collection. As create collection statement is clearly been logged. You want me to trace all the lines for this connection?&lt;/p&gt;</comment>
                            <comment id="3771793" author="eric.sedor" created="Thu, 13 May 2021 15:25:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=aayushi.mangal%40visiblealpha.com&quot; class=&quot;user-hover&quot; rel=&quot;aayushi.mangal@visiblealpha.com&quot;&gt;aayushi.mangal@visiblealpha.com&lt;/a&gt; it looks like these logs do not cover the full lifetime of &lt;tt&gt;conn557970&lt;/tt&gt;, but I see log lines that strongly suggest the connection is from your sharded cluster&apos;s config server replica set primary, which is likely not be authenticating to this node as an end-user.&lt;/p&gt;

&lt;p&gt;This SERVER project is for reporting bugs and making feature suggestions for the MongoDB server. For assistance troubleshooting and understanding where this collection comes from, I encourage you to start with our community by posting on the &lt;a href=&quot;https://community.mongodb.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB Developer Community Forums&lt;/a&gt;. Users there can assist you in tracing operations in sharded clusters and identifying the source of this operation.&lt;/p&gt;

&lt;p&gt;If your discussion there leads to evidence of a bug, we would be happy to investigate further here in this jira project.&lt;/p&gt;</comment>
                            <comment id="3771120" author="JIRAUSER1269214" created="Thu, 13 May 2021 09:04:05 +0000"  >&lt;p&gt;Hi Eric, I have checked details of that connection, but doesnot found the reason for this.. I need your help to debug this and found the reason or any miss we are having at any of the end.&lt;/p&gt;

&lt;p&gt;Logs uploaded&lt;/p&gt;</comment>
                            <comment id="3767908" author="eric.sedor" created="Tue, 11 May 2021 21:32:48 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=aayushi.mangal%40visiblealpha.com&quot; class=&quot;user-hover&quot; rel=&quot;aayushi.mangal@visiblealpha.com&quot;&gt;aayushi.mangal@visiblealpha.com&lt;/a&gt; sorry if I was unclear. I&apos;m asking for the log line that shows what user authenticated on &lt;tt&gt;conn557970&lt;/tt&gt;. If you&apos;re unsure, can you please upload the logs to this &lt;a href=&quot;https://10gen-httpsupload.s3.amazonaws.com/upload_forms/947b3548-b951-41a8-9d18-b1a0dde67372.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;secure upload portal&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="3765849" author="JIRAUSER1269213" created="Tue, 11 May 2021 08:25:25 +0000"  >&lt;p&gt;Hi Eric, My question still persist that how trinodb can create anything from another user also, if it is not allowed/not used or anything.&lt;/p&gt;</comment>
                            <comment id="3764568" author="eric.sedor" created="Mon, 10 May 2021 18:26:23 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=aayushi.mangal%40visiblealpha.com&quot; class=&quot;user-hover&quot; rel=&quot;aayushi.mangal@visiblealpha.com&quot;&gt;aayushi.mangal@visiblealpha.com&lt;/a&gt;, it is my initial suspicion based on the documentation you linked that Trino is creating this collection as part of its management activities using another user. Could you start by confirming in the logs what user authenticated to conn557970 prior to the log line you provided?&lt;/p&gt;</comment>
                            <comment id="3763036" author="JIRAUSER1269213" created="Mon, 10 May 2021 08:40:29 +0000"  >&lt;p&gt;Also this is the log entry:&lt;/p&gt;

&lt;p&gt;2021-04-13T06:55:21.328-0500 I ACCESS &lt;span class=&quot;error&quot;&gt;&amp;#91;conn1476202&amp;#93;&lt;/span&gt; Successfully authenticated as principal __system on local from client ip:54380&lt;br/&gt;
2021-04-13T06:55:21.484-0500 I STORAGE &lt;span class=&quot;error&quot;&gt;&amp;#91;conn557970&amp;#93;&lt;/span&gt; createCollection: insightsDB._schema with generated UUID: a219482a-e0c9-4308-bf77-a1b629d9c09e and options: {}&lt;br/&gt;
2021-04-13T06:55:21.493-0500 I INDEX &lt;span class=&quot;error&quot;&gt;&amp;#91;conn557970&amp;#93;&lt;/span&gt; index build: done building index &lt;em&gt;id&lt;/em&gt; on ns insightsDB._schema&lt;br/&gt;
2021-04-13T06:55:21.537-0500 I INDEX &lt;span class=&quot;error&quot;&gt;&amp;#91;conn1475968&amp;#93;&lt;/span&gt; index build: starting on insightsDB._schema properties: { v: 2, unique: true, key: &lt;/p&gt;
{ table: 1 }
&lt;p&gt;, name: &quot;table_1&quot;, ns: &quot;insightsDB._schema&quot; } using method: Hybrid&lt;/p&gt;</comment>
                            <comment id="3763035" author="JIRAUSER1269213" created="Mon, 10 May 2021 08:40:12 +0000"  >&lt;p&gt;Yes, that will be failed. Did you found any &quot;_schema&quot; collection already created in your database. With 1 or 2 metadata entry.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="3760841" author="JIRAUSER1259903" created="Fri, 7 May 2021 14:11:40 +0000"  >&lt;p&gt;As far as I tried in MongoDB 4.2.8 &amp;amp; 4.4.5 and Trino 353, I couldn&apos;t reproduce it. SELECT query (create _schema collection&#160;internally) failed with unauthorized message.&#160;&lt;/p&gt;</comment>
                            <comment id="3760697" author="JIRAUSER1269214" created="Fri, 7 May 2021 13:10:50 +0000"  >&lt;p&gt;Connection used:&#160;&lt;/p&gt;

&lt;p&gt;connector.name=mongodb&lt;br/&gt;
mongodb.seeds=mongo-router&lt;br/&gt;
mongodb.read-preference=SECONDARY&lt;br/&gt;
mongodb.credentials=readonly:pwd@admin&lt;br/&gt;
mongodb.case-insensitive-name-matching=true&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>11.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 7 May 2021 14:11:40 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 38 weeks, 6 days 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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 38 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>aayushi.mangal3@gmail.com</customfieldvalue>
            <customfieldvalue>aayushi.mangal@visiblealpha.com</customfieldvalue>
            <customfieldvalue>eric.sedor@mongodb.com</customfieldvalue>
            <customfieldvalue>ebyhry@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hz95nz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hytynj:</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_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>
                                    <customfieldvalue><![CDATA[eric.sedor@mongodb.com]]></customfieldvalue>
    

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

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