<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:36:33 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-348] Test the driver in a Medium Trust environment</title>
                <link>https://jira.mongodb.org/browse/CSHARP-348</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Test the driver in a Medium Trust environment.&lt;/p&gt;

&lt;p&gt;At the very least the type initializer for ObjectId apparently fails under Medium Trust. There may be other issues as well.&lt;/p&gt;

&lt;p&gt;Note: we may end up determining that we won&apos;t support the driver in a Medium Trust environment. A final determination will be made when more information is available.&lt;/p&gt;</description>
                <environment></environment>
        <key id="24250">CSHARP-348</key>
            <summary>Test the driver in a Medium Trust environment</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="craig.wilson@mongodb.com">Craig Wilson</assignee>
                                    <reporter username="robert@mongodb.com">Robert Stam</reporter>
                        <labels>
                    </labels>
                <created>Sat, 29 Oct 2011 22:49:30 +0000</created>
                <updated>Thu, 2 Apr 2015 18:27:43 +0000</updated>
                            <resolved>Fri, 15 Jun 2012 18:38:19 +0000</resolved>
                                    <version>1.3</version>
                                    <fixVersion>1.5</fixVersion>
                                                        <votes>2</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="133409" author="craiggwilson" created="Fri, 15 Jun 2012 18:38:09 +0000"  >&lt;p&gt;These changes will be available in the next release, version 1.5.&lt;/p&gt;

&lt;p&gt;Notes:&lt;br/&gt;
  1) Because of our need to have a Tcp Socket opened for connection to the mongodb server, it is impossible to run in default ASP.NET Medium Trust.  If modifying the trust level slightly is permissible, you can do what the previous comment says related to adding unrestricted socket permissions.  In reality, you don&apos;t need unrestricted, but rather a smaller subset related to only outgoing socket creation and only the Tcp Protocol.  For this, you would also need to specify the allowable hosts and ports.&lt;br/&gt;
  2) This should work without any modification in Azure Partial Trust.  However, Azure is configured to run in FullTrust unless you specify it to run more securely.&lt;/p&gt;</comment>
                            <comment id="132127" author="craiggwilson" created="Wed, 13 Jun 2012 21:12:14 +0000"  >&lt;p&gt;There are 2 issues that prevent the driver from working in ASP.NET Medium trust and Azure Partial Trust.&lt;br/&gt;
1) The static ObjectId constructor calls Process.GetCurrentProcess().Id.  This requires FullTrust period.  There doesn&apos;t seem to be anyway to create a &quot;custom&quot; trust config to enable this.  However, it is possible to simply not use ObjectId&apos;s in your classes and use some other type for a document&apos;s identifier (Guid, int, etc...).&lt;/p&gt;

&lt;p&gt;2) Communication with MongoDB occurs over a TCP socket which, in our case, appears to require unrestricted permissions.  You can create a custom trust config to enable this by appling the following to a copy of web_mediumtrust.config.&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Add &amp;lt;SecurityClass Name=&quot;SocketPermission&quot; Description=&quot;System.Net.SocketPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot;/&amp;gt;&lt;/li&gt;
	&lt;li&gt;Add &amp;lt;IPermission class=&quot;SocketPermission&quot; version=&quot;1&quot; Unrestricted=&quot;true&quot;/&amp;gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In addition, the driver will need to include the &lt;span class=&quot;error&quot;&gt;&amp;#91;AllowPartiallyTrustedCallers&amp;#93;&lt;/span&gt; attributes into our assemblies.&lt;/p&gt;</comment>
                            <comment id="127162" author="rstam" created="Wed, 6 Jun 2012 16:08:33 +0000"  >&lt;p&gt;Can you provide links to where medium trust is well defined?&lt;/p&gt;</comment>
                            <comment id="127153" author="daniel.sinclair@nupe.com" created="Wed, 6 Jun 2012 16:03:50 +0000"  >&lt;p&gt;Medium trust doesn&apos;t mean a custom trust level. They are well defined, although may vary by version. There&apos;s a definition of Partial Trust for Azure for instance.&lt;/p&gt;</comment>
                            <comment id="72779" author="rstam" created="Tue, 13 Dec 2011 16:21:58 +0000"  >&lt;p&gt;From my research so far apparently &quot;medium trust&quot; is a bit of an undefined term. It basically means less than full trust, but exactly which permissions are taken away depend on settings controlled by the provider.&lt;/p&gt;

&lt;p&gt;Any recommendations on how to determine exactly what medium trust means?&lt;/p&gt;

&lt;p&gt;Anyone know how to run NUnit tests under medium trust? That would be by far the easiest way to get decent code coverage under medium trust, since there are no compiler errors related to medium trust, only runtime errors.&lt;/p&gt;

&lt;p&gt;I also want to mention that we do lots of things that are apparently not allowed under medium trust (reflection, IL code generation, compiling lambdas, etc...) so there&apos;s a pretty high probability that we are not going to support medium trust.&lt;/p&gt;

&lt;p&gt;Note also that Azure now runs all web applications under full trust. They found that too many things just don&apos;t work under medium trust and it was causing too many support issues.&lt;/p&gt;</comment>
                            <comment id="69772" author="flyingpenguin" created="Wed, 30 Nov 2011 13:29:48 +0000"  >&lt;p&gt;By not working in a medium trust environment you are basically killing the ability to use mongodb for c# in any shared hosting setting.&lt;/p&gt;

&lt;p&gt;Considering a large portion of developers at least start in a shared environment, I would hope this gets bumped up to a higher priority.&lt;/p&gt;

&lt;p&gt;As for my project, I have to go back to using another driver until this is fixed even though I would prefer to  the official driver.&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|hrh893:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14136</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>