stackabletech / stackabletech/opa-operator

The opa-bundle-builder-clusterrole is never bound

Open
#823 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/bug
Dominant language
Rust
Stars
21
Forks
5
Avg merge
12h 44m
Merged PRs (30d)
11

Description

Affected Stackable version

Any (at least up until and including SDP 26.3)

Affected OpenPolicyAgent version

N/A

Current and expected behavior

Currently, the bundle-builder uses the operator service account, and therefore inherits operator permissions.

It should use it's own service account and be bound to the ClusterRole defined in deploy/helm/opa-operator/templates/clusterrole-opa-builder.yaml so it has only the necessary permissions to perform its function.

Possible solution
  1. Drop the unused ClusterRole
  2. Adjust the operator code so that the bundle-builder ClusterRole is used.

Option 2 is probably better, because it at least shows what is needed by the bundle-builder - and allows for architectural changes (like the bundle builder running outside of the OPA cluster pod if that was ever a possibility).

In either case, the comments in https://github.com/stackabletech/opa-operator/pull/820/changes/5dc06dbca2365f9c2957f74318d8f722e972e0d2 will need to be updated.

Additional context

Originally found here: https://github.com/stackabletech/opa-operator/pull/820#discussion_r3062985546

Environment

No response

Would you like to work on fixing this bug?

maybe

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with deploy/helm/opa-operator/templates/clusterrole-opa-builder.yaml, then trace the bundle-builder service account setup in the operator code. Confirm that the builder uses its own service account and that this ClusterRole is bound, and update the related comments from pull request #820. Done means the builder no longer inherits the operator service account's permissions.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes, rust
Domain
authorization, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.