opafm_selinux(8)

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

πŸ’… opafm_selinux(8) β€” the manual page, but make it make sense

Hi bestie! So this is the opafm_selinux manual page β€” it's the SELinux policy guide for the opafm processes, and ngl it's kinda niche but also lowkey important if you're running this stuff. Let's get into it. ✨


πŸŽ€ NAME

opafm_selinux β€” Security Enhanced Linux Policy for the opafm processes. Periodt.


🌸 DESCRIPTION

Security-Enhanced Linux secures the opafm processes via flexible mandatory access control. That's the whole vibe β€” SELinux is the bouncer at the club, and it's checking everyone's ID against the policy. πŸ’…

The opafm processes execute with the opafm_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 opafm_t

Okay so that's literally it β€” if you see opafm_t in the output, you know the processes are live. πŸ‘‘


πŸ¦‹ ENTRYPOINTS

The opafm_t SELinux type can be entered via the opafm_exec_t file type.

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

/usr/lib/opa-fm/bin/opafmd

That's the one and only door into the opafm_t domain, iykyk. πŸšͺ


πŸ’œ PROCESS TYPES

SELinux defines process types (domains) for each process running on the system. Cute, right?

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

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

The following process types are defined for opafm:

  • opafm_t
Note: semanage permissive -a opafm_t can be used to make the process type opafm_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. So it's like β€” the bouncer stops kicking people out but still writes down every single thing that happens. Bestie, the receipts are still there. πŸ“

✨ BOOLEANS

SELinux policy is customizable based on least access required. opafm policy is extremely flexible and has several booleans that allow you to manipulate the policy and run opafm with the tightest access possible. Lock it down, queen. πŸ’…

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

That -P is the important bit β€” it makes the change persistent, so it survives a reboot. Slay. 🫢


🌈 MANAGED FILES

The SELinux process type opafm_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 isn't out here doing DAC's job, it's just doing its own lil thing on top. 😭

  • 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
  • kdump_crash_t
/var/crash(/.*)?
  • nfs_t

(no default paths listed for this one β€” it's giving mystery, it's giving enigma πŸ•΅οΈβ€β™€οΈ)

  • opafm_var_lib_t
/var/lib/opa-fm(/.*)?
  • opafm_var_run_t
/run/opafmd(/.*)?
  • root_t
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp

Like… yes that's literally the root filesystem in there, no cap. Be careful with what you let opafm_t touch. ⚠️


⭐ FILE CONTEXTS

SELinux requires files to have an extended attribute to define the file type. It's like a little name tag for every file. 🏷️

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

🌸 STANDARD FILE CONTEXT

SELinux defines the file context types for the opafm, 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 opafm_exec_t '/srv/opafm/content(/.*)?'
restorecon -R -v /srv/myopafm_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. Regex girlies rise. 🧚

The following file types are defined for opafm:

  • opafm_exec_t β€” Set files with the opafm_exec_t type, if you want to transition an executable to the opafm_t domain.
  • opafm_var_lib_t β€” Set files with the opafm_var_lib_t type, if you want to store the opafm files under the /var/lib directory.
  • opafm_var_run_t β€” Set files with the opafm_var_run_t type, if you want to store the opafm 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 like β€” chcon is the temporary tattoo, semanage fcontext + restorecon is the real ink. Choose wisely. πŸ’€

πŸŽ€ 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 boolean can also be used to manipulate the booleans.

system-config-selinux is a GUI tool available to customize SELinux policy settings. For the besties who prefer a lil clicky-clicky interface instead of the terminal. πŸ–±οΈβœ¨


πŸ‘‘ AUTHOR

This manual page was auto-generated using sepolicy manpage. Not me writing it by hand, the machines did it. πŸ€–


🌈 SEE ALSO

selinux(8), opafm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)


And that's the whole page, bestie! Go forth and SELinux responsibly. πŸ’–

opafm Β· 26-10-06 Β· opafm_selinux(8) β€” mwah, that's the source, version, and date, all wrapped up with a lil kiss. 🫢✨

πŸ“¦ where this page comes from