Allow to add new tasks to already running pilots
It would be helpful to add a new task to already running pilots so that new work can be executed without having to restart pilots from scratch.
This can be done with a new command addTaskToPilots
, where the user passes a valid task-token pair to the server and the server will add the new task to the list of valid tasks for each of the user pilots.
n.b.: This, however, poses several security problems. A malicious user could launch an inactive pilot with a temporary task-token pair generated ad-hoc but specifying the username of a target user so that when the target user adds a new task the malicious pilot could start running its jobs, giving access to stdout/err to the malicious user. This is why this Issue depends on #4: the addTaskToPilots
command should be performed only by authenticated users, and the user-to-pilots mapping is done internally by the server so that only authenticated pilots will get the new jobs.