[JBoss Portal] - Re: Unable to login to Jboss portal 2.7.2
by PeterJ
Sorry, the table name I gave was a typo - you have the correct table. Are all of the table empty, or do some of them have content? For example, in my database jbp_portal_mode has 12 rows, and jbp_portal_object has 29 rows (the number of rows you have might be different).
The initial users are loaded from the file jboss-portal.sar/conf/hibernate/user/setup.txt. Check that file.
In the log file, you should see entries like this:
2009-03-25 16:18:36,663 DEBUG [org.hibernate.pretty.Printer] listing entities:
2009-03-25 16:18:36,665 DEBUG [org.hibernate.pretty.Printer] org.jboss.portal.identity.db.HibernateRoleImpl{users=[org.jboss.portal.identity.db.HibernateUserImpl#4], name=User, displayName=Users, key=2}
2009-03-25 16:18:36,665 DEBUG [org.hibernate.pretty.Printer] org.jboss.portal.identity.db.HibernateRoleImpl{users=[org.jboss.portal.identity.db.HibernateUserImpl#3], name=Admin, displayName=Administrators, key=1}
2009-03-25 16:18:36,666 DEBUG [org.hibernate.pretty.Printer] org.jboss.portal.identity.db.HibernateUserImpl{dynamic=[], enabled=true, registrationDate=2009-03-25 16:18:36, viewRealEmail=true, roles=[org.jboss.portal.identity.db.HibernateRoleImpl#1], familyName=null, fakeEmail=null, userName=admin, realEmail=admin(a)portal.com, givenName=null, password=21232f297a57a5a743894a0e4a801fc3, key=3}
2009-03-25 16:18:36,667 DEBUG [org.hibernate.pretty.Printer] org.jboss.portal.identity.db.HibernateUserImpl{dynamic=[], enabled=true, registrationDate=2009-03-25 16:18:36, viewRealEmail=true, roles=[org.jboss.portal.identity.db.HibernateRoleImpl#2], familyName=null, fakeEmail=null, userName=user, realEmail=user(a)portal.com, givenName=null, password=ee11cbb19052e40b07aac0ca060c23ee, key=4}
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226969#4226969
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226969
17 years, 4 months
[Security & JAAS/JBoss] - Re: DatabaseLoginServerModule implementing problems
by NSchweig
Hallo Wolfgang,
thank you very much for the answer.
Now I think it is working a little bit better, I have got the following log:
0]
| LoginModule Class: org.jboss.security.auth.spi.DatabaseServerLoginModule
| ControlFlag: Anmeldemodul-Steuerflag: required
| Options:
| name=debug, value=true
| name=rolesQuery, value=select userroles, 'roles' from userroles where username=?
| name=principalsQuery, value=select passwd from users where username=?
| name=dsJndiName, value=java:/databaselogin
|
| 15:42:55,343 TRACE [DatabaseServerLoginModule] initialize
| 15:42:55,343 TRACE [DatabaseServerLoginModule] Security domain: databaselogin
| 15:42:55,343 TRACE [DatabaseServerLoginModule] DatabaseServerLoginModule, dsJndiName=java:/databaselogin
| 15:42:55,343 TRACE [DatabaseServerLoginModule] principalsQuery=select passwd from users where username=?
| 15:42:55,343 TRACE [DatabaseServerLoginModule] rolesQuery=select userroles, 'roles' from userroles where username=?
| 15:42:55,343 TRACE [DatabaseServerLoginModule] suspendResume=true
| 15:42:55,343 TRACE [DatabaseServerLoginModule] login
| 15:42:55,343 TRACE [DatabaseServerLoginModule] suspendAnyTransaction
| 15:42:55,343 TRACE [DatabaseServerLoginModule] Excuting query: select passwd from users where username=?, with username: java
| 15:42:55,343 TRACE [DatabaseServerLoginModule] Obtained user password
| 15:42:55,343 TRACE [DatabaseServerLoginModule] resumeAnyTransaction
| 15:42:55,343 TRACE [DatabaseServerLoginModule] User 'java' authenticated, loginOk=true
| 15:42:55,343 TRACE [DatabaseServerLoginModule] commit, loginOk=true
| 15:42:55,343 TRACE [DatabaseServerLoginModule] getRoleSets using rolesQuery: select userroles, 'roles' from userroles where username=?, username: java
| 15:42:55,343 TRACE [DatabaseServerLoginModule] suspendAnyTransaction
| 15:42:55,343 TRACE [DatabaseServerLoginModule] Excuting query: select userroles, 'roles' from userroles where username=?, with username: java
| 15:42:55,343 TRACE [DatabaseServerLoginModule] Assign user to role java
| 15:42:55,343 TRACE [DatabaseServerLoginModule] resumeAnyTransaction
| 15:42:55,390 TRACE [databaselogin] defaultLogin, lc=javax.security.auth.login.LoginContext@551dc1, subject=Subject(1341551).principals=org.jboss.security.SimplePrincipal@11380792(java)org.jboss.security.SimpleGroup@32426946(roles(members:java))
| 15:42:55,390 TRACE [databaselogin] updateCache, inputSubject=Subject(1341551).principals=org.jboss.security.SimplePrincipal@11380792(java)org.jboss.security.SimpleGroup@32426946(roles(members:java)), cacheSubject=Subject(8610524).principals=org.jboss.security.SimplePrincipal@11380792(java)org.jboss.security.SimpleGroup@32426946(roles(members:java))
| 15:42:55,390 TRACE [databaselogin] Inserted cache info: org.jboss.security.plugins.auth.JaasSecurityManagerBase$DomainInfo@1cf9232[Subject(8610524).principals=org.jboss.security.SimplePrincipal@11380792(java)org.jboss.security.SimpleGroup@32426946(roles(members:java)),credential.class=java.lang.String@24598445,expirationTime=1240841565609]
| 15:42:55,390 TRACE [databaselogin] End isValid, true
| 15:42:55,390 TRACE [databaselogin] getPrincipal, cache info: org.jboss.security.plugins.auth.JaasSecurityManagerBase$DomainInfo@1cf9232[Subject(8610524).principals=org.jboss.security.SimplePrincipal@11380792(java)org.jboss.security.SimpleGroup@32426946(roles(members:java)),credential.class=java.lang.String@24598445,expirationTime=1240841565609]
| 15:42:55,406 TRACE [SecurityRolesAssociation] Setting threadlocal:null
| 15:42:55,406 TRACE [SecurityRolesAssociation] Setting threadlocal:null
| 15:42:55,406 TRACE [SecurityRolesAssociation] Setting threadlocal:{}
| 15:42:55,406 TRACE [JBossAuthorizationContext] Control flag for entry:org.jboss.security.authorization.config.AuthorizationModuleEntry{org.jboss.security.authorization.modules.DelegatingAuthorizationModule:{}REQUIRED}is:[REQUIRED]
| 15:42:55,421 TRACE [SecurityRolesAssociation] Setting threadlocal:null
| 15:42:55,421 TRACE [SecurityRolesAssociation] Setting threadlocal:null
|
But the problem now is that i get a http 403 error, access denied.
Any more ideas?
Thank you very much for the links, too!Very helpful.
Best regards,
Nicole
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226964#4226964
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226964
17 years, 4 months