docs(spec): presets have no access control of their own

Preset routes need no RBAC permission; a submit made from a preset is
checked like any other submit.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-13 03:33:25 +00:00
parent e48d36054d
commit 7382e94d24
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
2 changed files with 12 additions and 8 deletions

View file

@ -654,8 +654,9 @@ defaults a profile does not (everything but default reservations):
into its own local file, so a server preset being removed never affects
users. `preset diff` / `pull --force` are user-initiated.
- User-to-user sharing by `preset export` / `import` (file, mail, git).
- Presets carry no privilege: `queue:submit` (later `app:use`), the profile's
essentials, queue ceilings and project quotas still apply at submit.
- Presets have no access control of their own (user, 2026-10-12): the
preset routes need no RBAC permission, and a submit made from a preset is
checked like any other submit. Presets carry no privilege.
### Dispatch record
Decided 2026-10-12 (user): what a job was scheduled and started with is

View file

@ -19,10 +19,12 @@ configuration level.
--preset <name>` expands it; any command-line flag replaces the preset's
value for that option as a whole (no resreq parsing). The submit carries
only the expanded values.
- **Handled fully on the client.** Presets never reach the controller, WAL
or scheduler, own no attribute, are not a configuration level and carry
no privilege: `queue:submit` (later `app:use`), the profile's essentials, queue
ceilings and project quotas still apply at submit.
- **Handled fully on the client, with no access control of their own**
(user, 2026-10-12). Presets never reach the controller, WAL or scheduler,
own no attribute, are not a configuration level and carry no privilege.
Nothing checks who may use, pull or share a preset: a submit made from a
preset is an ordinary submit, checked like any other (`queue:submit`, the
profile's essentials, queue ceilings, project quotas).
- **One file per preset** (user, 2026-10-12), the same layout on client
and server:
@ -50,8 +52,9 @@ configuration level.
change them on the fly (`xcecli preset set / edit / show / list / delete`).
- **The server only shares.** The apiserver serves admin-deployed preset
files read-only: `GET /xce/v1/presets` (list, with each preset's content
hash) and `GET /xce/v1/presets/{name}` / `{ns}/{name}` (fetch). Every
authenticated user may see them.
hash) and `GET /xce/v1/presets/{name}` / `{ns}/{name}` (fetch). No RBAC
permission on these routes (no `RequirePermission`): any logged-in user
may list and fetch them, behind the usual middleware chain.
- **Where server presets live** (user, 2026-10-12): a directory beside the
apiserver's other config, `<TopDir>/config/presets/` (as
`config/rbac.yaml` and `config/auth.yaml`, `apiserver/cmd/main.go:144`,