Before I have tried to do this using a phony user and
iptables to execute commands that needs to be restricted. However now the commands need to read configuration set by each user's environment vars so it seems this way no longer works.
The OS is a RedHat and seems like the only solid alternative is SELinux. There is little about the best practises to configure SElinux policies beyond basic documentation and tutorial on the web. What is a recommended way to implement this functionality?