parseProxy() ) Logger::Fatal("Provided proxy certificate is invalid."); if ( ! isset($_POST['request']) ) Logger::Fatal("There is no request for MDS core found."); if ( ! $reqproxy->isVOMSAC() ) Logger::Fatal("Proxy certficates without VOMS extension is not supported."); // create User object in accordance to proxy certificate Logger::Debug("Proxy certificate successfully checked. Obtaining owner's info."); $mds_user = new User($reqproxy); Logger::Info("User %s successfully authenticated.", $mds_user->getName()); // database proxy store/update procedure Logger::Debug("Updating user proxy certificate stored in database."); $mds_user->updateDBProxy(); // // Process requests // switch ($_POST['request']) { case "getuuid": echo 'MDS_UUID=' . DB::QueryResultValue('SELECT UUID()') . PHP_EOL; break; case "addjob": if (! isset($_POST['uuid'])) Logger::Fatal("There is no job UUID in the request"); if (! isset($_FILES['params'])) Logger::Fatal("Missing required params file"); if (! isset($_FILES['jobidf'])) Logger::Fatal("Missing required grid job ID file"); // construct new job $job = new Job($_POST['uuid']); $job->fromREQ( ispost('jobname'), ispost('walltime',3600), ispost('cpus',1), ispost('software',MDS_DEF_SOFT), ispost('infrastructure',MDS_DEF_INFR), $mds_user, $_FILES['params']['tmp_name'], $_FILES['jobidf']['tmp_name'] ); $r = $job->saveNewDBJob(); if ($r) echo 'STATUS=OK' . PHP_EOL; break; case "statusupdate": if (! isset($_POST['uuid'])) Logger::Fatal("There is no job UUID in the request"); $job = new Job($_POST['uuid']); $job->updateJobStatus( ispost('status',255), ispost('details') ); break; } } else Logger::Fatal("Proxy certificate is missing but required for authentication."); ?>