Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(helm): grant permissions to get,list,watch ciskubebenchreports #1013

Merged
merged 1 commit into from
Mar 10, 2022
Merged

fix(helm): grant permissions to get,list,watch ciskubebenchreports #1013

merged 1 commit into from
Mar 10, 2022

Conversation

danielpacak
Copy link
Contributor

Initially, we wanted to implement the least privileged principle
by creating Role or ClusterRole depending on install mode.
For example, we created Role if the target namespace was the same
as the operator namespace. However, this logic was too simple
because we have cluster-scoped CRDs, e.g. CISKubeBenchReport, that
require ClusterRole to grant RBAC permissions.

Resolves: #1001

Signed-off-by: Daniel Pacak pacak.daniel@gmail.com

@danielpacak danielpacak requested a review from chen-keinan March 9, 2022 14:59
@codecov
Copy link

codecov bot commented Mar 9, 2022

Codecov Report

Merging #1013 (7ac4060) into main (baed561) will increase coverage by 0.17%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1013      +/-   ##
==========================================
+ Coverage   57.95%   58.12%   +0.17%     
==========================================
  Files          70       70              
  Lines        9097     9097              
==========================================
+ Hits         5272     5288      +16     
+ Misses       3297     3284      -13     
+ Partials      528      525       -3     
Impacted Files Coverage Δ
pkg/operator/controller/ciskubebenchreport.go 52.58% <0.00%> (+1.59%) ⬆️
pkg/operator/controller/vulnerabilityreport.go 59.14% <0.00%> (+1.82%) ⬆️
pkg/configauditreport/controller.go 64.19% <0.00%> (+1.85%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update baed561...7ac4060. Read the comment docs.

Initially, we wanted to implement the least privileged principle
by creating Role or ClusterRole depending on install mode.
For example, we created Role if the target namespace was the same
as the operator namespace. However, this logic was too simple
because we have cluster-scoped CRDs, e.g. CISKubeBenchReport, that
require ClusterRole to grant RBAC permissions.

Resolves: #1001

Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
@chen-keinan chen-keinan merged commit 91d9278 into aquasecurity:main Mar 10, 2022
@danielpacak danielpacak deleted the fix/helm_rbac_permissions branch March 10, 2022 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants