-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Draft] Error connecting to downstream service, exception: #1661
Comments
Hi Cherry! Why are you asking the Ocelot team to fix your SSL-certificate? You have to show us the direct connection between the client and deployed service is working and your SSL-certificate is valid. After that you need to show that Ocelot breaks communication really, and we have a potential bug in Ocelot core. So, you have to show a root cause of the issue!
Pay attention that for https-deployment scenarios (downstream service has been deployed with downstream scheme https) you have to generate service host SSL-certificate. After that your SSL-certificate public keys must be installed at gateway host machine. If gateway host is Docker container, you must install this SSL-certificate using host OS tools. It depends on OS type, Linux or Windows. Each operating system has own procedure of SSL-certificate installation. For localhost development scenarios I would recommend to use http-protocol first, to be able to finish development. After that you can start upgrading the solution to https communication. Make sense? |
Let's find some workaround in a week please!
|
Dear Ocelot team, my intention here is not to ask you to fix my SSL certificate issues. Sometimes due to special requirements and reasons, we have to configure HTTPS. However, currently if downstream services and the gateway are both using HTTPS, HTTPS certificates must be used. However, using HTTPS certificates is quite troublesome.
|
Solution: SSL Errors
Why do you use self-signed certificates for development environment? Roll back from https to http protocol!
If the downstream service doesn't have any certificates that means it is not deployed using https-protocol. No SSL errors at all. You can go with http-protocol. Conclusion:
I do not see any suggestions from your side. I see zero suggestions and feature requesting! I still see very short description of the issue. And I don't still understand either it is a feature or a bug? If you will show us your feature and/or bug fix request better we will be happy to review the request and accept it after discussions. P.S. Please, do not use Google Translate or Bing Translate online services to translate your China texts to English! |
Okay, I've looked at the source code and your response, and I roughly understand your design intentions. What I'm mainly seeking is the best practice for HTTPS solutions in a development environment. Thank you for your guidance. |
@Cherry542 |
Expected Behavior / New Feature
When Ocelot uses HTTPS, how to disable certificate validation and avoid errors from self-signed certificates?
Actual Behavior / Motivation for New Feature
Steps to Reproduce the Problem
warn: Ocelot.Responder.Middleware.ResponderMiddleware[0]
requestId: 0HMR0SBG3UKLQ:00000002, previousRequestId: no previous request id, message: Error Code: ConnectionToDownstreamServiceError Message: Error connecting to downstream service, exception: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch
at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
Specifications
The text was updated successfully, but these errors were encountered: