-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 contents_gpg to file.managed #31006
Comments
Hi, I very happy to see this new functionality getting attention. Still I feel the approach looks a bit entangled/complex. I think the original need was to allow sensitive, and possibly binary, data to be stored as files into (and served from) pillar, like ssh keys for instance or x509 keys. From a user/usability perspective, as evoked in #1543, an intuitive mean would be To sum up, I guess I suggest to support files as another built-in source for pillar data, just as yaml data. With this approach, we'd probably win renderer flexibility, environment support, and maybe other functionality that I can't think of. I guess |
The idea of using the file_tree external pillar is to allow for ACLs so that a file can not be readable and able to be decrypted by any minion that doesn't need to have that information. Trading convenience for added security, so to speak. To do it in the way you suggest means that the file is just part of the |
Having followed #1543, I'm well aware that sensitive data should be in pillar :) What in my proposition suggests
I stated:
I think I duplicated #3790. How about:
which would be available as pillar |
It may be possible, this would be something that would need to be implemented in the common code that compiles both pillar top files and top files for states. |
What if we renamed the "template" argument of file.managed to "renderer" and allowed all renderer modules here. That would make the OP's request possible, as well as provide much greater flexibility in what we do with managed files (also considering you could add custom renderer modules). |
@github-abcde Renaming the argument would not work, because not all renderers return a string. There are two types of renderers, data renderers and template renderers. Data renderers return a Python dictionary, while template renderers return a string. What might work is allowing for a pipe syntax similar to what we allow for renderers, so that we can pass the file through multiple template renderers. For example:
Thoughts? |
That looks like it will probably work if something similar is done like in |
Related: #18406 (comment) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Bump stalebot! |
Thank you for updating this issue. It is no longer marked as stale. |
@terminalmage are you still planning to work on this issue, if not I will unassign. |
Probably not in the near future. I've unassigned myself. |
The combination of the
file_tree
ext_pillar andcontents_pillar
argument tofile.managed
allow for binary files to be deployed in pillar data. However, to deploy gpg-encrypted contents, a new argumentcontents_gpg
should be added that, ifTrue
, pass the contents through thegpg
renderer to decrypt them.Refs: #1543
CC: @fbretel
The text was updated successfully, but these errors were encountered: