servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r414630 - in /incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release: conf/ examples/soap-binding/
Date Thu, 15 Jun 2006 16:21:41 GMT
Author: gnodet
Date: Thu Jun 15 09:21:40 2006
New Revision: 414630

URL: http://svn.apache.org/viewvc?rev=414630&view=rev
Log:
Add security and transactions to the default servicemix configuration

Added:
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/groups.properties
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/keystore.jks
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/login.properties
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/security.xml
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/users-credentials.properties
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/users-passwords.properties
Modified:
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/activemq.xml
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/jndi.xml
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/servicemix.xml
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/tx.xml
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/examples/soap-binding/README.txt
    incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/examples/soap-binding/servicemix.xml

Modified: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/activemq.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/activemq.xml?rev=414630&r1=414629&r2=414630&view=diff
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/activemq.xml
(original)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/activemq.xml
Thu Jun 15 09:21:40 2006
@@ -13,6 +13,7 @@
   
     <transportConnectors>
        <transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
+       <transportConnector uri="vm://localhost" discoveryUri="multicast://default"/>
     </transportConnectors>
     
     <networkConnectors>

Added: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/groups.properties
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/groups.properties?rev=414630&view=auto
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/groups.properties
(added)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/groups.properties
Thu Jun 15 09:21:40 2006
@@ -0,0 +1,4 @@
+programmers=first
+accounting=second
+employees=first,second
+testers=third
\ No newline at end of file

Modified: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/jndi.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/jndi.xml?rev=414630&r1=414629&r2=414630&view=diff
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/jndi.xml
(original)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/jndi.xml
Thu Jun 15 09:21:40 2006
@@ -4,6 +4,7 @@
 <beans>
 
   <import resource="tx.xml" />
+  <import resource="security.xml" />
 
   <bean id="jndi" 
         class="org.apache.xbean.spring.jndi.SpringInitialContextFactory" 
@@ -32,9 +33,47 @@
 
         <!-- transaction manager -->
         <entry key="javax.transaction.TransactionManager" value-ref="transactionManager"
/>
+        <entry key="java:comp/env/smx/TransactionManager" value-ref="transactionManager"
/>
+        
+        <!-- bootstrap context -->
+        <entry key="java:comp/env/smx/BootstrapContext" value-ref="bootstrapContext" />
+        
+        <!-- connection context -->
+        <entry key="java:comp/env/smx/ConnectionManager" value-ref="connectionManager"
/>
+        
+        <!-- Authentication service -->
+        <entry key="java:comp/env/smx/AuthenticationService" value-ref="authenticationService"
/>
+        
+        <!-- Keystore manager -->
+        <entry key="java:comp/env/smx/KeystoreManager" value-ref="keystoreManager" />
       </map>
     </property>
   </bean>
 
+  <!-- A managed JDBC DataSource for derby -->
+  <!-- needs tranql derby
+  <bean id="localDerbyMCF" class="org.tranql.connector.derby.EmbeddedXAMCF">
+    <property name="databaseName" value="data/derby"/>
+    <property name="createDatabase" value="true"/>
+  </bean>
+  <bean id="localDerbyDataSource" class="org.springframework.jca.support.LocalConnectionFactoryBean">
+    <property name="managedConnectionFactory" ref="localDerbyMCF"/>
+    <property name="connectionManager" ref="connectionManager"/>
+  </bean>
+  -->
+  
+  <!-- A managed JMS ConnectionFactory for ActiveMQ -->
+  <bean id="activemqMCF" class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
+    <property name="resourceAdapter">
+      <bean class="org.apache.activemq.ra.ActiveMQResourceAdapter">
+        <property name="serverUrl" value="vm://localhost"/>
+      </bean>
+    </property>
+  </bean>
+  <bean id="activemqCF" class="org.springframework.jca.support.LocalConnectionFactoryBean">
+    <property name="managedConnectionFactory" ref="activemqMCF"/>
+    <property name="connectionManager" ref="connectionManager"/>
+  </bean>
+        
 </beans>
 <!-- END SNIPPET: jndi -->

Added: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/keystore.jks
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/keystore.jks?rev=414630&view=auto
==============================================================================
Binary files /tmp/tmpbo3loM and /tmp/tmpPYHLSV differ

Added: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/login.properties
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/login.properties?rev=414630&view=auto
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/login.properties
(added)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/login.properties
Thu Jun 15 09:21:40 2006
@@ -0,0 +1,12 @@
+servicemix-domain {
+    org.apache.servicemix.jbi.security.login.PropertiesLoginModule 
+        sufficient
+        org.apache.servicemix.security.properties.user="usersp.properties"
+        org.apache.servicemix.security.properties.group="groups.properties";
+    
+    org.apache.servicemix.jbi.security.login.CertificatesLoginModule 
+        sufficient
+        org.apache.servicemix.security.certificates.user="usersc.properties"
+        org.apache.servicemix.security.certificates.group="groups.properties";
+   
+};

Added: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/security.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/security.xml?rev=414630&view=auto
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/security.xml
(added)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/security.xml
Thu Jun 15 09:21:40 2006
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:sm="http://servicemix.apache.org/config/1.0">
+
+  <sm:authenticationService id="authenticationService" />
+  
+  <sm:authorizationMap id="authorizationMap">
+    <sm:authorizationEntries>
+      <sm:authorizationEntry service="*:*" roles="*" />
+    </sm:authorizationEntries>
+  </sm:authorizationMap>
+  
+  <sm:keystoreManager id="keystoreManager">
+    <sm:keystores>
+      <sm:keystore name="default"
+                   path="classpath:keystore.jks"
+                   keystorePassword="servicemix"
+                   keyPasswords="smx=smx" />
+    </sm:keystores>
+  </sm:keystoreManager>
+
+</beans>
+

Modified: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/servicemix.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/servicemix.xml?rev=414630&r1=414629&r2=414630&view=diff
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/servicemix.xml
(original)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/servicemix.xml
Thu Jun 15 09:21:40 2006
@@ -1,6 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns:sm="http://servicemix.apache.org/config/1.0">
 
+  <sm:systemProperties>
+    <property name="properties">
+      <map>
+        <entry key="java.security.auth.login.config">
+          <bean class="org.springframework.util.ResourceUtils" factory-method="getFile">
+            <constructor-arg value="classpath:login.properties"/>
+          </bean>
+        </entry>
+      </map>
+    </property>
+  </sm:systemProperties>
+
   <import resource="classpath:jmx.xml" />
   <import resource="classpath:activemq.xml" />
   <import resource="classpath:jndi.xml" />
@@ -15,7 +27,19 @@
                 statsInterval="10" 
                 flowName="seda"
                 transactionManager="#transactionManager"
+                workManager="#workManager"
                 depends-on="jndi">
+                
+    <sm:broker>
+      <sm:securedBroker authorizationMap="#authorizationMap">
+        <sm:flows>
+          <sm:sedaFlow />
+          <sm:jcaFlow bootstrapContext="#bootstrapContext"
+                      connectionManager="#connectionManager"
+                      jmsURL="vm://localhost" />
+        </sm:flows>
+      </sm:securedBroker>
+    </sm:broker>
 
     <sm:activationSpecs>
 

Modified: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/tx.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/tx.xml?rev=414630&r1=414629&r2=414630&view=diff
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/tx.xml (original)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/tx.xml Thu
Jun 15 09:21:40 2006
@@ -2,14 +2,81 @@
 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
 <beans>
 
-  <bean id="extendedTransactionManager" class="org.jencks.factory.TransactionManagerFactoryBean"/>
+  <!-- Transaction log -->
+  <bean id="transactionLog" class="org.apache.geronimo.transaction.log.UnrecoverableLog"
/>
+  <!--
+  <bean id="transactionLog" class="org.apache.geronimo.transaction.log.HOWLLog">
+    <contructor-arg value="org.objectweb.howl.log.BlockLogBuffer"/> 
+    <contructor-arg value="32"/> 
+    <construcor-arg value="true"/>
+    <construcor-arg value="50"/> 
+    <construcor-arg value="var/txlog"/> 
+    <construcor-arg value="log"/> 
+    <construcor-arg value="howl"/>
+    <construcor-arg value="-1"/>
+    <construcor-arg value="0"/> 
+    <construcor-arg value="2"/> 
+    <construcor-arg value="4"/> 
+    <construcor-arg value="-1"/> 
+    <construcor-arg> 
+      <bean class="org.apache.geronimo.transaction.manager.XidFactoryImpl"/>
+    </constructor-arg>
+    <construcor-arg> 
+      <bean class="org.apache.geronimo.system.serverinfo.ServerInfo">
+          <constructor-arg value="var/geronimo"/>
+      </bean>
+    </constructor-arg>
+  </bean>
+  -->
+  
+  <!-- Internal transaction manager -->
+  <bean id="extendedTransactionManager" class="org.jencks.factory.TransactionManagerFactoryBean">
+    <property name="transactionLog" ref="transactionLog" />
+    <property name="defaultTransactionTimeoutSeconds" value="600"/>
+  </bean>
+  
+  <!-- Transaction context manager -->
   <bean id="transactionContextManager" class="org.jencks.factory.TransactionContextManagerFactoryBean">
     <property name="transactionManager" ref="extendedTransactionManager"/>
   </bean>
+  
+  <!-- Public transaction manager -->
   <bean id="transactionManager" class="org.jencks.factory.GeronimoTransactionManagerFactoryBean">
     <property name="transactionContextManager" ref="transactionContextManager"/>
   </bean>
   
-  <!-- We should configure a txlog to handle tx recovery -->
-
+  <!-- Work manager -->
+  <bean id="workManager" class="org.jencks.factory.WorkManagerFactoryBean">
+    <property name="threadPoolSize" value="30"/>
+    <property name="transactionContextManager" ref="transactionContextManager"/>
+  </bean>
+  
+  <!-- Bootstrap context for JCA -->
+  <bean id="bootstrapContext" class="org.jencks.factory.BootstrapContextFactoryBean">
+    <property name="workManager" ref="workManager"/>
+  </bean>
+  
+  <!-- Connection manager for JCA -->
+  <bean id="connectionTracker" class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator"/>
+  <bean id="poolingSupport" class="org.jencks.factory.SinglePoolFactoryBean">
+    <property name="maxSize" value="2"/>
+    <property name="minSize" value="1"/>
+    <property name="blockingTimeoutMilliseconds" value="60"/>
+    <property name="idleTimeoutMinutes" value="60"/>
+    <property name="matchOne" value="true"/>
+    <property name="matchAll" value="true"/>
+    <property name="selectOneAssumeMatch" value="true"/>
+  </bean>
+  <bean id="transactionSupport" class="org.jencks.factory.XATransactionFactoryBean">
+    <property name="useTransactionCaching" value="true"/>
+    <property name="useThreadCaching" value="true"/>
+  </bean>
+  <bean id="connectionManager" class="org.jencks.factory.ConnectionManagerFactoryBean">
+    <property name="containerManagedSecurity" value="false"/>
+    <property name="transactionContextManager" ref="transactionContextManager"/>
+    <property name="poolingSupport" ref="poolingSupport"/>
+    <property name="transactionSupport" ref="transactionSupport"/>
+    <property name="connectionTracker" ref="connectionTracker"/>
+  </bean>
+  
 </beans>

Added: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/users-credentials.properties
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/users-credentials.properties?rev=414630&view=auto
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/users-credentials.properties
(added)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/users-credentials.properties
Thu Jun 15 09:21:40 2006
@@ -0,0 +1 @@
+smx=CN=smx

Added: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/users-passwords.properties
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/users-passwords.properties?rev=414630&view=auto
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/users-passwords.properties
(added)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/users-passwords.properties
Thu Jun 15 09:21:40 2006
@@ -0,0 +1 @@
+smx=smx

Modified: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/examples/soap-binding/README.txt
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/examples/soap-binding/README.txt?rev=414630&r1=414629&r2=414630&view=diff
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/examples/soap-binding/README.txt
(original)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/examples/soap-binding/README.txt
Thu Jun 15 09:21:40 2006
@@ -27,3 +27,9 @@
        remove all the directories but the src one,
        type 'ant setup'
        run '../../bin/servicemix servicemix.xml'
+  * if you want to add authentication for this service,
+       just add an authMethod="basic" attribute on
+       the <http:endpoint> tag in the src/binding-su/xbean.xml
+       and rebuild the demo.  Before accessing the service,
+       you will need to enter a valid username / password
+       (smx / smx).

Modified: incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/examples/soap-binding/servicemix.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/examples/soap-binding/servicemix.xml?rev=414630&r1=414629&r2=414630&view=diff
==============================================================================
--- incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/examples/soap-binding/servicemix.xml
(original)
+++ incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/examples/soap-binding/servicemix.xml
Thu Jun 15 09:21:40 2006
@@ -1,15 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns:sm="http://servicemix.apache.org/config/1.0">
 
-  <!-- the JBI container -->
-  <sm:container id="jbi" 
-                rootDir="./wdir" 
-                installationDirPath="./install"
-                deploymentDirPath="./deploy"
-                flowName="seda">
+  <import resource="classpath:servicemix.xml" />
 
-    <sm:activationSpecs>
-		
-    </sm:activationSpecs>
-  </sm:container>
 </beans>



Mime
View raw message