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

Allow setting credentials from node.run_state #13

Open
e100 opened this issue Aug 18, 2016 · 1 comment
Open

Allow setting credentials from node.run_state #13

e100 opened this issue Aug 18, 2016 · 1 comment

Comments

@e100
Copy link
Contributor

e100 commented Aug 18, 2016

Forcing users to use data bags for credentials is too limiting.

Example use case:
In sentry wrapper cookbook:

  1. Randomly generate credentials and store them using https://github.com/zuazo/chef-encrypted-attributes
  2. Populate run_state with plain text values
    node.run_state["sentry_credentials"] = {........}
  3. Include sentry recipe

in sentry::_configure I was thinking a minor edit like this:

if node.run_state["sentry_credentials"]               
  sentry_config = node.run_state["sentry_credentials"]
else                                                  
  sentry_config = data_bag_item(                      
    node["sentry"]["data_bag"],                       
    node["sentry"]["data_bag_item"]                   
  )                                                   
end      

If that would be acceptable or if you have a different idea please let me know and I will create a pull request.

@nilroy
Copy link
Collaborator

nilroy commented Dec 28, 2016

@e100 Sorry for this very late reply. You can use other methods. But please make sure that it can use encrypted and unencrypted databags also.. Please create a PR

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

No branches or pull requests

2 participants