I created a PodmanSpawner one year ago and we recently discussed (here Any interest in PodmanSpawner ? · Issue #360 · jupyterhub/dockerspawner · GitHub) to incorporate some changes into JupyterHub in order to officially support the PodmanSpawner. These changes enable the JupyterHub to correctly log in system users with the system with PAM such that the system creates tmp folders for the user and logs login times, etc.
I do not know if this is absolutely relevant for the PodmanSpawner but it would allow to use Podman without a lot of additional configuration. I think logging in users at the system might also improve security.
However, to login users with PAM the calling process needs root privileges. In production mode this is not so much a problem. But in order to write tests this is a problem. So I wonder if there are any packages that extent pytest in order to simulate root privileges? There is the fakeroot command but it fakes different root privileges. I also found this tool https://cwrap.org/ but havent taken a deeper look. Can anyone recommend similar tools?