0
我在使用Kerberos和Webstart時遇到問題。 我想獲得在Windows用戶上簽名的當前委託人,並且API嘗試從票證緩存中獲取 tgt。通過Webstart使用Kerberos。無法從票據緩存中獲取tgt
AllowTgtSessionKey在註冊表中設置爲1。
與正常的Java應用程序一切正常,我也得到了機票,可使用本金。
但是,當我將應用程序部署爲Webstart時,我無法從緩存中獲取票證,並在調用LoginContext#login時得到LoginException。
Here's我的代碼:
配置:
private static Configuration getProgramaticLoginConfig()
{
HashMap<String, String> options = new HashMap<String, String>();
options.put("useTicketCache", "true");
options.put("doNotPrompt", "true");
options.put("debug","true");
AppConfigurationEntry krb5LoginModule = new AppConfigurationEntry("com.sun.security.auth.module.Krb5LoginModule", LoginModuleControlFlag.REQUIRED, options);
final AppConfigurationEntry[] aces = new AppConfigurationEntry[]{krb5LoginModule};
Configuration progConfig = new Configuration()
{
@Override
public AppConfigurationEntry[] getAppConfigurationEntry(String arg0)
{
return aces;
}
};
return progConfig;
}
而且here's我的代碼:
LoginContext lc = null;
try {
// create a LoginContext
lc = new LoginContext("asdjfkasdjkfasdö",new DialogCallbackHandler());
} catch(Exception e) {
log.error("Initialisierung fehlgeschlagen",e);
}
try {
// login (effectively populating the Subject)
lc.login();
} catch(LoginException e) {
log.error("Login failed",e);
}
try {
//get the Subject that represents the signed-on user
Subject signedOnUserSubject = lc.getSubject();
...
我在做什麼錯? 所有罐子都已簽名!
Thx尋求幫助。
問候, 霍爾格
所有罐子都已使用相同的證書籤名 – Holger 2013-02-18 08:00:50