rich wrote:
The key thing for the security is that while the IIS server is public, there is a firewall between it and the application server where the app components are. This firewall can detect and stop malicious access.
You think? read on.
As only the application server will have the database connectivity, there is no way for the attacker, even with complete control of the IIS machine, to directly access the data source. If the data connection is just from the IIS server then potentially they can.
True, if the BL server has DB access you made the attack surface somewhat smaller. With adapter you can perfectly establish this: the PL only uses the db generic project, the BL uses both projects.
However about your assumption that the firewall can stop an attacker: don't believe that. The reason for that is that the application on the webserver has code paths which lead to the deletion of data, modification of data through calling BL code, correct? So if an attacker starts such a codepath, or follows these codepaths, he can establish the same things. Perhaps not whiping out a complete database, but he can do a lot.
This is also the reason why for example stored procedures won't help you with security: if I can execute a delete procedure I can delete data. To prevent that you have to deny me access to the delete procedure, but if I can call a BL method which for example deletes a user, I still can delete that user by calling that method.
That's also the reason why the second security is breached by an attacker, a webserver should be completely repaved and every database indirectly reachable by the affected webserver should be restored from a save backup as well. You can't take any risks in this.
Not to scare you away, but I hope to be realistic in this. Mitigating factors are of course that your setup is a terrible situation for a hacker, he has to check a lot of code before he can even try to do something remotely useful. Mind you: most hackers break in and keep their mouth shut, and break in to get information, not to deface your website. So they'll likely download the code on the website and examine that throuroughly and will patch it with code to track things. That's also why for example using Win2k3 and IIS6 is preferred, and making it impossible for the user the website runs under to elevate privileges to a higher level (so no impersonation to a user which can do more) and thus even write the assemblies or code pages. This then makes it impossible for an attacker to patch the running assemblies.
It's a real surprise that it is to easy to do machine separation in COM with DCOM just by configuring (no code changes) yet it doesn't seem possible with .NET.
You mean with the proxys created by COM+? Yes that was a nice system.