keystone_selinux(8)

πŸ“¦
version 20250627+git412.dbf877ab7 Β· 7 versions
, in opensuse-leap 16.0

πŸ’– keystone_selinux(8) β€” the SELinux policy page for keystone, bestie πŸ’–

okay so this is the keystone_selinux page from the SELinux Policy keystone section of the manual, and we're gonna get through it together, no cap. grab a snack. πŸ“


✨ NAME ✨

keystone_selinux β€” the Security Enhanced Linux Policy for the keystone processes. that's it, that's the vibe. πŸ’…


🌸 DESCRIPTION 🌸

Security-Enhanced Linux secures the keystone processes via flexible mandatory access control. like, it's literally the bouncer at the club and it checks everybody's ID. 🫢

The keystone processes execute with the keystone_t SELinux type. you can check if you have these processes running by executing the ps command with the -Z qualifier. yes, the -Z. it's giving "show me the SELinux context" energy.

For example:

ps -eZ | grep keystone_t

run that and see who's wearing the keystone_t fit. πŸ‘‘


πŸ¦‹ ENTRYPOINTS πŸ¦‹

The keystone_t SELinux type can be entered via the keystone_exec_t file type. that's the doorway, bestie. πŸšͺ

The default entrypoint paths for the keystone_t domain are the following:

/usr/bin/keystone-all

one door. one path. iconic.


πŸŽ€ PROCESS TYPES πŸŽ€

SELinux defines process types (domains) for each process running on the system. every process gets its own little domain, like a group chat everyone's in. πŸ’¬

You can see the context of a process using the -Z option to ps.

Policy governs the access confined processes have to files. the SELinux keystone policy is very flexible, allowing users to setup their keystone processes in as secure a method as possible. flexible and secure, we love a multitasker. ✨

The following process types are defined for keystone:

  • keystone_t
  • keystone_cgi_script_t
Note: semanage permissive -a keystone_t can be used to make the process type keystone_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it stops blocking but it still talks about you behind your back. πŸ’€

⭐ BOOLEANS ⭐

SELinux policy is customizable based on least access required. keystone policy is extremely flexible and has several booleans that allow you to manipulate the policy and run keystone with the tightest access possible. toggles! we love toggles! 🎚️

If you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn on the daemons_dontaudit_scheduling boolean. Enabled by default.

setsebool -P daemons_dontaudit_scheduling 1

If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default.

setsebool -P fips_mode 1

If you want to allow confined applications to run with kerberos, you must turn on the kerberos_enabled boolean. Enabled by default.

setsebool -P kerberos_enabled 1

If you want to allow system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default.

setsebool -P nis_enabled 1

that last one is off out of the box, so flip it yourself if you need it, bestie. πŸ™ˆ


🌈 PORT TYPES 🌈

SELinux defines port types to represent TCP and UDP ports. ports have types now. everything has a type. πŸ’…

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. the SELinux keystone policy is very flexible, allowing users to setup their keystone processes in as secure a method as possible.

The following port types are defined for keystone:

  • keystone_port_t

Default Defined Ports:

tcp 35357
udp 35357

both protocols, same number, matching set. cute. πŸŽ€


🧚 MANAGED FILES 🧚

The SELinux process type keystone_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 said "i can allow it but your UID still has to actually have permission," so don't come for her when your regular perms are the problem. 😭

  • cluster_conf_t
/etc/cluster(/.*)?
  • cluster_var_lib_t
/var/lib/pcsd(/.*)?
/var/lib/cluster(/.*)?
/var/lib/openais(/.*)?
/var/lib/pengine(/.*)?
/var/lib/corosync(/.*)?
/usr/lib/heartbeat(/.*)?
/var/lib/heartbeat(/.*)?
/var/lib/pacemaker(/.*)?
  • cluster_var_run_t
/run/crm(/.*)?
/run/cman_.*
/run/rsctmp(/.*)?
/run/aisexec.*
/run/heartbeat(/.*)?
/run/pcsd-ruby.socket
/run/corosync-qnetd(/.*)?
/run/corosync-qdevice(/.*)?
/run/pcsd.socket
/run/corosync.pid
/run/cpglockd.pid
/run/rgmanager.pid
/run/cluster/rgmanager.sk
  • faillog_t
/var/log/btmp.*
/run/faillock(/.*)?
/var/log/faillog.*
/var/log/tallylog.*
  • keystone_tmp_t β€” no default paths listed, she's mysterious like that. πŸ¦‹
  • keystone_var_lib_t
/var/lib/keystone(/.*)?
  • keystone_var_run_t
/run/keystone(/.*)?
  • 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
  • lastlog_t
/var/log/lastlog.*
/var/lib/lastlog(/.*)?
  • root_t
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp
  • security_t
/selinux
  • wtmpdb_journal_t
/var/lib/wtmpdb/wtmp.db-journal

πŸ’œ FILE CONTEXTS πŸ’œ

SELinux requires files to have an extended attribute to define the file type. yes, files have extended attributes now, she's got layers. ✨

You can see the context of a file using the -Z option to ls.

Policy governs the access confined processes have to these files. the SELinux keystone policy is very flexible, allowing users to setup their keystone processes in as secure a method as possible.

🌸 STANDARD FILE CONTEXT 🌸

SELinux defines the file context types for the keystone, and 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 keystone_exec_t '/srv/keystone/content(/.*)?'
restorecon -R -v /srv/mykeystone_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise. πŸ”₯

The following file types are defined for keystone:

  • keystone_cgi_content_t β€” Set files with the keystone_cgi_content_t type, if you want to treat the files as keystone cgi content.
  • keystone_cgi_htaccess_t β€” Set files with the keystone_cgi_htaccess_t type, if you want to treat the file as a keystone cgi access file.
  • keystone_cgi_ra_content_t β€” Set files with the keystone_cgi_ra_content_t type, if you want to treat the files as keystone cgi read/append content.
  • keystone_cgi_rw_content_t β€” Set files with the keystone_cgi_rw_content_t type, if you want to treat the files as keystone cgi read/write content.
  • keystone_cgi_script_exec_t β€” Set files with the keystone_cgi_script_exec_t type, if you want to transition an executable to the keystone_cgi_script_t domain.
  • keystone_exec_t β€” Set files with the keystone_exec_t type, if you want to transition an executable to the keystone_t domain.
  • keystone_initrc_exec_t β€” Set files with the keystone_initrc_exec_t type, if you want to transition an executable to the keystone_initrc_t domain.
  • keystone_log_t β€” Set files with the keystone_log_t type, if you want to treat the data as keystone log data, usually stored under the /var/log directory.
  • keystone_tmp_t β€” Set files with the keystone_tmp_t type, if you want to store keystone temporary files in the /tmp directories.
  • keystone_unit_file_t β€” Set files with the keystone_unit_file_t type, if you want to treat the files as keystone unit content.
  • keystone_var_lib_t β€” Set files with the keystone_var_lib_t type, if you want to store the keystone files under the /var/lib directory.
  • keystone_var_run_t β€” Set files with the keystone_var_run_t type, if you want to store the keystone files under the /run or /var/run directory.
Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels. so chcon is the temporary tattoo and semanage fcontext + restorecon is the real one. iykyk. πŸ’…

πŸ‘‘ COMMANDS πŸ‘‘

semanage fcontext can also be used to manipulate 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 is a GUI tool available to customize SELinux policy settings. a GUI! for when you want to click instead of type. πŸ–±οΈβœ¨


🫢 AUTHOR 🫢

This manual page was auto-generated using sepolicy manpage. a bot wrote this. respectfully, she ate. πŸ€–πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

selinux(8), keystone(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), keystone_cgi_script_selinux(8), keystone_cgi_script_selinux(8)

(yes, keystone_cgi_script_selinux(8) is listed twice. i don't make the rules, i just think she's iconic enough to deserve it. πŸ’…)


that's the whole page, bestie β€” keystone manual, dated 26-10-06, version keystone, and you understood every bit of it. go forth and label responsibly. πŸŒˆπŸ’– periodt.

πŸ“¦ where this page comes from