Permission requirement for setDefaultRepository() is too broad
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Guruprasad |
Bug Description
This is a feature request.
The git-ubuntu importer runs as ~git-ubuntu-bot, which is a member of ~git-ubuntu-import, which is the team that owns all repositories imported by git-ubuntu and exists for that purpose. Both ~git-ubuntu-bot and ~git-ubuntu-import have no special privilege at all, which is best for security - especially as they deal with untrusted input.
However, to make imported repositories defaults for their targets, we must call git_repositorie
For now, I'm running a script with my own credentials that bulk examines all ~40k repositories and calls setDefaultRepos
Does launchpad.Edit correspond to being an uploader for a package? Would it be possible to split out this permission so we can grant it more granularly to the bot, so that it can set the default targets to its imported repositories without making it an uploader for all packages?
Related branches
- Andreas Hasenack: Approve
- Server Team CI bot: Approve (continuous-integration)
- Canonical Server Reporter: Pending requested
-
Diff: 200 lines (+54/-2)2 files modifiedgitubuntu/importer.py (+22/-1)
gitubuntu/importer_service_worker.py (+32/-1)
- Guruprasad: Approve
-
Diff: 20 lines (+14/-0)1 file modifieddatabase/schema/patch-2211-17-0.sql (+14/-0)
- William Grant: Approve (db)
- Colin Watson (community): Approve (db)
-
Diff: 20 lines (+14/-0)1 file modifieddatabase/schema/patch-2211-17-0.sql (+14/-0)
Changed in launchpad: | |
status: | New → Incomplete |
summary: |
- Permission requirement for setDefautRepository() is too broad + Permission requirement for setDefaultRepository() is too broad |
Changed in launchpad: | |
status: | In Progress → Fix Committed |
Is this the relevant check?
https:/ /git.launchpad. net/launchpad/ tree/lib/ lp/code/ model/gitreposi tory.py# n2353