From 9db2e5f2c3ee26948587afd5011677c83f1828df Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 16:05:55 +0000 Subject: [PATCH] Upgrade notes: an explicit "role": "reader" on POST /admin/users is the built-in reader role (#755) In 2.1 `reader` meant no built-in role, and scripts creating scoped service accounts sent it. Say so in the 2.2.0 upgrade notes and in the service-account section of the deployment guide, and name `roles_only` as the value to send. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_012e6DJbv51Ww65TPMmVAXU7 --- docs/changes/2.2.0/755.upgrade.md | 12 ++++++++++++ docs/deployment.md | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 docs/changes/2.2.0/755.upgrade.md diff --git a/docs/changes/2.2.0/755.upgrade.md b/docs/changes/2.2.0/755.upgrade.md new file mode 100644 index 00000000..8a3acecc --- /dev/null +++ b/docs/changes/2.2.0/755.upgrade.md @@ -0,0 +1,12 @@ +`POST /admin/users` with an explicit `"role": "reader"` now gives the new +account the built-in `reader` role, read on every repository, private ones +included. In 2.1 `reader` meant no built-in role, and the service-account +form and API examples sent it: a provisioning script or Terraform module +written for 2.1 that creates a service account with `"kind": "service"` and +`"role": "reader"` succeeds as before, and the account now reads every +repository instead of only what its own roles grant. The service accounts +that exist at the upgrade are not widened, only the ones created after it. +Change such requests to send `"role": "roles_only"`, or to leave `role` out, +which means the same for a service account. Make the change together with +the upgrade: 2.1 does not accept `roles_only`. `PATCH /admin/users/{id}` +takes no `role`, so it is not affected. diff --git a/docs/deployment.md b/docs/deployment.md index 9a103659..829088d4 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -536,7 +536,10 @@ balancer name it for the network's clients (see the examples under The admin API is the users API: `POST /admin/users` with `"kind": "service"`, the `username`, an optional `description` and `role` (`roles_only`, the default, `reader` or `writer`), and the optional `realm` -(the name of a trusted-header realm). +(the name of a trusted-header realm). `reader` is the built-in `reader` +role, read on every repository, private ones included: up to 2.1 it meant no +built-in role, so a script written for 2.1 that creates a scoped service +account sends `roles_only` instead, or no `role`. `GET /admin/users?kind=service` lists the service accounts; every user view carries `kind`, `description`, `realm` and `last_used_at`. `PATCH /admin/users/{id}` sets a service account's `description` and `realm`