-
Notifications
You must be signed in to change notification settings - Fork 71
try to constrain rbac based on e2e usage #598
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
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: awgreene The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4e82c3e
to
c4db2c1
Compare
/hold |
c4db2c1
to
add2e28
Compare
- apiGroups: | ||
- example.com | ||
resources: | ||
- tests | ||
verbs: | ||
- "*" | ||
- apiGroups: | ||
- kiali.io | ||
resources: | ||
- kialis | ||
verbs: | ||
- "*" | ||
- apiGroups: | ||
- monitoring.kiali.io | ||
resources: | ||
- monitoringdashboards | ||
verbs: | ||
- "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RBAC proposed in this PR stemmed from a run of audit2RBAC against an e2e test's audit logs, I'm not sure how we use these RBACs.
- apiGroups:
- example.com
resources:
- tests
verbs:
- "*"
- apiGroups:
- kiali.io
resources:
- kialis
verbs:
- "*"
- apiGroups:
- monitoring.kiali.io
resources:
- monitoringdashboards
verbs:
- "*"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How confident can we be here that this audit will have captured all of the permissions we would need? I'm seeing kiali operator stuff in there and wondering if that means we would need to add every resource type from every operator that OLM manages in order to maintain functionality, which would be impractical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure what other operators APIs has to do with this PR. This PR is to restrict the RBAC that is currently used by olm-operator to avoid using wildcards which means it can access a lot of other APIs that it doesn’t need. This only restricts it to a set of APIs that it needs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t know why those Kiali APIs were added in the original version of this PR but they are not needed as far as I know unless all the sudden OLM is using Kiali operator now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this PR should be on upstream as well. We can certainly refine/restrict RBAC on manifests that are used on upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! So I saw a similar issue upstream and it's because of the CR/CRD validation logic that OLM has. As @dinhxuanvu pointed out, we had an upstream PR that was a bit less strict on the RBAC we requested, I primarily was using this PR to test something on an OpenShift cluster.
The upstream PR linked earlier is being downstreamed in #600, so I'm going to close this PR.
verbs: | ||
- "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were options to constrain this further, but I was happy enough with wildcard permissions on what we actively use for now.
Signed-off-by: Alexander Greene <[email protected]>
add2e28
to
da37912
Compare
@awgreene: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
I was using this PR to test some changes to OLM's RBAC, which lead to this upstream PR which is being downstreamed in #600, so I'm going to close this PR. |
No description provided.