LoginException: No LoginModules configured - Websphere

This is a discussion on LoginException: No LoginModules configured - Websphere ; 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 ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: LoginException: No LoginModules configured

  1. LoginException: No LoginModules configured

    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(LoginC ontext.java:176)
    at javax.security.auth.login.LoginContext.(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.

  2. Re: LoginException: No LoginModules configured

    smita_ag@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/developerwork..._benantar.html

  3. Re: LoginException: No LoginModules configured

    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.

  4. Re: LoginException: No LoginModules configured

    smita_ag@hotmail.com wrote:
    > 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.


    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 ?

  5. Re: LoginException: No LoginModules configured

    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.getConfigu ration(Configuration.java:212)
    at javax.security.auth.login.LoginContext$1.run(Login Context.java:166)
    at java.security.AccessController.doPrivileged(Access Controller.java:192)
    at javax.security.auth.login.LoginContext.init(LoginC ontext.java:163)
    at javax.security.auth.login.LoginContext.(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?

  6. Re: LoginException: No LoginModules configured

    smita_ag@hotmail.com wrote:
    > 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.getConfigu ration(Configuration.java:212)
    > at javax.security.auth.login.LoginContext$1.run(Login Context.java:166)
    > at java.security.AccessController.doPrivileged(Access Controller.java:192)
    > at javax.security.auth.login.LoginContext.init(LoginC ontext.java:163)
    > at javax.security.auth.login.LoginContext.(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?


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

  7. Re: LoginException: No LoginModules configured

    >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"?



  8. Re: LoginException: No LoginModules configured

    smita_ag@hotmail.com wrote:
    >> 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"?
    >
    >


    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.

+ Reply to Thread