14:30:58 #startmeeting Pulp Triage 2019-11-26 14:30:58 !start 14:30:58 #info dkliban has joined triage 14:30:58 Meeting started Tue Nov 26 14:30:58 2019 UTC. The chair is dkliban. Information about MeetBot at http://wiki.debian.org/MeetBot. 14:30:58 Useful Commands: #action #agreed #help #info #idea #link #topic. 14:30:58 The meeting name has been set to 'pulp_triage_2019-11-26' 14:30:58 dkliban: dkliban has joined triage 14:31:12 This is the Content Signing in Pulp 3 meeeting. 14:31:35 despite what it says in the channel topic 14:31:38 https://etherpad.net/p/Pulp_-_Signing_Use_Cases 14:32:38 #info dawalker has joined triage 14:32:38 !here 14:32:38 dawalker: dawalker has joined triage 14:32:45 #info ttereshc has joined triage 14:32:45 !here 14:32:45 ttereshc: ttereshc has joined triage 14:33:08 #info daviddavis has joined triage 14:33:08 !here 14:33:08 daviddavis: daviddavis has joined triage 14:33:13 #info bmbouter has joined triage 14:33:13 !here 14:33:14 bmbouter: bmbouter has joined triage 14:33:16 #info ppicka has joined triage 14:33:16 !here 14:33:16 ppicka: ppicka has joined triage 14:33:39 If you have any additional use cases that we should discuss, please add them to the etherpad now 14:34:37 I would like to go through the use cases in the etherpad in the order that they are currently presented in 14:34:48 great 14:34:54 So we will begin with the plugin writer experience 14:35:00 also we can look for "high level" gpg actions, e.g. verify, sign, etc 14:36:00 bmbouter: line 3 has some assumptions built into it 14:36:09 yes it does 14:36:21 yea, I was going to ask about where this list of keys comes from 14:37:11 x9c4: can chime in to correct me, but he told me his vision was that pulpcore would store public keys in "generic" facilities 14:37:29 and he asked if he should write that, and I said he should write what he wanted to share and we can determine if we want to do that together 14:37:56 so these key ids I believe are referenes to "saved GPG keys", almost likepulp is a public keyring manager 14:38:12 he was considering it even as an independant plugin to do GPG keyring saving/management 14:38:15 I could imagine the keys to be organized in a gpg-plugin. 14:38:23 as usual content. 14:39:30 so aside from how it's built, the general idea I'm reading is "key storage" and the crux is public keys only 14:39:47 but there are other use cases further down where I think we need to store private keys 14:39:57 we'll come to those later tho 14:40:18 what about pointing pulp to a pre-existing gpg key storage so we don't have to manage keys? 14:41:59 daviddavis: is there one you have in mind? 14:42:01 so let's look at the use cases because it's how I arrived at my conclusion 14:42:18 no, I'm a bit of a novice when it comes to gpg and stuff 14:42:28 it's ok we can learn together 14:42:31 s/a bit of// 14:42:39 let's consider our user personas 14:42:44 ok 14:42:49 misa has tought me about why signing in pulp_deb (2) is done with a shell script. He has an external signing service and does _not_ save private keys. 14:43:14 we have the administrator, this is the person you call when your pulp is broken 14:43:37 and then we have many users, imagine a multi-tenant system, multiple teams etc 14:44:12 RBAC eventually will help us sort this big pool of users into various sub-personas, e.g. the person who can sign repo X or the access the "gpg trust store" y 14:44:50 a "gpg trust store" is the term I'm using for a "gpg home folder" which is the folder containing the various gpg data sources, this is where the keyring, public, and private keys would be stored (if you asked gpg to store such things) 14:45:24 x9c4: +1 to not using these facilities and having a "call out" option for use cases like misa's 14:45:39 but providing these facilities for the more common uses 14:46:07 anyway, the question I keep asking myself is: "does the administrator have the key or does a user with the right RBAC permissions have the key" 14:46:10 the private key 14:46:47 apologies for the connection issues, I wanted to say something and then couldn't because my nick wasn't whitelisted and then had to reconnect and it took several minutes... 14:46:49 if the administrator has the key, they would configure this in the settings folder, perhaps just pointing to one or more pre-configured "gpg trust stores" and pulp is then out of the key management space 14:46:56 if this has already been addressed, my apologies 14:47:08 if it's content, you're not implying that the "key" content would be present in the repository? I'm not sure we would want to do that 14:47:49 Sorry for being late 14:47:52 dalley: we have not addressed that. separate repos that contain public keys. 14:48:03 #info misa has joined triage 14:48:03 !here 14:48:03 misa: misa has joined triage 14:48:08 #info x9c4 has joined triage 14:48:08 !here 14:48:08 x9c4: x9c4 has joined triage 14:48:18 oops, not sure that's what I needed to do 14:48:23 it is actually 14:49:01 so we are currently discussing how a plugin writer could validate signatures on content that it is syncing or processing during upload 14:49:02 I think we only want pub and/or priv keys in so much as plugin writers want to use them for signing, verification, etc operations 14:49:56 although a future gpg-plugin would be cool, for the first-cut I think we only want enoiugh to serve ^ plugin writer goal 14:50:26 #info mikedep333 has joined triage 14:50:26 !here 14:50:26 mikedep333: mikedep333 has joined triage 14:50:54 that requires having access to some public keys. i am not too concerned about how pulp stores those public keys, but the plugin writer needs be able to access them in a programatic way. 14:51:32 this part is easy ... but the use cases that require using a private key to sign an artifact are the ones that give me pause 14:51:38 yup I think there are two main needs and we'll need both, one is the "built in signing" that's the common one most environments will use 14:52:09 the other is misa's use cases which is all the same verify/sign/etc operations only they are called to a system outside of pulp to perform 14:52:49 bmbouter: i don't think verifying needs to happen in an outside system ... misa? 14:53:17 Finished reading the thread. My biggest concern is how hard it is to design a generic system that can support whatever the user might want 14:53:30 dkliban: correct, verification can be built-in 14:53:53 dkliban: essentially, everything that touches secret material may be outsourced to an external service 14:54:01 But you don't want your content verified against a key, another user loaded into pulp. 14:54:41 x9c4: I think that's what I'm getting at. The RBAC-like syntax for this is confusing 14:54:58 "accept packages signed by this set of key ids" is the easy case 14:55:37 right. 14:55:38 what if they want "accept package foo signed by this key id, and package bar signed by this other key id" 14:55:41 we need simple facilities for RBAC ownership of specific objects I think this fits nicely with that 14:56:09 (never mind that deb doesn't do per-package signatures - but I digress) 14:57:12 I can envision how to build a thin layer around the gpg python bindings to have pulp handle this along w/ RBAC 14:57:30 I cannot envision how to layer on "call out" to misa's signing service in a generalized way 14:57:50 bmbouter: let me try to eliminate my confusion: are we talking specifically about syncing in this use case? 14:58:06 yes, we are still on that 14:58:14 I guess, that could be a call to a suid binary 14:58:16 I 14:58:47 external service is only needed for *signing*, not verified, right? 14:58:57 The arguments are "keyid to use" and "file to sign" and "mode..." 14:59:14 s/verified/verifying/ 14:59:39 misa, that's my understanding 14:59:54 yeah ... bmbouter, i would like to move on to lines 5 and 6 ... those deal with signing content 14:59:55 mine too 15:00:11 dkliban: +1 15:00:15 Depending on what you mean by artifact 15:00:31 Artifact is the most basic unit in Pulp 3 15:00:42 I don't think (re)signing packages should be Pulp's job 15:00:46 each file is an Artifact ... the same Artifact can belong to different content units 15:00:59 misa: for pulp_ansible that is the use case we want 15:01:09 for pulp to actually perform artifact signing as requested by plugin code 15:01:32 let me clarify. If pulp is not responsible with creating an artifact, it should not be responsible with signing the artifact 15:01:48 an rpm package is not created by pulp, it is uploaded to pulp 15:02:08 a yum repository is created by pulp from multiple rpm packages, so if metadata signing is needed, then pulp must do it 15:02:21 I guess it would be a plugin writer's choice 15:02:23 sure for pulp_ansible collection content also, it's uploaded to pulp, and then at some time later it is signed 15:02:36 whether to support it or not 15:02:50 misa: the metadata for RPM repo is considered an artifact 15:03:00 and the plugin writer needs facilities to sign that artifact 15:03:32 dkliban: which is fine, the distinction I got to is at "who created it" level. Not sure if this is helping though. 15:03:55 it will be up to the plugin author to make that distinction 15:04:49 so when the plugin writer does need to sign an artifact, how will the plugin writer do that? and i heard 2 possible ways 15:04:56 I think pulp_ansible actually wants to sign a file inside of the Artifact (just to make it more confusing) 15:05:09 bmbouter: oh wow 15:05:39 yeah it's the MANIFEST of the tarball's contents not the tarball itself 15:05:47 And the signed file will be the new artifact? 15:06:10 right now they want to offer via a viewset 15:06:26 pulp_ansible already has a pretty chatty API between pulp and the CLI (the Galaxy V3 API) 15:07:35 x9c4, I think it has to be, it will have different checksum and so on 15:07:50 at least I hope we are not updating/changing the existing one 15:07:54 can we take a step back from the pulp_ansible use case? i would like to dicuss whether Pulp can avoid storing private keys 15:07:56 That MANIFEST could be the second artifact on the collection content unit... 15:08:51 May I offer this as for starting the discussion: https://github.com/pulp/pulp_deb/blob/2-master/README.md#signing-support 15:09:38 A similar kind of API, not just for Release (which is an artifact), but to any artifact 15:10:22 misa: how much of this do you see coming from the settings versus from users? 15:10:36 most should be settings, I'd think 15:10:45 instance-level or repo-level settings 15:11:04 plugin writer could extend the signing infrastructure to expose their own variables 15:11:20 so that the signing infrastructure could make decisions on it 15:11:41 maybe things like PLUGIN_TYPE would also be exposed to the signing infrastructure 15:12:10 that'd be part of pulpcore, but the plugin author may specify extras as I was hinting 15:12:25 one of the things I'm struggling with is that the users who need this are not the same people who setup pulp for pulp_ansible at least 15:12:46 bmbouter: there is a third persona, I think 15:12:55 repository admin 15:13:05 admin, repository admin, user 15:13:13 yup that makes sense 15:13:15 users are read-only relative to content 15:13:23 admins have ssh access to the box and can set up stuff 15:13:42 repository admins have control over the repo's settings but not ssh access 15:13:56 an admin sets up the signing infrastructure and decides which keys are acceptable etc. 15:13:59 rest api access 15:14:09 dkliban: yep 15:14:28 that works for me 15:14:51 the repository admin needs to be able to configure a 'signing service' and then add that service to a repository 15:15:04 So the admin needs to put the private key into place, and pulp mus know which repositoy admin may use whicgh one. 15:15:06 repo admins can set up a subset of the keys the admin has configured 15:15:32 so should the repository admin be able to upload a private key to Pulp? 15:15:38 pulp_ansible will probably want to accept these keys over the API 15:15:49 the people configuring the system and those who have the keys are different 15:15:50 Triage will start in 15 minutes! 15:16:17 but one of these 'signing service' could be self-manage 15:16:23 dkliban: it seems highly insecure, but if they so choose, maybe 15:16:36 fao89: let's start triage after this signing discussion wraps up (may not be in 15 min) 15:16:49 So signing-services is a list in the global config? 15:17:03 daviddavis: we will stop at 10:30 ... i will schedule a follow up discussion 15:17:09 ok 15:17:24 dkliban: if there were a pulp_gpg plugin, it would allow you to manipulate keys, but an admin may choose not to use it, or to use it in conjunction with an external service 15:17:44 hey, I noticed that sync with mirror=false is no longer additive, I added a bug here https://pulp.plan.io/issues/5809 15:17:59 iballou: great, we'll triage it today 15:18:00 iballou: cool. we are in a meeting now. thank you! 15:18:15 we should get a meeting channel at some point 15:18:26 At pulpcon we kind of agreed, that such a plugin would only manage public keys. 15:18:53 and if the repo admin chooses to use the pulp_gpg infrastructure, then they implicitly can manage private keys 15:18:55 x9c4: yes but we have new info 15:19:03 x9c4: I think managing private keys is a terrible idea 15:19:31 yes but you also control the external signing service and pulp too right? 15:19:38 x9c4: but if they want to walk for 10 steps, who are we to tell them the end of the cliff is at 5 steps... 15:20:52 lol 15:20:58 bmbouter, but you don't neccessarily controll them via REST and HTTP, but ssh and bash... 15:21:02 misa++ 15:21:03 x9c4: misa's karma is now 22 15:21:11 so what i am hearing so far is that we want to provide a REST API that allows a user to configure a 'SigningService' 15:21:14 x9c4: maybe in a dev/test/prod scenario, you can accept devs to sign their packages using pulp, but in prod they always have to be signed by the external service 15:21:47 low-grade vs. high-grade security levels etc 15:22:16 So you just don't put the proper keys in the wrong places. 15:22:32 I think so. 15:22:46 with an external signing service, you typically don't even have access to the private key 15:22:47 THen we want to be able to associate that SigningService with a repository 15:22:51 Then one of the signing services could use those keys. 15:22:56 it's baked in some kind of a hardware appliance 15:23:26 dkliban: probably plural 15:23:44 dkliban: admin can set up one or more signing services, one of them being provided by pulp_gpg (in the future) 15:24:08 dkliban: and indeed a repository would be associated with a specific signing service 15:24:25 a signing service can be as simple as a config file like the one in https://github.com/pulp/pulp_deb/blob/2-master/README.md#signing-support 15:25:02 misa: yes, we will store the ocnfig in the DB though 15:25:38 dkliban: sure, although hopefully there's no REST API for it 15:25:39 misa: there will be different types of SigningService. and they will each provide a common interface for the plugin writer to create a signed artifact 15:26:38 I think the instance-level config should be command-line only for now 15:26:52 you can certainly add REST APIs for it later 15:27:18 we are almost at the end of our hour. i will send out a summary of this discussion to the ist. including the outstanding questions about the REST API for ocnfiguring signing services. 15:27:20 but that would become complicated really quickly 15:27:21 so pulp_ansible would work very differently than this 15:27:28 i will then schedule another discussion for next Thursday 15:27:48 bmbouter: I have no experience with it, so please share 15:27:48 so maybe we should consider implementing a few in the plugins and seeing where the common parts are 15:27:57 I can explain some next time 15:28:02 +1 15:28:15 thank you everyone for participating today! 15:28:20 +1 15:28:22 misa: I can see how regardless of pulp_ansible what you are describing is very valuable 15:28:27 dkliban, did you mean Tuesday? 15:28:28 +1 15:28:44 I grabbed the tues slot I think 15:28:48 for RBAC 15:28:54 ah 15:28:55 ok 15:28:58 #endmeeting 15:28:58 !end