I'm trying to get simple login to remote EJBs to work using the Duke example, 
putting the properties files in the EJB module.

The problem is that even though I set the Context.SECURITY_PRINCIPAL and 
Context.SECURITY_CREDENTIALS when obtaining the home inteface, a trace of 
org.jboss.security indicates that it sees the user id and password as null.

Here's the trace:


  | 2005-10-24 10:45:10,387 TRACE 
[org.jboss.security.auth.login.XMLLoginConfigImpl] Begin 
getAppConfigurationEntry(nmsBusinessServices), size=8
  | 2005-10-24 10:45:10,387 TRACE 
[org.jboss.security.auth.login.XMLLoginConfigImpl] End 
getAppConfigurationEntry(nmsBusinessServices), authInfo=AppConfigurationEntry[]:
  | [0]
  | LoginModule Class: org.jboss.security.auth.spi.UsersRolesLoginModule
  | ControlFlag: LoginModuleControlFlag: required
  | Options:
  | 2005-10-24 10:45:10,387 TRACE 
[org.jboss.security.auth.spi.UsersRolesLoginModule] initialize
  | 2005-10-24 10:45:10,387 TRACE 
[org.jboss.security.auth.spi.UsersRolesLoginModule] findResource: null
  | 2005-10-24 10:45:10,387 TRACE 
[org.jboss.security.auth.spi.UsersRolesLoginModule] Properties 
file=jar:file:/home/esliman/programs/jboss/jboss-4.0.2_newtest/server/default/tmp/deploy/tmp3568nmsBusinessServices.ear-contents/nmsProviderServiceEJBs.jar!/users.properties,
 defaults=null
  | 2005-10-24 10:45:10,388 DEBUG 
[org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, 
users=[duke, java]
  | 2005-10-24 10:45:10,388 TRACE 
[org.jboss.security.auth.spi.UsersRolesLoginModule] findResource: null
  | 2005-10-24 10:45:10,388 TRACE 
[org.jboss.security.auth.spi.UsersRolesLoginModule] Properties 
file=jar:file:/home/esliman/programs/jboss/jboss-4.0.2_newtest/server/default/tmp/deploy/tmp3568nmsBusinessServices.ear-contents/nmsProviderServiceEJBs.jar!/roles.properties,
 defaults=null
  | 2005-10-24 10:45:10,388 DEBUG 
[org.jboss.security.auth.spi.UsersRolesLoginModule] Loaded properties, 
users=[duke, java, java.CallerPrincipal, duke.CallerPrincipal]
  | 2005-10-24 10:45:10,388 TRACE 
[org.jboss.security.auth.spi.UsersRolesLoginModule] login
  | 2005-10-24 10:45:10,388 TRACE 
[org.jboss.security.auth.spi.UsersRolesLoginModule] Authenticating as 
unauthenticatedIdentity=null
  | 2005-10-24 10:45:10,389 DEBUG 
[org.jboss.security.auth.spi.UsersRolesLoginModule] Bad password for 
username=null
  | 2005-10-24 10:45:10,389 TRACE 
[org.jboss.security.auth.spi.UsersRolesLoginModule] abort
  | 2005-10-24 10:45:10,389 TRACE 
[org.jboss.security.plugins.JaasSecurityManager.nmsBusinessServices] Login 
failure
  | javax.security.auth.login.FailedLoginException: Password Incorrect/Password 
Required
  |     at 
org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:166)
  |     at 
org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:136)
  | 

You can see from the trace that it successfully loads the properties files.   
The "Authenticating as unauthenticatedIdentity=null" output also indicates that 
the username and password are null, as the source code shows that this is what 
triggers this output:


  |       if( username == null && password == null )
  |       {
  |          identity = unauthenticatedIdentity;
  |          super.log.trace("Authenticating as 
unauthenticatedIdentity="+identity);
  |       }
  | 


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3903038#3903038

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3903038


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to