是否可以在 Tomcat 中执行 TLS 握手事件? [英] Is it possible to do a TLS handshake event in Tomcat?

查看:59
本文介绍了是否可以在 Tomcat 中执行 TLS 握手事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 tomcat 中运行一个应用程序(Web 服务)并启用了 TLS(客户端和服务器都有证书).

I'm running an application (web service) in tomcat with TLS enabled (with certificates both for the client and the server).

我希望我的应用程序能够在 TLS 握手失败时发送审核消息(日志记录).例如,我想在以下时间登录:

I want that my application will be able to send audit message (logging) when TLS handshake fails. For example I want to log when:

  • 客户端证书已过期,
  • 客户端证书未知(不在服务器信任库中)
  • 任何其他握手失败

是否有任何我可以捕获和处理的事件来执行此操作?

Is there any event that I can catch and handle in order to do that?

我的应用程序基于 Web 服务并在 tomcat 中运行.Tomcat 正在处理所有网络和 TLS 层,而应用程序并不知道这一点.

My application is web service based and is running in tomcat. Tomcat is handling all network and the TLS layers, and the application does not aware of that.

由于我自己没有打开任何套接字,我应该在哪里捕获这个异常?

As I don't open any socket myself, where should I catch this Exception?

推荐答案

我不知道您可以向 Tomcat 添加任何内容.

I'm not aware of anything you can add to Tomcat.

将 Apache HTTPD 放在前面并使用单独的、已配置的 SSL 日志.

Put an Apache HTTPD in front and use a separate, configured, SSL log.

这篇关于是否可以在 Tomcat 中执行 TLS 握手事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆