Soap Shell

Pithy condor_soapshell documentation

If/when this makes it into the manual, this page can go away. Until then, this page documents the condor_soapshell; development of this service is tracked in ticket #662 .

Config file setup

Since it is a regular daemon core daemon, all the config options common to all HTCondor daemons are applicable. In addition, the following parameters can be set:

   SOAPSHELL_AUTHORIZED_COMMANDS = cmdName,cmdPath,defaultArgs,defaultEnvironment,...

So for each command you want users to be able to run, there will be four comma seperated tuples in SOAPSHELL_AUTHROIZED_COMMANDS. Note that spaces are considered part of the values (so paths can have spaces) - only commas delimit between tokens. Here is an example:

   SOAPSHELL_AUTHORIZED_COMMANDS = date,/bin/date,,

The above says the only authorized command is "date", and if a request arrives asking for command "date", then the service will run /bin/date with no default args and no default environment variables.

Here is an example that shows configuring two commands:

   SOAPSHELL_AUTHORIZED_COMMANDS = date,/bin/date,,,ps,/bin/ps,-elf,

The above says there are two authorized commands, "date" as before and "ps". If ps is requested, the service will run /bin/ps with -elf command-line args, and no default environment variables.

The syntax for arguments and environment variables is just like it would appear in a HTCondor submit file.

Using condor_soapshell

You can then run the service as yourself from the command line like:

   ./condor_soapshell -f -t -p 8080

This will run it in the foreground, with the log going to the terminal, and listening for incoming SOAP requests on port 8080.

The methods in the WSDL allow you to send a request class ad either as a ClassAdStruct just like SOAP calls to the schedd or collector, or as a string of newline separated class ad attributes. The request class ad looks like:

Cmd = "cmdName"    (this must be a cmdName listed in SOAPSHELL_AUTHORIZED_COMMANDS)
Arguments = "--whatever"   (this is optional)
Environment = "foo=bar"    (this is optional)
In = "IUAOXIUS="   (base64 encoded data to be used as stdin; this is optional)
INPUT_FILE_NAME_1 = "file-name"
INPUT_FILE_DATA_1 = "ADJALSJJ="
INPUT_FILE_DATA_2 = ....
INPUT_FILE_DATA_2 = ....

You can specify as many input files as you want.

The result class ad returned by the service will contain attributes for EXIT_STATUS, STDOUT and STDERR (base64 encoded), and a REQUEST_ID.

All programs will be run in a temporary subdirectory that will be removed when the program completes.