-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for systemd creds encrypt/decrypt #9383
add support for systemd creds encrypt/decrypt #9383
Conversation
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I've added some first quick comments.
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
tests/integration/targets/systemd_creds_decrypt/tasks/main.yaml
Outdated
Show resolved
Hide resolved
tests/integration/targets/systemd_creds_decrypt/tasks/main.yaml
Outdated
Show resolved
Hide resolved
tests/integration/targets/systemd_creds_decrypt/tasks/main.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Thanks for the help and guidance @felixfontein |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of comments more. Other than that, LGTM.
Co-authored-by: Alexei Znamensky <[email protected]>
Co-authored-by: Alexei Znamensky <[email protected]>
Co-authored-by: Alexei Znamensky <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Backport to stable-10: 💚 backport PR created✅ Backport PR branch: Backported as #9468 🤖 @patchback |
* add support for systemd creds encrypt/decrypt Signed-off-by: Thomas Sjögren <[email protected]> * add __metaclass__ Signed-off-by: Thomas Sjögren <[email protected]> * Python 2.7 issues Signed-off-by: Thomas Sjögren <[email protected]> * update version_added and ci test aliases Signed-off-by: Thomas Sjögren <[email protected]> * switch to container Signed-off-by: Thomas Sjögren <[email protected]> * run tests in docker as well Signed-off-by: Thomas Sjögren <[email protected]> * move tasks into tasks/ Signed-off-by: Thomas Sjögren <[email protected]> * no need to call echo Signed-off-by: Thomas Sjögren <[email protected]> * lint and add become: Signed-off-by: Thomas Sjögren <[email protected]> * dont append a newline Signed-off-by: Thomas Sjögren <[email protected]> * don't clean newlines Signed-off-by: Thomas Sjögren <[email protected]> * only use module name Signed-off-by: Thomas Sjögren <[email protected]> * clean Signed-off-by: Thomas Sjögren <[email protected]> * change msg to value Signed-off-by: Thomas Sjögren <[email protected]> * add return values Signed-off-by: Thomas Sjögren <[email protected]> * update attributes and description Signed-off-by: Thomas Sjögren <[email protected]> * Update plugins/modules/systemd_creds_decrypt.py Co-authored-by: Felix Fontein <[email protected]> * set newline default Signed-off-by: Thomas Sjögren <[email protected]> * Update plugins/modules/systemd_creds_encrypt.py Co-authored-by: Alexei Znamensky <[email protected]> * Update plugins/modules/systemd_creds_encrypt.py Co-authored-by: Alexei Znamensky <[email protected]> * Update plugins/modules/systemd_creds_encrypt.py Co-authored-by: Alexei Znamensky <[email protected]> * update required and spelling Signed-off-by: Thomas Sjögren <[email protected]> * use single backslash Signed-off-by: Thomas Sjögren <[email protected]> --------- Signed-off-by: Thomas Sjögren <[email protected]> Co-authored-by: Felix Fontein <[email protected]> Co-authored-by: Alexei Znamensky <[email protected]> (cherry picked from commit 482a90e)
@konstruktoid thanks for your contribution! |
… encrypt/decrypt (#9468) add support for systemd creds encrypt/decrypt (#9383) * add support for systemd creds encrypt/decrypt Signed-off-by: Thomas Sjögren <[email protected]> * add __metaclass__ Signed-off-by: Thomas Sjögren <[email protected]> * Python 2.7 issues Signed-off-by: Thomas Sjögren <[email protected]> * update version_added and ci test aliases Signed-off-by: Thomas Sjögren <[email protected]> * switch to container Signed-off-by: Thomas Sjögren <[email protected]> * run tests in docker as well Signed-off-by: Thomas Sjögren <[email protected]> * move tasks into tasks/ Signed-off-by: Thomas Sjögren <[email protected]> * no need to call echo Signed-off-by: Thomas Sjögren <[email protected]> * lint and add become: Signed-off-by: Thomas Sjögren <[email protected]> * dont append a newline Signed-off-by: Thomas Sjögren <[email protected]> * don't clean newlines Signed-off-by: Thomas Sjögren <[email protected]> * only use module name Signed-off-by: Thomas Sjögren <[email protected]> * clean Signed-off-by: Thomas Sjögren <[email protected]> * change msg to value Signed-off-by: Thomas Sjögren <[email protected]> * add return values Signed-off-by: Thomas Sjögren <[email protected]> * update attributes and description Signed-off-by: Thomas Sjögren <[email protected]> * Update plugins/modules/systemd_creds_decrypt.py Co-authored-by: Felix Fontein <[email protected]> * set newline default Signed-off-by: Thomas Sjögren <[email protected]> * Update plugins/modules/systemd_creds_encrypt.py Co-authored-by: Alexei Znamensky <[email protected]> * Update plugins/modules/systemd_creds_encrypt.py Co-authored-by: Alexei Znamensky <[email protected]> * Update plugins/modules/systemd_creds_encrypt.py Co-authored-by: Alexei Znamensky <[email protected]> * update required and spelling Signed-off-by: Thomas Sjögren <[email protected]> * use single backslash Signed-off-by: Thomas Sjögren <[email protected]> --------- Signed-off-by: Thomas Sjögren <[email protected]> Co-authored-by: Felix Fontein <[email protected]> Co-authored-by: Alexei Znamensky <[email protected]> (cherry picked from commit 482a90e) Co-authored-by: Thomas Sjögren <[email protected]>
SUMMARY
This PR adds systemd-creds encrypt/decrypt functionality.
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
- Note that I haven't updated theversion_added
information.systemd-creds encrypt
encrypts the information using host specific settings, it needs to be run as well when testingsystemd-creds decrypt
.systemd-creds encrypt
doesn't support (unencrypted plaintext) input credential files as the systemd tool does, onlystdin
as string.