{"id":993,"date":"2020-03-24T17:47:44","date_gmt":"2020-03-24T15:47:44","guid":{"rendered":"https:\/\/sven-seeberg.de\/wp\/?p=993"},"modified":"2020-03-24T17:58:06","modified_gmt":"2020-03-24T15:58:06","slug":"managing-password-for-saltstack-with-passbolt","status":"publish","type":"post","link":"https:\/\/sven-seeberg.de\/wp\/?p=993","title":{"rendered":"Managing password for Saltstack with Passbolt"},"content":{"rendered":"\n<p>I really like the approach of Passbolt to manage passwords with PGP. Passbolt also has a decent API that enables some scripting, and some basic Python packages already exist.<\/p>\n\n\n\n<p>That made me wonder if I could use Passbolt as a password safe for Saltstack. After some research, I came up with a pretty simple Python script that renders Pillars from Passbolt groups. After installing <a href=\"https:\/\/github.com\/netzbegruenung\/passbolt-salt\">https:\/\/github.com\/netzbegruenung\/passbolt-salt<\/a>, you need to add the following lines to a Pillar SLS file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!py\ndef run():\n    from salt_passbolt import fetch_passbolt_passwords\n    # The following UUID is the UUID of a Passbolt group\n    return fetch_passbolt_passwords(\"27b9abd4-af9b-4c9e-9af1-cf8cb963680c\") <\/code><\/pre>\n\n\n\n<p>With that, you can access passwords in states with Jinja:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ pillar['passbolt']['3ec2a739-8e51-4c67-89fb-4bbfe9147e17'] }}<\/code><\/pre>\n\n\n\n<p>I have to admit that addressing groups and passwords with UUIDs is not the most convenient way, but it definitely works.<\/p>\n\n\n\n<p>Please note that the passwords are accessible to all servers that use this Pillar. Therefore create different Passbolt groups for your different servers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I really like the approach of Passbolt to manage passwords with PGP. Passbolt also has a decent API that enables some scripting, and some basic Python packages already exist. That made me wonder if I could use Passbolt as a &hellip; <a href=\"https:\/\/sven-seeberg.de\/wp\/?p=993\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-993","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/posts\/993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=993"}],"version-history":[{"count":5,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/posts\/993\/revisions"}],"predecessor-version":[{"id":998,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=\/wp\/v2\/posts\/993\/revisions\/998"}],"wp:attachment":[{"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sven-seeberg.de\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}