Issue
Use case:
I would like to host a console application I built on an EC2 instance on AWS and give very strict limited access to the people who will connect to it:
- They must not be able to access the shell or execute any command on the machine
- They must not be able to use port forwarding
- They must not be able to copy or read anything from that machine, especially not environment variables
- They are only allowed to use that console application
My solution:
- Create a user:
- I replace its shell by the console application so the user can only access to that and nothing else
- Disable port forwarding
I'm not sure if that would be enough to secure the machine. That's why I'm asking here some advice or confirmation that this will work and will be 100% secure.
Solution
As we discussed on the comment section of your question:
- If you manage to replace the shell of the user for your application console and guarantee that it's not possible to run bash commands, terminal built-in functions (like export, enable, disable), and make sure that your application console have the right permissions (rwx) to interact with only the files and paths that your application needs to interact, then, you should be fine.
Answered By - Igor Servulo