[chef] Re: retrieving public keys of knife users


Chronological Thread 
  • From: Alex Howells < >
  • To:
  • Subject: [chef] Re: retrieving public keys of knife users
  • Date: Wed, 15 Aug 2012 15:15:06 +0100

On 15 August 2012 15:12, Alex Howells 
< >
 wrote:
> chef > x = 
> Chef::REST.new(Chef::Config[:chef_server_url]).get_rest("clients/foo")
>  => client[foo]
> chef > x.public_key
>  => "-----BEGIN RSA PUBLIC
> KEY-----\nMIIBCgKCAQEArWFbpLaXlcTRwaNIwG71Y8XEMKAkE0Aq4BeHQCK5CNnS7mhrFgPM\nKbLA4M27Z7Zph9nrFW5Kka3uRKDO7lhmvMrZjJZjl9Hq1kiy1DL7YY7HujW1RVwM\nvRv0NTAevM4A+yFIeq/QsI6kzIKIVIBNdG6KtPf5gmqfHrSJJbKrPmwXOC6dMy1q\n/0ptd+79u2crkCSb9ItlW3gs7FjReBxKQ8IAU3ZiBveKCk6JFdqoiw9DG59oeBDB\nJcT5NzE8lInn8prxkHl5uENu5MUB3Fp0iDk2PuxQA1Po1egxUsEKThj1ZYxY2fbk\nbDEvVfeOXZSCXI+SZQmgMWcHXX5Z4hB/IwIDAQAB\n-----END
> RSA PUBLIC KEY-----\n"

But the plot thickens --

chef > x = 
Chef::REST.new(Chef::Config[:chef_server_url]).get_rest("clients/baa")
[Wed, 15 Aug 2012 10:13:11 -0400] INFO: HTTP Request Returned 403
Forbidden: You are not the correct node (auth_user name: foo,
params[:id]: baa), or are not an API administrator (admin: false).



Archive powered by MHonArc 2.6.16.

§