Java and SELinux
I have been reading about SELinux, how to design a Trusted Computing Base (TCB) with it and the difficulties of setting up an OS-based ruled based security framework to control 'virtual machines' which basically take much of the responsibilities of a TCB off the Operating System.
I am more of an application developer kind of guy, but contrary to people's opinions I think you can indeed make SELinux and the JVM dance together pretty nicely, even better than regular OS-based applications since you would be instead of one, actually two walls by:
1._ actually using java security policies within the JVM
2._ constraining all native calls from the JVM to the actual OS through SELinux
I find this straightforward and doable with much difficulty or . . . what is it I am missing here?
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 10 lines · Albretch Mueller
I have been reading about SELinux, how to design a Trusted Computing Base (TCB) with it and the difficulties of setting up an OS-based ruled based security framework to control 'virtual machines' which basically take much of the responsibilities of a TCB off the Operating System.
I am more of an application developer kind of guy, but contrary to people's opinions I think you can indeed make SELinux and the JVM dance together pretty nicely, even better than regular OS-based applications since you would be instead of one, actually two walls by:
Quoted 7 lines
1._ actually using java security policies within the JVM
2._ constraining all native calls from the JVM to the actual OS through SELinux
I find this straightforward and doable with much difficulty or . . . what is it I am missing here?
The SELinux/Flask architecture refers to this notion as userspace object managers (or userspace policy enforcers), where an entity like the JVM would need to be modified to apply labeling and access controls on its abstractions that are not directly visible to the OS, providing finer-grained control, while still using the OS controls to provide coarse-grained protection. A few programs have been modified to act as userspace object managers on SELinux, including dbus-daemon and X.
Note that the Flux research group at Univ. of Utah has some prior work on introducing access controls into the JVM, including concepts from the Flask architecture (drawn from the earlier prototype in the Fluke microkernel, not SELinux). See http://www.cs.utah.edu/flux/janos/.
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Sorry, but I think that was not my point. I wasn't talking about a JavaOS or anything extra/fancy
I was actually refering to the implementation of a pretty flexible and robust security manager within the JVM.
Using it and declaring 'permissions' through 'grant' segments and combining them in policy files, you can pretty much customize the security of an application methods to your hearts content, e.g.:
Loaded application may write and read to the /tmp/ dir and subdirs
grant {
permission java.io.FilePermission "/tmp/*", "read, write";
permission java.lang.RuntimePermission "exitVM", "true";
}
Fine Socket permissions
grant {
permission java.net.SocketPermission "224.0.1.85", "connect,accept";
permission java.net.SocketPermission "*.edu.au:80", "connect";
}
Grant access only to particular hosts, subdomains or domains
grant codebase "http://sunshade.dstc.edu.au/classes/" {
permission java.security.AllPermission "", "";
}
Require digital signatures attached to code
grant signedBy "sysadmin" {
permission java.security.AllPermission "", "";
}
I think the basic idea of SELinux, as I see it, a bus that includes the sec context. Is implemented in the JVK already.
So, as I had said already, by letting the JVM do her thing and picking up OS stuff on the native calls with SELinux you would get the best of both worlds.
Or?
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 8 lines · Albretch Mueller
I think the basic idea of SELinux, as I see it, a bus that includes the sec context. Is implemented in the JVK already.
So, as I had said already, by letting the JVM do her thing and picking up OS stuff on the native calls with SELinux you would get the best of both worlds.
Or?
No. JVM lacks a MAC security model, and doesn't allow you to specify policy that governs information flow in order to enforce confidentiality and/or integrity properties. It would need to be enhanced, and SELinux provides an API to userspace for getting MAC decisions that is already used by programs like dbus-daemon and security-enhanced X. Further, ability of the JVM to properly isolate and protect is weak, so restructuring along the lines of JANOS has benefit...
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.