Qpid
  1. Qpid
  2. QPID-3474

Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.12
    • Fix Version/s: 0.15
    • Component/s: Java Broker
    • Labels:
      None

      Description

      The examples of log entries with principal name displayed twice and separated by semicolon are displayed below:

      2011-09-07 12:42:41,051 INFO  [RMI TCP Connection(3)-169.24.39.206] (Log4jMessageLogger.java:72) - [mng:N/A(169.24.39.206)] MNG-1007 : Open : User guest;guest
      2011-09-07 12:42:44,446 INFO  [RMI TCP Connection(3)-169.24.39.206] (Log4jMessageLogger.java:72) - [mng:N/A(169.24.39.206)] MNG-1008 : Close : User guest;guest
      

      This problem can be simply reproduced by connecting to broker with Management console and looking into log files.

      This issue occurs due to following reason:

      On logging of JMX connection Open/Close events a principal name is taken from JMX connection id.
      In current RMI server implementation the connection id has the following format

      rmi://<hostname>:<port> <principal 1>;<principal 2>...<principal n> <index>
      

      It has the list of principals taken from the subject at the moment of opening the connection.

      In current implementation of RMIPasswordAuthenticator on successful authentication an instance of JMXPrincipal is added to subject in addition to existing UsernamePrincipal which is added before in AuthenticationManager#authenticate.

      As result of this, Subject contains two entries with the same principal name.

      On creating a connection Id RMIServerImpl iterates through all principals in subject and adds them separated by ';' to connection id string.

        Activity

        Alex Rudyy created issue -
        Keith Wall made changes -
        Field Original Value New Value
        Summary Principal name appears twice (sperated by semicolon) in management logs on JMX connection closing/opening events. Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.
        Assignee Robbie Gemmell [ gemmellr ] Keith Wall [ k-wall ]
        Fix Version/s 0.15 [ 12319043 ]
        Hide
        Keith Wall added a comment -

        Patch applied.

        The (subclassed) RMIServer now maintains a hash-map of connection ids to usernames and this map is passed to the notification as handback data. MBeanInvocationHandler now has responsibility to clear the map entry on receipt of close/fail events.

        Show
        Keith Wall added a comment - Patch applied. The (subclassed) RMIServer now maintains a hash-map of connection ids to usernames and this map is passed to the notification as handback data. MBeanInvocationHandler now has responsibility to clear the map entry on receipt of close/fail events.
        Keith Wall made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Keith Wall made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Keith Wall made changes -
        Status Reopened [ 4 ] In Progress [ 3 ]
        Keith Wall made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Hide
        Keith Wall added a comment -

        Hi Robbie, can you review this change please?

        Show
        Keith Wall added a comment - Hi Robbie, can you review this change please?
        Keith Wall made changes -
        Assignee Keith Wall [ k-wall ] Robbie Gemmell [ gemmellr ]
        Hide
        Robbie Gemmell added a comment -

        Looks good to me.

        Show
        Robbie Gemmell added a comment - Looks good to me.
        Robbie Gemmell made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rob Godfrey made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        78d 4h 27m 1 Keith Wall 24/Nov/11 16:22
        Resolved Resolved Reopened Reopened
        1m 19s 1 Keith Wall 24/Nov/11 16:24
        Reopened Reopened In Progress In Progress
        5s 1 Keith Wall 24/Nov/11 16:24
        In Progress In Progress Reviewable Reviewable
        2s 1 Keith Wall 24/Nov/11 16:24
        Reviewable Reviewable Resolved Resolved
        4d 19h 13m 1 Robbie Gemmell 29/Nov/11 11:37
        Resolved Resolved Closed Closed
        1170d 8h 28m 1 Rob Godfrey 11/Feb/15 20:06

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Alex Rudyy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development