*
The moose likes JBoss/WildFly and the fly likes unable to add web-console user/password authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "unable to add web-console user/password authentication" Watch "unable to add web-console user/password authentication" New topic
Author

unable to add web-console user/password authentication

chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 188
Hi,

I succeed to add user/password authentication for the jmx-console but when I continue and try to add also user/password for the web-console nothing as worked.

I used the following instruction : securethejmxconsole

I get the following message:

at java.lang.Thread.run(Thread.java:595)
17:59:43,913 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
at org.jboss.security.auth.spi.Util.loadProperties(Util.java:249)
at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:164)
at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:483)
at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:425)
at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:251)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:230)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)

any suggestions ?

Thanks

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Well, you obviously did something wrong, but posting the error message doesn't help. Please post the configuration changes that you made, and provide the contents for the server/xxx/conf/props directory.


JBoss In Action
chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 188
Configuration changes:

In /jboss-4.0.2/server/default/deploy/jmx-console.war/WEB-INF/web.xml enable the security-constraint tag:







In /jboss-4.0.2/server/default/deploy/jmx-console.war/WEB-INF/jboss-web.xml enable the security-domain tag


In /jboss-4.0.2/server/default/deploy/management/console-mgr.sar/web-console.war/WEB-INF/web.xml enable the security-constraint tag:


In /jboss-4.0.2/server/default/deploy/management/console-mgr.sar/web-console.war/WEB-INF/jboss-web.xml enable the security-domain tag


Copy /jboss-4.0.2/server/default/deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/web-console-roles.properties into /jboss-4.0.2/server/default/conf/props
Copy /jboss-4.0.2/server/default/deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/ web-console-users.properties into /jboss-4.0.2/server/default/conf/props

Change the names of:
/jboss-4.0.2/server/default/deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/web-console-roles.properties into web-console-roles.properties_OLD
/jboss-4.0.2/server/default/deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/web-console-users.properties into web-console-users.properties_OLD

Change password and user in (same user & password for jmx and web console):
/jboss-4.0.2/server/default/conf/props/jmx-console-users.properties
/jboss-4.0.2/server/default/conf/props/web-console-users.properties

In /jboss-4.0.2/server/default/conf/login-config.xml change the web-console module-option name:



/jboss-4.0.2/server/default/conf/props content:




Thanks

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Please use the code tag, not the color tag, to mark source code. The cyan text was especially hard to read (actually, I could not read it at all).

Unless someone else jumps in with the solution I'll look at your settings tomorrow - it's been a loooooong day and my brain has gone on strike....
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9953
    
163

The "web-console" login module configuration in login-config.xml looks wrong:


The property names should be usersProperties and rolesProperties and not usersWebConsoleProperties and rolesWebConsoleProperties. Change it to:


[My Blog] [JavaRanch Journal]
chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 188
Hi,

Sorry for the color mark tag
anyway I try to use usersProperties and usersWebConsoleProperties but still its didn't work.
I notice that when I enable only one meaning web-console or jmx-console its working but when I try to enable both its not working.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to add web-console user/password authentication
 
Similar Threads
SSO using SPNEGO in JBOSS 4.2.2
Multiple ear deployment throws "No username found in principals"
JBoss 5.1.0 GA. FORM based authentication
configering DatabaseServerLoginModule in JBOSS
error on jboss start up