Adapt to changes in Commons
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 30 Nov 2015 12:23:44 +0000 (12:23 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 30 Nov 2015 12:23:44 +0000 (12:23 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@8655 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

14 files changed:
demo/slc_demo_rap.properties
org.argeo.slc.agent.jcr/META-INF/spring/jcr-osgi.xml
org.argeo.slc.agent.jcr/META-INF/spring/jcr.xml
org.argeo.slc.agent/META-INF/spring/osgi.xml
org.argeo.slc.client.rap/META-INF/spring/osgi.xml
org.argeo.slc.client.ui.dist/META-INF/spring/osgi.xml
org.argeo.slc.core/src/org/argeo/slc/core/execution/DefaultAgentCli.java
org.argeo.slc.core/src/org/argeo/slc/core/execution/ExecutionThread.java
org.argeo.slc.core/src/org/argeo/slc/core/execution/ProcessThread.java
org.argeo.slc.core/src/org/argeo/slc/core/execution/ProcessThreadGroup.java
org.argeo.slc.core/src/org/argeo/slc/core/execution/tasks/SystemCall.java
org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit-osgi.xml
org.argeo.slc.node.jackrabbit/META-INF/spring/jackrabbit.xml
pom.xml

index adbb47dd5d5f5cb02671583beebb4b9fd4e0b23a..4bd4985bce67d9efcd26ba3bef6b2c63dd1b4ede 100644 (file)
@@ -1,12 +1,12 @@
 argeo.osgi.start.2.http=\
 org.eclipse.equinox.http.servlet,\
-org.eclipse.equinox.http.jetty
+org.eclipse.equinox.http.jetty,\
+org.eclipse.rap.rwt.osgi
 
 argeo.osgi.start.3.node=\
 org.argeo.cms
 
 argeo.osgi.start.4.apps=\
-org.eclipse.rap.rwt.osgi,\
 org.eclipse.gemini.blueprint.extender
 
 argeo.osgi.start.4.workbench=\
@@ -42,6 +42,7 @@ argeo.server.port.http=7070
 # DON'T CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
 eclipse.ignoreApp=true
 osgi.noShutdown=true
+org.eclipse.equinox.http.jetty.autostart=false
 
 # Avoid errors logs (see https://issues.apache.org/jira/browse/JCR-2226)
 org.apache.jackrabbit.core.statementcache=false
\ No newline at end of file
index ef95f7c023d11305bc8c56291e8ea73b05455957..9362f10f33093f1a856f1f55f9413ae5350b2695 100644 (file)
@@ -13,8 +13,8 @@
        <reference id="repository" interface="javax.jcr.Repository"\r
                filter="(argeo.jcr.repository.alias=slc)" />\r
 \r
-       <reference id="authenticationManager"\r
-               interface="org.springframework.security.authentication.AuthenticationManager" />\r
+<!--   <reference id="authenticationManager" -->\r
+<!--           interface="org.springframework.security.authentication.AuthenticationManager" /> -->\r
 \r
        <reference id="modulesManager"\r
                interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
index 5fe028e1ff0559a9a39ff53fd991380d65947cef..84b32268e008d71cf4afce12388750c973d81d6a 100644 (file)
@@ -12,7 +12,7 @@
 \r
        <bean id="agentCli" class="org.argeo.slc.core.execution.DefaultAgentCli">\r
                <property name="agent" ref="agent" />\r
-               <property name="authenticationManager" ref="authenticationManager" />\r
+<!--           <property name="authenticationManager" ref="authenticationManager" /> -->\r
        </bean>\r
 \r
        <bean id="executionModulesListener" class="org.argeo.slc.jcr.execution.JcrExecutionModulesListener"\r
 \r
        <!-- Thread-bound session is used when multiple threads with various authentication \r
                will call the component -->\r
-       <bean id="session" class="org.argeo.security.jcr.SecureThreadBoundSession">\r
-               <property name="repository" ref="repository" />\r
-       </bean>\r
+<!--   <bean id="session" class="org.argeo.security.jcr.SecureThreadBoundSession"> -->\r
+<!--           <property name="repository" ref="repository" /> -->\r
+<!--   </bean> -->\r
 \r
        <bean id="attachmentUploader" class="org.argeo.slc.jcr.execution.JcrAttachmentUploader">\r
-               <property name="session" ref="session" />\r
+<!--           <property name="session" ref="session" /> -->\r
        </bean>\r
 \r
 \r
        <bean\r
                class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">\r
-               <property name="authenticationManager" ref="authenticationManager" />\r
+<!--           <property name="authenticationManager" ref="authenticationManager" /> -->\r
        </bean>\r
 \r
 \r
index f22371189d8ceb7b4c4d203f0e6cf4afb9570aee..2b9dee6850f3382d4fe792709b1a1debea2850db 100644 (file)
@@ -32,6 +32,8 @@
                cardinality="0..N">\r
                <listener ref="modulesManager" />\r
        </list>\r
+       <reference id="userTransaction" interface="javax.transaction.UserTransaction" />\r
+       <reference id="userAdmin" interface="org.osgi.service.useradmin.UserAdmin" />\r
 \r
        <!-- SERVICES -->\r
        <service ref="modulesManager" interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
        </beans:bean>\r
 \r
        <!-- ROLES -->\r
-       <reference id="userAdminService" interface="org.argeo.security.UserAdminService" />\r
+<!--   <reference id="userAdminService" interface="org.argeo.security.UserAdminService" /> -->\r
 \r
        <beans:bean class="org.argeo.security.core.SimpleRoleRegistration"\r
                init-method="run">\r
                <beans:property name="role" value="ROLE_SLC" />\r
-               <beans:property name="userAdminService" ref="userAdminService" />\r
+               <beans:property name="userAdmin" ref="userAdmin" />\r
+               <beans:property name="userTransaction" ref="userTransaction" />\r
+<!--           <beans:property name="userAdminService" ref="userAdminService" /> -->\r
        </beans:bean>\r
 </beans:beans>
\ No newline at end of file
index bb3095bfa49d10216962b10759526c84855b9346..557350b8e4a7f3d6ec6705d55b57bb34fe8aa94f 100644 (file)
@@ -14,6 +14,6 @@
                filter="(argeo.jcr.repository.alias=node)" />\r
 \r
        <reference id="repositoryFactory" interface="javax.jcr.RepositoryFactory" />\r
-       <reference id="keyring" interface="org.argeo.security.crypto.CryptoKeyring" />\r
+       <reference id="keyring" interface="org.argeo.util.security.CryptoKeyring" />\r
 \r
 </beans:beans>
\ No newline at end of file
index e8bc02d240e04e371946d2f3348cda1e4ca9dd75..590f3c37f2e9b65092ca264c0f287a02e9cbf58e 100644 (file)
@@ -12,7 +12,7 @@
                filter="(argeo.jcr.repository.alias=java)" />\r
 \r
        <reference id="repositoryFactory" interface="javax.jcr.RepositoryFactory" />\r
-       <reference id="keyring" interface="org.argeo.security.crypto.CryptoKeyring" />\r
+       <reference id="keyring" interface="org.argeo.util.security.CryptoKeyring" />\r
 \r
        <reference id="nodeRepository" interface="javax.jcr.Repository"\r
                filter="(argeo.jcr.repository.alias=node)" />\r
index f790a7945552c4febda588504abd804a461dccc3..e02d50f2f30af2ba6bc1788c83fb6cbed2f0f3f2 100644 (file)
@@ -10,7 +10,6 @@ import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.argeo.security.OsAuthenticationToken;
 import org.argeo.slc.DefaultNameVersion;
 import org.argeo.slc.NameVersion;
 import org.argeo.slc.SlcException;
@@ -20,9 +19,6 @@ import org.argeo.slc.execution.ExecutionSpec;
 import org.argeo.slc.execution.ExecutionSpecAttribute;
 import org.argeo.slc.execution.SlcAgent;
 import org.argeo.slc.execution.SlcAgentCli;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.security.core.context.SecurityContextHolder;
 
 /**
  * Authenticates thread and executes synchronously a command line execution.
@@ -33,18 +29,18 @@ public class DefaultAgentCli implements SlcAgentCli {
 
        private final static String UTF8 = "UTF-8";
        private SlcAgent agent;
-       private AuthenticationManager authenticationManager;
+//     private AuthenticationManager authenticationManager;
 
        private Long timeout = 24 * 60 * 60 * 1000l;
 
        public String process(String[] args) {
-               if (SecurityContextHolder.getContext().getAuthentication() == null) {
-                       OsAuthenticationToken oat = new OsAuthenticationToken();
-                       Authentication authentication = authenticationManager
-                                       .authenticate(oat);
-                       SecurityContextHolder.getContext()
-                                       .setAuthentication(authentication);
-               }
+//             if (SecurityContextHolder.getContext().getAuthentication() == null) {
+//                     OsAuthenticationToken oat = new OsAuthenticationToken();
+//                     Authentication authentication = authenticationManager
+//                                     .authenticate(oat);
+//                     SecurityContextHolder.getContext()
+//                                     .setAuthentication(authentication);
+//             }
 
                if (args.length > 0 && args[0].equals("help")) {
                        StringBuilder buf = new StringBuilder();
@@ -230,10 +226,10 @@ public class DefaultAgentCli implements SlcAgentCli {
                this.agent = agent;
        }
 
-       public void setAuthenticationManager(
-                       AuthenticationManager authenticationManager) {
-               this.authenticationManager = authenticationManager;
-       }
+//     public void setAuthenticationManager(
+//                     AuthenticationManager authenticationManager) {
+//             this.authenticationManager = authenticationManager;
+//     }
 
        public void setTimeout(Long timeout) {
                this.timeout = timeout;
index 48a5df38bed6f9bf2be8c2e7e8d8d786af0f0712..f29e2938fd6fedf22b4c47b81f8d16523e11cb57 100644 (file)
@@ -20,13 +20,10 @@ import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
 import org.argeo.slc.execution.ExecutionFlowDescriptor;
 import org.argeo.slc.execution.ExecutionModulesManager;
 import org.argeo.slc.execution.ExecutionStep;
 import org.argeo.slc.execution.RealizedFlow;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
 
 /** Thread of a single execution */
 public class ExecutionThread extends Thread {
@@ -49,11 +46,11 @@ public class ExecutionThread extends Thread {
 
        public void run() {
                // authenticate thread
-               Authentication authentication = getProcessThreadGroup()
-                               .getAuthentication();
-               if (authentication == null)
-                       throw new SlcException("Can only execute authenticated threads");
-               SecurityContextHolder.getContext().setAuthentication(authentication);
+//             Authentication authentication = getProcessThreadGroup()
+//                             .getAuthentication();
+//             if (authentication == null)
+//                     throw new SlcException("Can only execute authenticated threads");
+//             SecurityContextHolder.getContext().setAuthentication(authentication);
 
                // Retrieve execution flow descriptor
                ExecutionFlowDescriptor executionFlowDescriptor = realizedFlow
index 9b8f9cc3f2cdbb530a7c6b54b0df06de938580d7..b17e478f7a172fe458afa2b47d173b9400cdb743 100644 (file)
@@ -23,13 +23,10 @@ import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.argeo.slc.SlcException;
 import org.argeo.slc.execution.ExecutionModulesManager;
 import org.argeo.slc.execution.ExecutionProcess;
 import org.argeo.slc.execution.ExecutionStep;
 import org.argeo.slc.execution.RealizedFlow;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
 
 /**
  * Main thread coordinating an {@link ExecutionProcess}, launching parallel or
@@ -59,11 +56,11 @@ public class ProcessThread extends Thread {
 
        public final void run() {
                // authenticate thread
-               Authentication authentication = getProcessThreadGroup()
-                               .getAuthentication();
-               if (authentication == null)
-                       throw new SlcException("Can only execute authenticated threads");
-               SecurityContextHolder.getContext().setAuthentication(authentication);
+//             Authentication authentication = getProcessThreadGroup()
+//                             .getAuthentication();
+//             if (authentication == null)
+//                     throw new SlcException("Can only execute authenticated threads");
+//             SecurityContextHolder.getContext().setAuthentication(authentication);
 
                log.info("\n##\n## SLC Process #" + process.getUuid()
                                + " STARTED\n##\n");
index c18eaedbb1d28ca4bccc596e45ac4845ffe7e0d9..17dbff83b93f493cb1d3cccb95a3ef20d9fb092a 100644 (file)
@@ -20,14 +20,10 @@ import java.util.concurrent.BlockingQueue;
 
 import org.argeo.slc.execution.ExecutionProcess;
 import org.argeo.slc.execution.ExecutionStep;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
 
 /** The thread group attached to a given {@link SlcExecution}. */
 public class ProcessThreadGroup extends ThreadGroup {
-       // private final ExecutionModulesManager executionModulesManager;
-       // private final ProcessThread processThread;
-       private final Authentication authentication;
+//     private final Authentication authentication;
        private final static Integer STEPS_BUFFER_CAPACITY = 5000;
 
        private BlockingQueue<ExecutionStep> steps = new ArrayBlockingQueue<ExecutionStep>(
@@ -37,15 +33,13 @@ public class ProcessThreadGroup extends ThreadGroup {
 
        public ProcessThreadGroup(ExecutionProcess executionProcess) {
                super("SLC Process #" + executionProcess.getUuid() + " thread group");
-               // this.executionModulesManager = executionModulesManager;
-               // this.processThread = processThread;
-               this.authentication = SecurityContextHolder.getContext()
-                               .getAuthentication();
+//             this.authentication = SecurityContextHolder.getContext()
+//                             .getAuthentication();
        }
 
-       public Authentication getAuthentication() {
-               return authentication;
-       }
+//     public Authentication getAuthentication() {
+//             return authentication;
+//     }
 
        public void dispatchAddStep(ExecutionStep step) {
                // ExecutionProcess slcProcess = processThread.getProcess();
index b2d8723a658c1b0eceff3288230bcf4009fbf674..27cc59d60becde843d57a73fdd8d2f71d7349463 100644 (file)
@@ -54,8 +54,6 @@ import org.argeo.slc.core.test.SimpleResultPart;
 import org.argeo.slc.test.TestResult;
 import org.argeo.slc.test.TestStatus;
 import org.springframework.core.io.Resource;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
 
 /** Execute an OS specific system call. */
 public class SystemCall implements Runnable {
@@ -98,7 +96,7 @@ public class SystemCall implements Runnable {
        private Boolean exceptionOnFailed = true;
        private Boolean mergeEnvironmentVariables = true;
 
-       private Authentication authentication;
+//     private Authentication authentication;
 
        private String osConsole = null;
        private String generateScript = null;
@@ -160,7 +158,7 @@ public class SystemCall implements Runnable {
 
        /** Executes the system call. */
        public void run() {
-               authentication = SecurityContextHolder.getContext().getAuthentication();
+//             authentication = SecurityContextHolder.getContext().getAuthentication();
 
                // Manage streams
                Writer stdOutWriter = null;
@@ -535,10 +533,10 @@ public class SystemCall implements Runnable {
        /** Log from the underlying streams. */
        protected void log(String logLevel, String line) {
                // TODO optimize
-               if (SecurityContextHolder.getContext().getAuthentication() == null) {
-                       SecurityContextHolder.getContext()
-                                       .setAuthentication(authentication);
-               }
+//             if (SecurityContextHolder.getContext().getAuthentication() == null) {
+//                     SecurityContextHolder.getContext()
+//                                     .setAuthentication(authentication);
+//             }
 
                if ("ERROR".equals(logLevel))
                        log.error(line);
index 734721a7299eb96e4e320533f4332fb292852993..c037082066ed92c3e4b2a0f67a2dbe3606c4b27c 100644 (file)
@@ -13,8 +13,8 @@
        <reference id="nodeRepository" interface="javax.jcr.Repository"\r
                filter="(argeo.jcr.repository.alias=node)" />\r
 \r
-       <reference id="authenticationManager"\r
-               interface="org.springframework.security.authentication.AuthenticationManager" />\r
+<!--   <reference id="authenticationManager" -->\r
+<!--           interface="org.springframework.security.authentication.AuthenticationManager" /> -->\r
 \r
        <!-- SERVICES -->\r
        <service ref="jcrRepository" interface="javax.jcr.Repository">\r
index 6b068005330c79579180f1ed8f762a2447c65de2..f86c7d7ea2684befbcfe588907106b8d66b5844e 100644 (file)
@@ -28,7 +28,7 @@
        <bean
                class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">
                <description><![CDATA[Executes initialization with a system authentication]]></description>
-               <property name="authenticationManager" ref="authenticationManager" />
+<!--           <property name="authenticationManager" ref="authenticationManager" /> -->
        </bean>
 
 </beans>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 2c3298dfbe63be9b1b5b3090768e2342d0858bc0..972130b7084abdad29ad64065e66b8362df32e10 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
        <parent>
                <groupId>org.argeo.commons</groupId>
                <artifactId>argeo-commons</artifactId>
-               <version>2.1.29-SNAPSHOT</version>
+               <version>2.1.31-SNAPSHOT</version>
        </parent>
        <groupId>org.argeo.slc</groupId>
        <artifactId>argeo-slc</artifactId>
@@ -16,7 +16,7 @@
                <developmentCycle.startDate>2015-02-12</developmentCycle.startDate>
                <version.slc>2.1.1-SNAPSHOT</version.slc>
                <!-- Libraries versions -->
-               <version.argeo-tp-extras>2.1.5</version.argeo-tp-extras>
+               <version.argeo-tp-extras>2.1.7</version.argeo-tp-extras>
        </properties>
        <modules>
                <!-- Runtime -->