如何在没有`-djavax.net.debug = all,握手的情况下记录TLS握手细节

发布于 2025-02-09 15:19:49 字数 482 浏览 1 评论 0原文

我们使用Spring Boot 2.6.8和org.springframework.web.reactive.function.function.client.webclient维护Java 17应用程序,以执行HTTPS请求到多个端点。

为了建立HTTPS A MTLS握手(客户端和服务器证书验证)。 我们的客户端在密钥库中有多个证书链,具体取决于服务器的信任店,客户端实现选择一个或另一个。

如何在MTL握手期间正确记录特定的信息?例如。

  • 提供的客户证书信息的主题DN
  • 有关选定算法等
  • 等。

我知道Java System属性-djavax.net.debug = all,Handshake。但是我想避免所有未使用的细节,并对编写的日志和方式有更多控制。

我正在寻找类似网络的滤波器的方法。

先感谢您。

We maintain a Java 17 application using Spring Boot 2.6.8 and org.springframework.web.reactive.function.client.WebClient to perform HTTPS requests to multiple endpoints.

To establish HTTPS a mTLS handshake (client- and server certificate verification) is performed.
We, the client, have multiple certificate-chains in the keystore, depending on the truststore of the server, the client implementation picks one or the other.

How can I log properly specific information during mTLS handshake? eg.

  • Subject DN of provided client certificate
  • Information about chosen algorithm
  • and more.

I know about the java system property -Djavax.net.debug=all,handshake. But I would like to avoid all the unused details and have more control about what and how logs are written.

I am searching for a webclient-filter-like approach.

Thank you in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文