You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2020/11/26 23:52:27 UTC
[skywalking] branch patch-als-mtls created (now 1425aab)
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a change to branch patch-als-mtls
in repository https://gitbox.apache.org/repos/asf/skywalking.git.
at 1425aab Include SAN to set mTLS property
This branch includes the following new commits:
new 1425aab Include SAN to set mTLS property
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[skywalking] 01/01: Include SAN to set mTLS property
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch patch-als-mtls
in repository https://gitbox.apache.org/repos/asf/skywalking.git
commit 1425aab9b33d1e0320182d5b3b107754e067a17d
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Thu Nov 26 23:50:59 2020 +0000
Include SAN to set mTLS property
Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
.../server/receiver/envoy/als/LogEntry2MetricsAdapter.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/LogEntry2MetricsAdapter.java b/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/LogEntry2MetricsAdapter.java
index df3bab8..a771a0d 100644
--- a/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/LogEntry2MetricsAdapter.java
+++ b/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/LogEntry2MetricsAdapter.java
@@ -156,14 +156,14 @@ public class LogEntry2MetricsAdapter {
if (properties == null) {
return NON_TLS;
}
- if (isNullOrEmpty(Optional.ofNullable(properties.getLocalCertificateProperties())
- .orElse(TLSProperties.CertificateProperties.newBuilder().build())
- .getSubject())) {
+ TLSProperties.CertificateProperties lp = Optional.ofNullable(properties.getLocalCertificateProperties())
+ .orElse(TLSProperties.CertificateProperties.newBuilder().build());
+ if (isNullOrEmpty(lp.getSubject()) && isNullOrEmpty(lp.getSubjectAltName())) {
return NON_TLS;
}
- if (isNullOrEmpty(Optional.ofNullable(properties.getPeerCertificateProperties())
- .orElse(TLSProperties.CertificateProperties.newBuilder().build())
- .getSubject())) {
+ TLSProperties.CertificateProperties pp = Optional.ofNullable(properties.getPeerCertificateProperties())
+ .orElse(TLSProperties.CertificateProperties.newBuilder().build());
+ if (isNullOrEmpty(pp.getSubject()) && isNullOrEmpty(pp.getSubjectAltName())) {
return TLS;
}
return M_TLS;