<p>What recommendations can you give for a system which must do the following:</p>

<p>Load Plugins (and eventually execute them) but have 2 methods of loading these plugins:</p>

<ul>
<li>Load only authorized plugins
(developed by the owner of the
software)  </li>
<li>Load all plugins</li>
</ul>

<p>And we need to be reasonably secure that the authorized plugins are the real deal (unmodified). However all plugins must be in seperate assemblies. I've been looking at using strong named assemblies for the plugins, with the public key stored in the loader application, but to me this seems too easy to modify the public key within the loader application (if the user was so inclined) regardless of any obfuscation of the loader application. Any more secure ideas?</p>

[{'answer_id': 14384, 'author': 'Rytmis', 'author_id': 266, 'author_profile': 'https://Stackoverflow.com/users/266', 'pm_score': 0, 'selected': False, 'text': '<p>Mayhaps <a href="http://livedocs.adobe.com/flex/15/flex_docs_en/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flex_Documentation&amp;file=00001750.htm" rel="nofollow noreferrer" title="Flex Documentation: System.Security.allowDomain">System.Security.allowDomain</a> is what you need?</p>\n'}, {'answer_id': 14404, 'author': 'Theo', 'author_id': 1109, 'author_profile': 'https://Stackoverflow.com/users/1109', 'pm_score': 4, 'selected': True, 'text': '<p>This is all described in <a href="http://livedocs.adobe.com/flex/3/progAS_flex3.pdf" rel="nofollow noreferrer">The Adobe Flex 3 Programming ActionScript 3 PDF</a> on page 550 (Chapter 27: Flash Player Security / Cross-scripting):</p>\n\n<blockquote>\n  <p>If two SWF files written with ActionScript 3.0 are served from different domains—for example, <a href="http://siteA.com/swfA.swf" rel="nofollow noreferrer">http://siteA.com/swfA.swf</a> and <a href="http://siteB.com/swfB.swf" rel="nofollow noreferrer">http://siteB.com/swfB.swf</a>—then, by default, Flash Player does not allow swfA.swf to script swfB.swf, nor swfB.swf to script swfA.swf. A SWF file gives permission to SWF files from other domains by calling Security.allowDomain(). By calling Security.allowDomain("siteA.com"), swfB.swf gives SWF files from siteA.com permission to script it.</p>\n</blockquote>\n\n<p>It goes on in some more detail, with diagrams and all.</p>\n'}, {'answer_id': 14409, 'author': 'grapefrukt', 'author_id': 914, 'author_profile': 'https://Stackoverflow.com/users/914', 'pm_score': 2, 'selected': False, 'text': '<p>You\'ll need a crossdomain.xml policy file on the server that has the file you load, it should look a something like this:</p>\n\n<pre><code>&lt;?xml version="1.0"?&gt;\n&lt;!-- http://www.foo.com/crossdomain.xml --&gt;\n&lt;cross-domain-policy&gt;\n  &lt;allow-access-from domain="www.friendOfFoo.com" /&gt;\n  &lt;allow-access-from domain="*.foo.com" /&gt;\n  &lt;allow-access-from domain="105.216.0.40" /&gt;\n&lt;/cross-domain-policy&gt;\n</code></pre>\n\n<p>Put it as crossdomain.xml in the root of the domain you\'re loading from.</p>\n\n<p>Also you need to set the loader to read this file as such:</p>\n\n<pre><code>var loaderContext:LoaderContext = new LoaderContext();\nloaderContext.checkPolicyFile = true;\n\nvar loader:Loader = new Loader();\nloader.contentLoaderInfo.addEventListener( Event.COMPLETE, onComplete );\nloader.load( new URLRequest( "http://my.domain.com/image.png" ), loaderContext );\n</code></pre>\n\n<p>code sample yoinked from <a href="http://blog.log2e.com/2008/08/15/when-a-cross-domain-policy-file-is-not-enough/" rel="nofollow noreferrer">http://blog.log2e.com/2008/08/15/when-a-cross-domain-policy-file-is-not-enough/</a></p>\n'}]
['https://Stackoverflow.com/questions/14359', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1111/']