Bug 1423215
| Summary: | [RFE] rolebinding selector support | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Takayoshi Kimura <tkimura> |
| Component: | apiserver-auth | Assignee: | Mo <mkhan> |
| Status: | CLOSED ERRATA | QA Contact: | Chuan Yu <chuyu> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.4.0 | CC: | aos-bugs, Dale.Richardson4, jokerman, mfojtik, mkhan, mmccomas, pweil, tdawson |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: A bug existed in how policies are listed internally when used to build role bindings.
Consequence: Filtering of role bindings based on selectors did not work correctly.
Fix: The internal listing of polices was updated to the correct behavior.
Result: Filtering of role bindings based on selectors works as expected now.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-04-12 19:13:16 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Takayoshi Kimura
2017-02-17 03:12:10 UTC
This was fixed last month in https://github.com/openshift/origin/pull/12461 $ oc policy add-role-to-user registry-editor testuser role "registry-editor" added: "testuser" $ oc label rolebinding registry-editor app=foo rolebinding "registry-editor" labeled $ oc get rolebinding registry-editor -o yaml apiVersion: v1 groupNames: null kind: RoleBinding metadata: creationTimestamp: 2017-02-23T03:44:49Z labels: app: foo name: registry-editor namespace: default resourceVersion: "439" selfLink: /oapi/v1/namespaces/default/rolebindings/registry-editor uid: 6d4b53b4-f97a-11e6-abb5-507b9dac97ff roleRef: name: registry-editor subjects: - kind: User name: testuser userNames: - testuser $ oc get rolebinding -l app=foo NAME ROLE USERS GROUPS SERVICE ACCOUNTS SUBJECTS registry-editor /registry-editor testuser $ oc delete rolebinding -l app=foo rolebinding "registry-editor" deleted $ oc get rolebinding -l app=foo No resources found. Good to hear it's fixed. This is product ticket, so I think just closing it is not the right process. We need a resolution for OpenShift 3.4, QE, doc, etc. Can we backport this to 3.4 update? As this is not a critical breakage or security issue my current stance is that it does not require back porting and should be moved to ON_QA for 3.5 verification. If a case can be made that this causes critical breakage with no acceptable work around then we can reconsider. Hello, the bug-fix listed at https://github.com/openshift/origin/pull/12461 did not test for the delete use case, and had a comment from a tester that master tree post-merge still still did not support delete. Can you add a test case for delete to confirm the correct behaviour? Thanks, Dale. @Dale I confirmed the delete use case in comment 3 An extra test would not hurt of course. Hi Mo, Thanks for the response - was your test on the code fix branch, or the master branch post-merge? I was a little bit curious given the comment about deletes not working post-merge. Regards, Dale. Definitely a recent version of master. Happy to wait for 3.5 to roll out. Verified with latest 3.5 puddle,
# openshift version
openshift v3.5.0.33
kubernetes v1.5.2+43a9be4
etcd 3.1.0
Here is my step:
$ oc policy add-role-to-user registry-editor testuser
role "registry-editor" added: "testuser"
$ oc label rolebinding registry-editor app=foo
rolebinding "registry-editor" labeled
$ oc get rolebinding registry-editor -o yaml
rolebinding with label app=foo
$ oc get rolebinding -l app=foo
NAME ROLE USERS GROUPS SERVICE ACCOUNTS SUBJECTS
registry-editor /registry-editor testuser
$ oc delete rolebinding -l app=foo
rolebinding "registry-editor" deleted
$ oc get rolebinding -l app=foo
No resources found.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:0884 |