demo: using systemd-creds to store a secret as an unprivileged user #27144
eriksjolund
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here is a minimal demo showing how to use systemd-creds to store a secret as an unprivileged user and
then run a container to read the secret.
Requirements: systemd 258 or later.
mkdir -p ~/.config/containers/systemd
~/.config/containers/systemd/demo.container
containingmysecret
is printed by the containerNote, to make it work I had to add
Is SELinux supposed to be blocking this?
Side note 1:
To try it out on a Linux system with systemd 258, I booted up a Fedora CoreOS vm
(rawhide
https://builds.coreos.fedoraproject.org/browser?stream=rawhide&arch=aarch64)
with the help of the tool vfkit on a macbook.
Side note 2:
Lennart Poettering mentions in a Mastodon post that
LoadCredentialEncrypted=
was fixed in systemd 258 so that it works for unprivileged users.Beta Was this translation helpful? Give feedback.
All reactions