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`