[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[condor-users] Using Condor from a web application

Title: Using Condor from a web application

Dear all,

run into a major problem here and will really appreciate if can gather some advise.

I am trying to convert an web application written in Perl to off load some of the more CPU instensive to Condor. However, as i am using a Win 2K server with integrated authenication, all users who access the web application will be running the application with their own credentials(eg. employee ID). This is where things get really tricky: with Condor ver 6.6, submitters are required to store their credentials before they can perform Condor_submit. Unfortunately, with so many users having access to the web application, its not practical to pre-store everyone's credentials

I can think of 2 solutions: 1)do a runas when the application perform a condor_submit 2)let user enter their passwords and store it for them when they are accessing the web application for the first time

The challenge now i face is that both runas and condor_store_cred command are both interactive command which users have to enter their password when prompted. I have tried several ways to automated the process:

a)i tried using a VB script (see below for reference) which works well at command prompt when i invoke it using

system('runas1.vbs ID pwd "condor_submit hello.sub"');

however, when i call it from my web application, my web application hang. The system call is not successful

b) i tried to use a 3 party freeware call cpau. Similiarly, running from command prompt is successful but running it from web application generates error.

There seem to be problem of interfacing command prompt programs with perl web environment. Thus, i am wondering if there is a way to automate the entering of password using native perl language?

Also, are there any better suggestions on how can the credential problem be overcome?

Have not really tried automating the process of storing users credentials. Will it be easier to implement or  will most probably encounter similiar problems?

'Syntax: runas.vbs <username> <password> <command>
set args=wscript.arguments
username = args(0)
pass = args(1)
cmd = "cmd"
'Get the command arguments
for i=2 to args.count - 1
command = command & args.item(i) & " "
'Used for testing
'wscript.echo "runas.exe /user:" & username & " """ & command & """"
set shell=wscript.createobject("Wscript.shell")
'Run runas.exe
shell.run "runas.exe /env /user:" & username & " """ & command & """"
'Wait for runas.exe to load, this time could be shorter, but is set to 1000
'to be safe
'Send the password and hit enter
shell.sendkeys pass & "{ENTER}"

Thanks and Best Regards

Raymond Wong
System Engineer
Probe & Engineering Application
Information Systems & Services

DID  : 6360-7358
Pager: 9802-8590
Email: RaymondWong@xxxxxxxxxxxxxxxxxx