You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2007/11/12 05:12:17 UTC

DO NOT REPLY [Bug 43840] New: - Unexpected behaviour when GenericPrincipal is serialized using the SerializablePrincipal in a cluster.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43840>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43840

           Summary: Unexpected behaviour when GenericPrincipal is serialized
                    using the SerializablePrincipal in a cluster.
           Product: Tomcat 6
           Version: 6.0.14
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Cluster
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: ashley@tomizone.com


The method 'getUserPrincipal()' in the GenericPrincipal class returns itself or
a provided Principal if possible. This is also the return value of the
request.getUserPrincipal() method. This works fine in a non-clustered environment.

However the behaviour of this method changes when the GenericPrincipal is
serialized by the SerializablePrincipal class. In the initial node of a cluster
the request.getUserPrincipal() method behaves normally. However after the
principal is serialized to another node it no longer contains the internal
Principal object, so the same method call will now return a different object.

I think a solution could be:

1) If there exists an internal userPrincipal AND it is Serializable then
serialize it along with the other properties of GenericPrincipal.

2) Recreate it at the other end if it is available in the object stream.

In this manner users with custom Principal objects that implement
java.io.Serializable will have predictable results from the
request.getUserPrincipal method across nodes in a cluster.

I'd appreciate your thoughts on this.

Thanks,
Ashley

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 43840] - Unexpected behaviour when GenericPrincipal is serialized using the SerializablePrincipal in a cluster.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43840>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43840





------- Additional Comments From markt@apache.org  2007-12-30 14:04 -------
I have committed a fix to svn and proposed the fix for inclusion in 6.0.x

http://svn.apache.org/viewvc?rev=607596&view=rev
http://svn.apache.org/viewvc?rev=607597&view=rev

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 43840] - Unexpected behaviour when GenericPrincipal is serialized using the SerializablePrincipal in a cluster.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43840>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43840


markt@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From markt@apache.org  2008-01-10 13:10 -------
This has been fixed in svn and will be included in 6.0.16 onwards.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org