1redis_selinux(8) SELinux Policy redis redis_selinux(8)
2
3
4
6 redis_selinux - Security Enhanced Linux Policy for the redis processes
7
9 Security-Enhanced Linux secures the redis processes via flexible manda‐
10 tory access control.
11
12 The redis processes execute with the redis_t SELinux type. You can
13 check if you have these processes running by executing the ps command
14 with the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep redis_t
19
20
21
23 The redis_t SELinux type can be entered via the redis_exec_t file type.
24
25 The default entrypoint paths for the redis_t domain are the following:
26
27 /var/opt/rh/rh-redis32/redis(/.*)?, /usr/bin/redis-server
28
30 SELinux defines process types (domains) for each process running on the
31 system
32
33 You can see the context of a process using the -Z option to ps
34
35 Policy governs the access confined processes have to files. SELinux
36 redis policy is very flexible allowing users to setup their redis pro‐
37 cesses in as secure a method as possible.
38
39 The following process types are defined for redis:
40
41 redis_t
42
43 Note: semanage permissive -a redis_t can be used to make the process
44 type redis_t permissive. SELinux does not deny access to permissive
45 process types, but the AVC (SELinux denials) messages are still gener‐
46 ated.
47
48
50 SELinux policy is customizable based on least access required. redis
51 policy is extremely flexible and has several booleans that allow you to
52 manipulate the policy and run redis with the tightest access possible.
53
54
55
56 If you want to allow Redis to run redis-sentinal notification scripts,
57 you must turn on the redis_enable_notify boolean. Disabled by default.
58
59 setsebool -P redis_enable_notify 1
60
61
62
63 If you want to allow all daemons to write corefiles to /, you must turn
64 on the daemons_dump_core boolean. Disabled by default.
65
66 setsebool -P daemons_dump_core 1
67
68
69
70 If you want to enable cluster mode for daemons, you must turn on the
71 daemons_enable_cluster_mode boolean. Enabled by default.
72
73 setsebool -P daemons_enable_cluster_mode 1
74
75
76
77 If you want to allow all daemons to use tcp wrappers, you must turn on
78 the daemons_use_tcp_wrapper boolean. Disabled by default.
79
80 setsebool -P daemons_use_tcp_wrapper 1
81
82
83
84 If you want to allow all daemons the ability to read/write terminals,
85 you must turn on the daemons_use_tty boolean. Disabled by default.
86
87 setsebool -P daemons_use_tty 1
88
89
90
91 If you want to deny any process from ptracing or debugging any other
92 processes, you must turn on the deny_ptrace boolean. Enabled by
93 default.
94
95 setsebool -P deny_ptrace 1
96
97
98
99 If you want to allow any process to mmap any file on system with
100 attribute file_type, you must turn on the domain_can_mmap_files bool‐
101 ean. Enabled by default.
102
103 setsebool -P domain_can_mmap_files 1
104
105
106
107 If you want to allow all domains write to kmsg_device, while kernel is
108 executed with systemd.log_target=kmsg parameter, you must turn on the
109 domain_can_write_kmsg boolean. Disabled by default.
110
111 setsebool -P domain_can_write_kmsg 1
112
113
114
115 If you want to allow all domains to use other domains file descriptors,
116 you must turn on the domain_fd_use boolean. Enabled by default.
117
118 setsebool -P domain_fd_use 1
119
120
121
122 If you want to allow all domains to have the kernel load modules, you
123 must turn on the domain_kernel_load_modules boolean. Disabled by
124 default.
125
126 setsebool -P domain_kernel_load_modules 1
127
128
129
130 If you want to allow all domains to execute in fips_mode, you must turn
131 on the fips_mode boolean. Enabled by default.
132
133 setsebool -P fips_mode 1
134
135
136
137 If you want to enable reading of urandom for all domains, you must turn
138 on the global_ssp boolean. Disabled by default.
139
140 setsebool -P global_ssp 1
141
142
143
144 If you want to allow confined applications to use nscd shared memory,
145 you must turn on the nscd_use_shm boolean. Disabled by default.
146
147 setsebool -P nscd_use_shm 1
148
149
150
152 SELinux defines port types to represent TCP and UDP ports.
153
154 You can see the types associated with a port by using the following
155 command:
156
157 semanage port -l
158
159
160 Policy governs the access confined processes have to these ports.
161 SELinux redis policy is very flexible allowing users to setup their
162 redis processes in as secure a method as possible.
163
164 The following port types are defined for redis:
165
166
167 redis_port_t
168
169
170
171 Default Defined Ports:
172 tcp 6379,16379,26379
173
175 The SELinux process type redis_t can manage files labeled with the fol‐
176 lowing file types. The paths listed are the default paths for these
177 file types. Note the processes UID still need to have DAC permissions.
178
179 cluster_conf_t
180
181 /etc/cluster(/.*)?
182
183 cluster_var_lib_t
184
185 /var/lib/pcsd(/.*)?
186 /var/lib/cluster(/.*)?
187 /var/lib/openais(/.*)?
188 /var/lib/pengine(/.*)?
189 /var/lib/corosync(/.*)?
190 /usr/lib/heartbeat(/.*)?
191 /var/lib/heartbeat(/.*)?
192 /var/lib/pacemaker(/.*)?
193
194 cluster_var_run_t
195
196 /var/run/crm(/.*)?
197 /var/run/cman_.*
198 /var/run/rsctmp(/.*)?
199 /var/run/aisexec.*
200 /var/run/heartbeat(/.*)?
201 /var/run/corosync-qnetd(/.*)?
202 /var/run/corosync-qdevice(/.*)?
203 /var/run/cpglockd.pid
204 /var/run/corosync.pid
205 /var/run/rgmanager.pid
206 /var/run/cluster/rgmanager.sk
207
208 redis_conf_t
209
210 /etc/redis-sentinel.*
211
212 redis_log_t
213
214 /var/log/redis(/.*)?
215
216 redis_var_lib_t
217
218 /var/lib/redis(/.*)?
219
220 redis_var_run_t
221
222 /var/run/redis(/.*)?
223
224 root_t
225
226 /sysroot/ostree/deploy/.*-atomic.*/deploy(/.*)?
227 /
228 /initrd
229
230
232 SELinux requires files to have an extended attribute to define the file
233 type.
234
235 You can see the context of a file using the -Z option to ls
236
237 Policy governs the access confined processes have to these files.
238 SELinux redis policy is very flexible allowing users to setup their
239 redis processes in as secure a method as possible.
240
241 STANDARD FILE CONTEXT
242
243 SELinux defines the file context types for the redis, if you wanted to
244 store files with these types in a diffent paths, you need to execute
245 the semanage command to sepecify alternate labeling and then use
246 restorecon to put the labels on disk.
247
248 semanage fcontext -a -t redis_var_run_t '/srv/myredis_content(/.*)?'
249 restorecon -R -v /srv/myredis_content
250
251 Note: SELinux often uses regular expressions to specify labels that
252 match multiple files.
253
254 The following file types are defined for redis:
255
256
257
258 redis_conf_t
259
260 - Set files with the redis_conf_t type, if you want to treat the files
261 as redis configuration data, usually stored under the /etc directory.
262
263
264
265 redis_exec_t
266
267 - Set files with the redis_exec_t type, if you want to transition an
268 executable to the redis_t domain.
269
270
271 Paths:
272 /var/opt/rh/rh-redis32/redis(/.*)?, /usr/bin/redis-server
273
274
275 redis_initrc_exec_t
276
277 - Set files with the redis_initrc_exec_t type, if you want to transi‐
278 tion an executable to the redis_initrc_t domain.
279
280
281
282 redis_log_t
283
284 - Set files with the redis_log_t type, if you want to treat the data as
285 redis log data, usually stored under the /var/log directory.
286
287
288
289 redis_unit_file_t
290
291 - Set files with the redis_unit_file_t type, if you want to treat the
292 files as redis unit content.
293
294
295
296 redis_var_lib_t
297
298 - Set files with the redis_var_lib_t type, if you want to store the
299 redis files under the /var/lib directory.
300
301
302
303 redis_var_run_t
304
305 - Set files with the redis_var_run_t type, if you want to store the
306 redis files under the /run or /var/run directory.
307
308
309
310 Note: File context can be temporarily modified with the chcon command.
311 If you want to permanently change the file context you need to use the
312 semanage fcontext command. This will modify the SELinux labeling data‐
313 base. You will need to use restorecon to apply the labels.
314
315
317 semanage fcontext can also be used to manipulate default file context
318 mappings.
319
320 semanage permissive can also be used to manipulate whether or not a
321 process type is permissive.
322
323 semanage module can also be used to enable/disable/install/remove pol‐
324 icy modules.
325
326 semanage port can also be used to manipulate the port definitions
327
328 semanage boolean can also be used to manipulate the booleans
329
330
331 system-config-selinux is a GUI tool available to customize SELinux pol‐
332 icy settings.
333
334
336 This manual page was auto-generated using sepolicy manpage .
337
338
340 selinux(8), redis(8), semanage(8), restorecon(8), chcon(1), sepolicy(8)
341 , setsebool(8)
342
343
344
345redis 19-04-25 redis_selinux(8)