Skip to content

Add compute roles to assignable organization roles#233

Open
scotwells wants to merge 3 commits into
mainfrom
feat/activity-viewer-role
Open

Add compute roles to assignable organization roles#233
scotwells wants to merge 3 commits into
mainfrom
feat/activity-viewer-role

Conversation

@scotwells
Copy link
Copy Markdown
Collaborator

Summary

  • Owner and Editor roles now include compute.datumapis.com-admin
  • Viewer role now includes compute.datumapis.com-viewer

Why

Organization members had no access to compute resources (Workloads, WorkloadDeployments, Instances) through their org-level role. The compute IAM roles are deployed and registered with Milo but were never wired into the assignable organization roles.

Rollout

A staging-only patch in datum-cloud/infra is deploying this ahead of this OCI bundle being published, so the change can be validated in staging before reaching production.

🤖 Generated with Claude Code

Owner and Editor gain compute.datumapis.com-admin; Viewer gains
compute.datumapis.com-viewer, so organization members have access
to compute resources consistent with their role level.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@scotwells scotwells requested a review from a team as a code owner May 20, 2026 17:52
@scotwells scotwells requested a review from aflor024 May 20, 2026 17:52
JoseSzycho
JoseSzycho previously approved these changes May 20, 2026
Grant view access to location resources directly on the viewer
assignable org role rather than through the networking-viewer hierarchy,
since locations are expected to move out of the networking group.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kevwilliams added a commit that referenced this pull request Jun 5, 2026
## Summary

- Owner and Editor roles now include `billing.miloapis.com-admin`
- Viewer role now includes `billing.miloapis.com-viewer`

## Why

Creating a BillingAccount from the cloud portal fails with:

```
User "kwilliams@datum.net" cannot create resource "billingaccounts" in API group
"billing.miloapis.com" in the namespace "organization-personal-org-efb26a2b"
```

Organization members have no access to billing resources through their
org-level role. The billing IAM roles (`billing.miloapis.com-admin` /
`-viewer`) are already deployed and registered with Milo —
`infra/apps/billing-system/base/milo-control-plane.yaml` applies
`billing/config/components/iam` into `milo-system` — but were never
wired into the assignable organization roles.

`billing.miloapis.com-admin` grants
`billingaccounts.{create,update,patch,delete}` + the
`billingaccountbindings` equivalents (and inherits `-viewer`);
`billing.miloapis.com-viewer` grants `{list,get,watch}`.

Exactly mirrors the compute-roles wiring in #233.

## ⚠️ Decision for reviewers: should Editor get billing admin?

This follows #233's precedent (Owner **and** Editor get the resource
admin role). But BillingAccounts tie to payment, so you may prefer
**Owner-only** for `-admin` and give Editor `-viewer`. Easy to change —
drop the editor entry. Flagging because billing is more sensitive than
compute.

## Rollout

Like #233, this config publishes as an OCI bundle consumed by
`datum-cloud/infra`. If you want to validate in staging ahead of the
bundle, a staging-only patch in infra can apply it first.

## Verification after deploy

The original portal action (create BillingAccount as an org owner)
should succeed; the authz denial should disappear.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants