It should also be possible to provide the client_key as a string #58

Closed
bumi opened this Issue Jan 18, 2013 · 5 comments

Projects

None yet

3 participants

@bumi
bumi commented Jan 18, 2013

I'm using Ridley to update some data bags after a Travis-CI run. Mainly to implement continuous deployment. For that I was thinking of putting the chef config - including the client key - into a secure travis ENV variable.

Currently ridley only accepts a path to a client .pem file. Does it make sense to generally change that and add the option to provide the client_key as a String?
I think this would allow greater flexibility in general. What do you think? I'd be happy to change that if you think it's generally interesting.

@reset
Member
reset commented Jan 18, 2013

@bumi I think it's perfectly acceptable to have the default value of client_key, client_name, and server_url in the initializer for Ridley::Client to be the values of three ENV variables if present.

Would this solve your problem?

@bumi
bumi commented Jan 18, 2013

sorry, for beeing unclear:
I was thinking to not provide the client_key as a path to a file but directly provide the content of the key.

currently it only works with the path:
https://github.com/reset/ridley/blob/master/lib/ridley/client.rb#L114
from what I understand it reads the file content here: https://github.com/reset/ridley/blob/master/lib/ridley/middleware/chef_auth.rb#L15

my idea was to provide something like that:

Ridley::Connection.new({
  :server_url => "...", 
  :client_name => "...", 
  :client_key => "<full content of the client key file>"
})
@reset
Member
reset commented Jan 18, 2013

I understand. Yeah it's fine to either add an additional option for specifying the key or figuring out if the value given is a path to a file on disk and if the path exists.

@sethvargo
Contributor
@reset reset closed this in #138 May 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment