15:04:39 #startmeeting glance 15:04:40 Meeting started Fri Nov 15 15:04:39 2013 UTC and is due to finish in 60 minutes. The chair is markwash. Information about MeetBot at http://wiki.debian.org/MeetBot. 15:04:41 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 15:04:43 The meeting name has been set to 'glance' 15:04:50 hey 15:04:55 howdy 15:05:17 o/ 15:05:45 hey all, not sure if everyone got a chance to see the latest draft of the doc I put together? 15:06:02 * rosmaita is reading now 15:06:07 same here 15:06:14 thanks for putting together the document mclaren 15:06:16 https://region-a.geo-1.objects.hpcloudsvc.com/v1/61624292678963/public_referenced/consistent-multi-tenant-swift-backend.pdf 15:06:26 #topic swift backend and security 15:06:42 I'm still catching up to the latest revision 15:06:54 np, its all selfishly motivated, I'll like to sleep more peacefully ;-) 15:07:33 I was going over this with a security guy recently, and realized again how desperately we need a fix for this 15:07:40 So I still don't have a perfect proposal... 15:08:03 Closest right now is a 2nd swift (but expensive, admin headache etc) 15:08:28 Anyone know any Keystone gurus? I hit the limit of knowlege on how they might be able to help really fast 15:08:48 mclaren: quick question 15:08:57 sure 15:09:11 for multitenant, are images really stored one-per-container (bottom of p 1)? 15:09:24 (i am completely ignorant of multitenant) 15:09:32 rosmaita: yes 15:09:36 I believe so, I think that must be the case because Swift ACLs are at the container level 15:09:46 thats how we can share images 15:09:52 with per containter image acls 15:10:03 by granting other users read priviledge 15:10:17 yup 15:10:40 I'm interested to know how people feel about 15:11:10 multi-tenant being less fragile than single tenant 15:11:15 like you mentioned mclaren the biggest concern is user being able to access them directly outside of glance and manipulatun them 15:11:23 i definitely see the benefits of multitenant 15:11:47 also ho easy/painful would it be to migrate from single tenant to multitenant? 15:11:58 I do personally wonder if multitenant even really works at a basic level 15:12:23 for a long time the basic sharing aspect did not work with swift acls 15:12:24 markwash: ok, can you expand? do you mean the current implementation? 15:12:27 yeah 15:12:28 well, as mclaren points out, it's a pretty crappy user experience when you list your containers 15:13:21 I also wonder if we could accomplish some of the general robustness to deletion of X by allowing for a more complex default structure among swift containers in the single tenant store 15:13:45 could you elaborate markwash 15:13:48 like, instead of having one default set of credentials for all writes 15:13:53 we could have some sort of round-robin 15:14:06 so that folks generally ended up with multiple equally balanced containers 15:14:44 so password change issues with that! :-P 15:14:51 so/no 15:15:08 let's talk about password changes for a sec 15:15:13 I have a naive hope 15:15:15 have we eliminated all possible work arounds for password issue? 15:15:29 markwash: types faster than me :p 15:15:39 which is that it is possible to have multiple passwords simultaneously valid on a given account 15:15:42 I think that the user access key keystone blueprint gives hope in that area 15:16:01 mclaren: can you link to the bp? 15:16:17 it would allow rolling upload of credentials (key now rather than p/w) 15:16:18 so that way you can do a simple "add second creds", "roll update to creds", "delete old creds" 15:16:30 ah good 15:16:55 mclaren: how much of the issue with password updates would that resolve? 15:16:56 https://blueprints.launchpad.net/keystone/+spec/access-key-authentication 15:17:12 a lot 15:17:15 and we would abstract away the user credentials from locatuion 15:17:31 and store it elsewhere like config? 15:17:39 is that what you re thinking about mark? 15:17:48 but personally I feel multi-tenant has fewer paths to disaster 15:18:20 if we switched to user access keys we're still storing them on disk and can still leak them 15:18:45 mclaren: I definitely get that. . I'm just worried about the changes to swift we might need for multi-tenant to get someplace good 15:18:57 the Zen of no-password in the multi-tenant approach I find hugely appealing, and the distributed container nature 15:18:59 multi-tenant on an internal-only swift is pretty much the "best" solution 15:19:25 but I don't think its viable for any other deployers than the largest 15:19:39 but unfortunately hardest one to actually do 15:19:40 sure, I do wonder if there's some keystone 'magic' that could help (waves hands) 15:20:02 rosmaita: and me were having the same discussion if we could blacklist/white ips to contains 15:20:06 *containers in swift 15:20:35 talking about passwords again for a moment 15:20:57 I think the highest priority concern on the list is the fact that passwords are being stored in a database (even encrypted is pretty bad) 15:21:44 yes, makes it impossible to change pw without big DB operations (very slow) 15:22:12 rosmaita: well, we could fix the speed of that DB update just by normalizing out the credentials to their own table 15:22:20 yes and no, if the API process has an all powerful password in plaintext it can leak it -- this has happened before and is *bad* 15:22:48 but again, that means anyone who owns the db anywhere can try to attack those passwords 15:23:25 mclaren: hmm, good point. . but the only way to get around that is to figure out going completely passwordless, right? 15:23:41 I think the single tenant password change is solvable, but I want to go futher! 15:24:03 right 15:24:15 would temporary URLs in swift be useful here? 15:24:28 ie a signed URL that doesn't require extra creds? 15:24:31 okiedokie. . I'll back off for a bit. . I'm still really interested in your "best" approach :-) 15:25:04 notmyname: I think that does help us with the "client downloads image directly from swift" story 15:25:05 notmyname: we would still need the store creentials in a single tenant approach right? 15:25:33 iccha: you would need to know the shared secret, which is set on a per-account basis 15:25:38 notmyname: but glance still needs credentials in some form to have permissions to generate that temp url 15:25:42 yeah 15:26:36 markwash: if the shared secret is known, the tempurl can be generated with no other access required 15:26:53 notmyname: but we would need to store the shared secret 15:26:56 markwash: and you can fetcht he shared secret if you have the creds for the account (ie it's set in account metadata) 15:27:04 o/ 15:27:08 interesting 15:27:11 and I'm guessing you already have the user creds 15:27:27 I did think about a per container shared secret with signing as part of a dual auth approach, is that roughtly what we're talking about? 15:27:46 wonder if you all thinking about shared secrets, we can try to think about a 3 pass auth mechnism 15:27:51 http://docs.openstack.org/developer/swift/misc.html#module-swift.common.middleware.tempurl 15:28:07 are we trying to suggest a way to prevent a user modifying objects in their own container? 15:29:27 * markwash is not sure 15:29:32 so glance would have shared secret+user token from context. but users would not have shared secret so cannot access it ? is this a swft setting to ensure dual auth? 15:29:55 it seems kind of like we're all focusing on different things right now 15:30:09 which is good for parallelism, but really hard to construct a coherent conversation out of it 15:30:20 +1 15:30:35 seems like you were looking for a way to give people access to an object without having to create many different containers. tempurl is a way to do it 15:31:06 so the focus right now I think is still, how could we make multitenant viable so that we could go passwordless 15:31:20 mclaren: do you agree with that focus for the moment? 15:31:23 ok, we can investigate if tempurl potentially helps with that 15:31:28 markwash: yes 15:31:59 I think extra swift hardware is one way, and the holy grail is something software based 15:32:19 software based -> something like an internal only endpoint 15:32:29 exactly 15:32:32 or a way to mark a container ABAC as "internal only" ? 15:32:42 like a virtual region (waves handes) 15:32:47 yeah 15:32:54 you read my mind mclaren 15:33:01 ABAC = attribute based access control, where something like your ip, or the interface you came in on, is an attribute 15:33:23 yeah like the whitelisting concept 15:33:30 one potential problem with this approach 15:33:38 is that it would cause headaches for existing billing folks 15:33:59 because I think the normal right now is to charge folks for their swift storage & their glance image storage 15:34:17 is the charge different? 15:34:21 that's on the swift side, there may be keystone possibilities (eg https://github.com/openstack/keystone/commit/601eeb50b60a2e99041690fe19238202bc203503) but my knowlege on keystone is poor 15:34:45 iccha: well, in such a system, if we rolled this out it would suddenly be charging double, even if they're the same 15:35:08 personally I think billing is a secondary issue; design a robust system then figure out how to charge the $ 15:35:20 mclaren: that makes sense 15:35:32 it would require coordination before rollout 15:35:40 but not insurmountable 15:35:42 mclaren: would users be able to see such a container in their account? 15:35:56 so, anyone know any keystone gurus? :-) 15:36:23 markwash: if we keep pass in db and send it as a "digest" we can aboid whitelisting 15:36:27 markwash: ideally no, ideally users wouldn't even know swift is the backend 15:37:09 (single tenant) 15:37:16 well, one thing to keep in mind is that this effort would be concurrent to the general effort of always publishing the location details 15:37:16 o/ 15:37:29 oh, hey, I know a keystone guru :-) 15:37:31 and keystone guu appears 15:37:32 hi dolphm 15:37:36 \o/ 15:38:05 A keystone guru uses knowledge! Its super effective. 15:38:23 hey dolphm general background doc for some night time reading https://region-a.geo-1.objects.hpcloudsvc.com/v1/61624292678963/public_referenced/consistent-multi-tenant-swift-backend.pdf 15:38:49 mclaren: thanks 15:39:13 np, its basically a big shopping list with no solid proposals :-P 15:39:32 although I do think that a multi-tenant approach feels right 15:39:46 maybe we could start by asking dolphm the questions we had about what keystone could do or might be planning to do 15:40:04 (i'm reading this doc, but fire away) 15:40:31 mclaren: i think you could probably state the questions best 15:40:42 ok 15:41:03 I think we're wondering if there is something which exists in keystone 15:41:12 or could be reasonably implemented 15:41:37 which would give us a 'consistent multi tenant' solution 15:42:02 in the multi-tenant case, shouldn't glance be querying the container for the images, rather than relying on it's own stale db? 15:42:24 swift objects would be stored on behalf of a user but would not be directly accessible by that user 15:42:58 except for a special group of users, everyone else only needs read access to the container for the multi-tenant solution? 15:43:19 hmm 15:43:24 its like we're looking for another swift endpoint that in general is guaranteed to have some sort of internal-only ABAC restriction on it 15:43:25 it seems like you want some images shared, and some images managed privately per-tenant? 15:43:36 markwash: abac or rbac? 15:43:40 abac 15:43:49 markwash: based on what attributes? 15:43:54 dolphm: shared images can be handled easily enough with swift ACLs I think 15:44:19 network location, as a straw man 15:44:29 so I think considering just the non-shared case at first keeps it a little simpler 15:44:48 is it one container per image in the multi-tenant case? 15:44:55 yes 15:45:03 i guess the other way around (one image per container) 15:45:05 that's just there for sharing, we could change that 15:45:36 markwash: is there object level acl in swift? 15:45:37 swift ACLs are enforced on a container so it may be practical to keep that way of working 15:45:43 sharing can be done with tempurls. which would then allow you to do one glance account + one container per tenant 15:45:43 iccha: i thought there was? 15:45:57 chmouel: o/ 15:46:03 no object level ACLs in swift I believe 15:46:13 no. ACLs are container-based 15:46:23 notmyname: thanks! 15:46:33 iccha: let's just forget about sharing for now. if we had this swift solution we could make it so only glance has access to the containers and still manage sharing 15:46:56 makes sense 15:47:22 dolphm: on a slightly different thread, can I use trusts/delegation to give someone a token that only allows them to download a single object from swift? 15:48:06 mclaren: no object acl indeed 15:48:14 dolphm: ^ 15:48:32 markwash: unfortunately, no 15:48:38 markwash: roles wouldn't be granular enough 15:48:46 k, I guess tempurl is enough for that anyway 15:49:53 mclaren: is it fair to say that the big need in this approach is for swift containers that are only accessible over the internal endpoint? 15:50:11 i'd argue with the 'accidental deletion of X' "characteristics" -- those are natural consequences and shouldn't be avoided 15:50:36 FWIW, tempurl is essentially an auth system itself. if someone in the keystone world wanted something to work on, I supposed keystone could implement it too 15:50:51 dolphm: not sure I understand? 15:51:21 mclaren: notmyname: it's a "bearer" url, the "token" is just encoded in the URL 15:53:13 notmyname: is there anyway to create a container that the "owner" is not allowed to delete or list, but that the glance service user would be allowed to manipulate? 15:53:15 markwash: really its a way to store the data out of the direct reach of users 15:53:31 “Users should not be able to perform operations to manipulate image data directly via the Swift Api." why not? 15:53:33 markwash: that would be possible to do in auth middleware in swift (ie without changing "core" swift) 15:53:59 notmyname: gotcha, so it would require new work, but that work would have a pretty clear place to live? 15:53:59 dolphm: we want glance to reflect the current state of images 15:54:00 dolphm: image data is immutable 15:54:02 markwash: but I'm not sure I understand the use case of storing something on behalf of someone where they can't do anything to it 15:54:16 markwash: correct 15:54:35 notmyname: store images in the users swift account, but don't let them muck with it and inevitably generate support calls 15:54:37 notmyname: they can access it, but only in ways defined by Glance 15:54:42 the reason is that glance stores all metadata about the image, need to keep metadata consistent with the actual image 15:54:52 mclaren's way of saying it was better :-) 15:54:56 iccha: why is that mutually exclusive with users deleting images in swift, etc? why can't glance pull information from swift? 15:55:33 markwash: hmm...actually I was typing that answer thinking about the ABAC, not the "hidden" containers 15:55:34 markwash's had real world cred :-) 15:55:49 notmyname: are hidden containers a thing? 15:55:53 dolphm: no 15:56:19 notmyname: well, blocking "list objects" for that container may be sufficient 15:56:36 markwash: isn't that essentially about tying stuff together at the identity/billing level? what I'm not clear on is why that requires special features in swift 15:56:51 notmyname: it is, and that's how our other approach works 15:57:01 markwash: this sounds like policies at container level :) 15:57:03 however, we really like just reusing the users credentials when they contact us 15:57:04 ie why not have a separate glance account? 15:57:22 notmyname: right, 'something' in keystone may help us... 15:57:33 mclaren: i'm not sure what that would be :( 15:57:36 notmyname: essentially, we don't want to store a set of credentials that has super-ultra-mega access to all the images in the cloud 15:57:46 it seems like the blocker here is glance being unwilling/unable to read from swift 15:57:50 dolphm: guru status revoked :-P 15:58:32 markwash: ok (unlike an admin token to keystone? /troll) 15:58:39 markwash: ++ 15:58:43 fwiw, we ran into a similar issue at Rackspace when creating Cloud Backup 15:59:00 it is a big security risk to dump everyone's data together under one ueber account 15:59:03 notmyname: troll point taken :-) 15:59:04 dolphm: here is a usecase. there is no way to maintain the integrity of snapshots if we allow users to directly access and manipulate their images in swift 15:59:20 notmyname: 15:59:28 kgriffs: tell us more 15:59:41 but, on the other hand, we don't want users messing around with their backup sets directly 15:59:53 dolphm: hmm, I'm not sure I understand what you mean about "not being willing to read from swift" ? 15:59:59 kgriffs: what's was the solution?! 16:00:03 and it adds a lot of noise when they are looking at their account in the control panel or whatever 16:00:46 markwash: a bunch of the points in that pdf would be resolved by understanding that glance's knowledge of image states is stale, and pulling the latest data from swift as necessary 16:00:50 dolphm: we don't have a great one; just naming the backup containers something that makes it obvious what they are 16:00:56 dolphm: ah okay I see 16:01:03 kgriffs: that's kind of what i was thinking here 16:01:08 and putting a 0-byte file in there that says "do not delete this container!" 16:01:15 glance-image-{uuid} or something 16:01:21 as the container name 16:01:51 hmmm but that way we cannot control downloads directly 16:01:53 mclaren: I'd like to put my ptl hat on for the last 5 minutes of this meeting, is it that time? 16:01:59 sure 16:02:03 tbh, if there just a way to not make those containers show up when listing their account, that would be great 16:02:12 sorry, make them *not* show up 16:02:30 I think the passwordless approach shows a lot of promise, but still needs a lot more thought 16:02:57 if we can't quite figure it out, I still think we should make progress by moving the swift "single-tenant" creds into config from the db 16:03:20 in that case, we're cutting out a significant opportunity to attack those creds 16:03:38 in my view, the most significant opportunity 16:03:45 16:03:46 phew 16:03:49 markwash: are you concerned about storing password(encrypted) on disk as well? 16:04:02 iccha: somewhat, but not nearly as much as storing it in DB 16:04:24 how about a new location format to denote read creds from file? 16:04:42 something like https+swift://:@xxx.com 16:04:56 I suspect that may be illegal right now 16:05:00 mclaren: yeah, then I think we could make an online migration tool for it that would update a row at a time 16:05:16 we'd have to be careful with set image location -- to forbid that 16:05:55 I gotta run, but if you have more stuff you need to discuss about swift, please ask in #openstack-swift 16:05:56 mclaren: I like that way of thinking about it actually 16:05:59 "read from file" 16:06:06 notmyname: thanks 16:06:15 that puts a logical cap around how long those creds exist in the code 16:06:27 so opportunities to accidentally log them are much less 16:06:38 though moving creds out of the location is the biggest win there too 16:06:47 imnsho 16:07:24 there is patch with exists to substute it with hiddenuser or some other value right now 16:07:32 ok, thanks to everyone for their time. Let us know if you come up with some genious way to add consistency to the multi-tenant backend 16:08:35 should I bang the gavel? 16:08:46 yup, thanks markwash 16:08:50 #endmeeting