I am looking forward to develop a remote system management web application (like Webmin is, for example). Obviously I am going to need to call shell commands to be executed as issued by root or another specific non-nobody user.
What are general guidelines for this task?
The only solution coming into my mind now is running the web server on a special port, which’d be made (by means of a firewall) only accessible for local and VPN-connected users. But maybe there are special tricks that can secure such an application even if it is exposed to public web?
Since we are talking about webapplications to control native tasks , you need to take in consideration several aspects (at least for Java, but usually for every well designed solution):