Friday, 2017-07-14

*** Dslegends has joined #swift303:02
*** Dslegends has quit IRC03:03
*** _CrustY has quit IRC05:06
*** _CrustY has joined #swift305:10
*** ChadTaljaardt has quit IRC05:38
*** chsc has joined #swift316:29
*** xrb has joined #swift317:53
xrbhi all17:54
xrbI am trying to define ACLs for a bucket using the S3 interface (setup with Swift, Swift3 and Keystone for the auth) to make it readable to a user from another tenant.. Getting some issues with it..17:56
xrbThe ACLs are visible from S3 (using s3cmd) and I am currently trying to see how they are translated as Swift ACL.. But cannot see any currently..17:58
xrbShould it work that way?17:58
timburkexrb: are you using the s3_acl option? if so, they won't be translated to swift acls, but rather stored as sysmeta -- there isn't a direct translation between the two. if not, i think we've got some fairly tight constraints on what all we translate to X-Container-* headers: https://github.com/openstack/swift3/blob/master/swift3/acl_utils.py#L30-L4318:07
timburkethe s3_acl code is (for reasons not terribly clear to me) in https://github.com/openstack/swift3/blob/master/swift3/subresource.py -- i think the sysmeta header should be X-Container-Sysmeta-Swift3-Acl18:10
xrbyes, s3_acl is set. I had issues setting acls without this option...18:19
xrbI'll check the doc18:19
xrbwhat is the best practice re ACLs: to use this option or not? (my focus is to be able to grant bucket access to cross-tenant users)18:20
timburkei'm not sure :-) on the one hand, having it enabled produces better compatibility with S3, allowing things like per-user management and object-level ACLs; on the other, there's no enforcement when going through the Swift API, there's reduced visibility of the settings (as you've noticed), and there are performance penalties for needing to have the object response in hand before making an auth decision18:24
timburkefwiw, i think enabling `force_swift_request_proxy_log` then looking through the proxy logs may shine some light on what's going on18:26
timburkexrb: am i remembering right that you were seeing 404s (as opposed to, say, 403s) when trying to do the cross-tenant request?18:26
xrbwill check this option..18:29
xrbyes, currently I haven't been able to define proper ACL for a cross-tenant user, so that he sees the bucket, he always gets a 404 Bucket Not Found (or similar)..18:29
timburkei'm thinking that the request isn't going to the right swift account... since swift3 doesn't have a global bucket registry, we rely on the auth system to tell us which account to use -- keystone will default to using the account for the user's project, but you can override this by changing the access key id that's used from <access key> to <target account>:<access key>18:34
notmynametimburke: as an aside, it might be interesting to talk about a global bucket registry at the PTG. store a mapping in a dot account a la swauth or something (very likely not an original idea)18:35
timburkenotmyname: that is very much how i imagine doing such a thing. i've got two problems: 1) finding time to do it and 2) figuring out what to do about pre-existing containers18:44
notmynamehttps://assets.listia.com/photos/2361447/original.jpg?s=320x320m&sig=e147e360233071fc&ts=1303259490  <-- /me predicts this will confuse kota_18:47
*** ChadTaljaardt has joined #swift319:00
xrbtimburke: is it possible for a user to get access to a cross-tenant bucket without the '<target account>:<access key>' workaround (given proper ACL's on the bucket)?19:10
timburkexrb: not that i'm aware of19:12
timburkedoes the user need to be able to access buckets in both tenants?19:12
xrbtimburke: ideally yes (for what I want to do). Perhaps it's not the proper way to do it..19:13
timburkethe trouble is that we need a way to know which tenant to use for a given request -- if both tenants have a bucket named example-bucket, how do we know which to use?19:13
xrbI see..19:14
xrbor other possibility: can I define severay users within a tenant, where each user has access to its bucket and not the others? Then I would define an additional user having access to all of them...19:14
timburkexrb: that should be possible... i need to remember how keystone roles interact with ACLs...19:17
timburkeout of curiosity, will they only connect through the S3 api, or would some of them need to use the Swift api? i think both should be doable19:17
xrbProbably only through S3..19:21
timburkeshould make it a bit simpler. i think you just need to give the tenant-wide user an "admin" role, not give that role to the other users, and have the admin create the buckets with appropriate permissions19:28
*** ChadTaljaardt has quit IRC19:40
*** ChadTaljaardt has joined #swift319:53
xrbthat would be great19:55
xrbIf I have two users u1 and u2 within a tenant, what would be proper permission for a bucket to only be accessible by u1? Would that be through ACL?19:57
*** ChadTaljaardt has quit IRC21:46
*** xrb has quit IRC22:19
*** chsc has quit IRC23:55

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!