when using clustering the Principal seems not to be replicated correctly It seems to be linked to the UserDatabaseRealm, using a o.a.c.users.MemoryUser principal instead of a GenericPrincipal see: http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg74250.html
Now the UserDatabaseRealm also create GenericPrincipal class and at my test cases with basic login config at web.xml it works. OK, the set userPrincipal from GenericPrincipal are not transfered and this can be a problem. Please, can you checkout the last tomcat cvs head and test the fix? Thanks Peter
I tested it with the MemoryRealm settings using tomcat-users.xml for data of users, and the fix works. This with FORM authentication. however, we would like to use our custom JAAS login module. For this we programmed a module, and added 2 Principals to the config for user and role. These classes extend java.security.Principal. And this does not work yet. I think it has to do with the method createPrincipal(String username, Subject subject) in org.apache.catalina.realm.JAASRealm. All the other real implementations deal with GenericPrincipal, while here java.security.Principal is used.
Hmm, the JAASRealm.createPrincipal return a GenericPrincipal s. L.509 // Return the resulting Principal for our authenticated user return new GenericPrincipal(this, username, null, roles, userPrincipal); Can you better discribe your failure szenario?
it seems I was looking at (and using) the 5.5.9 stable source code, not the 5.5.10 HEAD. You are correct, this looks better. Let me do a new CVS checkout, build and test this was my error message: 107 55946 ERROR session.DeltaRequest - DeltaManager only support GenericPrincipal. Your realm used principal class com.lostboys.playground.common.security.UserPrincipal. and our UserPrincipal extends java.security.Principal (In reply to comment #3) > Hmm, > the JAASRealm.createPrincipal return a GenericPrincipal > s. L.509 > // Return the resulting Principal for our authenticated user > return new GenericPrincipal(this, username, null, roles, userPrincipal); > Can you better discribe your failure szenario?
*** Bug 34647 has been marked as a duplicate of this bug. ***
Currently we don´t support serialization from custom principals! I hope we can suppport this in a future release. Many thanx for your help Peter