-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Support HTTPS url for -Dcsp.sentinel.dashboard.server attribute #1896
Conversation
...ransport-common/src/main/java/com/alibaba/csp/sentinel/transport/config/TransportConfig.java
Outdated
Show resolved
Hide resolved
...ransport-common/src/main/java/com/alibaba/csp/sentinel/transport/config/TransportConfig.java
Outdated
Show resolved
Hide resolved
...ransport-common/src/main/java/com/alibaba/csp/sentinel/transport/config/TransportConfig.java
Outdated
Show resolved
Hide resolved
...tp/src/main/java/com/alibaba/csp/sentinel/transport/heartbeat/SimpleHttpHeartbeatSender.java
Show resolved
Hide resolved
...http/src/main/java/com/alibaba/csp/sentinel/transport/heartbeat/client/SimpleHttpClient.java
Outdated
Show resolved
Hide resolved
...http/src/main/java/com/alibaba/csp/sentinel/transport/heartbeat/client/SimpleHttpClient.java
Outdated
Show resolved
Hide resolved
Hi @jasonjoo2010 , |
sentinel-core/src/main/java/com/alibaba/csp/sentinel/util/function/Endpoint.java
Outdated
Show resolved
Hide resolved
sentinel-core/src/main/java/com/alibaba/csp/sentinel/util/function/Endpoint.java
Outdated
Show resolved
Hide resolved
...le-http/src/main/java/com/alibaba/csp/sentinel/transport/heartbeat/client/SocketFactory.java
Outdated
Show resolved
Hide resolved
...tty-http/src/main/java/com/alibaba/csp/sentinel/transport/heartbeat/HttpHeartbeatSender.java
Show resolved
Hide resolved
Hi @jasonjoo2010 , |
Before reviewing the integration tests failed. You can check and fix it parallelly. |
Work fine now. |
...le-http/src/main/java/com/alibaba/csp/sentinel/transport/heartbeat/client/SocketFactory.java
Outdated
Show resolved
Hide resolved
...nel-transport-common/src/main/java/com/alibaba/csp/sentinel/transport/endpoint/Protocol.java
Outdated
Show resolved
Hide resolved
public class HttpClientsFactory { | ||
|
||
private static class SslConnectionSocketFactoryInstance { | ||
private static final SSLConnectionSocketFactory SSL_CONNECTION_SOCKET_FACTORY = new SSLConnectionSocketFactory(SslFactory.getSslConnectionSocketFactory(), NoopHostnameVerifier.INSTANCE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sczyh30
Is bypass certificate verifying acceptable?
I don't insist on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@sczyh30 Do you have any concerns about the bypass certificate verification approach?
Thanks for contributing! |
…aba#1896) Apply to both simple-http and netty-http modules.
Does this pull request fix one issue?
Fixes #1840
Describe how you did it
Describe how to verify it
First we verify the https protocol:
I used keytool to generate certificates
2. Start a project that uses the modified jar with
-Dcsp.sentinel.dashboard.server=https://127.0.0.1:8080
3. Start the dashboard jar
4. Use browser access https://127.0.0.1:8080, we can see that the dashboard has been able to receive the data of demo
Second, we verify the http protocol
-Dcsp.sentinel.dashboard.server=http://127.0.0.1:8080
or-Dcsp.sentinel.dashboard.server=127.0.0.1:8080
Special notes for reviews
1.Is it necessary to set a certificate for the heartbeat of https?
2.Whether it is necessary to set parameters for the dashboard so that the https protocol can be used (because users may directly use the jar package instead of compiling by themselves)