sst.dev icon indicating copy to clipboard operation
sst.dev copied to clipboard

apig-test behind corporate proxy with MITM SSL certificates

Open zwik opened this issue 7 years ago • 1 comments

Hey guys,

We're doing a POC with AWS and the tutorial is amazing! Great job! Because we are behind a proxy that also use some MITM SSL certificate magic we're kind stuck at the following chapter: https://serverless-stack.com/chapters/test-the-apis.html

For all the tooling before we found ways to set a proxy, disable SSL certificate checking etc. but for apig-test we can't find anything yet.

For NPM we set strict-ssl to false, change the registry to http instead of https and set a proxy. for the AWS python tool we can set HTTP[S]_PROXY environment variables to our proxy and provide --no-verify-ssl to make things work. For serverless testing the API we can provide a piece of code that is similar like this:

AWS.config.update({
  sslEnabled: false,
  region: "us-east-2",
  httpOptions: { proxy('CORPORATEPROXY') }
});

And then it works as well. But now with apig-test we can't find anything yet. Hope you guys can help!

zwik avatar Dec 14 '17 13:12 zwik

@zwik That is interesting. I think the easiest way here might to edit apig-test to add the code block you have in there.

It should be pretty straightforward. For example, we update the config in it here - https://github.com/AnomalyInnovations/aws-api-gateway-cli-test/blob/master/index.js#L84

jayair avatar Dec 15 '17 17:12 jayair