Is using a strong named assembly for Plug In secure?
I was searching on way to prevent an unknown party from attaching their own Plug In containing malicious code into my application. And I ran across this post
.NET Assembly Plugin Security
It suggests to Strong Name the assembly and check it is strong named with the expected key on load.
However, when I look at the MSDN documentation regarding Strong Named Assemblies at this site
Strong-Named Assemblies
There is a Caution that says
Do not rely on strong names for security. They provide a unique identity only.
What does this mean? What security are they referring to, and is this relevant to the answer in the above stack overflow link I provided?
It's an interesting comment. From what I understand a signed assembly indicates 1) it has been signed with a certain key and 2) is could not have been modified after signing
On point 1, the security of the key is important as anyone with the key could modify and re-sign the assembly.
On point 2, I have seem an example online of a successful modification of an assembly while still passing the strong name verification. It was not trivial.
So technically correct, you can use this to verify identity but not necessarily security - or rather the difference between Authentication (the plugin was signed and not tampered with) versus Authorization (the code itself is authorized to do a certain action).
Authentication versus Authorization
链接地址: http://www.djcxy.com/p/22252.html上一篇: 仅对Solace MQTT服务中的订户进行身份验证
下一篇: 是否使用强大的命名组件来保护插件安全?