oxidecomputer / oxidecomputer/omicron
PUT resource policy does not validate type or existence of identity IDs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
I've been using the system users from /users to test role assignment on orgs and projects because I can't list silo users yet (#1235). It just occurred to me that I should not be able to assign resource roles to system users! Here is the PUT body:

It seems that as long as I say identity_type: "silo_user", the API does not validate that that is true.
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 in nexus/src/db/datastore.rs around lines 3761-3785 and trace the PUT resource-policy handling. Check how identity_type and identity IDs are validated, then verify the behavior for mismatched system-user types and nonexistent IDs; done means invalid assignments are rejected rather than accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, authorization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100