inspec-aws icon indicating copy to clipboard operation
inspec-aws copied to clipboard

Inspec behind a proxy

Open clintoncwolfe opened this issue 6 years ago • 2 comments

@JQUINONES82 commented on Fri Sep 27 2019

Can't test out aws resources when behind a proxy

Describe the problem

When I run a control test, I receive the following error

Version: (not specified)
Target:  aws://

  EC2 Instance i-xxxxxxxxxxxxxxxxxxx
     ×  should exist
     SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain)
     ×  should be running
     SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain)


Version: (not specified)
Target:  local://

  HTTP GET on https://www.google.com
     ×  status
     Failed to open TCP connection to : (getaddrinfo: Name or service not known)

If i set the env vars, it works.

Version: (not specified)
Target:  local://

  HTTP GET on https://www.google.com
     ✔  status should cmp == 200

Now for aws resource checking, it doesn't work. Is there a specific parameter I should be passing? The aws cli works just fine.

Profile: tests from controls/ec2_instances.rb (tests from controls.ec2_instances.rb)
Version: (not specified)
Target:  aws://

  EC2 Instance i-xxxxxxxxx
     ×  should exist
     SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain)
     ×  should be running
     SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain)

 aws ec2 describe-instances
{
    "Reservations": [

Possible Solution

Do I have pass a config file or extra variable?

clintoncwolfe avatar Sep 30 '19 17:09 clintoncwolfe

I take it back - I had success but I had to use http_proxy even for an https proxy.

chiefy avatar Apr 13 '20 14:04 chiefy

using proxies works for me too - close issue?

tbugfinder avatar Mar 26 '21 21:03 tbugfinder