<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:41:17 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>[CSHARP-1989] C# Driver Connection to MOngoDB Using Kerberos Authentication</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1989</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I am trying to connect from my client application to a replicate set in MongoDB which is setup using Kerberos connection. My connection string is something like below:&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;red&quot;&gt;mongodb://&lt;span class=&quot;error&quot;&gt;&amp;#91;user_name&amp;#93;&lt;/span&gt;%40[DO:&lt;span class=&quot;error&quot;&gt;&amp;#91;password&amp;#93;&lt;/span&gt;@HOST1:27017,HOST2:27017,HOST3:27017/?authMechanism=GSSAPI&amp;amp;authMechanismProperties=SERVICE_NAME:Mongo27017/?writePreference=HOST1:27017&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;I am getting the error message : Unable to connect using sasl protocol mechanism GSSAPI.&lt;/p&gt;

&lt;p&gt;We are using Enterprise version of MongoDB. From MongoShelll, I am able to connect successfully. I am using 2.4.3 C# driver for MongDB. Please assist.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Varun&lt;/p&gt;

</description>
                <environment>Windows</environment>
        <key id="388088">CSHARP-1989</key>
            <summary>C# Driver Connection to MOngoDB Using Kerberos Authentication</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="13202">Works as Designed</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="varun.bhola@cibc.com">Varun Bhola</reporter>
                        <labels>
                            <label>question</label>
                    </labels>
                <created>Mon, 29 May 2017 18:53:17 +0000</created>
                <updated>Fri, 27 Oct 2023 13:25:07 +0000</updated>
                            <resolved>Tue, 30 May 2017 14:28:28 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1582637" author="varun.bhola@cibc.com" created="Tue, 30 May 2017 14:16:27 +0000"  >&lt;p&gt;Hi Craig,&lt;/p&gt;

&lt;p&gt;I figured out the issue. I was trying to use a couple of options within the connection string and was using &apos;/?&apos; to separate them. I could not find any example in the documentation which was using replica set connection as well as Kerberos authentication with a different SERVICE_NAME in the same connection string. &lt;/p&gt;

&lt;p&gt;My working connection string is as follows:&lt;br/&gt;
&quot;mongodb://&lt;span class=&quot;error&quot;&gt;&amp;#91;user_name&amp;#93;&lt;/span&gt;%40&lt;span class=&quot;error&quot;&gt;&amp;#91;DOMAIN.COM&amp;#93;&lt;/span&gt;:&lt;span class=&quot;error&quot;&gt;&amp;#91;PASSWORD&amp;#93;&lt;/span&gt;@HOST1,HOST2/?replicaSet=&lt;span class=&quot;error&quot;&gt;&amp;#91;REPLICASET_NAME&amp;#93;&lt;/span&gt;&amp;amp;authMechanism=GSSAPI&amp;amp;authMechanismProperties=SERVICE_NAME:Mongo27017&quot;&lt;/p&gt;

&lt;p&gt;Thanks for looking into it.&lt;br/&gt;
Regards,&lt;br/&gt;
Varun&lt;/p&gt;</comment>
                            <comment id="1582222" author="craiggwilson" created="Mon, 29 May 2017 20:49:50 +0000"  >&lt;p&gt;Hi Varun,&lt;/p&gt;

&lt;p&gt;Your connection string looks a little odd; particularly, the SERVICE_NAME.  Was the SPN your ops guys created &quot;Mongo27017&quot;? What is likely happening here is that the service name getting used is something more like &quot;Mongo27017/?writePReference=HOST1:27017&quot;. I highly doubt that is your intent. Also, &quot;write preference&quot; isn&apos;t a valid connection string parameter. &lt;/p&gt;

&lt;p&gt;Can you show us how you are successfully connecting from the shell so we can compare?&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <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|ht0aan:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>