Skip to content

feat: add organization-scoped IAM roles#532

Merged
scotwells merged 1 commit intomainfrom
feat/iam-organization-roles
Mar 23, 2026
Merged

feat: add organization-scoped IAM roles#532
scotwells merged 1 commit intomainfrom
feat/iam-organization-roles

Conversation

@scotwells
Copy link
Copy Markdown
Contributor

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

The existing iam-admin role includes permissions for platform-level
resources (protectedresources, users, roles) that are not scoped to
organizations. The new iam-organization-{viewer,editor,admin} roles
provide org-scoped IAM management covering only resources that have
Organization as a parent: groups, groupmemberships, userinvitations,
and policybindings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@joggrbot
Copy link
Copy Markdown
Contributor

joggrbot bot commented Mar 20, 2026

📝 Documentation Analysis

All docs are up to date! 🎉


✅ Latest commit analyzed: fcbd9dd | Powered by Joggr

@scotwells
Copy link
Copy Markdown
Contributor Author

Tracking issue: datum-cloud/auth-provider-openfga#80

@scotwells scotwells requested a review from kevwilliams March 23, 2026 18:43
@scotwells scotwells merged commit 92c444f into main Mar 23, 2026
6 of 7 checks passed
@scotwells scotwells deleted the feat/iam-organization-roles branch March 23, 2026 18:44
scotwells added a commit to datum-cloud/datum that referenced this pull request Mar 23, 2026
## Summary

The `owner` role previously inherited `iam-admin`, which includes
permissions for platform-level resources (`protectedresources`, `users`)
that have no Organization parent. Granting those permissions at the
organization level gives access broader than intended.

This PR switches to `iam-organization-admin` (introduced in
datum-cloud/milo#532), which covers only IAM resources that are scoped
to an organization:
- `groups` and `groupmemberships`
- `userinvitations`
- `policybindings`

The platform-level IAM permissions (`users.*`, `protectedresources.*`,
`roles.*`) are no longer granted through the owner role.

## Dependency

Requires datum-cloud/milo#532 to be merged and deployed so that the
`iam-organization-admin` role exists in `milo-system`.

## Test plan

- [ ] Verify the owner role can still manage groups, policybindings, and
userinvitations within an organization
- [ ] Verify the owner role no longer grants access to platform-level
IAM resources (protectedresources, users)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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