Can you recommend a good introduction to non-trivial policy files for the standard Java SecurityManager?
Are there examples that go beyond what the Java website offers? Or maybe someone describes how to secure a Tomcat that runs a whole bunch of different web applications?
[EDIT] My use case is an application that can run scripts written by three types of users: 1. application developers, 2. application admins and 3. end users.
Users from group 1 need to be able to access almost any resource (= no need for a special SM).
Group #2 can be trusted but we'd like to protect them from silly mistakes (like calling System.exit
).
Group #3 can't be trusted. They usually only write small scripts.
When I run a script, I know where it comes from. Will policy files help with my use case or do I need to write my own SecurityManager?