Skip to content

docs: spell out the minimum RBAC permissions a mirrord for Teams user needs - #324

Open
aris-cub wants to merge 3 commits into
mainfrom
docs/rbac-minimal-permissions
Open

aris-cub wants to merge 3 commits into
mainfrom
docs/rbac-minimal-permissions

Conversation

@aris-cub

Copy link
Copy Markdown
Contributor

What

Expands the "How do I configure Role Based Access Control" section of the security doc to answer the question a prospect's security team actually asks: what is the exact minimum set of permissions a developer needs to run mirrord?

The section previously named four Operator API resources and pointed at the Helm chart template, which is hard to read (feature conditionals, split across helpers). During a recent POC evaluation the customer said they found this page but still couldn't work out the exact permissions required (context: PRD-151).

Changes

  • Frames RBAC as the two things a user needs: Operator API access + native get on the target workload (impersonation check).
  • New subsection "What are the minimum permissions a user needs?" with the explicit rule sets, split into cluster-scoped vs. namespace-scopeable, each rule annotated as required / optional / feature-specific — so security teams can build their own trimmed role.
  • Documents the native Kubernetes permission checked per target type (get on the workload, get on the namespace for targetless, list pods for label selectors), verified against the operator's SubjectAccessReview logic.
  • Points at kubectl get clusterrole mirrord-operator-user -o yaml as the authoritative per-installation reference, since the chart templates rules per enabled feature.
  • Notes explicitly that no write permissions on cluster workloads are needed.

Rule sets were taken from the current chart templates (mirrord-operator.rules / mirrord-operator.clusterRules in _helpers.tpl) and the operator's target access-review code.

🤖 Generated with Claude Code

… needs

The RBAC section named the Operator API resources but never showed the
exact minimal rule set, so security teams evaluating mirrord couldn't
tell what the actual floor is. Enumerate the cluster-scoped and
namespace-scopeable rules with per-capability annotations, the rendered
role as the authoritative per-installation reference, and the native
Kubernetes permissions checked on the target via impersonation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR expands the mirrord for Teams security documentation with concrete minimum RBAC guidance.

  • Separates cluster-scoped Operator API permissions from namespace-scopeable permissions.
  • Documents feature-specific permissions and the rendered ClusterRole as the installation-specific reference.
  • Explains the native Kubernetes permissions checked for workload, targetless, and label-selector targets.
  • Clarifies that developers do not need write access to Kubernetes workloads.

Important Files Changed

Filename Overview
docs/managing-mirrord/security.md Adds detailed RBAC rule examples and target authorization guidance consistent with the current Operator chart templates and access-review behavior.

Reviews (1): Last reviewed commit: "docs: spell out the minimum RBAC permiss..." | Re-trigger Greptile

Three of the annotations on the minimum rule sets would mislead a
security team trimming their own role:

- `copytargets` was marked optional, but Job and CronJob targets
  auto-enable copy target, so dropping it breaks those targets.
- The `sessions` verbs were described as stopping the caller's own
  sessions. They are not scoped to the caller.
- The feature-gated rules were sketched with an example rather than
  enumerated, so a hand-built role comes out short.

Also state that queue splitting adds nothing to the user roles, which
is the question enterprise reviewers actually ask, and spell out what
the roles deliberately do not carry.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
The prose list packed apiGroup, resource, and verbs into one sentence
per feature, which is the part a security team transcribes into a role.

🤖 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