简体   繁体   English

java HttpServer无法使用kerberos进行身份验证

[英]java HttpServer unable to authenticate using kerberos

I am running java server process that creates a HttpServer() object. 我正在运行创建HttpServer()对象的Java服务器进程。

The process is run with following args 该过程使用以下参数运行

-Dsun.security.krb5.debug=true
-Djava.security.krb5.conf="C:\Windows\krb5.ini"
-Djava.security.auth.login.config="D:\jaas.conf"
-Djavax.security.auth.useSubjectCredsOnly=false
-Dhttp.auth.preference="Kerberos"

jaas.conf contents are as follows. jaas.conf的内容如下。

com.sun.security.jgss.krb5.accept {
    com.sun.security.auth.module.Krb5LoginModule required 
    useTicketCache=true
    storeKey=true  
    keyTab="D:\mykey.keytab"  
    doNotPrompt=true  
    useKeyTab=true 
    debug=true
    principal="fully_qualified_spn";
};

But the http server is not asking clients to authenticate using kerberos but just services the GET requests without any authentication. 但是http服务器不会要求客户端使用kerberos进行身份验证,而只是为GET请求提供服务而无需任何身份验证。

My expectation is that having specified the http.auth.preference scheme to kerberos and having specified all the necessary config files, it should ask clients to authenticate. 我的期望是,已经为kerberos指定了http.auth.preference方案并指定了所有必需的配置文件,它应该要求客户端进行身份验证。

I am also not seeing any additional logs after enabling the -Dsun.security.krb5.debug=true 启用-Dsun.security.krb5.debug = true后,我也看不到任何其他日志

What HTTP server? 什么HTTP服务器? Your server requires some SPNEGO authenticator like this configured. 您的服务器需要一些像这样配置的SPNEGO身份验证器。 Otherwise it won't prompt at all. 否则它根本不会提示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM