man(8)
π NAME π
okay bestie, meet udica β it's a tool for generating SELinux security profiles for containers. yes, that's the whole vibe. it's giving "container security but make it cute." π«Ά
this little legend lives in section 8 of the manual (the man(8) one, admin/system tools territory, iykyk), and the page you're reading right now is the udica man page. slay.
β¨ SYNOPSIS β¨
udica [options] container_name
πΈ DESCRIPTION πΈ
So here's the tea, bestie. udica is a tool for generating SELinux security profiles for containers. The whole concept is based on the "block inheritance" feature inside the CIL intermediate language supported by the SELinux user space. π€―
The tool creates a policy which combines rules inherited from specified CIL blocks (templates) and rules discovered by inspection of the container JSON file with mount points and port definitions.
literally that's it. templates + JSON inspection = policy. no cap. π
π³ SUPPORTED CONTAINER ENGINES π³
- CRI-O v1.14.10+
- docker v1.13+
- podman v2.0+
(and yes there's a comma at the end of that list in the original, iconic behavior, we stan)
π OPTIONS π
-h,--helpβ Show this help message and exit. the classic "help me please" button π-i,--container-id IDβ An ID of the running container for which should be an SELinux policy created. so like, the container that's running right now that you want a policy for.-j,--json JSONFILEβ Load JSON content of the inspected container from this file. file-based inspo instead of live inspo β¨-l,--load-modulesβ Load templates and module created by this tool. go ahead, load 'em up.-c,--caps CAPSβ List of capabilities, for example:-c AUDIT_WRITE,CHOWN,DAC_OVERRIDE,FOWNER,FSETID,KILL. mandatory to use for Docker Engine, see the BUGS section β like, actually required, not a suggestion, fr fr.--devices DEVSβ List of devices the container should have access to, e.g--devices /dev/dri/card0,/dev/dri/renderD128. this one overrides devices specified in the conatiner JSON (yes, "conatiner," that's how it's spelled in the original and I will not be fixing it, it's canon now π).-a,--append-rules FILEβ Append more SELinux allow rules generated from SELinux denials in audit daemon. the audit denials said no but you say yes π-s,--stream-connect DOMAINβ Allow container to stream connect with given SELinux domain.-e,--container-engine ENGINEβ Specify which container engine is used for the inspected container (supports:CRI-O,docker,podman).--full-network-accessβ Allow a container full network access. the whole internet, bestie. π--tty-accessβ Allow a container to read and write the controlling terminal. terminal access, unlocked π--X-accessβ Allow a container to communicate with the X server. (note the capital X, it's fancy like that π)--virt-accessβ Allow a container to communicate with libvirt. virtualization besties unite π§
π₯ EXIT STATUS π₯
0β no errors encountered. we ate and left no crumbs β¨1β other errors.2β error while parsing options. oops, syntax moment π3β error while getting container info. couldn't find the container, tragic π4β error while creating an SELinux policy. the policy said "not today."
π EXAMPLES π
# cat my_con.json | udica --x-access --full-network-access my_container
Creates a new SELinux policy with name my_container based on inspecting container and adding access to the X server and full network access.
(and yes the example uses --x-access lowercase while the option list says --X-access β I'm reporting it exactly as written, don't come for me π«Ά)
π¦ SEE ALSO π¦
π BUGS π
okay so listen, there are some things you simply must know:
- Since it is not possible to detect capabilities used by a container in Docker Engine, you have to use
-cto specify capabilities for docker container manually. do not skip this one, bestie. - It is not possible to generate a custom local policy using the
"audit2allow -M"command from AVCs where source context was generated by udica. For this purpose please use--append-rulesoption. - In some situations udica fails to identify which container engine is used, therefore
"--container-engine"parameter has to be used to inform udica how JSON inspection file should be parsed.
π REPORTING BUGS π
Report bugs to <https://github.com/containers/udica/issues/>
π AUTHOR π
Written by Lukas Vrabec (lvrabec@redhat.com)
and that's the whole page, bestie!! πβ¨ source/version 1.1, dated 17 February 2019, from the man(8) manual. she's been iconic since 2019 and she's still serving. periodt. ππ¦π
π¦ where this page comes from
- centos-stream 10: udica 0.2.8-6.el10 Β· GPL-3.0-or-later
- centos-stream 9: udica 0.2.8-2.el9 Β· GPLv3+
- fedora 43: udica 0.2.8-11.fc43 Β· GPL-3.0-or-later
- fedora 44: udica 0.2.8-12.fc44 Β· GPL-3.0-or-later
- Copyright (C) 2018 Lukas Vrabec, <lvrabec@redhat.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms