Monday, 2021-08-02

opendevreviewMridula Joshi proposed openstack/python-glanceclient master: Add member-get command  https://review.opendev.org/c/openstack/python-glanceclient/+/80289004:48
opendevreviewMerged openstack/glance stable/ussuri: Add housekeeping module and staging cleaner  https://review.opendev.org/c/openstack/glance/+/78555205:44
prometheanfirehttps://review.opendev.org/803113 shows that glance has some issues with the newer networkx release05:45
opendevreviewAbhishek Kekane proposed openstack/glance master: Refactor gateway auth layer for metadef APIs  https://review.opendev.org/c/openstack/glance/+/79963208:46
opendevreviewAbhishek Kekane proposed openstack/glance master: Move metadef namepsace policy checks in the API  https://review.opendev.org/c/openstack/glance/+/79963308:46
opendevreviewAbhishek Kekane proposed openstack/glance master: Move metadef object policy checks in the API  https://review.opendev.org/c/openstack/glance/+/79963408:46
opendevreviewAbhishek Kekane proposed openstack/glance master: Move metadef resource type association policy checks in the API  https://review.opendev.org/c/openstack/glance/+/79963708:46
opendevreviewAbhishek Kekane proposed openstack/glance master: Move metadef property policy checks in the API  https://review.opendev.org/c/openstack/glance/+/79963508:46
opendevreviewAbhishek Kekane proposed openstack/glance master: Move metadef tag policy checks in the API  https://review.opendev.org/c/openstack/glance/+/79963608:46
opendevreviewMridula Joshi proposed openstack/python-glanceclient master: Add member-get command  https://review.opendev.org/c/openstack/python-glanceclient/+/80289009:12
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef namespaces  https://review.opendev.org/c/openstack/glance/+/79870011:31
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef resource-types  https://review.opendev.org/c/openstack/glance/+/79967111:31
opendevreviewMerged openstack/python-glanceclient master: Add member-get command  https://review.opendev.org/c/openstack/python-glanceclient/+/80289012:40
*** abhishekk is now known as akekane|home13:40
akekane|homeI don't see lance is back yet13:42
dansmithakekane|home: I think he's back, probably working out the irc change13:52
dansmithI'm guessing he probably can't be consulting on everyone's patches in the first few hours of his return :P13:52
akekane|homedansmith, ack :D13:52
dansmithakekane|home: I think I'm probably getting confused on this metadef stuff15:12
dansmiththere are so many objects, relationships and patches that I'm losing track of what we're trying to do here15:13
dansmithmy latest comments on your metadef objects patch might be exposing that confusion,15:13
akekane|homedansmith, world of metadefs15:13
akekane|homelooking15:13
dansmithbut in there it seems like you're checking one type of rule against a different type of thing (i.e. objects vs. namespaces)15:13
dansmithis the point to just replicate the very coarse "admin or not" permissions checks for metadef up in the api layer, or are you actually trying to fix the coarseness itself?15:14
akekane|homewhich comment you are talking about?15:16
dansmithakekane|home: well, L129 for instance15:17
akekane|homein the namespace patch15:18
akekane|home?15:18
dansmithhttps://review.opendev.org/c/openstack/glance/+/799634/10/glance/api/v2/metadef_objects.py15:18
dansmithsorry, I said "metadef object patch" but that's probably not very clear, sorry15:18
akekane|homeno problem, I am also in other discussion at that moment15:19
akekane|homeok15:20
akekane|homedansmith, here reason I have avoided policy check again as our database already returns formatted list to us15:21
akekane|homeso if I have added that check then that check will always performed only positive enforcement and not negative one15:22
dansmithright, but the goal is to move those checks to the api right? otherwise what's the point?15:22
akekane|homeOk, lets go line by line15:22
akekane|homeat line no 123 only I will get only those objects which are visible to me15:23
akekane|homeSo the query executed on line 123 will give me those result set15:24
akekane|homedoes this mean we need to change the query as well15:24
dansmithakekane|home: just like L87 here: https://review.opendev.org/c/openstack/glance/+/799633/13/glance/api/v2/metadef_namespaces.py15:25
dansmithbut we're running each through the policy check so that the operator can write policy checks that actually do something right?15:25
akekane|homeack, will do it that way then15:26
akekane|homeregarding your update and delete comment15:26
dansmithis there a reason not to?15:26
akekane|homeUpdate and delete calls are admin only15:26
dansmithakekane|home: okay that's kinda what I was asking.. the point there is just to decide "can this user update/delete *any* object" and not to make it more flexible15:27
dansmiththe admin could add more roles to the policy rule, but not say "you can update these but not those"15:27
dansmithbecause your comment says the DB layer will decide if you can update something or not, which is not exactly "admin only" so it's a bit confusing15:28
akekane|homeYeah, I will change that comment15:29
dansmithokay15:29
akekane|homeI need to remove that comment from all CUD operations as it makes no sense15:29
akekane|homeRegarding your comment at line #17015:32
akekane|homeNamespace is gatekeeper object15:32
akekane|homeobjects, properties, resource_types, tags etc all associated with namespace only15:33
dansmithokay but does it make sense to have a "can get objects inside a namespace I already have access to" permission?15:34
akekane|homeand each get call checks for namespace is visible or not at db layer15:34
dansmithlike, is there a reason to give someone access to see a namespace but not the things within it, if the things within are not actually restricted or restrictable?15:34
akekane|homeI don't think so15:35
dansmithso I wonder if it just makes sense to deprecate all these checks other than the namespace one(s) and not check them after the refactor?15:35
akekane|homeI am ok for that15:36
akekane|homebut as of now, I have tried to maintain the behavior which is as close to current behavior15:36
akekane|homeand then we can work on deprecating these policies which are actually causing confusion15:37
akekane|homealso if you see auth layer checks you can see those are also based on namespace only 15:40
akekane|homee.g. is_object_mutable call 15:41
dansmithokay I guess I need to go look at those15:41
dansmiththis is just a big mess15:41
akekane|home++15:41
akekane|homeis_meta_resource_type_mutable15:41
akekane|homeis_namespace_property_mutable15:41
akekane|homeis_tag_mutable15:42
dansmithI get the argument for "just replicate what we have, deprecate later,15:42
dansmithbut if it's hard to confirm that we're really replicating what is there today, I'm not sure it's really better/safer15:42
dansmithbut I'll go try to convince myself by looking at the metadef auth layer after my next call15:42
akekane|homeack15:43
akekane|homeI guess this is again has a different reality vs our policy check15:43
* akekane|home will be back from dinner till then15:48
opendevreviewPranali Deore proposed openstack/glance master: Implement project personas for metadef resource-types  https://review.opendev.org/c/openstack/glance/+/79967116:04
akekane|homedansmith, also you can refer 4th sheet from our spread sheet so that you can get some idea related to metadef policies as well16:29
akekane|homelbragstad, welcome back and congratulations16:31
lbragstado/ thanks :) 16:31
akekane|homeSomeday will like to see photo of the little one 16:36
dansmithakekane|home: ugh.. too complicated, but yeah nice job with that at least :)16:38
dansmithlbragstad: o/16:39
dansmithakekane|home: I guess I'm not sure why we're even doing all this for metadef.. meaning, why can't we just refactor to "admin can CRUD, otherwise everyone can read" and kinda deprecate the multi-tenancy part?16:42
dansmithit just seems like a crazy amount of work (as shown by the grid) for something 99.9999% of people will never use with private namespace objects16:43
akekane|homedansmith, so you are saying to get rid of visibility check, right ?16:44
dansmithI dunno what I'm saying, I just want to burn it all down :)16:46
akekane|home:D16:46
dansmithon the "before rbac" side, that's not really the way it is now, right?16:47
dansmithI mean, the default policices don't allow project members to create things anymore,16:47
dansmithbut they could until last cycle, and could still have the old default rules16:47
akekane|homeno they do not16:47
dansmiththe new "after rbac" side seems too complicated to me, as it's returning us to "members can create metadef things" which seems to be of limited or no value to almost everyone,16:48
dansmithunless you've heard of new use-cases16:48
akekane|homewhere do you see member can create metadef things ?16:48
dansmithwell, okay maybe I'm getting my rows mixed up,16:49
akekane|homefor other than get operation member and reader both have forbidden for POST, PUT and Delete16:49
dansmithbut in "after rbac" you've gone back to "can view only public and tenant b namespaces"16:50
dansmithbut you're thinking that's because the *admin* would have created something for that tenant, right?16:50
akekane|homeright16:50
akekane|homeand based on our read only checks we have at auth layer16:51
akekane|homeor is_namespace_visible check at db layer16:51
dansmithalright16:55
akekane|homeI think I will restructure comments that will avoid confusion16:57
akekane|homeprobably I should avoid mentioning db layer checks at API layer :D16:57
dansmiththere's really no way to avoid confusion with this stuff I think16:58
*** akekane_ is now known as abhishekk17:01
abhishekkcroelandt, if you are around could you please have a look at this change https://review.opendev.org/c/openstack/glance/+/789913/1617:10
opendevreviewDan Smith proposed openstack/glance master: Refactor gateway get_repo auth layer  https://review.opendev.org/c/openstack/glance/+/78991317:22
opendevreviewDan Smith proposed openstack/glance master: Make image update check policy at API layer  https://review.opendev.org/c/openstack/glance/+/78991517:22
opendevreviewDan Smith proposed openstack/glance master: Check get_image(s) in the API  https://review.opendev.org/c/openstack/glance/+/79606717:22
opendevreviewDan Smith proposed openstack/glance master: Add a member field to Image when appropriate  https://review.opendev.org/c/openstack/glance/+/79606617:22
opendevreviewDan Smith proposed openstack/glance master: POC: Check delete_image policy in the API  https://review.opendev.org/c/openstack/glance/+/79807317:22
opendevreviewDan Smith proposed openstack/glance master: POC: Check deactivate, reactivate policy in the API  https://review.opendev.org/c/openstack/glance/+/79826617:22
opendevreviewRajat Dhasmana proposed openstack/glance master: Refactor glance cinder tests  https://review.opendev.org/c/openstack/glance/+/80324017:43
dansmithcroelandt: you commented on PS16 but I actually just updated PS17 with more words in that docstring.. maybe that clarifies it a bit (also replied), but if not I can add some more to that comment17:48
croelandtdansmith: damn, lemme check17:50
akekane_may be I have shared the link with croelandt before your updates to PS17:50
croelandtoh yeah there was /16 at the end17:51
croelandt:D17:51
croelandtoh ok so legacy code implicitely passes True17:52
croelandtI see17:52
croelandtok let's merge this one17:52
dansmithright, and then when everything is passing =False, we actually remove the flag entirely17:52
akekane_thank you croelandt 17:54
*** akekane_ is now known as abhishekk17:54
dansmith\o/17:56
croelandt3rd one looks good as well18:05
dansmithwoohoo18:06
abhishekkcroelandt, super18:08
opendevreviewAbhishek Kekane proposed openstack/glance master: Move metadef namepsace policy checks in the API  https://review.opendev.org/c/openstack/glance/+/79963318:11
opendevreviewAbhishek Kekane proposed openstack/glance master: Move metadef object policy checks in the API  https://review.opendev.org/c/openstack/glance/+/79963418:11
abhishekkdansmith, ^^ probably this will be less confusing :P18:11
croelandtdansmith: are the POCs patches you need comments on, or just work in progress not ready to be reviewed yet?18:12
dansmithcroelandt: well, comments always welcome, but I've just not gotten to finishing those yet.. just wanting to get some of the stack flushed before I keep going18:14
abhishekkcroelandt, comment will be good IMO so that we will not forget if there is any objection18:14
dansmithalways open for comments though18:14
dansmithmakes later review faster for you too :)18:14
abhishekk++18:15
abhishekkdansmith, based on above two patches I will work on other patches tomorrow my time18:15
abhishekkso if you have any suggestion please comment as per your convenient time18:15
dansmithokay will try to look over those in a bit18:17
dansmithI already see one GLARING -118:17
abhishekkaah18:18
abhishekkwill stop further work then :D18:18
dansmithhehe18:18
croelandtThe first two POC patches are fairly small18:21
croelandtwhich is nice18:21
dansmithbecause they're missing tests :)18:21
abhishekk:D18:22
croelandtI almost wish we could have the whole api_policy.ImageApiPolicy(req.context, image, self.policy).<method>() as a decorator, but that would make us call get_repo() and image_repo.get() twice, which would not be super efficient18:23
dansmithyeah, I mean we could make the decorator pass in the repo it got, but I think there are cases where we're checking things in different order and such18:23
dansmithand I figured too much magic hurts readability, especially while we're changing things from enforcement in one layer to another18:23
croelandtyeah18:24
croelandtin a way, having @check_policy_here would *help* readability18:25
croelandtbut yeah sometimes we have to run checks in weird places18:25
croelandtso that might end up being worse18:25
* abhishekk signing out for the day18:33
abhishekkgood night/day all18:34
dansmithcroelandt: could always refactor to that once everything is uniform18:36
croelandtyeah18:37
croelandtlet's get something workign first18:37
dansmithright now checks happen all over the place, but once everything is at the API layer and generally in the same format, we could then clean up to that18:37
croelandtwe'll make it beautiful then18:37
dansmithlike when we yank the auth layer for good18:37
* lbragstad wanders in late19:17
lbragstadfwiw, i got that same impression when i worked on the project personas in Wallaby19:18
lbragstadgetting everything into one place would be nice19:18
lbragstadi kept running into issues getting things into a single place *and* making it work for all cases19:19
croelandtyeah19:28
croelandtthere is already one case where we do the checks in an if/else19:29
croelandtso that would be weird with a generic decorator19:29

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