Who may see, change and run a job#
A job can do what few users may: read and write any folder, connect to other servers, send mail, run commands. So two questions matter for every job: who may touch it, and with whose authority it runs.
With whose authority a job runs#
Every job carries an authority record: as whom it runs, who saved it last, and when. The designer shows it as a badge beside the job's name:
| Badge | The job runs |
|---|---|
| Runs as root | with full authority. It was saved by a full administrator. |
| Runs as and role names | with the rights of those roles and the scopes of the account that saved it. Every task is checked against them when it runs. |
| Runs as legacy admin | as CrushFTP 11 ran it, with the admin flags of whoever saved it |
| No authority record | it was saved before roles existed, or its file was written by hand. See Approvals. |
The rule behind it: authority belongs to the job, not to whoever starts it.
- A user whose upload starts a job gains nothing by it: the job does what was saved, with the authority it was saved with.
- An admin with limited rights cannot make a job do more than they may do themselves: the job they save runs as their roles. A Copy to a folder outside their storage scope is refused, at saving and again when the task runs with its variables filled in.
- An admin cannot change a job that runs with more authority than their own.
- A job follows its roles. When a role is changed, every job that runs as it changes with it; when the role is deleted, those jobs stop running until somebody with the rights saves them again.
The record is signed by the server when the job is saved. A job file that was changed outside the app, or copied in from another server, does not verify: see Approvals.
Rights on jobs#
Rights are given through roles, each for a scope of job folders:
| Right | Allows |
|---|---|
| list, view | seeing that a job exists, and opening it |
| view secrets | seeing stored passwords in it |
| create, edit, delete, rename | |
| schedule | switching a job's schedule on and off |
| run, run with parameters | starting it |
| control | pausing, resuming, stopping and restarting a run |
| history, log | looking at past runs and their logs |
| import | bringing in a job file |
| approve | signing a job that does not verify |
The scope is all, a folder of the job list, or one job: folder:Finance/ gives the rights for the jobs in that folder and below, job:Finance/Month end for that job alone.
Four built-in roles bundle the usual sets:
| Role | For |
|---|---|
| Job Viewer | seeing jobs and their history, with secrets masked |
| Job Operator | running, pausing and cancelling jobs, and reading their logs |
| Job Editor | building jobs from the file-handling and flow tasks, inside a job scope and a storage scope |
| Job Integrator | the tasks that talk to other systems (mail, HTTP, AS2, PGP, tunnels) and the connection profiles they use. Given together with Job Editor. |
See Access Roles and the role editor.
Besides roles, a job's Setup has Allowed usernames ("Users allowed to monitor"): accounts that may watch and run this one job.
Which tasks an admin may use#
Each kind of task is a right of its own. The task picker shows an admin only the kinds their roles allow, and the server refuses a save that holds another kind.
| Tasks | For a role holder |
|---|---|
| Find, Copy, Move, Delete, Rename, MakeDirectory, WriteFile, Zip, Unzip, Compress, Decompress, Preview, FindCache, Exclude, Sort | allowed within the admin's storage scope |
| HTTP, AS2, CMS, Glacier, Tunnel, Email, PopImap, MicrosoftMails, PGP, SQL, JMS, Kafka | allowed where the role grants the task |
| Link | only to jobs within the admin's job scope |
| UsersList | only over users the admin may see |
| UserVariable, Jump, Branch, Wait, Loop, Kill, FileParser | allowed; the rules for variables apply |
| Execute, Java, Custom, RaspberryPi | full administrators only. These run programs as the server itself. No role can grant them, and no token can carry them. |
The same holds for variables and functions that reach into the server: its paths and logs, its status, other users, the creation of users and shares. Each needs the matching right in the job's authority.
Admins from CrushFTP 11#
Accounts with the admin flags of version 11 (job list, job view, job run, job edit and so on) keep working as they did. For them the older rules apply when they save a job:
- Execute, Java, Tunnel, Link, UsersList, Custom, JMS and Kafka tasks are taken out of the job.
- Addresses must be inside the folders the admin may reach.
- Variables that show the server's own paths and logs, and functions that change users, groups or shares, are refused: "Error: Access Denied!" with the task and the field, and "Task item failed due to limited admin violation."
Converting such accounts to roles is described in Roles from CrushFTP 11.
Passwords in jobs#
Passwords in a job's tasks are stored encrypted. An account without the "view secrets" right sees a mask in their place, and saving the mask keeps the stored password. Better still, keep sign-ins out of jobs: a task can name a connection profile, and the password then lives in one place that few may open.
The API and tokens#
The API follows the same rights. A token for a program that only starts jobs needs "run" for the job's folder and nothing else.
Who did what#
Changes to jobs are in each job's change log, and saves, refusals and approvals are in the server's audit log.