Jeff Roberts [mailto:[EMAIL PROTECTED]] wrote:

> That's all I have !  It is not much considering the amount of
> c++ code I have = ported !  If anyone can tell me how to
> solve these issues in managed code that = will run in the
> Internet security zone I would be a very very happy camper !

Jeff,

By overriding WndProc and P/Invoke you ARE solving those problems the right
way. It is true that your app won't just run off a web site with default
permissions now, but there's *nothing* wrong with this. You simply need to
sign your code with a strong name key and the user needs to entrust your
that strong name with certain rights to their machine. Another approach that
can be used is that a user can trust anything from
"http://www.yourcompany.com/*";, but this is a lot less secure since DNS
resolution can be spoofed.

Now, the tough part is how to get your user to setup the proper trust for
your product. Obviously we don't want our end typical end users having to
understand command line caspol.exe or even the Microsoft .NET Framework
Configuration MMC interface. So what can we do? Chris Sells has
demonstrated, with his Wahoo! Sample app[1], that you can have the user
initially download a small MSI package which executes a custom installer
that simply uses the built-in security namespaces to make the proper
security entries for a product.

This is the future. We (developers) need to ask for permission rather than
just taking it. It needs to be a become a standard consideration during the
development process of a product. The thing I fear most is that developers
will be lazy and just ask for FullTrust all the time.  This is inexcusable,
you should only ask for what you need, otherwise you're creating the
potential for a security breach and are contributing to the problem.

HTH,
Drew

P.S. I copied this to the DOTNET-CLR list, please continue discussion there.
P.P.S. Maybe there should be a DOTNET-SECURITY list?? There's enough topics
to discuss there that would warrant it.

[1] http://www.sellsbrothers.com/wahoo/

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to