Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-4297

Broker should not rely on Subject.getPrincipals.iterator().next() to find 'username principal'

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.19
    • Broker-J
    • None

    Description

      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

      Attachments

        Activity

          People

            robbie Robbie Gemmell
            kwall Keith Wall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: