Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

LoginException: No LoginModules configured

已查看 352 次
跳至第一个未读帖子

smit...@hotmail.com

未读,
2007年4月25日 09:12:192007/4/25
收件人
I am trying to setup a custom JAAS login module to work with websphere 6.1. The Module class itself is bundled within my deployed ear file. I added this module via the ApplicationLogins link on the admin console. I have tried both with and without the websphere login module proxy. Each time, when I try to login to my application, I see the error:

2007-04-24 01:34:33.275 PM: ERROR Login problem
javax.security.auth.login.LoginException: No LoginModules configured for PPS
at javax.security.auth.login.LoginContext.init(LoginContext.java:176)
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:319)

where PPS is the name of my app.

There are no other errors being logged in SystemOut or SystemErr logs. What could I be missing?

Could this be some kind of class loading issue? Even though I am not seeing any ClassNotFound exceptions anywhere in the logs.

If anyone has successfully configured a JAAS custom login module with websphere, please provide any helpful tips.

Paul Ilechko

未读,
2007年4月25日 09:45:382007/4/25
收件人
smit...@hotmail.com wrote:

> If anyone has successfully configured a JAAS custom login module with websphere, please provide any helpful tips.


Did you look at this article ?

http://www-128.ibm.com/developerworks/websphere/techjournal/0508_benantar/0508_benantar.html

smit...@hotmail.com

未读,
2007年4月25日 12:30:512007/4/25
收件人
Yes, I have. That document explains system logins in a great detail, and I am trying to configure an application level custom login module.

Based on the document's suggestion, I have tried putting my LoginModule in wsas/lib/ext directory also, but I still get the same error = No LoginModules configured for PPS.

Paul Ilechko

未读,
2007年4月25日 16:52:422007/4/25
收件人

Why are you using an application config instead of adding your module to
the relevant system config?

Also, how are you invoking the application config ?

smit...@hotmail.com

未读,
2007年4月26日 13:47:222007/4/26
收件人
ok, I have made a bit of a progress (I think). I was setting my own custom Configuration class. If I remove that call and effectively rely on the standard websphere jaas Configuration (which I believe is com.ibm.security.auth.login.ConfigFile), I now get the error:

2007-04-26 05:35:22.093 AM: DEBUG Module when creating login context:PPS

2007-04-26 05:35:22.111 AM: ERROR Unidentified problem
java.lang.SecurityException: unable to instantiate LoginConfiguration
at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:212)
at javax.security.auth.login.LoginContext$1.run(LoginContext.java:166)
at java.security.AccessController.doPrivileged(AccessController.java:192)
at javax.security.auth.login.LoginContext.init(LoginContext.java:163)


at javax.security.auth.login.LoginContext.<init>(LoginContext.java:319)

This message isn't much useful - I can't tell whether this is a class loader problem or something else.

btw, my application is compiled in java 1.4.2 and websphere 6.1 is using java 5. Could that by any remote chance be an issue?

Paul Ilechko

未读,
2007年4月26日 15:43:442007/4/26
收件人

It could, but you still haven't answered my questions.

smit...@hotmail.com

未读,
2007年4月26日 16:08:242007/4/26
收件人
>Why are you using an application config instead of adding your module to
>the relevant system config?

I am not quite sure what you mean by "application config". Do you mean a jaas.cfg file? I am not using that. I am configuring my module using the "Application Login" link on the websphere admin console (under JAAS).

>Also, how are you invoking the application config ?

Again, would you pls elaborate on what you mean by "application config"?


Paul Ilechko

未读,
2007年4月26日 16:17:512007/4/26
收件人

Login modules can be added to system configurations or application
configurations. System configurations execute at certain well-defined
system events. These include web-inbound, rmi-inbound, rmi-outbound etc.
You can add custom login modules to these configurations, as described
in detail in my paper. Application configurations need to be invoked
explicity by doing a JAAS login in code, in order to set a credential on
the current thread of execution.

0 个新帖子