- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: providing signing key from an alternative source
- Date: Thu, 10 Jan 2013 08:51:17 -0800
On Thursday, January 10, 2013 at 7:13 AM, andi abes wrote:
I ended up creating a little monkeypatch for the rest client. This was complicated a bit by having different Chef objects instantiate their own REST client in subtly different ways...
In case it helps other folks still on 10.x, (and in case folk spot issues I didn't...)
The idea is that once you "replace_authenticator", all future REST instances will use the alternative client/key.
I see.
I recently ran into this use case myself. The correct code to use the "raw_key" option is like this:
Chef::REST.new(Chef::Config[:chef_server_url], entity_name, nil, :raw_key => client.private_key)
But as you alluded to, most of the model objects in Chef don't give you control over the rest client. I think it would be reasonable to add support for that if you're interested.
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.