SELinux and Tomcat web server
Hello friends,
I am a newbie just getting my hands dirty with SELinux. We are presently planing to host a Jakarta Tomcat web server that hosts some JSPs on a SELinux system. So as evident, this requires configuring the server which is started using the command /usr/local/jakarta/tomcat.sh start
The process listens at some port and respond by serving JSPs. This to my knowledge involves unzipping/extracting class files from some jar files in the lib and work folders under the jakarta folder. It also needs configuring the acess to the Java subsystem by Tomcat process. Before starting on this, I thought of inquiring if any of you have already gone through it. I would be grateful for any help in this context. Any pointers in configuring the Java subsystem will also be quite useful. Thanks in advance,
Vamshi.
--
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 5 lines · K VAMSHI KRISHNA
I am a newbie just getting my hands dirty with SELinux. We are presently planing to host a Jakarta Tomcat web server that hosts some JSPs on a SELinux system. So as evident, this requires configuring the server which is started using the command
/usr/local/jakarta/tomcat.shstart
Quoted 8 lines
The process listens at some port and respond by serving JSPs. This to my knowledge involves unzipping/extracting class files from some jar files in the lib and work folders under the jakarta folder. It also needs configuring the acess to the Java subsystem by Tomcat process. Before starting on this, I thought of inquiring if any of you have already gone through it. I would be grateful for any help in this context. Any pointers in configuring the Java subsystem will also be quite useful. Thanks in advance,
Sounds like you need to write a new policy for JSP servers.
It will need to have a type for the executable defined by EG daemon_domain(jserver), then you need to have a start script in /etc/init.d/ for it which runs the executable (and transitions from initrc_t to jserver_t). Then you need a rule something like create_dir_file(jserver_t, jserver_tmp_t) to handle the files it extracts from archives.
Signature · 10 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- 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 2 lines · Vamshi Krishna K
Do you have any policy which is similar to what we are talking about. Something like what is given for a Apache server.
Not really.
Quoted 7 lines
(I had been poking with
that (apache.te) for sometime now to see how it works but I am afraid Tomcat is a bit different from it, what with it's interactions with Java subsystem.) Or a bare policy for the context in disussion can also be helpful. Please give me some links from where I can start off. I am not fully confident of my understanding of the whole stuff as yet and would be grateful for any help.
How about starting with the following:
jserver.te:daemon_domain(jserver)tmp_domain(jserver)log_domain(jserver)
jserver.fc:/usr/sbin/whatever system_u:object_r:jserver_exec_t
/var/cache/jserver(.*)? system_u:object_r:jserver_tmp_t
/var/log/jserver(.*)? system_u:object_r:jserver_log_t
Signature · 10 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- 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.