All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.objectweb.proactive.extensions.processbuilder.README.html Maven / Gradle / Ivy

Go to download

ProActive Programming is a Java API that provides a powerful framework to easily develop parallel and distributed applications

The newest version!

	
		OSProcessBuilder - Quickstart for Developers
		
	
   
   	

OSProcessBuilder - Quickstart for Developers

This document serves as a crash-course on the basics of the process builder. For further information please refer to:

  • the JavaDoc - on Java classes and the Script-to-Java API
  • the CONTENTS.txt in the scripts folder - about files needed on the script side
  • the build.xml - for other building-related details

1. Building

To build the OSProcessBuilder, you can use the build mechanism of ProActvie, as it is fully compilant with it (extension targets). The main side-effect of building is that the script files will be copied into the proactive.home/dist/scripts/processbuilder/ folder. However, not all files which can be seen in the scripts folder among the sources will be copied (please refer to scripts/[os_name]/CONTENTS.txt for more information).

Windows particularities

  • Among the scripts there is a file PipeBridge.cpp which has to be compiled. The compilation has to work with a VisualStudio 20xx as there are no extra dependencies. Just create a project and copy this file as main source.
  • For correct functioning you will need PsExec.exe in the scripts folder (http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx)

Linux particularities
The executable suer32, respectively suer64 are obtained from suer.c. The compilation is done inside the build scripts with gcc. However, if you plan to export a PA distribution, make sure you have both 32 and 64 bit version of the gcc libraries on your machine, as it will try to compile in both modes.

2. Testing

The test files for the OSProcessBuilder can be found in the proactive/src/Tests/functionalTests/processbuilder folder. To run them you will most probably have to set three environment variables:

  • OSPB_TEST_USER - username of the user used for testing
  • OSPB_TEST_PASS - password of the user used for testing
  • OSPB_TEST_TEMP - folder visible (and writable) by both the user currently executing the tests, and the one that is specified by the above two variables

3. Setting up machines to be used with the lib

All OSes
Make sure that the proactive.home/dist/scripts/processbuilder folder is readable (and contents are executable) by all users that can be used as targets for launching.

Windows

  • No password - for this to work, the target user's password has to be saved already in the windows keystore. This can be done by running runas /user:TARGET_USER /savecred cmd.exe. It will prompt for the password for the first time, but any subsequent run will use the saved password.
    Make sure that the launching user has write rights to the scripts folder (see section 4).
  • With password - no special setup needed (just be sure the PsExec.exe is either in the scripts folder, or on the PATH).

Linux

  • No password (SUDO) - the sudoers file has to contain the rights for the given user-change.
  • With password (SU) - no special setup needed (just be sure the suer32/suer64 is in the scripts folder).
  • With private key (SSH) - no special setup is needed - however, see Security Threats below.

4. Security Threats and Other Issues

Windows
The main security issue is that since runas will not propagate the environent correctly (fully) we use a hack. This hack is writing the contents of the environment to a temp folder. At the moment, this folder is the scripts folder! Do not put sensitive information into the environment as it may be read by anyone.

Linux (general)
Since we use scripts to start the executable in case there is a target user, be aware that all paramters are visible to all users! Do not leave sensitive information in the arguments for the command. Use the environment instead - also, read below.

Linux (the SSH option)
The main security issue is that since ssh will not propagate the environent at all, we use the same hack as in windows. We write the contents of the environment to the temp folder (this is done in the scripts, and we create this file with mktemp). Do not put sensitive information into the environment as it may be read by anyone.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy