Q:

Split an application into user and admin parts for security reasons?

I'm currently developing an application which needs to have the ability to manage users. If a hacker would have access to the administrative section, he would have access to sensitive information and/or could delete user accounts etc.
So I had the idea to split the application into two applications, one hosted on a public server for the users and the other one hosted on a private server, only accessible from inside a specific network.
I'm fairly new to application security, so could someone please tell me if this is a good idea or, and if not, why?

A:

Yes, it's a good idea: if you application allows it, it will make it possible to apply the principle of least privilege to a deployment, for instance by making sure the administrative interface can only be reached  from "secure" networks.
It can be further improved by applying the same principle all over the stack: using the OS and database security systems to make sure different elements of the application only have access to the part of the data they really need.
The main risk is over-engineering the whole thing: splitting the application means defining mechanism for the different parts to communicate together (APIs). This is often an overlooked aspect of application security that can increase the attack surface of a potential attacker.

