{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/chef-splunk/issues/75","repository_url":"https://api.github.com/repos/chef-cookbooks/chef-splunk","labels_url":"https://api.github.com/repos/chef-cookbooks/chef-splunk/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/chef-splunk/issues/75/comments","events_url":"https://api.github.com/repos/chef-cookbooks/chef-splunk/issues/75/events","html_url":"https://github.com/chef-cookbooks/chef-splunk/pull/75","id":141900886,"number":75,"title":"Splunk password encryption helper","user":{"login":"touzoku","id":1285662,"avatar_url":"https://avatars.githubusercontent.com/u/1285662?v=3","gravatar_id":"","url":"https://api.github.com/users/touzoku","html_url":"https://github.com/touzoku","followers_url":"https://api.github.com/users/touzoku/followers","following_url":"https://api.github.com/users/touzoku/following{/other_user}","gists_url":"https://api.github.com/users/touzoku/gists{/gist_id}","starred_url":"https://api.github.com/users/touzoku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/touzoku/subscriptions","organizations_url":"https://api.github.com/users/touzoku/orgs","repos_url":"https://api.github.com/users/touzoku/repos","events_url":"https://api.github.com/users/touzoku/events{/privacy}","received_events_url":"https://api.github.com/users/touzoku/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-18T15:38:48Z","updated_at":"2016-06-01T04:12:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chef-cookbooks/chef-splunk/pulls/75","html_url":"https://github.com/chef-cookbooks/chef-splunk/pull/75","diff_url":"https://github.com/chef-cookbooks/chef-splunk/pull/75.diff","patch_url":"https://github.com/chef-cookbooks/chef-splunk/pull/75.patch"},"body":"As you might now, any config that contains passwords in splunk works really bad with chef.\r\n\r\nSplunk doesn't disclose their encryption method, so it is very hard to do recipes with credentials. This helper fixes it.\r\n\r\nFor example, setting up LDAP in a recipe:\r\n```ruby\r\ntemplate '/opt/splunk/etc/system/local/authentication.conf' do\r\n  source 'authentication.conf.erb'\r\n  owner 'root'\r\n  group 'root'\r\n  mode 00600\r\n  helpers(Splunk)\r\n  variables(pwd: 'MyVerySecureLDAPPassword123')\r\n  notifies :restart, 'service[splunk]', :delayed\r\nend\r\n```\r\n\r\nWhere `authentication.conf.erb` may look like this:\r\n```\r\n[MyLDAP]\r\n...\r\nbindDN = <%= node['splunk']['ldap']['bindDN'] %>\r\nbindDNpassword = <%= splunk_encrypted_password(@pwd) %>\r\n...\r\n```\r\n\r\nCool stuff, huh? :smirk:\r\n\r\nDisclaimer: I'm a security engineer and not a ruby developer (I code in Perl), sorry for code quality"},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/chef-splunk/issues/comments/222888029","html_url":"https://github.com/chef-cookbooks/chef-splunk/pull/75#issuecomment-222888029","issue_url":"https://api.github.com/repos/chef-cookbooks/chef-splunk/issues/75","id":222888029,"user":{"login":"touzoku","id":1285662,"avatar_url":"https://avatars.githubusercontent.com/u/1285662?v=3","gravatar_id":"","url":"https://api.github.com/users/touzoku","html_url":"https://github.com/touzoku","followers_url":"https://api.github.com/users/touzoku/followers","following_url":"https://api.github.com/users/touzoku/following{/other_user}","gists_url":"https://api.github.com/users/touzoku/gists{/gist_id}","starred_url":"https://api.github.com/users/touzoku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/touzoku/subscriptions","organizations_url":"https://api.github.com/users/touzoku/orgs","repos_url":"https://api.github.com/users/touzoku/repos","events_url":"https://api.github.com/users/touzoku/events{/privacy}","received_events_url":"https://api.github.com/users/touzoku/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T04:12:57Z","updated_at":"2016-06-01T04:12:57Z","body":"@mikkoc Could you please provide splunk version, sample password, resulting ciphertext from splunk itself and from my script?"}}
{"actor":{"display_login":"touzoku"}}