openshift_selinux(8)
πΈ openshift_selinux(8) πΈ
okay so bestie, welcome to openshift_selinux β the SELinux policy page for the openshift processes, straight out of the SELinux Policy openshift section of your man pages. grab a snack, this one's a whole journey π
β¨ NAME β¨
openshift_selinux β Security Enhanced Linux Policy for the openshift processes π«Ά
π¦ DESCRIPTION π¦
Security-Enhanced Linux secures the openshift processes via flexible mandatory access control. that's the whole vibe.
The openshift processes execute with the openshift_t SELinux type. you can check if you have these processes running by executing the ps command with the -Z qualifier.
for example:
ps -eZ | grep openshift_t
π ENTRYPOINTS π
The openshift_t SELinux type can be entered via the crontab_exec_t, user_cron_spool_t file types.
The default entrypoint paths for the openshift_t domain are the following, and yes you need all of them:
/usr/bin/(f)?crontab/usr/bin/at/usr/bin/fcronsighup/usr/libexec/fcronsighup/var/spool/at(/.*)?/var/spool/atjobs/.SEQ/var/spool/cron/var/spool/cron/tabs/[^/]+
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. every process gets a little name tag, iconic behavior.
You can see the context of a process using the -Z option to ps.
Policy governs the access confined processes have to files. SELinux openshift policy is very flexible allowing users to setup their openshift processes in as secure a method as possible.
The following process types are defined for openshift β full squad, no cap:
openshift_initrc_topenshift_cgroup_read_topenshift_net_read_topenshift_cron_topenshift_topenshift_app_topenshift_script_t
Note:semanage permissive -a openshift_tcan be used to make the process typeopenshift_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it stops yelling at your app but it still writes down everything you did in its little diary π
π MCS Constrained π
The SELinux process type openshift_t is an MCS (Multi Category Security) constrained type. Sometimes this separation is referred to as sVirt. These types are usually used for securing multi-tenant environments, such as virtualization, containers or separation of users. The tools used to launch MCS types, pick out a different MCS label for each process group.
For example one process might be launched with openshift_t:s0:c1,c2, and another process launched with openshift_t:s0:c3,c4. The SELinux kernel only allows these processes can only write to content with a matching MCS label, or a MCS Label of s0. A process running with the MCS level of s0:c1,c2 is not allowed to write to content with the MCS label of s0:c3,c4. it's giving assigned seating at a wedding β you do NOT sit at someone else's table πͺπ
π BOOLEANS π
SELinux policy is customizable based on least access required. openshift policy is extremely flexible and has several booleans that allow you to manipulate the policy and run openshift with the tightest access possible. little toggles, big power β¨
cron_userdomain_transitionβ if you want to determine whether crond can execute jobs in the user domain as opposed to the the generic cronjob domain, you must turn on this boolean. Enabled by default.
setsebool -P cron_userdomain_transition 1
deny_ptraceβ if you want to deny any process from ptracing or debugging any other processes, you must turn on this boolean. Disabled by default.
setsebool -P deny_ptrace 1
nis_enabledβ if you want to allow system to run with NIS, you must turn on this boolean. Disabled by default.
setsebool -P nis_enabled 1
π§ PORT TYPES π§
SELinux defines port types to represent TCP and UDP ports.
You can see the types associated with a port by using the following command:
semanage port -l
Policy governs the access confined processes have to these ports. SELinux openshift policy is very flexible allowing users to setup their openshift processes in as secure a method as possible. same energy as the files, just with ports πͺ
The following port types are defined for openshift:
openshift_port_t
π MANAGED FILES π
The SELinux process type openshift_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions. SELinux is not out here overriding your regular permissions, bestie, it's a whole separate layer π«Ά
faillog_t/var/log/btmp.*/run/faillock(/.*)?/var/log/faillog.*/var/log/tallylog.*
hugetlbfs_t/dev/hugepages/usr/lib/udev/devices/hugepages
krb5_host_rcache_t/var/tmp/krb5_0.rcache2/var/cache/krb5rcache(/.*)?/var/tmp/nfs_0/var/tmp/DNS_25/var/tmp/host_0/var/tmp/imap_0/var/tmp/HTTP_23/var/tmp/HTTP_48/var/tmp/ldap_55/var/tmp/ldap_487/var/tmp/ldapmap1_0
openshift_tmpfs_tβ no default paths listed, it's mysterious like that πpostfix_spool_t/var/spool/postfix.*/var/spool/postfix/defer(/.*)?/var/spool/postfix/flush(/.*)?/var/spool/postfix/deferred(/.*)?/var/spool/postfix/maildrop(/.*)?
security_t/selinux
π FILE CONTEXTS π
SELinux requires files to have an extended attribute to define the file type.
You can see the context of a file using the -Z option to ls.
Policy governs the access confined processes have to these files. SELinux openshift policy is very flexible allowing users to setup their openshift processes in as secure a method as possible.
πΈ EQUIVALENCE DIRECTORIES πΈ
openshift policy stores data with multiple different file context types under the /var/lib/openshift directory. If you would like to store the data in a different directory you can use the semanage command to create an equivalence mapping. If you wanted to store this data under the /srv directory you would execute the following command:
semanage fcontext -a -e /var/lib/openshift /srv/openshift
restorecon -R -v /srv/openshift
openshift policy stores data with multiple different file context types under the /var/lib/stickshift directory. If you would like to store the data in a different directory you can use the semanage command to create an equivalence mapping. If you wanted to store this data under the /srv directory you would execute the following command:
semanage fcontext -a -e /var/lib/stickshift /srv/stickshift
restorecon -R -v /srv/stickshift
like, it's literally the same trick twice, just a different directory. slay for consistency π
β STANDARD FILE CONTEXT β
SELinux defines the file context types for the openshift, if you wanted to store files with these types in a different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk.
semanage fcontext -a -t openshift_initrc_exec_t '/srv/openshift/content(/.*)?'
restorecon -R -v /srv/myopenshift_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. so those (/.*)? bits are doing a LOT of heavy lifting, okay π₯
The following file types are defined for openshift β big list incoming, stay with me:
openshift_app_tmp_tβ Set files with theopenshift_app_tmp_ttype, if you want to store openshift app temporary files in the/tmpdirectories.openshift_cgroup_read_exec_tβ Set files with theopenshift_cgroup_read_exec_ttype, if you want to transition an executable to theopenshift_cgroup_read_tdomain.openshift_cgroup_read_tmp_tβ Set files with theopenshift_cgroup_read_tmp_ttype, if you want to store openshift cgroup read temporary files in the/tmpdirectories.openshift_content_tβ Set files with theopenshift_content_ttype, if you want to treat the files as openshift content.openshift_cron_exec_tβ Set files with theopenshift_cron_exec_ttype, if you want to transition an executable to theopenshift_cron_tdomain.openshift_cron_tmp_tβ Set files with theopenshift_cron_tmp_ttype, if you want to store openshift cron temporary files in the/tmpdirectories.openshift_htaccess_tβ Set files with theopenshift_htaccess_ttype, if you want to treat the file as a openshift access file.openshift_initrc_exec_tβ Set files with theopenshift_initrc_exec_ttype, if you want to transition an executable to theopenshift_initrc_tdomain. Paths:/usr/bin/(oo|rhc)-restorer/usr/bin/(oo|rhc)-restorer-wrapper.sh/usr/bin/mcollectived/etc/rc.d/init.d/libra/usr/bin/oo-admin-ctl-gears/etc/rc.d/init.d/mcollective
openshift_initrc_tmp_tβ Set files with theopenshift_initrc_tmp_ttype, if you want to store openshift initrc temporary files in the/tmpdirectories.openshift_log_tβ Set files with theopenshift_log_ttype, if you want to treat the data as openshift log data, usually stored under the/var/logdirectory. Paths:/var/log/openshift(/.*)?/var/log/mcollective.log.*
openshift_net_read_exec_tβ Set files with theopenshift_net_read_exec_ttype, if you want to transition an executable to theopenshift_net_read_tdomain.openshift_ra_content_tβ Set files with theopenshift_ra_content_ttype, if you want to treat the files as openshift read/append content.openshift_rw_content_tβ Set files with theopenshift_rw_content_ttype, if you want to treat the files as openshift read/write content.openshift_rw_file_tβ Set files with theopenshift_rw_file_ttype, if you want to treat the files as openshift rw content. Paths:/var/lib/openshift/.*/data(/.*)?/var/lib/stickshift/.*/data(/.*)?
openshift_script_exec_tβ Set files with theopenshift_script_exec_ttype, if you want to transition an executable to theopenshift_script_tdomain.openshift_tmp_tβ Set files with theopenshift_tmp_ttype, if you want to store openshift temporary files in the/tmpdirectories. Paths:/var/lib/openshift/.*/.tmp(/.*)?/var/lib/openshift/.*/.sandbox(/.*)?/var/lib/stickshift/.*/.tmp(/.*)?/var/lib/stickshift/.*/.sandbox(/.*)?
openshift_tmpfs_tβ Set files with theopenshift_tmpfs_ttype, if you want to store openshift files on a tmpfs file system.openshift_var_lib_tβ Set files with theopenshift_var_lib_ttype, if you want to store the openshift files under the/var/libdirectory. Paths:/var/lib/openshift(/.*)?/var/lib/stickshift(/.*)?/var/lib/containers/home(/.*)?
openshift_var_run_tβ Set files with theopenshift_var_run_ttype, if you want to store the openshift files under the/runor/var/rundirectory. Paths:/run/openshift(/.*)?/run/stickshift(/.*)?
Note: File context can be temporarily modified with thechconcommand. If you want to permanently change the file context you need to use thesemanage fcontextcommand. This will modify the SELinux labeling database. You will need to userestoreconto apply the labels. temporarychconis giving "I'll remember it for five minutes",semanage+restoreconis the actual permanent commitment π
and that's where part one wraps for now β more incoming, don't go anywhere π¦
β¨ COMMANDS β¨
okay so here's the command crew that lets you poke at SELinux policy stuff from different angles π
semanage fcontextβ can also be used to manipulate the default file context mappings β¨semanage permissiveβ can also be used to manipulate whether or not a process type is permissive πsemanage moduleβ can also be used to enable/disable/install/remove policy modules π οΈsemanage portβ can also be used to manipulate the port definitions π₯semanage booleanβ can also be used to manipulate the booleans πsystem-config-selinuxβ a GUI tool available to customize SELinux policy settings π₯οΈβ¨
π AUTHOR π
This manual page was auto-generated using sepolicy manpage. no cap, the robots made this one π€π«Ά
π SEE ALSO π
go read these next, bestie β yes, some of them are listed twice, and yes, we're keeping it exactly like that πβ¨
selinux(8)openshift(8)semanage(8)restorecon(8)chcon(1)sepolicy(8)setsebool(8)openshift_app_selinux(8)openshift_app_selinux(8)openshift_cgroup_read_selinux(8)openshift_cgroup_read_selinux(8)openshift_cron_selinux(8)openshift_cron_selinux(8)openshift_initrc_selinux(8)openshift_initrc_selinux(8)openshift_net_read_selinux(8)openshift_net_read_selinux(8)openshift_script_selinux(8)openshift_script_selinux(8)
And that's the footer, bestie: source openshift, date 26-10-06, title openshift_selinux(8) πβ¨ periodt.
π¦ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms