1swift_selinux(8) SELinux Policy swift swift_selinux(8)
2
3
4
6 swift_selinux - Security Enhanced Linux Policy for the swift processes
7
9 Security-Enhanced Linux secures the swift processes via flexible manda‐
10 tory access control.
11
12 The swift processes execute with the swift_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 swift_t
19
20
21
23 The swift_t SELinux type can be entered via the swift_exec_t file type.
24
25 The default entrypoint paths for the swift_t domain are the following:
26
27 /usr/bin/swift-object-info, /usr/bin/swift-proxy-server,
28 /usr/bin/swift-object-server, /usr/bin/swift-account-reaper,
29 /usr/bin/swift-account-server, /usr/bin/swift-container-sync,
30 /usr/bin/swift-object-auditor, /usr/bin/swift-object-expirer,
31 /usr/bin/swift-object-updater, /usr/bin/swift-account-auditor,
32 /usr/bin/swift-container-server, /usr/bin/swift-container-auditor,
33 /usr/bin/swift-container-updater, /usr/bin/swift-object-replicator,
34 /usr/bin/swift-account-replicator, /usr/bin/swift-container-replicator,
35 /usr/bin/swift-container-reconciler
36
38 SELinux defines process types (domains) for each process running on the
39 system
40
41 You can see the context of a process using the -Z option to ps
42
43 Policy governs the access confined processes have to files. SELinux
44 swift policy is very flexible allowing users to setup their swift pro‐
45 cesses in as secure a method as possible.
46
47 The following process types are defined for swift:
48
49 swift_t
50
51 Note: semanage permissive -a swift_t can be used to make the process
52 type swift_t permissive. SELinux does not deny access to permissive
53 process types, but the AVC (SELinux denials) messages are still gener‐
54 ated.
55
56
58 SELinux policy is customizable based on least access required. swift
59 policy is extremely flexible and has several booleans that allow you to
60 manipulate the policy and run swift with the tightest access possible.
61
62
63
64 If you want to determine whether swift can connect to all TCP ports,
65 you must turn on the swift_can_network boolean. Disabled by default.
66
67 setsebool -P swift_can_network 1
68
69
70
71 If you want to allow users to resolve user passwd entries directly from
72 ldap rather then using a sssd server, you must turn on the authlo‐
73 gin_nsswitch_use_ldap boolean. Disabled by default.
74
75 setsebool -P authlogin_nsswitch_use_ldap 1
76
77
78
79 If you want to allow all daemons to write corefiles to /, you must turn
80 on the daemons_dump_core boolean. Disabled by default.
81
82 setsebool -P daemons_dump_core 1
83
84
85
86 If you want to enable cluster mode for daemons, you must turn on the
87 daemons_enable_cluster_mode boolean. Enabled by default.
88
89 setsebool -P daemons_enable_cluster_mode 1
90
91
92
93 If you want to allow all daemons to use tcp wrappers, you must turn on
94 the daemons_use_tcp_wrapper boolean. Disabled by default.
95
96 setsebool -P daemons_use_tcp_wrapper 1
97
98
99
100 If you want to allow all daemons the ability to read/write terminals,
101 you must turn on the daemons_use_tty boolean. Disabled by default.
102
103 setsebool -P daemons_use_tty 1
104
105
106
107 If you want to deny any process from ptracing or debugging any other
108 processes, you must turn on the deny_ptrace boolean. Enabled by
109 default.
110
111 setsebool -P deny_ptrace 1
112
113
114
115 If you want to allow any process to mmap any file on system with
116 attribute file_type, you must turn on the domain_can_mmap_files bool‐
117 ean. Enabled by default.
118
119 setsebool -P domain_can_mmap_files 1
120
121
122
123 If you want to allow all domains write to kmsg_device, while kernel is
124 executed with systemd.log_target=kmsg parameter, you must turn on the
125 domain_can_write_kmsg boolean. Disabled by default.
126
127 setsebool -P domain_can_write_kmsg 1
128
129
130
131 If you want to allow all domains to use other domains file descriptors,
132 you must turn on the domain_fd_use boolean. Enabled by default.
133
134 setsebool -P domain_fd_use 1
135
136
137
138 If you want to allow all domains to have the kernel load modules, you
139 must turn on the domain_kernel_load_modules boolean. Disabled by
140 default.
141
142 setsebool -P domain_kernel_load_modules 1
143
144
145
146 If you want to allow all domains to execute in fips_mode, you must turn
147 on the fips_mode boolean. Enabled by default.
148
149 setsebool -P fips_mode 1
150
151
152
153 If you want to enable reading of urandom for all domains, you must turn
154 on the global_ssp boolean. Disabled by default.
155
156 setsebool -P global_ssp 1
157
158
159
160 If you want to allow confined applications to run with kerberos, you
161 must turn on the kerberos_enabled boolean. Enabled by default.
162
163 setsebool -P kerberos_enabled 1
164
165
166
167 If you want to allow system to run with NIS, you must turn on the
168 nis_enabled boolean. Disabled by default.
169
170 setsebool -P nis_enabled 1
171
172
173
174 If you want to allow confined applications to use nscd shared memory,
175 you must turn on the nscd_use_shm boolean. Disabled by default.
176
177 setsebool -P nscd_use_shm 1
178
179
180
182 SELinux defines port types to represent TCP and UDP ports.
183
184 You can see the types associated with a port by using the following
185 command:
186
187 semanage port -l
188
189
190 Policy governs the access confined processes have to these ports.
191 SELinux swift policy is very flexible allowing users to setup their
192 swift processes in as secure a method as possible.
193
194 The following port types are defined for swift:
195
196
197 swift_port_t
198
199
200
201 Default Defined Ports:
202 tcp 6200-6203
203
205 The SELinux process type swift_t can manage files labeled with the fol‐
206 lowing file types. The paths listed are the default paths for these
207 file types. Note the processes UID still need to have DAC permissions.
208
209 cluster_conf_t
210
211 /etc/cluster(/.*)?
212
213 cluster_var_lib_t
214
215 /var/lib/pcsd(/.*)?
216 /var/lib/cluster(/.*)?
217 /var/lib/openais(/.*)?
218 /var/lib/pengine(/.*)?
219 /var/lib/corosync(/.*)?
220 /usr/lib/heartbeat(/.*)?
221 /var/lib/heartbeat(/.*)?
222 /var/lib/pacemaker(/.*)?
223
224 cluster_var_run_t
225
226 /var/run/crm(/.*)?
227 /var/run/cman_.*
228 /var/run/rsctmp(/.*)?
229 /var/run/aisexec.*
230 /var/run/heartbeat(/.*)?
231 /var/run/corosync-qnetd(/.*)?
232 /var/run/corosync-qdevice(/.*)?
233 /var/run/cpglockd.pid
234 /var/run/corosync.pid
235 /var/run/rgmanager.pid
236 /var/run/cluster/rgmanager.sk
237
238 root_t
239
240 /sysroot/ostree/deploy/.*-atomic.*/deploy(/.*)?
241 /
242 /initrd
243
244 swift_data_t
245
246 /srv/node(/.*)?
247 /var/lib/swift(/.*)?
248 /srv/loopback-device(/.*)?
249
250 swift_lock_t
251
252 /var/lock/swift.*
253
254 swift_tmp_t
255
256
257 swift_tmpfs_t
258
259
260 swift_var_cache_t
261
262 /var/cache/swift(/.*)?
263
264 swift_var_run_t
265
266 /var/run/swift(/.*)?
267
268
270 SELinux requires files to have an extended attribute to define the file
271 type.
272
273 You can see the context of a file using the -Z option to ls
274
275 Policy governs the access confined processes have to these files.
276 SELinux swift policy is very flexible allowing users to setup their
277 swift processes in as secure a method as possible.
278
279 STANDARD FILE CONTEXT
280
281 SELinux defines the file context types for the swift, if you wanted to
282 store files with these types in a diffent paths, you need to execute
283 the semanage command to sepecify alternate labeling and then use
284 restorecon to put the labels on disk.
285
286 semanage fcontext -a -t swift_var_run_t '/srv/myswift_content(/.*)?'
287 restorecon -R -v /srv/myswift_content
288
289 Note: SELinux often uses regular expressions to specify labels that
290 match multiple files.
291
292 The following file types are defined for swift:
293
294
295
296 swift_data_t
297
298 - Set files with the swift_data_t type, if you want to treat the files
299 as swift content.
300
301
302 Paths:
303 /srv/node(/.*)?, /var/lib/swift(/.*)?, /srv/loopback-device(/.*)?
304
305
306 swift_exec_t
307
308 - Set files with the swift_exec_t type, if you want to transition an
309 executable to the swift_t domain.
310
311
312 Paths:
313 /usr/bin/swift-object-info, /usr/bin/swift-proxy-server,
314 /usr/bin/swift-object-server, /usr/bin/swift-account-reaper,
315 /usr/bin/swift-account-server, /usr/bin/swift-container-sync,
316 /usr/bin/swift-object-auditor, /usr/bin/swift-object-expirer,
317 /usr/bin/swift-object-updater, /usr/bin/swift-account-auditor,
318 /usr/bin/swift-container-server, /usr/bin/swift-container-auditor,
319 /usr/bin/swift-container-updater, /usr/bin/swift-object-replica‐
320 tor, /usr/bin/swift-account-replicator, /usr/bin/swift-container-
321 replicator, /usr/bin/swift-container-reconciler
322
323
324 swift_lock_t
325
326 - Set files with the swift_lock_t type, if you want to treat the files
327 as swift lock data, stored under the /var/lock directory
328
329
330
331 swift_tmp_t
332
333 - Set files with the swift_tmp_t type, if you want to store swift tem‐
334 porary files in the /tmp directories.
335
336
337
338 swift_tmpfs_t
339
340 - Set files with the swift_tmpfs_t type, if you want to store swift
341 files on a tmpfs file system.
342
343
344
345 swift_unit_file_t
346
347 - Set files with the swift_unit_file_t type, if you want to treat the
348 files as swift unit content.
349
350
351
352 swift_var_cache_t
353
354 - Set files with the swift_var_cache_t type, if you want to store the
355 files under the /var/cache directory.
356
357
358
359 swift_var_run_t
360
361 - Set files with the swift_var_run_t type, if you want to store the
362 swift files under the /run or /var/run directory.
363
364
365
366 Note: File context can be temporarily modified with the chcon command.
367 If you want to permanently change the file context you need to use the
368 semanage fcontext command. This will modify the SELinux labeling data‐
369 base. You will need to use restorecon to apply the labels.
370
371
373 semanage fcontext can also be used to manipulate default file context
374 mappings.
375
376 semanage permissive can also be used to manipulate whether or not a
377 process type is permissive.
378
379 semanage module can also be used to enable/disable/install/remove pol‐
380 icy modules.
381
382 semanage port can also be used to manipulate the port definitions
383
384 semanage boolean can also be used to manipulate the booleans
385
386
387 system-config-selinux is a GUI tool available to customize SELinux pol‐
388 icy settings.
389
390
392 This manual page was auto-generated using sepolicy manpage .
393
394
396 selinux(8), swift(8), semanage(8), restorecon(8), chcon(1), sepolicy(8)
397 , setsebool(8)
398
399
400
401swift 19-04-25 swift_selinux(8)