kanidm_unixd_selinux(8)

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

πŸ’… kanidm_unixd_selinux(8) β€” SELinux Policy for kanidm_unixd ✨

okay so bestie, you've stumbled into the kanidm_unixd_selinux(8) man page and honestly? you're about to learn how SELinux keeps the kanidm_unixd processes on a leash 🫢 this is the manual page for the SELinux Policy that wraps around kanidm_unixd, and yes it's giving very much "security guard at the club" energy πŸ‘‘


🌸 NAME 🌸

kanidm_unixd_selinux β€” the Security Enhanced Linux Policy for the kanidm_unixd processes πŸ’–


✨ DESCRIPTION ✨

Security-Enhanced Linux secures the kanidm_unixd processes via flexible mandatory access control. it's not vibes-based security, it's policy-based security, and honestly the flex is real πŸ”₯

The kanidm_unixd processes execute with the kanidm_unixd_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 kanidm_unixd_t

run that and it's like a vibe check for your running processes, except the vibe is a security context πŸŽ€


πŸ¦‹ ENTRYPOINTS πŸ¦‹

The kanidm_unixd_t SELinux type can be entered via the kanidm_unixd_exec_t file type.

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

/usr/bin/kanidm_unixd

that's the one (1) door into this domain, no cap πŸšͺ


πŸ‘‘ PROCESS TYPES πŸ‘‘

SELinux defines process types (domains) for each process running on the system.

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

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

The following process types are defined for kanidm_unixd:

  • kanidm_unixd_t
  • kanidm_unixd_tasks_t
Note: semanage permissive -a kanidm_unixd_t can be used to make the process type kanidm_unixd_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it won't block you, but it will be taking notes πŸ“πŸ˜­

πŸŽ€ BOOLEANS πŸŽ€

SELinux policy is customizable based on least access required. kanidm_unixd policy is extremely flexible and has several booleans that allow you to manipulate the policy and run kanidm_unixd with the tightest access possible. tightest access possible is the whole aesthetic, periodt πŸ’œ

  • 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 use nscd shared memory, you must turn on the nscd_use_shm boolean. Enabled by default.
setsebool -P nscd_use_shm 1

three booleans, all on by default, all glowing ✨ flip them with setsebool -P and you're literally the main character of your own policy 🌈


🌸 MANAGED FILES 🌸

The SELinux process type kanidm_unixd_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 doing DAC's job for it, bestie, they're different layers 🧚

  • 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
  • kanidm_unixd_var_cache_t
/var/cache/kanidm-unixd(/.*)?
/var/cache/private/kanidm-unixd(/.*)?
  • root_t
/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp

look at all those cluster paths living their best life in this policy 😭 root_t really said "I contain multitudes" πŸ’€


πŸ¦‹ 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 kanidm_unixd policy is very flexible allowing users to setup their kanidm_unixd processes in as secure a method as possible. same energy as before, we're just talking about files now πŸŽ€

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for the kanidm_unixd, 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 kanidm_unixd_var_run_t
'/srv/kanidm_unixd/content(/.*)?'
restorecon -R -v /srv/mykanidm_unixd_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex my beloved πŸ§šβ€β™€οΈ

The following file types are defined for kanidm_unixd:

  • kanidm_unixd_exec_t β€” Set files with the kanidm_unixd_exec_t type, if you want to transition an executable to the kanidm_unixd_t domain.
  • kanidm_unixd_tasks_exec_t β€” Set files with the kanidm_unixd_tasks_exec_t type, if you want to transition an executable to the kanidm_unixd_tasks_t domain.
  • kanidm_unixd_var_cache_t β€” Set files with the kanidm_unixd_var_cache_t type, if you want to store the files under the /var/cache directory.

Paths:

/var/cache/kanidm-unixd(/.*)?, /var/cache/private/kanidm-unixd(/.*)?
  • kanidm_unixd_var_run_t β€” Set files with the kanidm_unixd_var_run_t type, if you want to store the kanidm unixd 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. temporary vs permanent, know the difference bestie πŸ’…

πŸ’œ 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.

all the semanage subcommands, slaying in a row πŸ‘‘ plus one (1) GUI tool for when you want to point and click instead of type πŸ–±οΈβœ¨


🌈 AUTHOR 🌈

This manual page was auto-generated using sepolicy manpage. a bot wrote this and honestly? it ate πŸ€–πŸ’…


πŸ“ SEE ALSO πŸ“

selinux(8), kanidm_unixd(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), kanidm_unixd_tasks_selinux(8)


and that's the whole page bestie, you're now officially fluent in kanidm_unixd SELinux πŸ’– mwah 🫢

that was kanidm_unixd_selinux(8), from the kanidm_unixd manual, dated 26-10-06 β€” go forth and label responsibly ✨

πŸ“¦ where this page comes from