1mongod_selinux(8)            SELinux Policy mongod           mongod_selinux(8)
2
3
4

NAME

6       mongod_selinux  -  Security  Enhanced  Linux Policy for the mongod pro‐
7       cesses
8

DESCRIPTION

10       Security-Enhanced Linux  secures  the  mongod  processes  via  flexible
11       mandatory access control.
12
13       The  mongod  processes  execute with the mongod_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 mongod_t
20
21
22

ENTRYPOINTS

24       The  mongod_t  SELinux  type  can  be  entered via the file_type, unla‐
25       beled_t, proc_type, filesystem_type, mtrr_device_t,  sysctl_type,  mon‐
26       god_exec_t file types.
27
28       The default entrypoint paths for the mongod_t domain are the following:
29
30       all  files on the system, /dev/cpu/mtrr, /usr/bin/mongod, /usr/bin/mon‐
31       gos, /usr/share/aeolus-conductor/dbomatic/dbomatic
32

PROCESS TYPES

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

BOOLEANS

54       SELinux policy is customizable based on least access required.   mongod
55       policy is extremely flexible and has several booleans that allow you to
56       manipulate the policy and run mongod with the tightest access possible.
57
58
59
60       If you want to allow all daemons to write corefiles to /, you must turn
61       on the allow_daemons_dump_core boolean. Disabled by default.
62
63       setsebool -P allow_daemons_dump_core 1
64
65
66
67       If  you want to allow all daemons to use tcp wrappers, you must turn on
68       the allow_daemons_use_tcp_wrapper boolean. Disabled by default.
69
70       setsebool -P allow_daemons_use_tcp_wrapper 1
71
72
73
74       If you want to allow all daemons the ability to  read/write  terminals,
75       you  must  turn  on  the  allow_daemons_use_tty  boolean.  Disabled  by
76       default.
77
78       setsebool -P allow_daemons_use_tty 1
79
80
81
82       If you want to allow all domains to use other domains file descriptors,
83       you must turn on the allow_domain_fd_use boolean. Enabled by default.
84
85       setsebool -P allow_domain_fd_use 1
86
87
88
89       If  you  want to allow unconfined executables to make their heap memory
90       executable.  Doing this is a really  bad  idea.  Probably  indicates  a
91       badly  coded  executable, but could indicate an attack. This executable
92       should be reported in bugzilla, you must  turn  on  the  allow_execheap
93       boolean. Disabled by default.
94
95       setsebool -P allow_execheap 1
96
97
98
99       If  you  want to allow unconfined executables to map a memory region as
100       both executable and writable, this  is  dangerous  and  the  executable
101       should  be  reported  in  bugzilla), you must turn on the allow_execmem
102       boolean. Enabled by default.
103
104       setsebool -P allow_execmem 1
105
106
107
108       If you want to  allow  all  unconfined  executables  to  use  libraries
109       requiring  text  relocation  that are not labeled textrel_shlib_t), you
110       must turn on the allow_execmod boolean. Enabled by default.
111
112       setsebool -P allow_execmod 1
113
114
115
116       If you want to allow unconfined executables to make  their  stack  exe‐
117       cutable.   This  should  never, ever be necessary. Probably indicates a
118       badly coded executable, but could indicate an attack.  This  executable
119       should  be  reported in bugzilla), you must turn on the allow_execstack
120       boolean. Enabled by default.
121
122       setsebool -P allow_execstack 1
123
124
125
126       If you want to allow sysadm to debug or ptrace all processes, you  must
127       turn on the allow_ptrace boolean. Disabled by default.
128
129       setsebool -P allow_ptrace 1
130
131
132
133       If  you  want  to enable cluster mode for daemons, you must turn on the
134       daemons_enable_cluster_mode boolean. Disabled by default.
135
136       setsebool -P daemons_enable_cluster_mode 1
137
138
139
140       If you want to allow all domains to have the kernel load  modules,  you
141       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
142       default.
143
144       setsebool -P domain_kernel_load_modules 1
145
146
147
148       If you want to allow all domains to execute in fips_mode, you must turn
149       on the fips_mode boolean. Enabled by default.
150
151       setsebool -P fips_mode 1
152
153
154
155       If you want to enable reading of urandom for all domains, you must turn
156       on the global_ssp boolean. Disabled by default.
157
158       setsebool -P global_ssp 1
159
160
161
162       If you want to enable support for upstart as the init program, you must
163       turn on the init_upstart boolean. Enabled by default.
164
165       setsebool -P init_upstart 1
166
167
168
169       If  you  want to allow certain domains to map low memory in the kernel,
170       you must turn on the mmap_low_allowed boolean. Disabled by default.
171
172       setsebool -P mmap_low_allowed 1
173
174
175
176       If you want to boolean to determine whether the system permits  loading
177       policy,  setting enforcing mode, and changing boolean values.  Set this
178       to true and you have to reboot to set it back, you  must  turn  on  the
179       secure_mode_policyload boolean. Disabled by default.
180
181       setsebool -P secure_mode_policyload 1
182
183
184
185       If you want to support X userspace object manager, you must turn on the
186       xserver_object_manager boolean. Disabled by default.
187
188       setsebool -P xserver_object_manager 1
189
190
191

PORT TYPES

193       SELinux defines port types to represent TCP and UDP ports.
194
195       You can see the types associated with a port  by  using  the  following
196       command:
197
198       semanage port -l
199
200
201       Policy  governs  the  access  confined  processes  have to these ports.
202       SELinux mongod policy is very flexible allowing users  to  setup  their
203       mongod processes in as secure a method as possible.
204
205       The following port types are defined for mongod:
206
207
208       mongod_port_t
209
210
211
212       Default Defined Ports:
213                 tcp 27017-27019,28017-28019
214

MANAGED FILES

216       The  SELinux  process  type  mongod_t can manage files labeled with the
217       following file types.  The paths listed are the default paths for these
218       file types.  Note the processes UID still need to have DAC permissions.
219
220       file_type
221
222            all files on the system
223
224

FILE CONTEXTS

226       SELinux requires files to have an extended attribute to define the file
227       type.
228
229       You can see the context of a file using the -Z option to ls
230
231       Policy governs the access  confined  processes  have  to  these  files.
232       SELinux  mongod  policy  is very flexible allowing users to setup their
233       mongod processes in as secure a method as possible.
234
235       STANDARD FILE CONTEXT
236
237       SELinux defines the file context types for the mongod, if you wanted to
238       store  files  with  these types in a diffent paths, you need to execute
239       the semanage command  to  sepecify  alternate  labeling  and  then  use
240       restorecon to put the labels on disk.
241
242       semanage fcontext -a -t mongod_var_run_t '/srv/mymongod_content(/.*)?'
243       restorecon -R -v /srv/mymongod_content
244
245       Note:  SELinux  often  uses  regular expressions to specify labels that
246       match multiple files.
247
248       The following file types are defined for mongod:
249
250
251
252       mongod_exec_t
253
254       - Set files with the mongod_exec_t type, if you want to  transition  an
255       executable to the mongod_t domain.
256
257
258       Paths:
259            /usr/bin/mongod, /usr/bin/mongos, /usr/share/aeolus-conductor/dbo‐
260            matic/dbomatic
261
262
263       mongod_initrc_exec_t
264
265       - Set files with the mongod_initrc_exec_t type, if you want to  transi‐
266       tion an executable to the mongod_initrc_t domain.
267
268
269       Paths:
270            /etc/rc.d/init.d/mongod, /etc/rc.d/init.d/mongos
271
272
273       mongod_log_t
274
275       -  Set  files with the mongod_log_t type, if you want to treat the data
276       as mongod log data, usually stored under the /var/log directory.
277
278
279
280       mongod_tmp_t
281
282       - Set files with the mongod_tmp_t type, if you  want  to  store  mongod
283       temporary files in the /tmp directories.
284
285
286
287       mongod_var_lib_t
288
289       -  Set  files  with the mongod_var_lib_t type, if you want to store the
290       mongod files under the /var/lib directory.
291
292
293
294       mongod_var_run_t
295
296       - Set files with the mongod_var_run_t type, if you want  to  store  the
297       mongod files under the /run or /var/run directory.
298
299
300       Paths:
301            /var/run/mongodb(/.*)?, /var/run/aeolus/dbomatic.pid
302
303
304       Note:  File context can be temporarily modified with the chcon command.
305       If you want to permanently change the file context you need to use  the
306       semanage fcontext command.  This will modify the SELinux labeling data‐
307       base.  You will need to use restorecon to apply the labels.
308
309

COMMANDS

311       semanage fcontext can also be used to manipulate default  file  context
312       mappings.
313
314       semanage  permissive  can  also  be used to manipulate whether or not a
315       process type is permissive.
316
317       semanage module can also be used to enable/disable/install/remove  pol‐
318       icy modules.
319
320       semanage port can also be used to manipulate the port definitions
321
322       semanage boolean can also be used to manipulate the booleans
323
324
325       system-config-selinux is a GUI tool available to customize SELinux pol‐
326       icy settings.
327
328

AUTHOR

330       This manual page was auto-generated using sepolicy manpage .
331
332

SEE ALSO

334       selinux(8), mongod(8), semanage(8), restorecon(8),  chcon(1)  ,  setse‐
335       bool(8)
336
337
338
339mongod                             15-06-03                  mongod_selinux(8)
Impressum