Skip to content
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 sops as a secret reslover #155

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

rjhaverkamp
Copy link

Sops secret resolver

this adds sops as an extra secret resolver. I've used most(if not all) of the code from the sops ansible collection I've left the original license and copyright notices in place.

Motivation and Context

I'm working on having himl as a data layer for ansible inventory. Using sops as a secret store. It would be great to have this as native usage in sops instead of sprinkling ansible lookups all over.

This might need some more work, but mainly looking here if you're open to making this part of himl?

How Has This Been Tested?

I've tested this with my own key and encrypted files. To reproduce follow the steps from sops, and edit the examples/secrets/default.yaml to use the example file and fetch a secret.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@rjhaverkamp
Copy link
Author

@amuraru please let me know your thoughts about this :)

)
command.extend(["--extract", secret_key])
command.extend(["--decrypt", encrypted_file])
print(command)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debugging leftover that needs to be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant