Bugzilla – Bug 5981
subclasses of org.globus.gsi.jaas.SimplePrincipal
Last modified: 2008-04-06 12:58:54
You need to log in before you can comment on or make changes to this bug.
Class org.globus.gsi.jaas.SimplePrincipal implements an equals method but that method fails to distinguish instances of SimplePrincipal from instances of other implementations of java.security.Principal. Moreover, the subclasses GlobusPrincipal and UserNamePrincipal do not override the equals method, and so they too are indistinguishable from other implementations. Stated differently, we require that a GlobusPrincipal can only be equal to another GlobusPrincipal. Likewise a UserNamePrincipal can only be equal to another UserNamePrincipal. The problem worsens if I extend SimplePrincipal: public class SAMLPrincipal extends SimplePrincipal; An instance of SAMLPrincipal with the same name as an instance of UserNamePrincipal (which is likely) can not co-exist in the same JAAS Subject, for example. A possible solution is to make SimplePrincipal abstract, which forces subclasses to implement a proper equals method.
A workaround (for us) is to extend class org.globus.gsi.jaas.UserNamePrincipal. See Bug 5980 for details.