Replies: 1 comment 3 replies
-
In my opinion, ssh-agent should never be used, anywhere. (reason: it's too easy to expose key to unwanted process/location, and it's hard to realize) But mount key file should hit another AVC denial, you still required to add some policy. LOL |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to run an Ansible EE container, which needs SSH credentials for the remote server. I would rather not mount in my ~/.ssh directory, but rather just start an ssh-agent for the duration, add they needed key, and expose socket while running the Ansible EE, and then clean it all up nicely.
Besides the fact that ansible-runner currently broken, and thus doesn't handle SSH keys for EE, it has historically made it work with
--ipc=host
, and most other solutions out there is to basically disable SELinux (as always...)I tried the following, running Podman rootless from my regular user:
looking in audit.log, i see the AVC denial, as expected:
What is the correct and secure way to achieve this using Podman with SELinux enabled? Should this be filed as a issue against container-selinux, so that a rule could be added, to allow this, or is this an insanely stupid idea in the first place, and should the specific key be mounted RO into the container's ~/.ssh directory instead?
Beta Was this translation helpful? Give feedback.
All reactions