Friday, 2021-08-06

opendevreviewPranali Deore proposed openstack/glance-tempest-plugin master: Implement API protection testing for metadef namespaces  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80090209:43
jokke_abhishekk: responded to your comment on test. Feel free to add any of your negative cases not covered as I have no idea what else you want to cover as such10:35
abhishekkjokke_, ack10:36
jokke_abhishekk: hope that helps understanding what's going on in there ;)10:43
jokke_let me know if not10:43
abhishekkdidn't have detail look yet, in middle of something, will ping you if something is needed10:44
opendevreviewMerged openstack/glance stable/wallaby: Fix the policy deprecation message  https://review.opendev.org/c/openstack/glance/+/80010014:30
* abhishekk working on members API14:34
* dansmith is doing death-by-delete-policy14:41
abhishekksame is for member delete as well :P14:44
dansmithI'm actually not sure that delete has enough protection in it to run without the auth layer and rule:default14:56
abhishekk:/15:04
croelandtdansmith: did we get through all your patches under review or am I hallucinating?15:15
dansmithcroelandt: all the ones we can merge yeah15:16
dansmithtrying to decide between suicide and fixing the delete patch15:16
croelandtI'd fix the delete patch if I were you15:17
dansmithwe'll see.15:17
dansmithbasically I think the location layer in the onion does no checking and will nuke the locations on the image if it's called,15:18
dansmithwhile the other layers delete operation just mutate the image object in memory and wait for the image_repo to save those changes, where the actual permissions checks are don15:18
dansmith*done15:18
dansmithwith the auth layer this all exploded earlier so we never got this far15:19
dansmithit's really a disaster.15:19
abhishekkohh, sounds frightening15:21
abhishekklbragstad,  Policies ['get_member', 'get_members'] reference a rule that is not defined.15:21
abhishekkdoes this mean something is wrong with f string defined in policies ?15:22
dansmiththe db just enforces "is admin or owner" if the policy check doesn't do anything at the top layers, so I think I'm just going to have to add that to the API if secure_rbac=False15:23
abhishekkI think I have done that in member15:24
dansmithit sucks pretty bad.15:25
abhishekkhttps://review.opendev.org/c/openstack/glance/+/802996/1/glance/api/v2/image_members.py#36315:25
dansmithugh15:25
dansmithokay, let's at least put that in a handler we can test and both use15:25
dansmithI'll do it in mine15:25
abhishekkI am opting another method as well, lets see both and decide15:26
dansmithabhishekk: this is what I was thinking: https://termbin.com/ccub15:37
abhishekklooking15:37
dansmithfixes my immediate issue, but need to make sure it doesn't break anything else15:37
dansmiththe delete operation in API does several things that all need to not run if we're not going to actually let the user do it, so checking it there when we're doing our new policy check properly keeps us from doing any of those things15:38
abhishekklooks better15:39
abhishekkThis could be required everywhere (for each delete call I guess)15:40
dansmithmeaning member delete as well?15:41
abhishekki think so15:41
abhishekkdansmith, quick help15:41
dansmithif that falls back to admin-or-owner(-of-image) too then yeah15:41
abhishekkcould you please tell me what is wrong with these f strings ?15:42
abhishekkADMIN_OR_SHARED_MEMBER = f'role:admin or {IMAGE_MEMBER_CHECK}'15:42
abhishekkADMIN_OR_PROJECT_READER_OR_SHARED_MEMBER = (15:42
abhishekk    f'rule:admin or '15:42
abhishekk    f'role:reader and (project_id:%(project_id)s or {IMAGE_MEMBER_CHECK})'15:42
abhishekk)15:42
dansmithwhat's wrong with them is that they're f**k-strings15:42
abhishekkhaha15:43
dansmithyou have "rule:admin" but meant "role:admin"15:43
dansmiththat's why policy is claiming missing rule :)15:43
abhishekkohhh15:43
abhishekkthank you15:44
dansmithnp :)15:44
abhishekkI was struggling for half an hour with this :/15:44
dansmithI know the feeling.. fresh eyes.15:44
abhishekknow I will have my dinner in peace :D15:46
abhishekkwill be back in short15:46
dansmithhah15:49
opendevreviewDan Smith proposed openstack/glance master: Check delete_image policy in the API  https://review.opendev.org/c/openstack/glance/+/79807315:53
opendevreviewDan Smith proposed openstack/glance master: POC: Check deactivate, reactivate policy in the API  https://review.opendev.org/c/openstack/glance/+/79826615:53
opendevreviewDan Smith proposed openstack/glance master: Add check_is_image_mutable() legacy helper  https://review.opendev.org/c/openstack/glance/+/80377615:53
dansmithooh, missed a test case actually15:55
opendevreviewDan Smith proposed openstack/glance master: Check delete_image policy in the API  https://review.opendev.org/c/openstack/glance/+/79807316:03
opendevreviewDan Smith proposed openstack/glance master: POC: Check deactivate, reactivate policy in the API  https://review.opendev.org/c/openstack/glance/+/79826616:03
* lbragstad trying to catch up 16:08
lbragstadok - sounds like you all figured out the undefined policy thing?16:12
dansmithif you mean "reference a rule that is not defined." yeah16:13
opendevreviewAbhishek Kekane proposed openstack/glance master: Refactor gateway auth layer for member APIs  https://review.opendev.org/c/openstack/glance/+/80252516:47
opendevreviewAbhishek Kekane proposed openstack/glance master: PoC Move member policy checks to API layer  https://review.opendev.org/c/openstack/glance/+/80299616:47
abhishekklbragstad, need your help here as one test will fail in glance-tempest-plugin with this change16:47
abhishekkdansmith, this is how I managed to do it16:48
dansmithabhishekk: ack on both TODOs if I respin, good call17:24
abhishekkgreat17:25
dansmithI mentioned "transitional" in the docstring of the helper, at least17:25
abhishekkyeah17:25
opendevreviewAbhishek Kekane proposed openstack/glance-tempest-plugin master: Fix modify_member policy functional test case  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80380118:49
opendevreviewAbhishek Kekane proposed openstack/glance master: PoC Move member policy checks to API layer  https://review.opendev.org/c/openstack/glance/+/80299618:50
opendevreviewAbhishek Kekane proposed openstack/glance master: PoC Move member policy checks to API layer  https://review.opendev.org/c/openstack/glance/+/80299618:52
opendevreviewAbhishek Kekane proposed openstack/glance master: PoC Move member policy checks to API layer  https://review.opendev.org/c/openstack/glance/+/80299618:54
* abhishekk signing out for the day19:14
opendevreviewAde Lee proposed openstack/glance master: DNM: Add fips check jobs  https://review.opendev.org/c/openstack/glance/+/79053620:39
opendevreviewLance Bragstad proposed openstack/glance master: DNM: Fix role check in image membership policy  https://review.opendev.org/c/openstack/glance/+/80380821:55
opendevreviewAde Lee proposed openstack/glance master: DNM: Add fips check jobs  https://review.opendev.org/c/openstack/glance/+/79053622:04

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