Bug 1292321 - Group and user binding relationship is not clear by "describe" or "get" even though group role is shared with user
Group and user binding relationship is not clear by "describe" or "get" even ...
Status: NEW
Product: OpenShift Origin
Classification: Red Hat
Component: Auth (Show other bugs)
3.x
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: David Eads
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-16 22:25 EST by XiaochuanWang
Modified: 2016-10-30 18:56 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description XiaochuanWang 2015-12-16 22:25:30 EST
Description of problem:
After "oadm groups add-users", group can't be described for the added user, also missing from "edit user"
After "edit group" to add user, group can't be described for the added user, also missing from "edit user"
After "edit user" to add group, user can't be described for the added group, also missing from "edit group"

Version-Release number of selected component (if applicable):
oadm v1.1-477-g0d4de0b
oc v1.1-477-g0d4de0b
kubernetes v1.1.0-origin-1107-g4c8e6f4

How reproducible:
Always

Steps to Reproduce:
1. After "oadm groups add-users", group can't be described for the added user, also missing from "edit user"
1) oadm groups new group1
2) oadm groups add-users group1 user1
3) oc describe/edit user user1

2. After "edit group" to add user, group can't be described for the added user, also missing from "edit user"
1)oadm groups new group2
2)oc edit group group2 (append "- user2" to "users:")
3)oc describe/edit user user2

3. After "edit user" to add group, user can't be described for the added group, also missing from "edit group"
1) oadm groups new group3
2) oc edit user user3 (append "- group3" to "groups:")
3) oc describe/edit group group3

Actual results:
1.3) user1 doesn't have group1 described, also missing from "edit user"
groups: null
2.3) user2 doesn't have group2 described, also missing from "edit user"
groups: null
3.3) group3 doesn't have user3 described, also missing from "edit group"
users: null


Expected results:
1.3) user1 should have group1 described
2.3) user2 should have group2 described
3.3) group3 should have user3 described

Additional info:
1.3) Role for group1 can share with user1
2.3) Role for group2 can share with user2
Comment 1 David Eads 2015-12-17 16:01:08 EST
The `Groups` field on a `User` is not virtualized.  They are two different ways of representing the group, that means that `edit` on the resources can't behave the way you've described.

I don't think we have non-congruent groups between update and get, so I probably wouldn't change the get behavior to collapse them either.

I see a couple options:
 1. Sub-resource on a user to get its groups.  This seems pretty reasonable.
 1. Status.Groups on a User that indicates its current group affiliations as known by the server.

I think both are reasonable.

Jordan, Clayton opinions?
Comment 2 Jordan Liggitt 2015-12-21 09:35:27 EST
Agree... `groups` field on user != all group memberships. Need to document that (and maybe mark groups field as deprecated?).

I think I'd lean toward the subresource to keep the user call cheap and small, but I need to think about that a little more
Comment 3 David Eads 2015-12-21 09:46:22 EST
The API is functioning as expected.  Its a little difficult to follow as a user, but no data is being lost and the rolebindings are operating as expected.

XiaochuanWang: If you agree, can you reduce severity to "low"?
Comment 4 XiaochuanWang 2015-12-23 01:16:29 EST
severity is down to "low"

Note You need to log in before you can comment on or make changes to this bug.