1tomcat_selinux(8)            SELinux Policy tomcat           tomcat_selinux(8)
2
3
4

NAME

6       tomcat_selinux  -  Security  Enhanced  Linux Policy for the tomcat pro‐
7       cesses
8

DESCRIPTION

10       Security-Enhanced Linux  secures  the  tomcat  processes  via  flexible
11       mandatory access control.
12
13       The  tomcat  processes  execute with the tomcat_t SELinux type. You can
14       check if you have these processes running by executing the  ps  command
15       with the -Z qualifier.
16
17       For example:
18
19       ps -eZ | grep tomcat_t
20
21
22

ENTRYPOINTS

24       The  tomcat_t  SELinux  type  can be entered via the tomcat_exec_t file
25       type.
26
27       The default entrypoint paths for the tomcat_t domain are the following:
28
29       /usr/sbin/tomcat(6)?, /usr/libexec/tomcat/server
30

PROCESS TYPES

32       SELinux defines process types (domains) for each process running on the
33       system
34
35       You can see the context of a process using the -Z option to ps
36
37       Policy  governs  the  access confined processes have to files.  SELinux
38       tomcat policy is very flexible allowing users  to  setup  their  tomcat
39       processes in as secure a method as possible.
40
41       The following process types are defined for tomcat:
42
43       tomcat_t
44
45       Note:  semanage  permissive -a tomcat_t can be used to make the process
46       type tomcat_t permissive. SELinux does not deny  access  to  permissive
47       process  types, but the AVC (SELinux denials) messages are still gener‐
48       ated.
49
50

BOOLEANS

52       SELinux policy is customizable based on least access required.   tomcat
53       policy is extremely flexible and has several booleans that allow you to
54       manipulate the policy and run tomcat with the tightest access possible.
55
56
57
58       If you want to allow tomcat to connect to databases over  the  network,
59       you must turn on the tomcat_can_network_connect_db boolean. Disabled by
60       default.
61
62       setsebool -P tomcat_can_network_connect_db 1
63
64
65
66       If you want to allow tomcat to read rpm database, you must turn on  the
67       tomcat_read_rpm_db boolean. Disabled by default.
68
69       setsebool -P tomcat_read_rpm_db 1
70
71
72
73       If  you  want  to  allow tomcat to use executable memory and executable
74       stack, you must turn on the  tomcat_use_execmem  boolean.  Disabled  by
75       default.
76
77       setsebool -P tomcat_use_execmem 1
78
79
80
81       If you want to allow users to resolve user passwd entries directly from
82       ldap rather then using a sssd server, you  must  turn  on  the  authlo‐
83       gin_nsswitch_use_ldap boolean. Disabled by default.
84
85       setsebool -P authlogin_nsswitch_use_ldap 1
86
87
88
89       If you want to allow all daemons to write corefiles to /, you must turn
90       on the daemons_dump_core boolean. Disabled by default.
91
92       setsebool -P daemons_dump_core 1
93
94
95
96       If you want to enable cluster mode for daemons, you must  turn  on  the
97       daemons_enable_cluster_mode boolean. Enabled by default.
98
99       setsebool -P daemons_enable_cluster_mode 1
100
101
102
103       If  you want to allow all daemons to use tcp wrappers, you must turn on
104       the daemons_use_tcp_wrapper boolean. Disabled by default.
105
106       setsebool -P daemons_use_tcp_wrapper 1
107
108
109
110       If you want to allow all daemons the ability to  read/write  terminals,
111       you must turn on the daemons_use_tty boolean. Disabled by default.
112
113       setsebool -P daemons_use_tty 1
114
115
116
117       If  you  want  to deny any process from ptracing or debugging any other
118       processes, you  must  turn  on  the  deny_ptrace  boolean.  Enabled  by
119       default.
120
121       setsebool -P deny_ptrace 1
122
123
124
125       If  you  want  to  allow  any  process  to mmap any file on system with
126       attribute file_type, you must turn on the  domain_can_mmap_files  bool‐
127       ean. Enabled by default.
128
129       setsebool -P domain_can_mmap_files 1
130
131
132
133       If  you want to allow all domains write to kmsg_device, while kernel is
134       executed with systemd.log_target=kmsg parameter, you must turn  on  the
135       domain_can_write_kmsg boolean. Disabled by default.
136
137       setsebool -P domain_can_write_kmsg 1
138
139
140
141       If you want to allow all domains to use other domains file descriptors,
142       you must turn on the domain_fd_use boolean. Enabled by default.
143
144       setsebool -P domain_fd_use 1
145
146
147
148       If you want to allow all domains to have the kernel load  modules,  you
149       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
150       default.
151
152       setsebool -P domain_kernel_load_modules 1
153
154
155
156       If you want to allow all domains to execute in fips_mode, you must turn
157       on the fips_mode boolean. Enabled by default.
158
159       setsebool -P fips_mode 1
160
161
162
163       If you want to enable reading of urandom for all domains, you must turn
164       on the global_ssp boolean. Disabled by default.
165
166       setsebool -P global_ssp 1
167
168
169
170       If you want to allow confined applications to run  with  kerberos,  you
171       must turn on the kerberos_enabled boolean. Enabled by default.
172
173       setsebool -P kerberos_enabled 1
174
175
176
177       If  you  want  to  allow  system  to run with NIS, you must turn on the
178       nis_enabled boolean. Disabled by default.
179
180       setsebool -P nis_enabled 1
181
182
183
184       If you want to allow confined applications to use nscd  shared  memory,
185       you must turn on the nscd_use_shm boolean. Enabled by default.
186
187       setsebool -P nscd_use_shm 1
188
189
190

MANAGED FILES

192       The  SELinux  process  type  tomcat_t can manage files labeled with the
193       following file types.  The paths listed are the default paths for these
194       file types.  Note the processes UID still need to have DAC permissions.
195
196       cluster_conf_t
197
198            /etc/cluster(/.*)?
199
200       cluster_var_lib_t
201
202            /var/lib/pcsd(/.*)?
203            /var/lib/cluster(/.*)?
204            /var/lib/openais(/.*)?
205            /var/lib/pengine(/.*)?
206            /var/lib/corosync(/.*)?
207            /usr/lib/heartbeat(/.*)?
208            /var/lib/heartbeat(/.*)?
209            /var/lib/pacemaker(/.*)?
210
211       cluster_var_run_t
212
213            /var/run/crm(/.*)?
214            /var/run/cman_.*
215            /var/run/rsctmp(/.*)?
216            /var/run/aisexec.*
217            /var/run/heartbeat(/.*)?
218            /var/run/corosync-qnetd(/.*)?
219            /var/run/corosync-qdevice(/.*)?
220            /var/run/cpglockd.pid
221            /var/run/corosync.pid
222            /var/run/rgmanager.pid
223            /var/run/cluster/rgmanager.sk
224
225       pki_apache_var_log
226
227
228       pki_common_t
229
230            /opt/nfast(/.*)?
231
232       pki_tomcat_cert_t
233
234            /var/lib/pki-ca/alias(/.*)?
235            /etc/pki/pki-tomcat/ca(/.*)?
236            /var/lib/pki-kra/alias(/.*)?
237            /var/lib/pki-tks/alias(/.*)?
238            /var/lib/pki-ocsp/alias(/.*)?
239            /etc/pki/pki-tomcat/alias(/.*)?
240            /var/lib/ipa/pki-ca/publish(/.*)?
241
242       pki_tomcat_etc_rw_t
243
244            /etc/pki-ca(/.*)?
245            /etc/pki-kra(/.*)?
246            /etc/pki-tks(/.*)?
247            /etc/pki-ocsp(/.*)?
248            /etc/pki/pki-tomcat(/.*)?
249            /etc/sysconfig/pki/tomcat(/.*)?
250
251       pki_tomcat_log_t
252
253            /var/log/pki-ca(/.*)?
254            /var/log/pki-kra(/.*)?
255            /var/log/pki-tks(/.*)?
256            /var/log/pki-ocsp(/.*)?
257            /var/log/pki/pki-tomcat(/.*)?
258
259       pki_tomcat_var_lib_t
260
261            /var/lib/pki-ca(/.*)?
262            /var/lib/pki-kra(/.*)?
263            /var/lib/pki-tks(/.*)?
264            /var/lib/pki-ocsp(/.*)?
265            /var/lib/pki/pki-tomcat(/.*)?
266
267       pki_tomcat_var_run_t
268
269            /var/run/pki-ca.pid
270            /var/run/pki-kra.pid
271            /var/run/pki-tks.pid
272            /var/run/pki-ocsp.pid
273            /var/run/pki/tomcat(/.*)?
274
275       root_t
276
277            /sysroot/ostree/deploy/.*-atomic.*/deploy(/.*)?
278            /
279            /initrd
280
281       tomcat_cache_t
282
283            /var/cache/tomcat6?(/.*)?
284
285       tomcat_log_t
286
287            /var/log/tomcat6?(/.*)?
288
289       tomcat_tmp_t
290
291
292       tomcat_var_lib_t
293
294            /var/lib/tomcat6?(/.*)?
295            /var/lib/tomcats?(/.*)?
296
297       tomcat_var_run_t
298
299            /var/run/tomcat6?.pid
300
301       usr_t
302
303            /usr/.*
304            /opt/.*
305            /emul/.*
306            /ostree(/.*)?
307            /export(/.*)?
308            /usr/doc(/.*)?/lib(/.*)?
309            /usr/inclu.e(/.*)?
310            /usr/share/doc(/.*)?/README.*
311            /usr
312            /opt
313            /emul
314
315

FILE CONTEXTS

317       SELinux requires files to have an extended attribute to define the file
318       type.
319
320       You can see the context of a file using the -Z option to ls
321
322       Policy governs the access  confined  processes  have  to  these  files.
323       SELinux  tomcat  policy  is very flexible allowing users to setup their
324       tomcat processes in as secure a method as possible.
325
326       STANDARD FILE CONTEXT
327
328       SELinux defines the file context types for the tomcat, if you wanted to
329       store  files  with  these types in a diffent paths, you need to execute
330       the semanage command  to  sepecify  alternate  labeling  and  then  use
331       restorecon to put the labels on disk.
332
333       semanage fcontext -a -t tomcat_var_run_t '/srv/mytomcat_content(/.*)?'
334       restorecon -R -v /srv/mytomcat_content
335
336       Note:  SELinux  often  uses  regular expressions to specify labels that
337       match multiple files.
338
339       The following file types are defined for tomcat:
340
341
342
343       tomcat_cache_t
344
345       - Set files with the tomcat_cache_t type, if  you  want  to  store  the
346       files under the /var/cache directory.
347
348
349
350       tomcat_exec_t
351
352       -  Set  files with the tomcat_exec_t type, if you want to transition an
353       executable to the tomcat_t domain.
354
355
356       Paths:
357            /usr/sbin/tomcat(6)?, /usr/libexec/tomcat/server
358
359
360       tomcat_log_t
361
362       - Set files with the tomcat_log_t type, if you want to treat  the  data
363       as tomcat log data, usually stored under the /var/log directory.
364
365
366
367       tomcat_tmp_t
368
369       -  Set  files  with  the tomcat_tmp_t type, if you want to store tomcat
370       temporary files in the /tmp directories.
371
372
373
374       tomcat_unit_file_t
375
376       - Set files with the tomcat_unit_file_t type, if you want to treat  the
377       files as tomcat unit content.
378
379
380
381       tomcat_var_lib_t
382
383       -  Set  files  with the tomcat_var_lib_t type, if you want to store the
384       tomcat files under the /var/lib directory.
385
386
387       Paths:
388            /var/lib/tomcat6?(/.*)?, /var/lib/tomcats?(/.*)?
389
390
391       tomcat_var_run_t
392
393       - Set files with the tomcat_var_run_t type, if you want  to  store  the
394       tomcat files under the /run or /var/run directory.
395
396
397
398       Note:  File context can be temporarily modified with the chcon command.
399       If you want to permanently change the file context you need to use  the
400       semanage fcontext command.  This will modify the SELinux labeling data‐
401       base.  You will need to use restorecon to apply the labels.
402
403

COMMANDS

405       semanage fcontext can also be used to manipulate default  file  context
406       mappings.
407
408       semanage  permissive  can  also  be used to manipulate whether or not a
409       process type is permissive.
410
411       semanage module can also be used to enable/disable/install/remove  pol‐
412       icy modules.
413
414       semanage boolean can also be used to manipulate the booleans
415
416
417       system-config-selinux is a GUI tool available to customize SELinux pol‐
418       icy settings.
419
420

AUTHOR

422       This manual page was auto-generated using sepolicy manpage .
423
424

SEE ALSO

426       selinux(8), tomcat(8),  semanage(8),  restorecon(8),  chcon(1),  sepol‐
427       icy(8) , setsebool(8)
428
429
430
431tomcat                             19-04-25                  tomcat_selinux(8)
Impressum