Is there any other implementation (e.g. in an OSS project) of a Java SecurityManager available which has more features than the one in the JDK?
I’m looking for features like
- configurable at runtime
- policies updateable at runtime, read from other data sources than a
security.policyfile - Thread-aware, e.g. different policies per Thread
- Higher-level policies, e.g. “Disable network functions, but allow JDBC traffic”
- Common predefined policies, e.g. “Allow read-access to usual system properties like
file.encodingorline.separator, but disallow read-access to user.home” - Monitoring and audit trace logging, e.g. “Log all file access, log all network access going NOT to knownhost.example.org”
- Blocking jobs “requesting” a permission until an administrator grants permission, letting the thread/job continue
- …
I’m pretty sure that application servers (at least the commercial ones) have their own SecurityManager implementation or at least their own policy configuration. I’m wondering if there is any free project with similar requirements.
ProtectionDomains (introduced in 1.4 IIRC), delegate to the modifiablePolicy.ThreadGroup, which is generally considered a bad thing.AccessController.doPrivileged.AccessControllerin the Sun/Oracle implementation does have tracing features.“Glossitope” attempted to have a system that sprung up a dialog box every time a permission was requested. Of course, the request makes no sense to the user that just wants to see the dancing pigs. (Glossitope was an attempt at a Java version of the Vista side panel thing. The features added to 6u10 (drag-and-drop install, non-rectangular windows, warning icon instead of banner, JNLP services) make it mostly redundant.)