audit icon indicating copy to clipboard operation
audit copied to clipboard

Unable to fetch profiles from chef server

Open jillson opened this issue 5 years ago • 5 comments

Cookbook version

Edit: 7.4.0 (and also 7.3.0)

Chef-client version

14.8.12

Platform Details

RHEL 7.6 on AWS EC2 instance. We appear to be using inspec 3.0.61 (bundled with chef client)

Scenario:

We have chef server configured to proxy requests to chef automate for profiles, and then publish the results of the audit cookbook through chef server to chef automate.

Steps to Reproduce:

Followed standard configuration as far as I know. Using the bottom configuration option from https://github.com/chef-cookbooks/audit/blob/master/docs/supported_configuration.md (i.e.


Expected Result:

Audit results published

Actual Result:

Using the stock code, I get an error. The error message is [] is undefined for URI::HTTPS. The real meaning is that the code was being passed in a URI:HTTPS but was expecting either a string (which gets parsed to a URI:HTTPS) or a hash (which will have a :url value that gets passed as a string to be parsed).

If I edit line 123 or so in * /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/fetchers/url.rb * to add

puts "Monkey patching if target is already URI:HTTPS",target.class
      return target if target.is_a?(URI::HTTPS)

at the top of the * def parse_uri(target) * method, then I get the expected result.

jillson avatar Mar 13 '19 13:03 jillson

Hey There It looks like this is the first issue you've filed against the chef-cookbooks project. I'm here to offer you a bit of extra help to make sure we can quickly get back to you. Make sure you've filled out all the fields in our issue template. Make sure you've provided us with the version of chef-client you're running, your operating system and the version of the cookbook. If you're not using the most up to date version of the cookbook then please make sure to update first. Lots of things change between versions even if you're issue isn't listed in the changelog. Finally please give us a detailed description of the issue you're having. The more we know about what you're trying to do, what actually happens, and how you can reproduce the problem, the better.

If you're looking for more immediate troubleshooting help make sure to check out #general on the Chef Community Slack. There's plenty of folks there willing to lend a helping hand. Thanks for the first issue. We hope we can get back to you soon with a solution.

welcomebot avatar Mar 13 '19 13:03 welcomebot

Currently updating to 7.4.0; will update issue (and/or close) shortly

jillson avatar Mar 13 '19 13:03 jillson

Just to make sure this isn't going to get auto-closed because I misunderstood: is there more information I need to provide? (To confirm: I did update to 7.4.0 and still had same issue. )

jillson avatar Apr 01 '19 14:04 jillson

@jillson apologies for the late follow-up, but is this still an issue in the latest version of the cookbook?

kekaichinose avatar Nov 08 '19 23:11 kekaichinose

Unfortunately, not able to test currently. I gave up and just kept my monkeypatch in place

jillson avatar Nov 08 '19 23:11 jillson