feat: add Milo IAM ProtectedResources and Roles#12
Merged
Conversation
Add an `iam` component that registers Vendor and Subprocessor with the
Milo IAM authorizer and ships compliance-admin / compliance-viewer
Roles, matching the fraud and telemetry service patterns.
Without these resources every request against
`compliance.miloapis.com/v1alpha1` is denied because the API group is
unknown to the authorizer; deploying just the controller and CRDs is
not enough for staff or organization users to interact with the
service.
Key changes:
- config/components/iam/protected-resources/{vendor,subprocessor}.yaml
declare each kind with its plural/singular and the standard
list/get/create/update/delete/patch/watch permission set.
- config/components/iam/roles/compliance-viewer.yaml grants list, get,
and watch on vendors and subprocessors.
- config/components/iam/roles/compliance-admin.yaml inherits the viewer
role and adds create, update, delete, and patch.
- config/components/iam/kustomization.yaml exposes the resources as a
kustomize Component so consumers can include them alongside `base`.
Granting access to the staff group (or any org-scoped role) is still
applied separately through a PolicyBinding referencing
compliance.miloapis.com-admin or -viewer.
scotwells
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
config/components/iam/with Milo IAMProtectedResources forVendorandSubprocessorandRolescompliance.miloapis.com-admin/compliance.miloapis.com-viewer, mirroring the fraud and telemetry service patterns.compliance.miloapis.com/v1alpha1because the API group is unknown to it. The infra-side change to load this component is in a companiondatum-cloud/infraPR.PolicyBindingto one of the new Roles.Test plan
kustomize build config/components/iamproduces the four expected resources.infraPR rolls out,kubectl get protectedresources.iam.miloapis.com compliance.miloapis.com-vendor compliance.miloapis.com-subprocessorresolve inmilo-system.kubectl get roles.iam.miloapis.com compliance.miloapis.com-admin compliance.miloapis.com-viewerresolve inmilo-system.PolicyBindinggrantingcompliance.miloapis.com-adminto the staff group, the staff portal can list/create vendors against the staging Milo API.