<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>New Security Model: Moving to a Better Sandbox</title><link>http://blogs.msdn.com/b/dotnet/archive/2009/06/10/new-security-model-moving-to-a-better-sandbox.aspx</link><description>For .Net Framework 4, we decided to remove the dependency on caspol and the policy levels and make things simpler. 
 With this change, the default grant-set for assemblies is now FullTrust unless the host (such as InternetExplorer) decides to load them</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: New Security Model: Moving to a Better Sandbox</title><link>http://blogs.msdn.com/b/dotnet/archive/2009/06/10/new-security-model-moving-to-a-better-sandbox.aspx#10287421</link><pubDate>Mon, 26 Mar 2012 04:37:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10287421</guid><dc:creator>Justin</dc:creator><description>&lt;p&gt;If it is complex maybe you can make it simpler or explain better in the documentation. &lt;/p&gt;
&lt;p&gt;Removing it altogether?!!! makes things a lot more complicated. How is this simpler? &lt;/p&gt;
&lt;p&gt;Just keep it as an option like turning the setting flag on. Why remove it????&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10287421" width="1" height="1"&gt;</description></item><item><title>re: New Security Model: Moving to a Better Sandbox</title><link>http://blogs.msdn.com/b/dotnet/archive/2009/06/10/new-security-model-moving-to-a-better-sandbox.aspx#10099979</link><pubDate>Fri, 03 Dec 2010 14:04:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10099979</guid><dc:creator>Oliver</dc:creator><description>&lt;p&gt;Dear Andrew,&lt;/p&gt;
&lt;p&gt;Probably the old security logic with CAS was complex, and it took a while to understand, but once you figured it out, it was flexible, and could be configured in a lot of different ways. &lt;/p&gt;
&lt;p&gt;You could grant specific permissions to specific assemblies by rolling out an MSI package. Once this was done within our company, it was no problem for us to create a signed ActiveX, which would run in the browser but still access local files.&lt;/p&gt;
&lt;p&gt;Now with the new logic you have either full trust or the predefined set of permissions as decided by the hosting application. Only two possibilities, instead of millions of different combinations. And as there are no settings for this within the typical host IE - you are stuck with the default ones. For us this means, that in .NET for, we can not implement &amp;nbsp;our ActiveX any longer.&lt;/p&gt;
&lt;p&gt;Also, IMHO in an ideal world, assemblies should define what permission they would like to get, but the real permissions granted should be decided by system administrator. This is now definitely not possible any longer, as the CASpol tool is obsolete.&lt;/p&gt;
&lt;p&gt;IMHO, you went in the wrong direction...&lt;/p&gt;
&lt;p&gt;Oliver&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10099979" width="1" height="1"&gt;</description></item><item><title>re: New Security Model: Moving to a Better Sandbox</title><link>http://blogs.msdn.com/b/dotnet/archive/2009/06/10/new-security-model-moving-to-a-better-sandbox.aspx#9932481</link><pubDate>Fri, 04 Dec 2009 13:17:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9932481</guid><dc:creator>Asen</dc:creator><description>&lt;p&gt;I wonder why the assemblies loaded from byte array by the MBR object in the sandboxed appdomain inherit the permission set from the loader assembly. I expected their permission set to match the appdomain’s. What's the technique for having partially trusted dlls loaded dynamically from byte[]?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9932481" width="1" height="1"&gt;</description></item><item><title>re: New Security Model: Moving to a Better Sandbox</title><link>http://blogs.msdn.com/b/dotnet/archive/2009/06/10/new-security-model-moving-to-a-better-sandbox.aspx#9770610</link><pubDate>Thu, 18 Jun 2009 00:21:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9770610</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;Hi Andrew,&lt;/p&gt;
&lt;p&gt;thanks for the clarification. I disagree with your conclusions, though. &lt;/p&gt;
&lt;p&gt;I understand the reasons for the change and I agree with your decision, but I think it's a mistake to remove the option to opt out of the sandboxing model altogether. This leaves us with no option to use managed code for browser controls in situations where we need full control.&lt;/p&gt;
&lt;p&gt;Sure, the app needs to have control, but your SandboxActivator could provide a nice standard way to let the user configure exceptions. (The app could still decide to disable that.)&lt;/p&gt;
&lt;p&gt;Silverlight is superior in many situations, granted, but Silverlight code always runs in a sandbox. (This is an interesting topic on its own. Compare this to Moonlight, which can run code inside the sandbox, but also on top of the normal Mono runtime - what would be your Desktop CLR. That allows for code that can run in the browser, but the same code can run with full permissions. A nice option for enterprise apps that can run online or disconnected, with a local DB and everything, or need to interact with desktop apps like Office. And the compatibility story is obviously much smoother than Silverlight/WPF. But I digress.)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9770610" width="1" height="1"&gt;</description></item><item><title>re: New Security Model: Moving to a Better Sandbox</title><link>http://blogs.msdn.com/b/dotnet/archive/2009/06/10/new-security-model-moving-to-a-better-sandbox.aspx#9769862</link><pubDate>Wed, 17 Jun 2009 20:03:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9769862</guid><dc:creator>Andrew Dai [MS]</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;The gist of the new CAS policy model is that everything unhosted runs as fully trusted, and hosts get to decide what the security policy is for their hosted code. Applications will have full trust unless they’re hosted, and there’s no way for the hosted, partial trust apps to elevate out of the host’s sandbox. To allow that would remove from the host’s complete control of its own security policy, which is one of the things we set out to provide for this release.&lt;/p&gt;
&lt;p&gt;Specifically for IE hosting of managed controls - this is no longer supported in .NET Framework 4, as Silverlight is superior in terms of user and developer experience for browser-based managed code. Note that your control will continue to work as it did as long as it’s not recompiled against .NET Framework 4.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9769862" width="1" height="1"&gt;</description></item><item><title>re: New Security Model: Moving to a Better Sandbox</title><link>http://blogs.msdn.com/b/dotnet/archive/2009/06/10/new-security-model-moving-to-a-better-sandbox.aspx#9752411</link><pubDate>Mon, 15 Jun 2009 11:32:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9752411</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;Hi Andrew&lt;/p&gt;
&lt;p&gt;thanks for your response. We have a managed IE control that allows an HTML-based app to interact with the desktop. We use CAS Policy to give this control (or rather, its assembly) full trust. &lt;/p&gt;
&lt;p&gt;Wouldn't it be nice if the SandboxActivator could automatically read some standard configuration section from the from app.config file? This way, users would not depend on every single app to include some exception mechanism, and app authors wouldn't have to do the work?&lt;/p&gt;
&lt;p&gt;(Then of course you'd have to make sure that every critical app, like IE, uses SandboxActivator, or provide some easy way to access that config from unmanaged code.)&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9752411" width="1" height="1"&gt;</description></item><item><title>re: New Security Model: Moving to a Better Sandbox</title><link>http://blogs.msdn.com/b/dotnet/archive/2009/06/10/new-security-model-moving-to-a-better-sandbox.aspx#9738757</link><pubDate>Fri, 12 Jun 2009 23:31:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9738757</guid><dc:creator>Andrew Dai [MS]</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;It is no longer possible for partially trusted code to be elevated to full trust the way it was in the previous model. You’re pretty much right on – each host needs to provide its own interface for trusting assemblies. It is very simple to administer exceptions to the partial trust permission set with the CreateDomain API that Cristian describes.&lt;/p&gt;
&lt;p&gt;The CreateDomain API creates an AppDomain where there are two trust levels – full trust and partial trust. Everything loaded into the domain is partially trusted unless it’s on the full trust list – the ‘params StrongName[] fullTrustAssemblies’ argument in the overload.&lt;/p&gt;
&lt;p&gt;This, coupled with the HostSecurityManager features provided (&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/system.security.hostsecuritymanager_members"&gt;http://msdn.microsoft.com/en-us/library/system.security.hostsecuritymanager_members&lt;/a&gt;(VS.100).aspx ), provides the host the ability to define its policy for hosted code. &lt;/p&gt;
&lt;p&gt;We are indeed working with the various teams that host partially trusted code internally. What particular IE scenario are you interested in? &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Andrew Dai&lt;/p&gt;
&lt;p&gt;MS Common Language Runtime Security Program Manager&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9738757" width="1" height="1"&gt;</description></item><item><title>re: New Security Model: Moving to a Better Sandbox</title><link>http://blogs.msdn.com/b/dotnet/archive/2009/06/10/new-security-model-moving-to-a-better-sandbox.aspx#9736483</link><pubDate>Fri, 12 Jun 2009 20:37:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9736483</guid><dc:creator>Tanveer Badar</dc:creator><description>&lt;p&gt;What you call overrides at three places are actually overloads. I didn't bother reading rest of the article after those mistakes.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9736483" width="1" height="1"&gt;</description></item><item><title>No more global exceptions?</title><link>http://blogs.msdn.com/b/dotnet/archive/2009/06/10/new-security-model-moving-to-a-better-sandbox.aspx#9731817</link><pubDate>Fri, 12 Jun 2009 11:39:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9731817</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;This sounds like the right thing to do. After all, the CAS policy stuff was not only overcomplicated, but also underdocumented and buggy. (What a combination!)&lt;/p&gt;
&lt;p&gt;I'm really looking forward to the new model, but there's one thing that I'd like you to clarify:&lt;/p&gt;
&lt;p&gt;With the current model, it is possible to elevate an assembly to full trust, even if it is loaded in, say, IE. So although IE explicitly uses APIs to load its controls in a partial trust zone, we can give it full trust without IE even noticing.&lt;/p&gt;
&lt;p&gt;With the other options, I believe that each and every application would have to manage exceptions to their partial trust policy, right? And if the application doesn't have configuration options to do so, there is no way to work around it, right?&lt;/p&gt;
&lt;p&gt;While this was a real PITA, at least it was possible after some trial&amp;amp;error. &lt;/p&gt;
&lt;p&gt;In case my assumptions are correct, do you have any idea how various app teams at MSFT are dealing with this? Are you working with them? (I'm particularly interested in IE)&lt;/p&gt;
&lt;p&gt;Thanks, &lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9731817" width="1" height="1"&gt;</description></item></channel></rss>