activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1295083 - in /activemq/activemq-apollo/trunk: apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/security/ apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/ apollo-stomp/src/main/scala/org/apache/activemq/apol...
Date Wed, 29 Feb 2012 13:05:37 GMT
Author: chirino
Date: Wed Feb 29 13:05:36 2012
New Revision: 1295083

URL: http://svn.apache.org/viewvc?rev=1295083&view=rev
Log:
Fixes: APLO-167 The 'Not authorized to connect to connector' log messages do not show the
principals of the user

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/security/SecurityContext.scala
    activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolHandler.scala
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/security/SecurityContext.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/security/SecurityContext.scala?rev=1295083&r1=1295082&r2=1295083&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/security/SecurityContext.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/security/SecurityContext.scala
Wed Feb 29 13:05:36 2012
@@ -59,7 +59,7 @@ class SecurityContext {
     var rc = List[String]()
     if(_principals!=null) {
       for(principal<-_principals) {
-        rc ::= principal.getClass.getName+":"+principal.getName
+        rc ::= principal.getClass.getName+"("+principal.getName+")"
       }
     }
     "["+rc.mkString(", ")+"]"

Modified: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolHandler.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolHandler.scala?rev=1295083&r1=1295082&r2=1295083&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolHandler.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolHandler.scala
Wed Feb 29 13:05:36 2012
@@ -455,11 +455,11 @@ class OpenwireProtocolHandler extends Pr
         host.authenticator.authenticate(security_context) { auth_failure =>
           dispatchQueue {
             if( auth_failure!=null ) {
-              async_die(auth_failure+". Credentials="+security_context.credential_dump)
+              async_die("%s. Credentials=%s".format(auth_failure, security_context.credential_dump))
             } else if( !host.authorizer.can(security_context, "connect", connection.connector)
) {
-              async_die("Not authorized to connect to connector '%s'. Principals=".format(connection.connector.id,
security_context.principal_dump))
+              async_die("Not authorized to connect to connector '%s'. Principals=%s".format(connection.connector.id,
security_context.principal_dump))
             } else if( !host.authorizer.can(security_context, "connect", this.host) ) {
-              async_die("Not authorized to connect to virtual host '%s'. Principals=".format(this.host.id,
security_context.principal_dump))
+              async_die("Not authorized to connect to virtual host '%s'. Principals=%s".format(this.host.id,
security_context.principal_dump))
             } else {
               resume_read
               ack(info);

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala?rev=1295083&r1=1295082&r2=1295083&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
Wed Feb 29 13:05:36 2012
@@ -951,11 +951,11 @@ class StompProtocolHandler extends Proto
             host.authenticator.authenticate(security_context) { auth_failure=>
               dispatchQueue {
                 if( auth_failure!=null ) {
-                  async_die(auth_failure+". Credentials="+security_context.credential_dump)
+                  async_die("%s. Credentials=%s".format(auth_failure, security_context.credential_dump))
                 } else if( !host.authorizer.can(security_context, "connect", connection.connector)
) {
-                  async_die("Not authorized to connect to connector '%s'. Principals=".format(connection.connector.id,
security_context.principal_dump))
+                  async_die("Not authorized to connect to connector '%s'. Principals=%s".format(connection.connector.id,
security_context.principal_dump))
                 } else if( !host.authorizer.can(security_context, "connect", this.host) )
{
-                  async_die("Not authorized to connect to virtual host '%s'. Principals=".format(this.host.id,
security_context.principal_dump))
+                  async_die("Not authorized to connect to virtual host '%s'. Principals=%s".format(this.host.id,
security_context.principal_dump))
                 } else {
                   resume_read
                   send_connected



Mime
View raw message