[chef] Re: Re: how to log-in to chef-server and create role normally?


Chronological Thread 
  • From: Ilya < >
  • To: < >
  • Subject: [chef] Re: Re: how to log-in to chef-server and create role normally?
  • Date: Tue, 06 Dec 2011 15:22:32 +0400

it seems that some sort of signing going on, but not substituted for the required headers (see attached screenshot)

On Tue, 6 Dec 2011 22:55:46 +1300, AJ Christensen wrote:

Yo,

Chef::REST should just work, I guess.. :)

Take a look at these.

https://github.com/opscode/chef/blob/master/chef/lib/chef/role.rb#L326
https://github.com/opscode/chef/blob/master/chef/lib/chef/knife/role_from_file.rb
https://github.com/danryan/spice/blob/master/lib/spice/role.rb#L16

Have nice day.

--AJ

On 6 December 2011 22:47, Ilya <
 
 ">
 > wrote:
Hello! We are faced with a third party application authorization (written in Rails) to chef-server. In particular: it is necessary to establish the role of our application. According to the documentation we create a POST query of the form: {      "name": "123",      "chef_type": "role",      "json_class": "Chef:: Role" } But the server does not transmit the request, because we are not authorized on it. We're trying to login (so in the documentation) on the server as: chef_server_url = "http://10.1.6.106:4000"      client_name = "desktop"      signing_ket_filename = "/ etc / chef / client.pem"      rest = Chef:: REST.new (chef_server_url, client_name, signing_ket_filename)      puts rest.get_rest ("/ clients") And we have nothing. Somehow we have to create a header that will contain the signature, but it is unclear how to do it. Question: how to log-in to chef-server and create role normally? -- Best Regards, Ilya

 

-- 
Best Regards,
Ilya

Attachment: Screenshot.png
Description: PNG image




Archive powered by MHonArc 2.6.16.

§