Monday, 2025-02-17

*** mhen_ is now known as mhen02:43
rajivhi15:00
xek#startmeeting barbican15:00
opendevmeetMeeting started Mon Feb 17 15:00:56 2025 UTC and is due to finish in 60 minutes.  The chair is xek. Information about MeetBot at http://wiki.debian.org/MeetBot.15:00
opendevmeetUseful Commands: #action #agreed #help #info #idea #link #topic #startvote.15:00
opendevmeetThe meeting name has been set to 'barbican'15:00
xek#topic Roll Call15:01
xekCourtesy ping for dmendiza[m] ade_lee d34dh0r53 Luzi tosky tobias-urdin jjung mharley lpiwowar15:01
xekrajiv o/15:01
xekAs usual our agenda can be found here:15:01
xek#link https://etherpad.openstack.org/p/barbican-weekly-meeting15:01
rajivheylo15:06
xeklooks like we're the only ones here15:06
rajivoops15:06
rajivi guess i will need dmendiza[m] to answer my query ! ?15:07
dmendiza[m]🙋15:08
xeko great :)15:08
xeklet's go over the agenda15:08
rajiv:) 15:08
xek#topic Review Past Meeting Action Items15:08
xekThere were none15:08
xek#topic Liaison Updates15:08
xekElection nominations are this week15:09
xek#link https://releases.openstack.org/epoxy/schedule.html15:09
xekand feature freeze is next week15:10
xek#topic Open Discussion15:10
xekrajiv shoot away :)15:10
rajivthanks, while testing the old bug https://review.opendev.org/c/openstack/barbican/+/933461 15:11
rajivi noticed the Thales device returns a CKR error15:11
rajivafter sharing this bug with Thales, it was concluded : https://www.thalesdocs.com/gphsm/integrations/guides/openstack_barbican/index.html#configure-openstack-barbican-with-thales-luna-hsm-or-luna-cloud-hsm15:12
rajivthe conclusion is mentioned in the NOTES section, could dmendiza[m] review this ?15:12
dmendiza[m]What conclusion, sorry I'm not sure what you want me to look at there?15:13
xekI think rajivmeant troubleshooting section?15:13
rajivEnter hmac_key_type and hmac_keygen_mechanism details only when generating a new HMAC key. If you are upgrading from a previous version and already have an HMAC key, these flags are not required.15:16
dmendiza[m]Right, yeah, those are used for HMAC key generation. 15:16
rajivI disabled these 2 flags in my barbican.conf since the keys were already generated : https://github.com/sapcc/helm-charts/blob/master/openstack/barbican/templates/etc/_secrets.conf.tpl#L23-L2815:16
rajivokay, so this configuration is fine ?15:17
dmendiza[m]rajiv: I would set those flags regardless.  They won't get used and you don't have to go edit your template if you need them.15:24
rajivwhen i set those flags, barbican-api fails to create pkeks for new projects, i get an error15:24
rajivit works for older projects though15:25
dmendiza[m]rajiv: That's weird and sounds like a bug.  Those options should not affect PKEK generation.15:27
rajivThe Thales expert also confirmed the same while testing this on a devstack15:27
rajivi upgraded to hsm 771 in QA for a month, i also observed new project secret creations failed, i presumed it was env issue :D 15:28
rajivwould it be an issue to proceed without this flag ?15:29
dmendiza[m]My apologies, my previous response is not quite right15:32
dmendiza[m]hmac_keygen_mechnanism is only used for HMAC master key generation15:33
dmendiza[m]but hmac_key_type is used for both generating the master HMAC and also looking for the master hmac afterwards whenever it needs to be used15:33
dmendiza[m]it is part of the query sent to the HSM to find the key15:33
rajivnp :) 15:33
dmendiza[m]when you don't set that option, then oslo.policy uses the default value of CKK_AES15:34
rajivcorrect, so these flags need to be enabled only for new installation or where there are no keys right ?15:34
dmendiza[m]No, you need to set hmac_key_type to match the type of key you created15:34
dmendiza[m]if you create your HMAC (e.g. by using barbican-manage hsm gen_mkek ) then you need to set that option to the correct value for your HSM and keep it set for every deployment.15:35
rajivokay, so disable hmac_keygen_mechnanism and enable hmac_key_type ?15:35
dmendiza[m]Again, you're not "disabling" these options15:35
dmendiza[m]when you remove them from barbican.conf you're telling barbican to use the default value15:36
dmendiza[m]https://opendev.org/openstack/barbican/src/branch/master/barbican/plugin/crypto/p11_crypto.py#L78-L8415:36
dmendiza[m]So, removing them from barbican.conf is the same as setting them to15:36
dmendiza[m]hmac_key_type=CKK_AES15:36
dmendiza[m]hmac_keygen_mechanism=CKM_AES_KEY_GEN15:36
dmendiza[m]CKM_AES_KEY_GEN is only used for creating the HMAC key15:37
dmendiza[m]but CKK_AES is part of the query15:37
dmendiza[m]so your HMAC key in  your environment must also be a CKK_AES key15:37
dmendiza[m]or your query will fail15:37
rajivokay, Thales guide proposes : hmac_key_type = CKK_GENERIC_SECRET15:38
dmendiza[m]It depends on what you use for hmac_mechanism https://opendev.org/openstack/barbican/src/branch/master/barbican/plugin/crypto/p11_crypto.py#L85-L8715:39
dmendiza[m]some devices let you use CKK_AES for CKM_SHA256_HMAC, and some other devices don't15:39
rajivokay, so its an issue with the device now ?15:40
rajivthe device is unable to support hmac_key_type and hmac_keygen_mechanism ?15:41
dmendiza[m]No15:43
rajivthis was the error msg when all flags were set : P11CryptoPluginException: HSM returned response code: 0xc0 CKR_SIGNATURE_INVALID15:43
dmendiza[m]If you set hmac_mechanism=CKK_GENERIC_SECRET and get an error related to HMACs, then likely your actual HMAC key does not match the type15:43
dmendiza[m]yeah, what's going on in your environment is that your HMAC key is probably CKK_AES15:44
dmendiza[m]so setting it to CKK_GENERIC_SECRET is wrong15:44
dmendiza[m]and that's why it fails15:44
dmendiza[m]or you have both a CKK_AES and a CKK_GENERIC_SECRET keys and you're choosing the wrong one15:44
rajivah okay, CKK_AES was the value before this patch was merged15:45
rajivmaybe you tested with CKK_GENERIC_SECRET on your device ?15:45
dmendiza[m]yes, so when you create the HMAC key you choose the type15:45
rajivokay, thanks for the clarification, back to another round of testing :) 15:47
rajivin the db i saw project field with kek_data having mechanism as CKM_AES_KEY_WRAP_KWP15:48
rajivso this is expected15:48
dmendiza[m]I think I used CKK_AES ... not sure though, I'll have to go back and chec15:48
dmendiza[m]*check15:48
rajivoh ok15:48
dmendiza[m]I do have access to a Thales device with FIPS mode turned on now, so I can do some testing on my end15:48
rajivah ok! i can share mine :D 15:49
xekok, I guess we'll have more updates next week!15:52
xeklet's check the bug boards...15:52
rajivsure15:52
xek#topic Bug Review15:52
xekThere were no new bugs reported since our last meeting15:54
xekSee y'all next week!15:54
xek#endmeeting15:54
opendevmeetMeeting ended Mon Feb 17 15:54:12 2025 UTC.  Information about MeetBot at http://wiki.debian.org/MeetBot . (v 0.1.4)15:54
opendevmeetMinutes:        https://meetings.opendev.org/meetings/barbican/2025/barbican.2025-02-17-15.00.html15:54
opendevmeetMinutes (text): https://meetings.opendev.org/meetings/barbican/2025/barbican.2025-02-17-15.00.txt15:54
opendevmeetLog:            https://meetings.opendev.org/meetings/barbican/2025/barbican.2025-02-17-15.00.log.html15:54
opendevreviewIvan Anfimov proposed openstack/barbican master: Update README.rst - few small fix  https://review.opendev.org/c/openstack/barbican/+/94196917:55
opendevreviewIvan Anfimov proposed openstack/barbican master: Update README.rst - few small fix  https://review.opendev.org/c/openstack/barbican/+/94196918:01
opendevreviewArtom Lifshitz proposed openstack/castellan master: WIP: Make sending service token a runtime decision  https://review.opendev.org/c/openstack/castellan/+/94201522:33
opendevreviewArtom Lifshitz proposed openstack/barbican master: WIP: Make secrets owned by service if service token is sent  https://review.opendev.org/c/openstack/barbican/+/94201622:36

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