Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/enable external https requests #118

Merged
merged 9 commits into from
Oct 14, 2019

Conversation

mefellows
Copy link
Member

This PR allows users to set their own TLS configuration for provider verification, which can be useful in the following situations:

  1. Verification is performed against an endpoint with a self-signed certificate
  2. Verification against endpoints with custom/unknown CAs

The local proxy currently assumes that a verification will take place
against either a) a local endpoint or b) an http endpoint. It did not
support external hosts on https.o

It also did not rewrite the Host header correctly (see golang/go#28168)

This change:

1. Rewrites the header during proxying
2. Hard codes the local proxy to run only on http - there is no reason why it should run on https
   even if the endpoint under test _is_.
3. Opens the door for client configured transports during verification,
   to enable self-signed certificates to be easily used
* Adds new `CustomTLSConfig` to Verifier interface
* Fixes issue
* Adds integration tests
@mefellows mefellows force-pushed the fix/enable-external-https-requests branch from 8a8fdea to 54d3c64 Compare October 14, 2019 13:02
@mefellows mefellows merged commit 2a5627d into master Oct 14, 2019
@mefellows mefellows deleted the fix/enable-external-https-requests branch October 14, 2019 13:07
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.1%) to 81.576% when pulling 54d3c64 on fix/enable-external-https-requests into 3640617 on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants