Java中的简单Kerberos客户端? [英] Simple Kerberos client in Java?

查看:94
本文介绍了Java中的简单Kerberos客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Chrome和IE等应用程序可以透明地处理Kerberos身份验证;但是,我无法找到一个简单的Java解决方案来匹配这种透明度。我发现的所有解决方案都需要存在krb5.conf文件和一个login.conf文件,而上述应用程序似乎需要这些文件。

Applications such a Google's Chrome and IE can transparently handle Kerberos authentication; however I can not find a "simple" Java solution to match this transparency. All of the solutions I have found require the presence of a krb5.conf file and a login.conf file which nether of the above apps seem to require.

什么是使用Kerberos SSO功能构建Java应用程序的最佳方法是什么?

What is the best way to build a Java application with Kerberos SSO capabilities that just work?

[更新]:要清楚我需要客户端 创建门票的侧面解决方案未验证它们。此外,似乎SPNEGO是默认的包装器协议,最终将委托给Kerberos,但我也需要能够处理SPNEGO协议。

[update]: to be clear I need a CLIENT side solution for creating tickets not validating them. Also, it seems that SPNEGO is the default "wrapper" protocol that will eventually delegate to Kerberos but I need to be able to handle the SPNEGO protocol as well.

推荐答案

Oracle已使用Java的SaslClient 的示例。我不是Java程序员,但当我向曾经指出过这个问题的人时,他们能够很快地完成它。它可能仍然需要某处的conf文件(n.b. Kerberos使用环境变量,通常以KRB5_开头,知道在哪里查找这些文件)。另请注意,Kerberos本身不包含任何类型的传输 - 您的应用程序需要知道如何以服务器期望的方式发送和接收Kerberos有效负载(这取决于您尝试进行身份验证的服务器)。

Oracle has an example using Java's SaslClient. I'm not a Java programmer, but when I pointed this out once to someone who is, they were able to make it work pretty quickly. It may still require a "conf" file somewhere (n.b. Kerberos uses environment variables, often starting with KRB5_, to know where to look for such files). Also note that Kerberos itself does not include a transport of any kind--your app needs to know how to send and receive the Kerberos payloads the way the server expects (and this is different depending on the server you are trying to authenticate with).

编辑:你编辑了你的问题,所以这里有一个与Java中的SPNEGO相关的链接可能有些用处:
http://download.oracle.com/javase/6/docs/technotes/guides/security/ jgss / lab / part5.html

you edited your question, so here's a link related to SPNEGO in Java which might be of some use: http://download.oracle.com/javase/6/docs/technotes/guides/security/jgss/lab/part5.html

这篇关于Java中的简单Kerberos客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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