log4j.logger.org.springframework.web.servlet.PageNotFound=ERROR
log4j.logger.org.argeo.server.webextender.TomcatDeployer=WARN
log4j.logger.org.argeo.slc.client.ui.dist=TRACE
-
+log4j.logger.org.argeo.security.core=TRACE
#log4j.logger.org.argeo.jcr.proxy=TRACE
#log4j.logger.org.apache.jackrabbit.webdav=DEBUG
org.argeo.slc.core.test.tree,
org.argeo.slc.execution,
org.argeo.slc.jsch,
+ org.argeo.slc.jsch.swing,
org.argeo.slc.osgi,
org.argeo.slc.structure,
org.argeo.slc.test,
<bean p:host="localhost" p:port="22" p:user="${user.name}"\r
p:localPrivateKey="${user.home}/.ssh/id_rsa" class="org.argeo.slc.jsch.SshTarget">\r
<property name="userInfo">\r
- <bean class="org.argeo.slc.jsch.UiUserInfo" />\r
+ <bean class="org.argeo.slc.jsch.swing.SwingUserInfo" />\r
</property>\r
</bean>\r
</property>\r
org.argeo.slc.agent,\
org.argeo.slc.agent.jcr,\
org.springframework.osgi.web.extender,\
-org.argeo.slc.demo.ant,\
+
+slc.executionModules=org.argeo.slc.demo.ant,\
org.argeo.slc.demo.basic,\
+org.argeo.slc.demo.minimal,\
#slc.executionModules=org.argeo.infra.slc.rpmfactory,\
#org.argeo.elgis.rpmfactory,\
org.argeo.slc.node.jackrabbit,\
org.argeo.slc.agent,\
org.argeo.slc.agent.jcr,\
-org.argeo.slc.demo.ant,\
+
+slc.executionModules=org.argeo.slc.demo.ant,\
org.argeo.slc.demo.basic,\
org.argeo.slc.demo.minimal,\
-org.argeo.elgis.rpmfactory,\
eclipse.application=org.argeo.slc.client.rcp.application
org.argeo.security.ui.initialPerspective=org.argeo.slc.client.ui.slcExecutionPerspective
// current space and the part on bottom gets the rest. Likewise, for a
// horizontal split, the part at left gets the specified ratio of the
// current space.
-// IFolderLayout main = layout.createFolder("main", IPageLayout.RIGHT,
-// 0.3f, editorArea);
+ // IFolderLayout main = layout.createFolder("main", IPageLayout.RIGHT,
+ // 0.3f, editorArea);
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT,
0.3f, editorArea);
IFolderLayout bottom = layout.createFolder("bottom",
IPageLayout.BOTTOM, 0.65f, editorArea);
+ bottom.addView("org.argeo.security.ui.logView");
bottom.addView("org.argeo.slc.client.ui.jcrProcessListView");
-// IFolderLayout topRight = layout.createFolder("topRight",
-// IPageLayout.RIGHT, 0.6f, "main");
+ // IFolderLayout topRight = layout.createFolder("topRight",
+ // IPageLayout.RIGHT, 0.6f, "main");
// add the views to the corresponding place holder
left.addView("org.argeo.slc.client.ui.jcrExecutionModulesView");
left.addView("org.argeo.slc.client.ui.jcrResultListView");
-// main.addView("org.argeo.slc.client.ui.processBuilderView");
-// main.addPlaceholder("org.argeo.slc.client.ui.resultDetailView:UUID-*");
-// main.addPlaceholder("org.argeo.slc.client.ui.processDetailView:UUID-*");
+ // main.addView("org.argeo.slc.client.ui.processBuilderView");
+ // main.addPlaceholder("org.argeo.slc.client.ui.resultDetailView:UUID-*");
+ // main.addPlaceholder("org.argeo.slc.client.ui.processDetailView:UUID-*");
-
-// topRight.addView("org.argeo.slc.client.ui.processParametersView");
+ // topRight.addView("org.argeo.slc.client.ui.processParametersView");
}
}
</parent>
<artifactId>org.argeo.slc.agent</artifactId>
<name>SLC Agent</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Import-Package>
+ *,
+ org.argeo.slc.core.test.tree
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
org.argeo.slc.build,
org.argeo.slc.core.execution,
org.argeo.slc.core.attachment,
- org.argeo.slc.core.execution,
org.argeo.slc.core.structure,
org.argeo.slc.core.structure.tree,
org.argeo.slc.core.test,
<property name="repository" ref="jcrRepository" />\r
</bean>\r
\r
+ <bean\r
+ class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">\r
+ <property name="authenticationManager" ref="authenticationManager" />\r
+ </bean>\r
</beans>
\ No newline at end of file
<property name="defaultRepositories" ref="defaultMavenRepositories" />
</bean>
- <bean
- class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">
- <property name="authenticationManager" ref="authenticationManager" />
- </bean>
-
-
</beans>
\ No newline at end of file
<url>file://${site.repoBase}/${developmentCycle.slc}/</url>
</site>
</distributionManagement>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.3.1</version>
- <reportSets>
- <reportSet>
- <reports>
- <report>index</report>
- <report>summary</report>
- <report>license</report>
- <report>scm</report>
- <report>issue-tracking</report>
- <report>dependencies</report>
- </reports>
- </reportSet>
- <reportSet>
- <inherited>false</inherited>
- <reports>
- <report>project-team</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.7</version>
- <inherited>false</inherited>
- <configuration>
- <aggregate>true</aggregate>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <aggregate>true</aggregate>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.7.1</version>
- <inherited>false</inherited>
- <configuration>
- <aggregate>true</aggregate>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>taglist-maven-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <aggregate>true</aggregate>
- <tags>
- <tag>TODO</tag>
- <tag>FIXME</tag>
- <tag>@deprecated</tag>
- </tags>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-changelog-plugin</artifactId>
- <version>2.2</version>
- <inherited>false</inherited>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.3</version>
- <inherited>false</inherited>
- <configuration>
- <linkXref>true</linkXref>
- <targetJdk>1.5</targetJdk>
- <aggregate>true</aggregate>
- <excludes>
- <exclude>**/springutil/*.java</exclude>
- </excludes>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>cpd</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- </plugins>
- </reporting>
+<!-- <reporting> -->
+<!-- <plugins> -->
+<!-- <plugin> -->
+<!-- <groupId>org.apache.maven.plugins</groupId> -->
+<!-- <artifactId>maven-project-info-reports-plugin</artifactId> -->
+<!-- <version>2.3.1</version> -->
+<!-- <reportSets> -->
+<!-- <reportSet> -->
+<!-- <reports> -->
+<!-- <report>index</report> -->
+<!-- <report>summary</report> -->
+<!-- <report>license</report> -->
+<!-- <report>scm</report> -->
+<!-- <report>issue-tracking</report> -->
+<!-- <report>dependencies</report> -->
+<!-- </reports> -->
+<!-- </reportSet> -->
+<!-- <reportSet> -->
+<!-- <inherited>false</inherited> -->
+<!-- <reports> -->
+<!-- <report>project-team</report> -->
+<!-- </reports> -->
+<!-- </reportSet> -->
+<!-- </reportSets> -->
+<!-- </plugin> -->
+<!-- <plugin> -->
+<!-- <groupId>org.apache.maven.plugins</groupId> -->
+<!-- <artifactId>maven-javadoc-plugin</artifactId> -->
+<!-- <version>2.7</version> -->
+<!-- <inherited>false</inherited> -->
+<!-- <configuration> -->
+<!-- <aggregate>true</aggregate> -->
+<!-- <encoding>UTF-8</encoding> -->
+<!-- </configuration> -->
+<!-- </plugin> -->
+<!-- <plugin> -->
+<!-- <groupId>org.apache.maven.plugins</groupId> -->
+<!-- <artifactId>maven-jxr-plugin</artifactId> -->
+<!-- <version>2.2</version> -->
+<!-- <configuration> -->
+<!-- <aggregate>true</aggregate> -->
+<!-- </configuration> -->
+<!-- </plugin> -->
+<!-- <plugin> -->
+<!-- <groupId>org.apache.maven.plugins</groupId> -->
+<!-- <artifactId>maven-surefire-report-plugin</artifactId> -->
+<!-- <version>2.7.1</version> -->
+<!-- <inherited>false</inherited> -->
+<!-- <configuration> -->
+<!-- <aggregate>true</aggregate> -->
+<!-- </configuration> -->
+<!-- </plugin> -->
+<!-- <plugin> -->
+<!-- <groupId>org.codehaus.mojo</groupId> -->
+<!-- <artifactId>taglist-maven-plugin</artifactId> -->
+<!-- <version>2.4</version> -->
+<!-- <configuration> -->
+<!-- <aggregate>true</aggregate> -->
+<!-- <tags> -->
+<!-- <tag>TODO</tag> -->
+<!-- <tag>FIXME</tag> -->
+<!-- <tag>@deprecated</tag> -->
+<!-- </tags> -->
+<!-- </configuration> -->
+<!-- </plugin> -->
+<!-- <plugin> -->
+<!-- <groupId>org.apache.maven.plugins</groupId> -->
+<!-- <artifactId>maven-changelog-plugin</artifactId> -->
+<!-- <version>2.2</version> -->
+<!-- <inherited>false</inherited> -->
+<!-- </plugin> -->
+<!-- <plugin> -->
+<!-- <groupId>org.apache.maven.plugins</groupId> -->
+<!-- <artifactId>maven-pmd-plugin</artifactId> -->
+<!-- <version>2.3</version> -->
+<!-- <inherited>false</inherited> -->
+<!-- <configuration> -->
+<!-- <linkXref>true</linkXref> -->
+<!-- <targetJdk>1.5</targetJdk> -->
+<!-- <aggregate>true</aggregate> -->
+<!-- <excludes> -->
+<!-- <exclude>**/springutil/*.java</exclude> -->
+<!-- </excludes> -->
+<!-- </configuration> -->
+<!-- <reportSets> -->
+<!-- <reportSet> -->
+<!-- <reports> -->
+<!-- <report>cpd</report> -->
+<!-- </reports> -->
+<!-- </reportSet> -->
+<!-- </reportSets> -->
+<!-- </plugin> -->
+<!-- </plugins> -->
+<!-- </reporting> -->
<profiles>
<profile>
<id>developer</id>
<type>pom</type>
</dependency>
+ <!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.context</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>org.springframework.security.core</artifactId>
+ </dependency>
<dependency>
<groupId>net.sourceforge.cglib</groupId>
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.ExecutionStep;
import org.argeo.slc.process.RealizedFlow;
+import org.springframework.security.Authentication;
+import org.springframework.security.context.SecurityContextHolder;
/** Thread of a single execution */
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);
+
if (getContextClassLoader() != null) {
if (log.isTraceEnabled())
log.trace("Context class loader set to "
processThread.getProcessThreadGroup().dispatchAddStep(step);
}
+ protected ProcessThreadGroup getProcessThreadGroup() {
+ return processThread.getProcessThreadGroup();
+ }
+
public RealizedFlow getRealizedFlow() {
return realizedFlow;
}
import org.argeo.slc.execution.ExecutionStep;
import org.argeo.slc.process.RealizedFlow;
import org.argeo.slc.process.SlcExecution;
+import org.springframework.security.Authentication;
+import org.springframework.security.context.SecurityContextHolder;
/** Thread of the SLC Process, starting the sub executions. */
@SuppressWarnings("deprecation")
}
public final void run() {
- log.info("\n##\n## SLC Process #" + process.getUuid()
- + " STARTED\n##\n");
+ // authenticate thread
+ 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 by "
+ + authentication.getName() + "\n##\n");
// Start logging
new LoggingThread().start();
import org.argeo.slc.execution.ExecutionStep;
import org.argeo.slc.process.SlcExecution;
import org.argeo.slc.process.SlcExecutionStep;
+import org.springframework.security.Authentication;
+import org.springframework.security.context.SecurityContextHolder;
/** The thread group attached to a given {@link SlcExecution}. */
@SuppressWarnings("deprecation")
public class ProcessThreadGroup extends ThreadGroup {
private final ExecutionModulesManager executionModulesManager;
private final ProcessThread processThread;
-
+ private final Authentication authentication;
private final static Integer STEPS_BUFFER_CAPACITY = 5000;
private BlockingQueue<ExecutionStep> steps = new ArrayBlockingQueue<ExecutionStep>(
+ " thread group");
this.executionModulesManager = executionModulesManager;
this.processThread = processThread;
+ this.authentication = SecurityContextHolder.getContext()
+ .getAuthentication();
+ }
+
+ public Authentication getAuthentication() {
+ return authentication;
}
public void dispatchAddStep(ExecutionStep step) {