简体   繁体   English

Jaas / Kerberos:在配置文件中以外的其他位置指定LoginModule

[英]Jaas/Kerberos : specify LoginModule elsewhere than in the configuration file

I'm using jaas to authenticate threw a Kerberos server. 我正在使用jaas进行身份验证,并抛出了Kerberos服务器。 I use the Krb5LoginModule to get the ticket in the cache. 我使用Krb5LoginModule在缓存中获取票证。 It works but I always have to specify the configuration file below to run the java app, like this : 它可以工作,但是我总是必须在下面指定配置文件才能运行Java应用程序,如下所示:

java com.company.maclasse -Djava.security.auth.login.config=jaas.conf

jaas.conf : jaas.conf:

com.orange.rolefilter.LDAPManager {
        com.sun.security.auth.module.Krb5LoginModule
        required
        client=TRUE
        doNotPrompt=TRUE
        useTicketCache=TRUE
        storeKey=FALSE
        useKeyTab=FALSE;
};

I would like to know if there is a way to specify this Krb5LoginModule elsewhere than in a configuration file, I want it to be taken into account at the compilation for example. 我想知道是否有一种方法可以在配置文件之外的其他地方指定此Krb5LoginModule,例如,我希望在编译时将其考虑在内。 In a way to not having to specify it after. 以一种不必在以后指定的方式。

Thanks. 谢谢。

似乎没有办法,运送配置文件,或者让代码在运行时写出配置文件。

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

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