Add ActiveMQ security support
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 6 May 2010 06:15:06 +0000 (06:15 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 6 May 2010 06:15:06 +0000 (06:15 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@3554 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

security/runtime/org.argeo.security.core/pom.xml
security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/activemq/SecuredActiveMqConnectionFactory.java
security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/core/MatchingAuthenticationProvider.java

index 221bdfebd269f90501f6aa88f730754ba557f470..29b4283e8abe6088c033daf44fbcf05dc3f45e36 100644 (file)
@@ -33,6 +33,7 @@
                                                        org.argeo.security.*
                                                </Export-Package>
                                                <Import-Package>*,
+                                                       org.springframework.context,
                                                        org.argeo.server.json;resolution:=optional,
                                                        org.springframework.ldap.core.support;resolution:=optional
                                                </Import-Package>
                        <version>0.1.3-SNAPSHOT</version>
                </dependency>
 
-               <!-- Spring LDAP -->
-               <!--
-                       <dependency> <groupId>org.argeo.dep.osgi</groupId>
-                       <artifactId>org.argeo.dep.osgi.springframework.ldap</artifactId>
-                       </dependency>
-               -->
+               <dependency>
+                       <!--
+                               Force inclusion of commons.lang to prevent v2.1.0 to be taken by
+                               Spring Security
+                       -->
+                       <groupId>org.apache.commons</groupId>
+                       <artifactId>com.springsource.org.apache.commons.lang</artifactId>
+               </dependency>
+
+               <!-- Spring -->
                <dependency>
                        <groupId>org.springframework.ldap</groupId>
                        <artifactId>org.springframework.ldap</artifactId>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.transaction</artifactId>
                </dependency>
-
-               <!-- Security -->
                <dependency>
-                       <!--
-                               Force inclusion of commons.lang to prevent v2.1.0 to be taken by
-                               Spring Security
-                       -->
-                       <groupId>org.apache.commons</groupId>
-                       <artifactId>com.springsource.org.apache.commons.lang</artifactId>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>org.springframework.jms</artifactId>
                </dependency>
                <dependency>
                        <groupId>org.springframework.security</groupId>
                        <groupId>org.argeo.dep.osgi</groupId>
                        <artifactId>org.argeo.dep.osgi.activemq</artifactId>
                </dependency>
+               <dependency>
+                       <groupId>javax.jms</groupId>
+                       <artifactId>com.springsource.javax.jms</artifactId>
+               </dependency>
 
                <!-- TEST -->
                <dependency>
index 440a0226c0e81647bd2c3e08c652a4e209ff9084..3860d67705f532a0365a64c7530ba5687cb1594e 100644 (file)
@@ -200,4 +200,8 @@ public class SecuredActiveMqConnectionFactory implements ConnectionFactory,
                this.brokerURL = brokerUrl;
        }
 
+       public void setAuthenticationMode(String authenticationMode) {
+               this.authenticationMode = authenticationMode;
+       }
+
 }
index d53bf7871516a7d3667fc0a253bd8a27c9c6ec9f..730b5af0ddf7ad85b10d4ca5ca58fd29bcb60cfd 100644 (file)
@@ -5,7 +5,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.commons.io.IOUtils;
 import org.springframework.core.io.Resource;
 import org.springframework.security.AuthenticationException;
 import org.springframework.security.BadCredentialsException;
@@ -31,7 +30,7 @@ public class MatchingAuthenticationProvider extends
                try {
                        properties.load(propIn);
                } finally {
-                       IOUtils.closeQuietly(propIn);
+                       propIn.close();
                }
        }