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

Add a flag to skip certificate verification #109

Merged
merged 1 commit into from
Aug 15, 2019
Merged

Conversation

ob-stripe
Copy link
Contributor

Reviewers

r? @aarongreen-stripe @brandur-stripe @tomer-stripe
cc @stripe/dev-platform

Summary

Adds a --skip-verify flag to the listen command that disables certificate verification when forwarding to an HTTPS endpoint.

Fixes #108.

I've tested this manually:

$ ./stripe listen --forward-to https://localhost:4443
> Ready! Your webhook signing secret is whsec_... (^C to quit)
[Thu, 15 Aug 2019 14:18:28 PDT]  INFO Received event: evt_123 [type: payment_intent.created]
[Thu, 15 Aug 2019 14:18:28 PDT] ERROR Failed to POST event to local endpoint, error = Post https://localhost:4443: x509: certificate is valid for stripe.com, not localhost

$ ./stripe listen --forward-to https://localhost:4443 --skip-verify
> Ready! Your webhook signing secret is whsec_... (^C to quit)
[Thu, 15 Aug 2019 14:18:45 PDT]  INFO Received event: evt_123 [type: payment_intent.created]
[Thu, 15 Aug 2019 14:18:45 PDT]  INFO Got response from local endpoint, status=501

Copy link

@brandur-stripe brandur-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ob-stripe ob-stripe merged commit cb22ac3 into master Aug 15, 2019
@ob-stripe ob-stripe deleted the ob-skip-verify branch August 15, 2019 21:36
@ob-stripe
Copy link
Contributor Author

Thanks Brandur!

@ob-stripe
Copy link
Contributor Author

Released as 0.4.5.

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

Successfully merging this pull request may close these issues.

Allow forwarding to endpoints with a self signed certificate
5 participants