Commit 92c444f
authored
feat: add organization-scoped IAM roles (#532)
## Summary
The platform `iam-admin` role includes permissions for platform-level
resources — `protectedresources` and `users` — that have no Organization
parent and don't belong in the Organization resource hierarchy. When
this role is granted at the organization level it gives access to
platform-wide resources, which is broader than intended.
This PR introduces three new roles scoped strictly to resources that
have `Organization` as a parent:
- **`iam-organization-viewer`**: Read access to `groups`,
`groupmemberships`, `userinvitations`, and `policybindings`
- **`iam-organization-editor`**: Inherits viewer; adds
create/update/patch/delete on the same resources
- **`iam-organization-admin`**: Inherits editor; acts as the org-level
IAM admin role
These roles intentionally exclude:
- `iam.miloapis.com/users.*` — platform resource (no org parent)
- `iam.miloapis.com/protectedresources.*` — platform resource (no org
parent)
- `iam.miloapis.com/roles.*` — scoped to `Service`, not `Organization`
## Test plan
- [ ] Apply the new Role manifests to a dev cluster and verify they are
accepted
- [ ] Assign `iam-organization-admin` to a user on an organization and
confirm they can manage groups/policybindings but cannot access
platform-level IAM resources
- [ ] Confirm `iam-organization-viewer` grants read-only access as
expected
🤖 Generated with [Claude Code](https://claude.com/claude-code)4 files changed
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
0 commit comments