Repository navigation
Upgrade notes: an explicit "role": "reader" on POST /admin/users now grants read on every repository - #909
Merged
Conversation
…he 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012e6DJbv51Ww65TPMmVAXU7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #755
The 2.2.0 upgrade notes covered only a
POST /admin/usersrequest withoutrole. A script or Terraform module written for 2.1 that creates a service account with an explicit"role": "reader"still succeeds on 2.2, and the account now holds the built-inreaderrole: read on every repository, private ones included.Changes
docs/changes/2.2.0/755.upgrade.md(new): the upgrade note. An explicit"role": "reader"is the built-inreaderrole; scripts creating scoped service accounts send"role": "roles_only"or leaveroleout; 2.1 does not acceptroles_only, so the change goes with the upgrade;PATCH /admin/users/{id}takes norole.docs/deployment.md, Service accounts: the paragraph on the admin API says whatreadergrants and what it meant up to 2.1.A fragment of its own rather than an amendment of
733.upgrade.md:docs/changes/README.mdnames a fragment after the issue the change fixes, so the entry links #755.Checked against the code
v2.1.2,crates/server/src/admin/users.rs):AccessRolewasreader(the default),writer,admin;Readermapped to no built-in role, and the service-account form sentreaderby default.main:AccessRole::Readermaps toauthz_dao::READER_ROLE;roles_onlyis the accepted value for no built-in role, and the default for a service account whenroleis absent.UpdateUser(PATCH /admin/users/{id}) hasactive,descriptionandrealmonly and rejects unknown fields, so the change applies to creating an account alone. Assigning the rolereaderby name throughPUT /admin/users/{id}/rolesis already covered by822.upgrade.md.Not done here
The issue's optional part,
POST /admin/usersrefusingreaderfor a service account for one release without an explicit opt-in, is a behaviour change and is left out of this documentation fix.No web UI change: the admin API is unchanged.
Generated by Claude Code