You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alex Rudyy (JIRA)" <ji...@apache.org> on 2011/09/07 13:57:09 UTC

[jira] [Created] (QPID-3474) Principal name appears twice (sperated by semicolon) in management logs on JMX connection closing/opening events.

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

                 Key: QPID-3474
                 URL: https://issues.apache.org/jira/browse/QPID-3474
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
    Affects Versions: 0.12
            Reporter: Alex Rudyy
            Assignee: Robbie Gemmell
            Priority: Minor


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

{noformat}
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
{noformat}

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

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

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.



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Assigned] (QPID-3474) Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.

Posted by "Keith Wall (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall reassigned QPID-3474:
--------------------------------

    Assignee: Robbie Gemmell  (was: Keith Wall)

Hi Robbie, can you review this change please?
                
> Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3474
>                 URL: https://issues.apache.org/jira/browse/QPID-3474
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.12
>            Reporter: Alex Rudyy
>            Assignee: Robbie Gemmell
>            Priority: Minor
>             Fix For: 0.15
>
>
> The examples of log entries with principal name displayed twice and separated by semicolon are displayed below:
> {noformat}
> 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
> {noformat}
> 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
> {noformat}
> rmi://<hostname>:<port> <principal 1>;<principal 2>...<principal n> <index>
> {noformat}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Reopened] (QPID-3474) Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.

Posted by "Keith Wall (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall reopened QPID-3474:
------------------------------

    
> Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3474
>                 URL: https://issues.apache.org/jira/browse/QPID-3474
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.12
>            Reporter: Alex Rudyy
>            Assignee: Keith Wall
>            Priority: Minor
>             Fix For: 0.15
>
>
> The examples of log entries with principal name displayed twice and separated by semicolon are displayed below:
> {noformat}
> 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
> {noformat}
> 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
> {noformat}
> rmi://<hostname>:<port> <principal 1>;<principal 2>...<principal n> <index>
> {noformat}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3474) Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.

Posted by "Keith Wall (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall updated QPID-3474:
-----------------------------

    Fix Version/s: 0.15
         Assignee: Keith Wall  (was: Robbie Gemmell)
          Summary: Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.  (was: 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.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3474
>                 URL: https://issues.apache.org/jira/browse/QPID-3474
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.12
>            Reporter: Alex Rudyy
>            Assignee: Keith Wall
>            Priority: Minor
>             Fix For: 0.15
>
>
> The examples of log entries with principal name displayed twice and separated by semicolon are displayed below:
> {noformat}
> 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
> {noformat}
> 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
> {noformat}
> rmi://<hostname>:<port> <principal 1>;<principal 2>...<principal n> <index>
> {noformat}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Resolved] (QPID-3474) Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.

Posted by "Robbie Gemmell (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell resolved QPID-3474.
----------------------------------

    Resolution: Fixed

Looks good to me.
                
> Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3474
>                 URL: https://issues.apache.org/jira/browse/QPID-3474
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.12
>            Reporter: Alex Rudyy
>            Assignee: Robbie Gemmell
>            Priority: Minor
>             Fix For: 0.15
>
>
> The examples of log entries with principal name displayed twice and separated by semicolon are displayed below:
> {noformat}
> 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
> {noformat}
> 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
> {noformat}
> rmi://<hostname>:<port> <principal 1>;<principal 2>...<principal n> <index>
> {noformat}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Resolved] (QPID-3474) Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.

Posted by "Keith Wall (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall resolved QPID-3474.
------------------------------

    Resolution: Fixed

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.
                
> Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3474
>                 URL: https://issues.apache.org/jira/browse/QPID-3474
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.12
>            Reporter: Alex Rudyy
>            Assignee: Keith Wall
>            Priority: Minor
>             Fix For: 0.15
>
>
> The examples of log entries with principal name displayed twice and separated by semicolon are displayed below:
> {noformat}
> 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
> {noformat}
> 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
> {noformat}
> rmi://<hostname>:<port> <principal 1>;<principal 2>...<principal n> <index>
> {noformat}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3474) Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.

Posted by "Keith Wall (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall updated QPID-3474:
-----------------------------

    Status: Ready To Review  (was: In Progress)
    
> Principal name appears twice (separated by semicolon) in management logs on JMX connection closing/opening events.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3474
>                 URL: https://issues.apache.org/jira/browse/QPID-3474
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.12
>            Reporter: Alex Rudyy
>            Assignee: Keith Wall
>            Priority: Minor
>             Fix For: 0.15
>
>
> The examples of log entries with principal name displayed twice and separated by semicolon are displayed below:
> {noformat}
> 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
> {noformat}
> 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
> {noformat}
> rmi://<hostname>:<port> <principal 1>;<principal 2>...<principal n> <index>
> {noformat}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org