oxidecomputer / oxidecomputer/omicron
Rethink authz around retrieving IP pools
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
Prior to #3985, there was a single fleet-level default IP pool named "default", and any authenticated user can CreateChild on a given IP pool:
So when we looked up the default pool, we could rely cleanly on something like this to enforce permissions.
LookupPath::new(opctx, &self)
.ip_pool_name("default")
.fetch_for(authz::Action::CreateChild)
In #3985, there can be multiple default pools at different scopes (fleet, silo, or project), so figuring the default is more of a listing operation, which means we don't have a single pool up front to do an auth check on. One option is to do the query and then run the auth check on the resulting pool. But we will also want to do things like list available pools at a given scope in order to allow users to choose one at instance create time in the CLI or console. So I think this might call for a rework of the permission model around IP pools.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the permission rules in nexus/db-queries/src/authz/omicron.polar around lines 387-390 and trace the LookupPath::ip_pool_name("default") call described in the issue. Compare this with the scoped default pools introduced by #3985 and the planned CLI or console listing flow. Done means the permission model clearly supports retrieving and listing eligible IP pools at fleet, silo, and project scopes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, authorization
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100