Repository navigation
Conversation
datumctl plugins that gate on service activation (compute, and any future plugin adopting the same SDK) list Service objects in the platform-wide catalog before running, to read the live entitlement mode instead of a hard-coded copy. No assignable role granted that read: owner, editor and viewer all inherited services.miloapis.com-entitlement-viewer/-admin (ServiceEntitlement, ServiceConsumer, ServiceAvailability) but never the sibling services.miloapis.com-viewer role that covers the Service resource itself. Every caller that goes through the Role/PolicyBinding system — service accounts in particular — got Forbidden on that lookup, regardless of role. Add services.miloapis.com-viewer next to the existing entitlement-viewer grant. Editor and owner both inherit viewer, so this reaches every assignable organization role from one place, matching how the other per-service viewer roles are wired in this file.
|
|
|
Closing — this doesn't fix the underlying bug. The catalog-read check runs against `iam.miloapis.com/Root:services.miloapis.com/Service`, and that type only accepts direct tuples (`InternalUser`/`InternalUserGroup#member`) — see The real fix already exists as unshipped code: a `ResourceKind` PolicyBinding granting `services.miloapis.com-viewer` to `Group: system:authenticated` (service-catalog's `iam-authenticated-catalog-read` component), plus turning on multi-cluster OpenFGA discovery in production so project-scoped service accounts are recognized as members of that group at all. Tracked in milo-os/service-catalog#101. This PR also grants read on `ServiceConfiguration` (billing/quota/provisioning settings) to every org member, harmless today only because that resource has no parent — worth avoiding regardless. |
Summary
datumctl compute(and any future plugin built on the same service-activationSDK) checks the platform-wide service catalog before every command, to read
the live entitlement mode for its own service. No assignable role granted
that read — owner, editor and viewer all inherited the
services.miloapis.comentitlement/consumer/availability roles, but never the sibling
-viewerrolethat covers the
Serviceresource itself. Every caller that relies on theRole/PolicyBinding system got
Forbiddenon that lookup, independent of whichrole they held, including project
owner.Confirmed live: dumped the
ownerRole'sstatus.effectivePermissionson theplatform and it has zero
services.miloapis.com/services.*entries, while asibling role (
services.miloapis.com-viewer) already ships with exactly thatpermission and was simply never wired into
viewer.Change
Add
services.miloapis.com-viewernext to the existingservices.miloapis.com-entitlement-viewergrant in theviewerrole.editorand
ownerboth inheritviewer, so this reaches every assignableorganization role from one place.
Test plan
kustomize build config/assignable-organization-rolesrenders cleanly(verified locally)
owner'sstatus.effectivePermissionsincludesservices.miloapis.com/services.listownerPolicyBindingcan rundatumctl compute services list(or any gated compute command) withouta
Forbiddenonservices.services.miloapis.comserviceentitlements,serviceconsumers,serviceavailabilities)Note: merging ships to staging only per this repo's deploy flow — reaching
production needs a release tag afterward.