Thursday, 2023-05-11

*** atmark is now known as Guest110707:51
SvenKieskefungi: re: OSSA-2023-003 just some general feedback for the next time: it might be worth to highlight it more upfront that non iscsi/FC deployments need to make config changes as well, people sadly tend to skim such announcements. I had people asking and experienced people answering "this is only about iscsi". so they obviously missed the config change part for everyone.08:41
SvenKiesketbf, you(?) clearly wrote that in the scope section08:42
SvenKieskecommunication is so difficult08:42
sean-k-mooneyyes10:00
SvenKieskeit at least mentions oslos "service_token_roles", the question is: which service token roles do we need to assign to nova and how do I enable that cinder checks this role in kolla-ansible?10:01
SvenKieskeI'll dig into the oslo config docs, I'm not that familiar with the rbac stuff just yet..10:02
sean-k-mooneyso the service role existing in keystone for service users prior to our reuse of it for rbac10:02
sean-k-mooneyso i belive its the service role that needs to be added to nova10:02
sean-k-mooneyill take a look at the cinder config ref and see if that line up 10:03
SvenKieskeso in oslo this should look like this: https://docs.openstack.org/oslo.policy/latest/user/usage.html#how-to-register but I agree, better to look up the cinder docs10:03
sean-k-mooneyim just looking for that now but im not sure that cider as a singel unifed config referince doc lik noav10:04
SvenKieskeah there is some rbac stuff here: https://docs.openstack.org/cinder/latest/configuration/block-storage/policy-personas.html10:05
SvenKieskeand i guess we need this, basically: https://docs.openstack.org/cinder/latest/configuration/block-storage/policy.html10:05
sean-k-mooneyya im trying to find the cinder version of https://docs.openstack.org/nova/latest/configuration/config.html10:05
sean-k-mooneybut it might be quicker ot look at the code10:06
sean-k-mooneyi dong think this is policy related10:06
sean-k-mooneyits in the keystone_authtoken section10:06
sean-k-mooneyso its part of keystone middlewaare10:06
sean-k-mooneyhttps://docs.openstack.org/nova/latest/configuration/config.html#keystone_authtoken.service_token_roles10:07
sean-k-mooneythat should be common for all openstack serivces since its actullly handeld by the ketone libs not in the proejcts directly10:07
sean-k-mooneyso yes the 'service' role is what is required10:08
SvenKieskefound it for cinder: https://docs.openstack.org/cinder/latest/configuration/block-storage/service-token.html#configuration10:08
SvenKieskepoint 4: If Cinder is going to receive service tokens from other services it needs to have two options configured in the [keystone_authtoken] section of the configuration file:10:09
sean-k-mooneyso we need to add [keystone_authtoken]service_token_roles_required=true10:09
SvenKieskeand "service_token_roles_required" true10:09
SvenKieskeah sorry, you wrote that10:09
sean-k-mooneyheh no worries10:10
SvenKieskewe must list the appropriate roles also with "service_token_roles" it seems10:10
sean-k-mooneyso ya that is missing form the patch i wrote to actully do the enforcement. the patch i wrote will send the token but cidner will not check that it has the service role10:10
SvenKieskeah default is "service" should be fine10:10
SvenKieskethank you for the patch anyway! highly appreciated :)10:11
sean-k-mooneyyep10:11
SvenKieskeand thanks for helping figuring this out10:11
sean-k-mooneywell this converstaion also just told me i have more work to do on another installer10:11
sean-k-mooneycause i did hte same fix there. i just added the nova section but i have not 1 ensured that it has the service role or two modifed the deployemnt of cinder et al to actully validate that10:12
sean-k-mooneyso this has been useful for me too10:12
sean-k-mooneyi can proably quickly update the kolla-ansible patch ot add the cinder bits if you like althoug really it woudl good to do this for all services10:12
sean-k-mooneyso that is proably more work then i have time to do10:13
sean-k-mooneyactull for nova its proably a good idea to enable the role validation on nova itslef too10:13
SvenKieskeI'll check with mnasiadka to fix other services, or make at least a list of work to do, depending on the scope of this10:13
sean-k-mooneySvenKieske: im a littel sad about hte upgrade impact of this change in nova/cinder requiremnts10:14
sean-k-mooneyi understand why this was the only solution they could come up with to close all the angeles10:14
sean-k-mooneyits just sad tha it will require peopel to update there installer to be able to update the deploy openstack10:15
sean-k-mooneywell or for kolla you can use the config override mecahimue to od this without ansibel changes10:15
SvenKieskemhm, well, just thinking: wouldn't it suffice to restart nova/cinder? then they should validate the service roles? of course you need to handover stuff for HA scenarios, but should be possible?10:15
SvenKieskewhat impact are you talking about?10:16
sean-k-mooneyya its just a config update and restart (after you add the role to nova and the other services.)10:16
SvenKieskeyeah sure, you also need to update the installer, I guess10:16
SvenKieskethis only tangentially affects myself, as I'm not really using iscsi/FC, as far as I'm aware at least.10:17
sean-k-mooneyhttps://review.opendev.org/c/openstack/nova/+/882847/1/releasenotes/notes/service-user-token-421d067c16257782.yaml10:19
sean-k-mooneyso we dont currently have a check to hard stop nova starting10:19
sean-k-mooneybut i think on the cinder side you will need the serviec token to do some operations10:20
SvenKieskemhm, thinking further: I would propose it would also be good to switch the defaults in the services: that is: if service_tokens are send "service_token_roles_required=true" should imho be the default10:20
SvenKieskethat like not checking https certs for validity, that was a huge fuzz on oss-sec just some days ago, regarding some popular perl library10:21
sean-k-mooneyya it proably shoudl be but until now this cofnig was optional10:21
SvenKieskeyeah, I understand that; also the topic of backwards compatibility needs to be thought through, but over 1-2 releases we should be able to change that10:21
sean-k-mooney"""For backwards compatibility reasons we must let valid service tokens pass that don’t pass the service_token_roles check as valid. Setting this true will become the default in a future release and should be enabled if possible"""10:21
SvenKieskeit's easy to miss, don't want to know how many admins wanted to enforce service tokens but never validated them by accident10:22
sean-k-mooneythats in the docs so it looks like fliping that to true is the plan anyway10:22
SvenKieskeah nice!10:22
sean-k-mooneyi assume this will go to true as part of the rbac goal10:22
sean-k-mooneyonce we get to the point where we can start relying on the service role10:23
sean-k-mooneythe orginal usecasue for the service_user cofnig in case you were not familar was so that service A can say (the users token was valid when i recived it) so that operation in service B do not fail due to time outs10:24
sean-k-mooneyfor any long runnign requests10:24
SvenKieskethat would be great; I'll be out for lunch for now; thanks for all the help and information again :)10:24
sean-k-mooneyin the future with SRBAC it will also be used for service to service calls to drop admin form the services10:24
*** mmalchuk_ is now known as mmalchuk11:03
fungiSvenKieske: thanks for the excellent point. i'm hoping there's no "next time" though, this was a very unusual circumstance and the first time in 13 years of the project that a vulnerability fix has backported a behavior that required configuration/deployment changes. if there had been *any* other way i would have preferred we didn't take this approach11:30
fungithere is a reason why our policy for security advisories is that just applying patches should suffice11:31
fungii'm similarly quite worried that ossa-2023-003 is going to cause confusion due to the sheer complexity11:32
fungiit was by far the most "wordy" advisory we've ever issued, and that's after splitting about half of it into a separate ossn-009211:33
fungii had to merge a change to our site generator, because the sphinx extension was written to assume the description would only ever be a single paragraph with no special formatting11:33
fungias for not checking https certs, we still have a lot of that too in various places, we've always considered it a hardening opportunity because in most cases it's vendor drivers designed to communicate with internal interfaces of things like disk array controllers that operators traditionally just relied on tofu for a self-signed cert the device autogenerated on first boot11:37
fungiat least i know when i was in that position, we never bought real certs for devices which were only reachable on our management network. that's probably less common now that free sources of certs abound, but still it's complicated to get those issued for devices that can't/won't ever be connected to the internet11:39
SvenKieskesure, that stuff only changed very recently with the adoption of let's encrypt and the general policy changes regarding usage of https and correct certs even in internal environments, it's still a work in progress for many systems, but overall a good move in the right direction11:44
SvenKieskeand also agreed that this is a very unusual patch/problem; but I wouldn't bet on stuff never occuring again. This might also just be a side effect from people paying more attention to security problems today, at least that is my optimistic take.11:51
fungiyeah, i'm not betting on that, not much of one to gamble after all, but it is a once-so-far in the lifetime of the project12:01
sean-k-mooneyfungi: for what its worth just applying the patch will fix most of the CVE edgaces but not all of them12:08
sean-k-mooneySvenKieske: on this topic one of the recomendation was to also modify the multipathd config12:08
sean-k-mooneythat is also something that should be handeled in kolla and other installer. i think there are patchs for this for tripleo12:09
SvenKieskeah, well I need to take an hour and read the complete advisory I guess, I still just skimmed it, am in  a meeting now though. If I can assist further, just ping me here or in private.12:09
sean-k-mooneybut i dont know if a comunication has been done to OSA or or other installers like kolla12:09
fungisean-k-mooney: i took the opportunity to proactively add the ptls of all official deployment projects to our advance notification list at the end of last month (previously we just added them if they asked), and also pinged them all privately in irc to alert them to the fact that they were going to be receiving copies of the advisory/note and patches12:36
sean-k-mooneyfungi: ack that sound like a good improvement in process12:37
fungiso in theory at least the ptls for kolla, osa, openstack-helm, puppet-openstack, openstack-chef got copies about a week ahead12:37
sean-k-mooneyfungi: on the nova side we have not implemnted a hard bock on nova starting if the service user is not there12:37
fungiopenstack-charms too12:37
sean-k-mooneybut i have not looked at the cidner patch to see if they change the requriemetns 12:38
sean-k-mooneyso i dont know if we will automatically se job failures or not12:38
sean-k-mooneyin etiher case its imporant to make sur that this is adress in the installer12:38
fungiand yeah, for tripleo i have no idea what the plan is since the current "maintained" stable branches have no maintainers12:38
fungibut maybe they also have ~0 users12:39
sean-k-mooneythere are definely downstream patches for ooo12:39
sean-k-mooneyi hope there are upstream versions of the same12:39
fungiright, for the old versions rh is supporting downstream12:39
sean-k-mooneyya so i saw patches for the downswtream wallaby and train equivalnets12:39
sean-k-mooneyi hope now the embargo has passed those will be upstream but not sure about master12:40
sean-k-mooneyor zed12:40
fungibut the tripleo leadership said wallaby was the most recent red hat still had interest in supporting12:40
sean-k-mooneyya so i expect it to get fixed ther ebut tripleo historicall did not alwasy requrie patches to merge on master first12:41
fungigiven that they basically didn't maintain versions after wallaby anyway, i have a feeling whatever they patch in wallaby could be trivially forward-ported to the later branches12:41
sean-k-mooneysince they never have follow the stable backport policy12:41
sean-k-mooneyfor what its worth ooo has been using the service_user since at least train12:41
fungibut also, i'm only concerned about patches in newer tripleo branches if they actually have users, which is doubtful12:42
sean-k-mooneyi dont know if the validation for roles was ever enabled12:42
sean-k-mooneyor if it adds the servie role to the relevnet acounts12:42
sean-k-mooneyos i think that would be the likely gap currently12:42
sean-k-mooneyalso the multipatd config change i guess12:42
sean-k-mooneyfungi: this is where a lot of our installer focus is now https://issues.redhat.com/browse/OSPRH-19112:43
sean-k-mooneyim trying to capture all the changes that are rquired and make sure they get applied to the new golang k8s operator based installer12:44
fungiyeah, i gathered that was the thrust of the replacement12:45
fungibasically make openshift be the new rdo installer12:45
sean-k-mooneyeffectivly12:45
sean-k-mooneyor you can think of it liek make openstack be an app you can install on an openshift cluster like any other applciaiton12:46
sean-k-mooneyperhaps just a tad more complex the the typical wordpress example12:46
fungiwhich is effectively the approach canonical took with charmed openstack too12:47
sean-k-mooneyya using juju as the task orchstrtor12:47
sean-k-mooneyinstead of openshift12:47
fungimuch different implementation obviously, but the overall goal is the same12:47
sean-k-mooneybut similar or like what starling x does12:47
fungisure12:47
sean-k-mooneythey use airship and helm to deploy openstack on vanilla k8s12:48
fungii want to say they replaced their use of airship recently, but maybe that's still in progress12:48
sean-k-mooneythe core idea is create an entity that know how to take a declaritive input and make it so in our case a operator writteen in go in thres a charm 12:48
sean-k-mooneyhopefully i can still peak at there code cause i wanted to see if i could port how they run wsgi servies under grunicorn to devstack and maybe our operator stuff12:49
sean-k-mooneyfungi: basically so we can move devstack of uwsgi to something maintaiend and perhapse make it simpler to use in a venv12:50
sean-k-mooneybut the fact they used grunicorn ot run all the wsgi services in starlinx means in principal all the openstack service should work with it12:51
sean-k-mooneyi kind of wish more or the experiment/inotvations they come up with in starlingx could propagate back ot openstack in general12:52
fungiwell, uwsgi is maintained afaik, just not getting further development... or did that change more recently?12:52
sean-k-mooneyhttps://uwsgi-docs.readthedocs.io/en/latest/#12:52
sean-k-mooneyhttps://github.com/unbit/uwsgi/commit/5838086dd4490b8a55ff58fc0bf0f108caa4e07912:54
sean-k-mooneyso it went into maintaince mode in april 202212:54
sean-k-mooneyso its not dead or anything but a signal has at least been sent that its lifetime is proably limited12:55
fungimaintenance mode sounds maintained to me ;)12:56
fungianyway, having more options is definitely good, yes12:56
sean-k-mooneyyes im just not sure it that include suppprot for new python version12:56
fungieasy enough to compile a fresh cpython 3.12.0a7 and find out12:58
fungii always build the latest prerelease and have it available in my path for similar reasons12:59
sean-k-mooneyi have not looked at teh devstack venv work in a while 13:01
sean-k-mooneyim hoping that will help here once that is merged13:01
sean-k-mooneyits much simpler to this tyep of testing with a venv then system wide install13:01
fungiabsolutely13:01
sean-k-mooneyevne if its just create a ven and pip install everytin in gloabl requirement and see what explodes13:02
sean-k-mooneyalthough that has much less value then atcully runing the code13:02
sean-k-mooneycool well i beter go fix the go installler chat to ye later o/13:03
fungithanks!13:03
sean-k-mooneyfungi: by the way this is actully the second cve to require a config change to fix13:49
sean-k-mooneybut two in 14 years is still a good record13:49
fungiyeah, though in that case it was a simple toggle on a default i think? not significant additional requirements to how things are deployed13:50
sean-k-mooneyto fully fix https://bugs.launchpad.net/os-vif/+bug/1734320 with ml2/ovs  https://opendev.org/openstack/os-vif/src/branch/master/vif_plug_ovs/ovs.py#L96 to true13:51
fungiand it wasn't a config change that was mandatory to keep things from breaking on upgrade13:51
sean-k-mooneyya so just adding [os_vif_ovs]isolate_vif=ture13:51
fungialso we didn't do that one as an official security advisory13:52
sean-k-mooneyno? it had a cve assocated with it i tought13:54
sean-k-mooneybut ya its https://review.opendev.org/c/openstack/cinder/+/882835/2/cinder/volume/api.py#254313:55
sean-k-mooneythat is diffent here.13:55
fungianyone can get a cve assigned for anything they like. the openstack vmt didn't request a cve for it, in 2018 we declared it an incomplete fix13:55
sean-k-mooneyfair enough i am pretty sure downstream thsi was treated as a cve but i have ejected it form my brain at this point13:56
fungiwell, like i said, cve != security advisory13:56
fungicve is merely a unique tracking id. it doesn't even mean that the project considers what that's tracking to be a vulnerability at all13:57
fungianyone can ask mitre to assign a cve for anything, with or without the input of the people responsible for the software13:57
fungithere is a process for projects to request that mitre revoke a cve or for marking it as disputed upstream, but we (openstack vmt) don't bother to do that because we don't consider the existence of a cve to necessarily mean there's an actual vulnerability anyway13:59
fungisome people do assume the existence of a cve means there's a vulnerability, but those people are gravely misunderstanding the entire point of mitre's cve system14:00
* SvenKieske feels this same topic was just recently discussed on oss-sec as well.14:01
fungiyes, it comes up there with some regularity14:01
SvenKieskefungi: just a shout out: if I had read your announcement completely - and other people as well - it would have answered all questions regarding the service token stuff.14:02
fungiin the case of bug 1734320 i agree it represents an actual vulnerability, just one we couldn't backport fixes for14:02
fungia not-on-by-default fix for that bug did eventually get backported to some stable branches, but many years later and for versions that didn't even exist at the time we made the call14:03
SvenKieskeI mean the heuristic cve ~ vuln is a pretty decent one. people think in abstractions, after all. I also treat the system and it's workings more like a feature. I can request a cve for a vuln, even if $vendor disagrees. and how many vendors disagree just because they want to avoid bad press and not on factual grounds? sadly still a lot.14:03
sean-k-mooneythis is one of the reasons i like to fix things upstream14:04
SvenKieskeit's of course a terribly complex  system for end users, which they don't understand.14:04
fungiyeah, like i said, as a general rule we don't disagree on cve requests others make for our bugs, we just ask they update the bug with the cve that was assigned so there don't end up being duplicates14:04
sean-k-mooneybecause even if they disagree you still get the fix evenutlly14:04
SvenKieskesure :)14:05
fungibut by the same token, we don't treat a bug any differently just because someone got a cve assignment issued for it14:05
fungiif we (vmt) decide we'll be issuing an advisory then we ask mitre to assign a cve for it, assuming someone else didn't do that already14:06
fungiin the case of ossa-2023-003 the cve was assigned by red hat, because one of the developers felt compelled to loop rh's security team into the discussion ahead of schedule14:08
fungibut also sometimes the reporter of a bug works for an organization which is a cna and so assigns a cve themselves before they even contact us (we've had some from cisco talos like that, for example)14:16

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