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 domains to execute in fips_mode, you must turn
64 on the fips_mode boolean. Enabled by default.
65
66 setsebool -P fips_mode 1
67
68
69
70 If you want to allow confined applications to use nscd shared memory,
71 you must turn on the nscd_use_shm boolean. Disabled by default.
72
73 setsebool -P nscd_use_shm 1
74
75
76
78 SELinux defines port types to represent TCP and UDP ports.
79
80 You can see the types associated with a port by using the following
81 command:
82
83 semanage port -l
84
85
86 Policy governs the access confined processes have to these ports.
87 SELinux redis policy is very flexible allowing users to setup their
88 redis processes in as secure a method as possible.
89
90 The following port types are defined for redis:
91
92
93 redis_port_t
94
95
96
97 Default Defined Ports:
98 tcp 6379,16379,26379
99
101 The SELinux process type redis_t can manage files labeled with the fol‐
102 lowing file types. The paths listed are the default paths for these
103 file types. Note the processes UID still need to have DAC permissions.
104
105 cluster_conf_t
106
107 /etc/cluster(/.*)?
108
109 cluster_var_lib_t
110
111 /var/lib/pcsd(/.*)?
112 /var/lib/cluster(/.*)?
113 /var/lib/openais(/.*)?
114 /var/lib/pengine(/.*)?
115 /var/lib/corosync(/.*)?
116 /usr/lib/heartbeat(/.*)?
117 /var/lib/heartbeat(/.*)?
118 /var/lib/pacemaker(/.*)?
119
120 cluster_var_run_t
121
122 /var/run/crm(/.*)?
123 /var/run/cman_.*
124 /var/run/rsctmp(/.*)?
125 /var/run/aisexec.*
126 /var/run/heartbeat(/.*)?
127 /var/run/corosync-qnetd(/.*)?
128 /var/run/corosync-qdevice(/.*)?
129 /var/run/corosync.pid
130 /var/run/cpglockd.pid
131 /var/run/rgmanager.pid
132 /var/run/cluster/rgmanager.sk
133
134 postfix_spool_t
135
136 /var/spool/postfix.*
137 /var/spool/postfix/defer(/.*)?
138 /var/spool/postfix/flush(/.*)?
139 /var/spool/postfix/deferred(/.*)?
140 /var/spool/postfix/maildrop(/.*)?
141
142 redis_conf_t
143
144 /etc/redis-sentinel.*
145
146 redis_log_t
147
148 /var/log/redis(/.*)?
149
150 redis_var_lib_t
151
152 /var/lib/redis(/.*)?
153
154 redis_var_run_t
155
156 /var/run/redis(/.*)?
157
158 root_t
159
160 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
161 /
162 /initrd
163
164
166 SELinux requires files to have an extended attribute to define the file
167 type.
168
169 You can see the context of a file using the -Z option to ls
170
171 Policy governs the access confined processes have to these files.
172 SELinux redis policy is very flexible allowing users to setup their
173 redis processes in as secure a method as possible.
174
175 STANDARD FILE CONTEXT
176
177 SELinux defines the file context types for the redis, if you wanted to
178 store files with these types in a diffent paths, you need to execute
179 the semanage command to sepecify alternate labeling and then use
180 restorecon to put the labels on disk.
181
182 semanage fcontext -a -t redis_unit_file_t '/srv/myredis_content(/.*)?'
183 restorecon -R -v /srv/myredis_content
184
185 Note: SELinux often uses regular expressions to specify labels that
186 match multiple files.
187
188 The following file types are defined for redis:
189
190
191
192 redis_conf_t
193
194 - Set files with the redis_conf_t type, if you want to treat the files
195 as redis configuration data, usually stored under the /etc directory.
196
197
198
199 redis_exec_t
200
201 - Set files with the redis_exec_t type, if you want to transition an
202 executable to the redis_t domain.
203
204
205 Paths:
206 /var/opt/rh/rh-redis32/redis(/.*)?, /usr/bin/redis-server
207
208
209 redis_initrc_exec_t
210
211 - Set files with the redis_initrc_exec_t type, if you want to transi‐
212 tion an executable to the redis_initrc_t domain.
213
214
215
216 redis_log_t
217
218 - Set files with the redis_log_t type, if you want to treat the data as
219 redis log data, usually stored under the /var/log directory.
220
221
222
223 redis_tmp_t
224
225 - Set files with the redis_tmp_t type, if you want to store redis tem‐
226 porary files in the /tmp directories.
227
228
229
230 redis_unit_file_t
231
232 - Set files with the redis_unit_file_t type, if you want to treat the
233 files as redis unit content.
234
235
236
237 redis_var_lib_t
238
239 - Set files with the redis_var_lib_t type, if you want to store the
240 redis files under the /var/lib directory.
241
242
243
244 redis_var_run_t
245
246 - Set files with the redis_var_run_t type, if you want to store the
247 redis files under the /run or /var/run directory.
248
249
250
251 Note: File context can be temporarily modified with the chcon command.
252 If you want to permanently change the file context you need to use the
253 semanage fcontext command. This will modify the SELinux labeling data‐
254 base. You will need to use restorecon to apply the labels.
255
256
258 semanage fcontext can also be used to manipulate default file context
259 mappings.
260
261 semanage permissive can also be used to manipulate whether or not a
262 process type is permissive.
263
264 semanage module can also be used to enable/disable/install/remove pol‐
265 icy modules.
266
267 semanage port can also be used to manipulate the port definitions
268
269 semanage boolean can also be used to manipulate the booleans
270
271
272 system-config-selinux is a GUI tool available to customize SELinux pol‐
273 icy settings.
274
275
277 This manual page was auto-generated using sepolicy manpage .
278
279
281 selinux(8), redis(8), semanage(8), restorecon(8), chcon(1), sepol‐
282 icy(8), setsebool(8)
283
284
285
286redis 21-03-26 redis_selinux(8)