Friday, 2021-07-30

opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef namespaces  https://review.opendev.org/c/openstack/glance/+/79870008:20
opendevreviewAbhishek Kekane proposed openstack/glance master: Refactor gateway auth layer for member APIs  https://review.opendev.org/c/openstack/glance/+/80252508:41
opendevreviewAbhishek Kekane proposed openstack/glance master: PoC Move member policy checks to API layer  https://review.opendev.org/c/openstack/glance/+/80299608:41
opendevreviewAbhishek Kekane proposed openstack/glance stable/ussuri: DNM - Add housekeeping module and staging cleaner  https://review.opendev.org/c/openstack/glance/+/78555208:52
opendevreviewAbhishek Kekane proposed openstack/glance stable/ussuri: DNM - Add housekeeping module and staging cleaner  https://review.opendev.org/c/openstack/glance/+/78555209:00
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef namespaces  https://review.opendev.org/c/openstack/glance/+/79870009:02
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef resource-types  https://review.opendev.org/c/openstack/glance/+/79967109:02
opendevreviewAbhishek Kekane proposed openstack/glance stable/ussuri: DNM - Add housekeeping module and staging cleaner  https://review.opendev.org/c/openstack/glance/+/78555209:06
opendevreviewAbhishek Kekane proposed openstack/glance stable/ussuri: DNM - Add housekeeping module and staging cleaner  https://review.opendev.org/c/openstack/glance/+/78555209:07
opendevreviewAbhishek Kekane proposed openstack/glance stable/ussuri: Add housekeeping module and staging cleaner  https://review.opendev.org/c/openstack/glance/+/78555209:15
akekane_croelandt, found out the reason of failure on stable/ussuri patch09:22
akekane_commented on the patch09:22
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef objects  https://review.opendev.org/c/openstack/glance/+/80205411:27
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef properties  https://review.opendev.org/c/openstack/glance/+/80205511:27
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef tags  https://review.opendev.org/c/openstack/glance/+/80205611:27
croelandtabhishekk: I think it was fixed in b220030070adbea0bd253dfa390218d30b04715414:02
abhishekkcroelandt, lookung14:02
croelandtI'll backport it to ussuri14:03
abhishekkcoool14:04
abhishekkkindly comment on the bug as well, https://bugs.launchpad.net/glance/+bug/188582514:05
croelandtyeah I'll mark it as fix released there14:05
abhishekkgreat, thank you14:07
opendevreviewCyril Roelandt proposed openstack/glance stable/ussuri: Make test-setup.sh compatible with mysql8  https://review.opendev.org/c/openstack/glance/+/80304014:08
croelandtabhishekk: thanks for finding the issue :)14:10
abhishekk:D14:11
-opendevstatus- NOTICE: There will be a brief outage of the Gerrit service on review.opendev.org starting at 15:00 UTC today as part of a routine project rename maintenance: http://lists.opendev.org/pipermail/service-announce/2021-July/000023.html14:11
abhishekkdansmith, if you have some time (now or later) could you please verify the new RBAC defaults for members in our spreadsheet (I have tried to go as much as close as possible)14:32
dansmithabhishekk: second tab?14:33
abhishekkyes14:33
dansmithokay14:34
abhishekkthank you14:34
dansmithabhishekk: I'm a bit confused... based on the code, it looks like add_member should be ADMIN_OR_PROJECT_MEMBER, SHARED is checked outside the policy layer and probably should be14:44
abhishekkYeah, so that check is while creating AUTH repo which we are going to remove, right ?14:44
dansmithshared is a glance architectural requirement for an image having members, so it _should_ be enforced in python14:45
dansmithyes, but we'll need to move it somewhere14:45
abhishekkSO are you suggesting to add this check additional API layer 14:45
dansmithif it's in policy, an admin could remove the shared check from the rule and that would break things14:45
dansmithjust check it in the API itself, yeah14:45
abhishekkOk14:46
opendevreviewMerged openstack/glance stable/ussuri: Make test-setup.sh compatible with mysql8  https://review.opendev.org/c/openstack/glance/+/80304014:46
dansmithsame goes for the rest of the delete and modify14:46
abhishekkSo I guess, shared visibility will come out of every rule14:47
dansmithnot sure if yeah14:47
dansmiths/not sure if// :)14:47
abhishekk:D14:47
abhishekkthat is good for add_member and get_members I guess, what about others?14:49
dansmithyep, still looking at those14:50
dansmithabhishekk: currently delete is only admin or owner, *not* project member right?14:52
abhishekkLooking again14:52
dansmithI think if an admin wants to add "shared:visibility and project_id:member" to delete, they should be able to, but not by default based on the current behavior I think14:53
abhishekkits admin or project member14:53
dansmithif (self.image.owner == self.context.owner or self.context.is_admin)14:54
dansmiththis is just owner or admin, no?14:54
abhishekkaah, I thought you are asking current default RBAC 14:54
abhishekkYes, I will remove shared visibility check from all rules and make it separate validation check at API layer14:55
dansmithno, I'm talking about the current regular behavior14:55
dansmithbut the rbac is the same14:56
abhishekkyes, this condition you are pointing is stating this14:56
abhishekkbut in API in delete call when you call get member it calls additional nested check14:57
abhishekkwhich I marked in red14:57
dansmiththat's not used for remove, AFAICT14:58
dansmithit is for get and list (which makes no sense?)14:58
abhishekk:D14:58
dansmithright?14:58
abhishekkhttps://github.com/openstack/glance/blob/master/glance/api/v2/image_members.py#L7914:58
abhishekkThis _lookup_member is called from each API except add and get14:59
dansmithbut then the actual remove won't let that happen will it?14:59
abhishekkSo Based on the mutability check it adds different object to onion layer14:59
dansmithyou won't get past here when the repo.remove is called: https://github.com/openstack/glance/blob/master/glance/api/authorization.py#L16214:59
dansmithWAT15:00
-opendevstatus- NOTICE: There will be a brief outage of the Gerrit service on review.opendev.org in the next few minutes as part of a routine project rename maintenance: http://lists.opendev.org/pipermail/service-announce/2021-July/000023.html15:00
abhishekkThis object, ImmutableMemberProxy15:01
dansmithright, so if we're a member, we won't get immutablememberproxy, right? and then we'll go on to call remove on ImageMemberProxy, and then fail the check I linked above right?15:01
abhishekkyes15:03
abhishekkYou can add comments there15:05
abhishekkSo image owner means any user from my project can initiate delete call, right? 15:06
dansmithI guess, because owner is project15:07
dansmithbut not any *member* as defined by the shared member list15:07
abhishekkright15:09
dansmithhmm, can I not "suggest" edits on a sheet?15:11
abhishekkI think you can15:13
dansmithI don't see how15:13
dansmithso I think the current rbac rules for add_member and delete_member are correct15:14
dansmithget_member and get_members should probably be ADMIN_OR_PROJECT_MEMBER_OR_SHARED_MEMBER15:15
dansmithwhere SHARED_MEMBER is %(project_id)s:member15:15
abhishekkack15:16
dansmithactually reader I guess, so:15:16
dansmith"role:admin or (role:reader and project_id:%(project_id)s) or member:%(project_id)s"15:17
dansmithif you're a reader on the project that owns the image, then cool15:17
dansmithif admin, cool15:17
dansmithif shared with you as a member, then cool15:17
dansmithelse, not cool15:17
abhishekkcool :D15:17
dansmith:P15:17
dansmithso if I share an image with you, you can modify the member list?15:19
dansmithI'm not sure I understand this:15:20
dansmithself.context.owner == image_member.member_id15:20
dansmithmaybe members can modify their own memberness? not sure what they can change, but maybe that makes sense15:21
dansmiththey can just change the status of the share I guess?15:22
abhishekkyes15:22
abhishekkaccept or reject15:22
dansmithokay15:22
abhishekkI think I will be ready with patch by Monday eod for review15:23
dansmithokay, but it would be good if we could merge some too :)15:23
dansmithmaybe croelandt is too caught up in celebrating france beating us in basketball...15:24
abhishekkhe has to look at some down stream work as well15:24
dansmith*gasp*15:25
abhishekkOnce lance is back things will start picking up speed15:25
abhishekkI think we need to follow distributed policy15:25
abhishekkI need to take close look at yours and you should be at mine, then those will be ready for others to have a look15:26
dansmithI think I'm +2 on the bottom few of your set15:27
abhishekkdansmith, on delete policy I am doubtful, I think I saw some functional test scenario where image member (with whom ) image is shared is deleting the image 15:29
dansmithdeleting the image itself?15:29
abhishekkno member ship15:29
abhishekkdelete-member 15:29
dansmithokay I don't see how that could work based on the code15:30
abhishekkNah, # Image Member Cannot delete Image membership (this is the scenario, which means he is not)15:32
dansmithmeaning the test you were thinking about is  asserting that the member can *not* delete their own membership?15:32
abhishekkyeah15:32
dansmithcool15:32
abhishekktest_image_member_lifecycle15:33
abhishekkit has around 25+ scenarios covered :D15:34
abhishekkSo just couple of minutes more15:34
abhishekkI think on testing part15:34
abhishekkwe have job to check existing is working15:35
abhishekkWe added job to cover it is working with RBAC enabled as well15:35
abhishekkAND we are adding new tests to cover policy enforcement at API layer15:36
abhishekkI think it is enough to ensure that we are going in right direction15:36
dansmithcool15:37
abhishekkgreat15:40
abhishekkmodify_member new rule is ok ?15:40
dansmithwhat does "not project member" mean?15:42
dansmithpresumably project member (i.e. owner) can modify membership right?15:42
dansmithor .. maybe they use add/delete member and modify is just for the share-ee15:42
dansmith?15:42
abhishekkmeans the project member should not accept the member ship15:42
abhishekks/member ship/membership15:42
abhishekkdansmith, right15:43
dansmithyeah, okay, makes sense15:44
abhishekksomething I got right :D15:44
dansmithcan't you just do ADMIN_OR_SHARED_MEMBER ?15:44
dansmithI mean, if they aren't the member, then image.member==None15:45
dansmithso I think "role:admin or member:%(project_id)s" will do everything you need15:45
abhishekkYeah, I think so as well15:45
abhishekkwill test accordingly15:46
dansmithcool15:46
abhishekkthank you, it took a lot time15:47
dansmithsorry :/15:47
abhishekkno, I was saying thank you for putting your time :D15:48
abhishekkI know you have other priorities as well, so really appreciating your time/efforts here15:49
* abhishekk going for dinner break15:49
dansmithnp, enjoy :)15:50
abhishekk:)15:50
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef namespaces  https://review.opendev.org/c/openstack/glance/+/79870016:59
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef resource-types  https://review.opendev.org/c/openstack/glance/+/79967116:59
*** melwitt is now known as jgwentworth17:55
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef namespaces  https://review.opendev.org/c/openstack/glance/+/79870018:22
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef resource-types  https://review.opendev.org/c/openstack/glance/+/79967118:22
* abhishekk signing out for the day18:45
* abhishekk have a great weekend ahead18:46
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef namespaces  https://review.opendev.org/c/openstack/glance/+/79870018:53
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef resource-types  https://review.opendev.org/c/openstack/glance/+/79967119:10

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!