If I have a strongly-named assembly, I'm wondering how secure is declaring
methods as Friend?

Is this enough to ensure other assemblies will not be able to access the
method (including over a Remoting boundary) or is there some other framework
mechansim I should be employing also.

Many thanks everyone.

===
Phil
(Auckland | Aotearoa)

RE: How Secure is "Friend" by Haacked

Haacked
Tue Nov 02 18:33:02 CST 2004

Friend is not secure. Neither is private. It's a common mistake to confuse
"visibility" with "security".

Friend declares that a method is only visible to classes within the same
project. Likewise, "private" declares that a method is only visible within a
class.

However, anybody can call a private or friend method via Reflection.

The only way to secure a method from being called by an untrusted source is
to use Code Access Security.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcodeaccesssecurity.asp


"Phil Jones" wrote:

> If I have a strongly-named assembly, I'm wondering how secure is declaring
> methods as Friend?
>
> Is this enough to ensure other assemblies will not be able to access the
> method (including over a Remoting boundary) or is there some other framework
> mechansim I should be employing also.
>
> Many thanks everyone.
>
> ===
> Phil
> (Auckland | Aotearoa)
>
>
>

Re: How Secure is "Friend" by Phil

Phil
Tue Nov 02 18:51:36 CST 2004

Ahaa - glad I asked. Thanks for the point in the right direction.

--
===
Phil
(Auckland | Aotearoa)



Re: How Secure is "Friend" by Haacked

Haacked
Tue Nov 02 18:55:01 CST 2004

No problem. THough I've opened up a whole can of worms with Code Access
security. ;)

"Phil Jones" wrote:

> Ahaa - glad I asked. Thanks for the point in the right direction.
>
> --
> ===
> Phil
> (Auckland | Aotearoa)
>
>
>