Skip to content
New issue

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

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

Already on GitHub? # to your account

HoverflyConfiguration.tlsVerificationDisabled not being honored #2

Open
ctoomey opened this issue Jul 14, 2021 · 2 comments
Open

HoverflyConfiguration.tlsVerificationDisabled not being honored #2

ctoomey opened this issue Jul 14, 2021 · 2 comments

Comments

@ctoomey
Copy link

ctoomey commented Jul 14, 2021

I'm trying to hit my local grpc server running SSL with a self-signed certificate.

Since disabling TLS verification is not supported by the existing GrpcConfig class, I subclassed it and overrode build() so that I can set tlsVerificationDisabled in the created HoverflyConfiguration. I've run it in the debugger and verified that in Hoverfly.start(), the HoverflyConfiguration returned by build() has tlsVerificationDisabled = true.

But I'm still getting this error from hoverfly-grpc when I make a proxied grpc request: [Thread-1] INFO hoverfly-grpc - 2021/07/13 19:14:13 [001] WARN: Cannot handshake client localhost:9443 remote error: tls: unknown certificate.

Can you confirm this is a bug in the included binary, or what other info can I provide?

@ctoomey
Copy link
Author

ctoomey commented Jul 14, 2021

Update: I got past the above error, which turned out to be caused by not having imported the Hoverfly certificate into the right java cacert file. But now I'm indeed getting a target server certificate validation error back from hoverfly:

headers: Metadata(:status=200,content-type=text/plain)
DATA-----------------------------
Hoverfly Error!

There was an error when forwarding the request to the intended destination

Got error: x509: certificate signed by unknown authority
trailers: Metadata(grpc-status=2).

The hoverctl logs shows the same:

ERRO[2021-07-14T11:33:32-07:00] There was an error when forwarding the request to the intended destination  error="x509: certificate signed by unknown authority" mode=capture request=...

@ctoomey
Copy link
Author

ctoomey commented Jul 20, 2021

Hi, will you please confirm this is a a bug and let me know when you think you'll be able to fix it? Thanks much.

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

No branches or pull requests

1 participant