Java 命名 : Security considerations for difference between and uses of SECURITY_AUTHENTICATION and SECURITY_PROTOCOL

标签 java ssl jndi

javax.naming.Context 的 Java 文档对其字段进行了简短描述,包括 SECURITY_AUTHENTICATIONSECURITY_PROTOCOL here .

与理解它们的目的和行为相关的描述部分是...

对于 SECURITY_AUTHENTICATION:

Constant that holds the name of the environment property for specifying the security level to use. Its value is one of the following strings: "none", "simple", "strong".

对于 SECURITY_PROTOCOL:

Constant that holds the name of the environment property for specifying the security protocol to use. Its value is a string determined by the service provider (e.g. "ssl").

为了测试,我使用了“简单”身份验证,即明文和“ssl”协议(protocol)。

这是如何运作的?客户端应用程序是否会连接到服务器并以明文形式提供主体/凭据,然后对查询和对象修改等进行加密,或者整个通信是否会通过 ssl 隧道、身份验证等,或者它是如何工作的?如果在指定 ssl 协议(protocol)时一切都通过 ssl,为什么会存在 SECURITY_AUTHENTICATION 字段?是对即将通过加密连接(加密两次)的信息进行加密吗?

如果为协议(protocol)指定了一切都通过 ssl,那么我认为即使在生产中使用“简单”和“ssl”也是安全的。有什么理由不这样做吗?

这一切都归结为“它们之间有什么区别?”

最佳答案

连接先于身份验证。首先通过 SSL 建立连接,然后执行身份验证。在通过客户端证书进行身份验证的情况下,这一切都是一步。

“简单”身份验证不是明文。

关于Java 命名 : Security considerations for difference between and uses of SECURITY_AUTHENTICATION and SECURITY_PROTOCOL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31081303/

相关文章:

c# - 使用 c# Webclient 通过 https 请求 html

java - 如何通过 JNDI 从 JBoss 检索数据源

jax-ws - @EJB 注入(inject)失败,但 JNDI 查找在 Glassfish 的 Web 服务类中有效

java - 如何查找远程 JNDI

java - 匹配阿拉伯日期或普通日期的正则表达式

java - 如何创建通用方法来容纳任意数量的 POJO

ios - FBSDK 安全网络请求失败 iOS9

java - 在 Tomcat 8 上配置 SSL 并连接超时

java - Spring 启动,允许POST访问静态内容

java - 如何通过单击 JButton 来更改 JLabel 文本?