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

Please support 'pillar:' URIs as source #18406

Closed
wwentland opened this issue Nov 22, 2014 · 15 comments
Closed

Please support 'pillar:' URIs as source #18406

wwentland opened this issue Nov 22, 2014 · 15 comments
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. P1 Priority 1 Pillar stale
Milestone

Comments

@wwentland
Copy link
Contributor

It is very common that one wants to distribute sensitive files to minions and not make that information available to all minions that are connected to the master. The only way to achieve that is to use something like:

foo:
  some_data: |
    some data
    that spans
    multiple lines

and to reference that via contents_pillar. It would be absolutely fantastic if salt would support pillar: as source and a direct mapping from those URIs to a standardised location on the filesystem (with configurable prefix, git pillar support, .... naturally). Access to the files would be controlled via a top file again and the content of the file simply becomes the value of the dictionary that is returned.

So, a location like PILLAR_FILE_ROOT/foo/bar/private_key could be accessed via pillar:///foo/bar/private_key.

Thank you!

@eliasp
Copy link
Contributor

eliasp commented Nov 22, 2014

This would take so much pain out of distributing binary content, SSL/SSH keys or license files via pillars.
+1 for this!

@ssgward ssgward added the Feature new functionality including changes to functionality and code refactors, etc. label Nov 24, 2014
@ssgward ssgward added this to the Approved milestone Nov 24, 2014
@ssgward
Copy link

ssgward commented Nov 24, 2014

Great idea. Thanks for the input.

@florianjacob
Copy link

Just inlined a few long ssl certificates. Would be really nice to be able to keep them in the crt file and just handling them like salt:/// source files!

+1

@wwentland
Copy link
Contributor Author

Nobody @saltstack is interested in bringing this to the community?

@arnisoph
Copy link
Contributor

+111111

@srkunze
Copy link
Contributor

srkunze commented Mar 25, 2015

I think the biggest reservation about this is the missing access restrictions as described here: #9569 (comment)

We basically would need to have a way to selectively choose the directories allowed to be served to a particular minion.

@wwentland
Copy link
Contributor Author

You would naturally still need a top file in which you grant access to files to specific minions/targets.

@srkunze
Copy link
Contributor

srkunze commented Mar 26, 2015

@BABILEN I would restrict this to directories as the effort to do this for all specific file might be enormous and wouldn't scale very well.

@eliasp
Copy link
Contributor

eliasp commented Oct 7, 2015

Another scenario covered here I'd like to see:

  • My "secret" pillar data are GPG encrypted and the GPG renderer is used to decrypt them on the master before sending them to the corresponding Minions
  • I'm distributing SSL private keys

Currently, encrypting and inlining an SSL key produces a huge amount of lines within my YAML structure, which makes the YAML file rather unpleasant to manage/edit/handle.

Once distributing SSL keys etc. is doable in the way suggested here, I'd also like to be able to use GPG encrypted files which are then encrypted by the renderer first.
So something like this might work:
pillar+gpg:///foo/bar/private.key.gpg

This is a similar way other protocols (e.g. git+ssh://) are often handling such scenarios.
So the 2nd component would define the renderer to be used where the provided file has to pass through first.

@wwentland
Copy link
Contributor Author

@eliasp, yes. That would be quite nice indeed. In fact that's a wonderful idea!

@DanyC97
Copy link

DanyC97 commented Oct 30, 2015

I do really need this functionality, please!
I understand the focus is more on reducing the # of bugs but please consider this feature too since many of us need to share passwords etc.

What @eliasp said is exactly what is happening in reality and guess what i have 50 different password i need to share, a gpg key for each turns the YAML into an ugly file to look at.

@jfindlay jfindlay added Core relates to code central or existential to Salt P1 Priority 1 Pillar labels Mar 29, 2016
@jaceq
Copy link

jaceq commented Sep 5, 2016

Any update on this? I'd also love to use such feature.

@cohadar
Copy link

cohadar commented Sep 19, 2017

This is a much better alternative:
https://docs.saltstack.com/en/develop/ref/pillar/all/salt.pillar.file_tree.html#module-salt.pillar.file_tree

  • deploy a file using contents_pillar with a file.managed state.

IMHO this issue should be closed.

@wwentland
Copy link
Contributor Author

The file_tree pillar conflates targeting and data unfortunately.

@stale
Copy link

stale bot commented Feb 7, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. P1 Priority 1 Pillar stale
Projects
None yet
Development

No branches or pull requests

10 participants