Keith Wall created QPID-4297:
--------------------------------

             Summary: Broker should not rely on 
Subject.getPrincipals.iterator().next() to find 'username principal'
                 Key: QPID-4297
                 URL: https://issues.apache.org/jira/browse/QPID-4297
             Project: Qpid
          Issue Type: Improvement
          Components: Java Broker
            Reporter: Keith Wall
             Fix For: 0.19


The Broker uses the idiom Subject.getPrincipals.iterator().next() in a couple 
of places to find the principal corresponding to the username of the logged on 
user.   This assumes that corresponding principal will always be returned 
first.  This may not be a safe assumption across different JVM providers, 
different JVM versions or when running Qpid with a container.

This should be replaced by our utility methods 
AuthenticatedPrincipal#getOptionalAuthenticatedPrincipalFromSubject and
AuthenticatedPrincipal#getAuthenticatedPrincipalFromSubject

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to