)]}'
{"swift/common/middleware/acl.py":[{"author":{"_account_id":995,"name":"David Goetz","email":"david.goetz@rackspace.com","username":"david-goetz"},"change_message_id":"bed0cfc69a4c00a4f453a74046dce5eb8361e313","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"ACCOUNT_SYSMETA_ACL_HEADER \u003d get_sys_meta_header("},{"line_number":21,"context_line":"    \u0027account\u0027, \u0027core-access-control\u0027)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def clean_acl(name, value):"},{"line_number":25,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FRms%3D","line":22,"updated":"2014-04-15 16:13:48.000000000","message":"was going to +2 this but why not just have:\n\nACCOUNT_SYSMETA_ACL_HEADER \u003d \u0027x-account-sysmeta-core-access-control\u0027\n\nand then not have that other whole function that\u0027s used only once and only has one line in it? are there other middlewares and stuff that\u0027ll use it? Would anybody ever have  \u0027x-object-sysmeta-core-access-control\u0027 ? If yes- then I\u0027ll +2 it.","commit_id":"7bfcdba7d15a89c2fd372ddd49d48d31319ea585"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1d23f606266d6df78667158c8a7cf383a6ce4b53","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"ACCOUNT_SYSMETA_ACL_HEADER \u003d get_sys_meta_header("},{"line_number":21,"context_line":"    \u0027account\u0027, \u0027core-access-control\u0027)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def clean_acl(name, value):"},{"line_number":25,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FQWw%3D","line":22,"in_reply_to":"AAAAW3%2F%2FRms%3D","updated":"2014-04-15 18:34:51.000000000","message":"yeah idk, all the sysmeta prefix helpers predate this patch, I don\u0027t see the strong need for them over the literals (as you suggested), but I don\u0027t know if that\u0027s a good enough reason to circumvent them?  I think I would at least use the existing prefix function:\n\n     ACCOUNT_SYSMETA_ACL_HEADER \u003d get_sys_meta_prefix(\u0027account\u0027) + \u0027core-access-control\u0027\n\nBut I could never remember if get_sys_meta_prefix included the trailing \u0027-\u0027 or not, so I buried it in request helpers with a new method that I thought made more sense than get_sys_meta_prefix.\n\nTaking some existing examples that pre-date sysmeta, I think certainly it would make sense for future users of sysmeta to say:\n\n    CONTAINER_SYSMETA_ACL_HEADER \u003d get_sys_meta_header(\u0027container\u0027, \u0027core-access-control\u0027)\n\nor\n\n    TEMP_URL_KEY_SYSMETA_HEADER \u003d get_sys_meta_header(\u0027account\u0027, \u0027temp-url-key\u0027)\n\nI think I was mainly just trying to avoid a bunch of repeated calls to get_sys_meta_prefix.  I think it\u0027d be reasonable to even to do away with the constant and just user literals everwhere it\u0027s needed - it\u0027s not like the name of the constant is any shorter - but again, I didn\u0027t feel strongly enough to try and circumvent the existing helpers.\n\nMaybe I should do a pre-req patch that unifies \"all\" the current sysmeta usage on the single function (or dump them in favor of literals) if possible?","commit_id":"7bfcdba7d15a89c2fd372ddd49d48d31319ea585"},{"author":{"_account_id":995,"name":"David Goetz","email":"david.goetz@rackspace.com","username":"david-goetz"},"change_message_id":"e98c6b1e9513653fa208c93d78623294a3390cf6","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"ACCOUNT_SYSMETA_ACL_HEADER \u003d get_sys_meta_header("},{"line_number":21,"context_line":"    \u0027account\u0027, \u0027core-access-control\u0027)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def clean_acl(name, value):"},{"line_number":25,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAXH%2F%2F2%2BA%3D","line":22,"updated":"2014-04-16 21:53:36.000000000","message":"i guess i should have said why not just do this here:\n\nACCOUNT_SYSMETA_ACL_HEADER \u003d get_sys_meta_prefix(\u0027account\u0027) + \u0027core-access-control\u0027\n\nthis isn\u0027t a huge deal of anything but why the extra function? Seems like the existing one already handles it.","commit_id":"e3f0e54f3ac35775eec132d0cd5f235558e0257e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b553f1d3ec7634632b44ae5b345155133b1ed38d","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"ACCOUNT_SYSMETA_ACL_HEADER \u003d get_sys_meta_header("},{"line_number":21,"context_line":"    \u0027account\u0027, \u0027core-access-control\u0027)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def clean_acl(name, value):"},{"line_number":25,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAXH%2F%2F2u0%3D","line":22,"in_reply_to":"AAAAXH%2F%2F2%2BA%3D","updated":"2014-05-09 08:42:27.000000000","message":"yeah, because I thought get_sys_meta_prefix is sorta hard to use - I have to look at it everytime to see if it adds the trailing \u0027-\u0027 or not.  I think baking that domain knowledge into a function with two arguments will be more valuable.  I would remove the prefix function all together but it actually has some use in the gatekeeper.\n\nSince you don\u0027t feel strongly on it i\u0027m inclined to leave the new function in there.  I think the next user of sysmeta is likely to pick that up over the prefix + name approach.","commit_id":"e3f0e54f3ac35775eec132d0cd5f235558e0257e"}],"swift/common/request_helpers.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a7ee1a80b1cb9ae663d0bd77bd5f61a2e2fe48d7","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"def get_sys_meta_header(server_type, name):"},{"line_number":189,"context_line":"    \"\"\""},{"line_number":190,"context_line":"    Returns the full system metadata header for the give server type joined"},{"line_number":191,"context_line":"    with the given name."},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    \u003e\u003e get_sys_meta_header(\u0027account\u0027, \u0027core-access-control\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FElE%3D","line":190,"updated":"2014-03-20 14:24:27.000000000","message":"/give/given","commit_id":"00952fe4184e7c988eb291932ed3732e795eb094"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"af439e891551fb9675fb76829bcae3c7ed441a55","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"def get_sys_meta_header(server_type, name):"},{"line_number":189,"context_line":"    \"\"\""},{"line_number":190,"context_line":"    Returns the full system metadata header for the give server type joined"},{"line_number":191,"context_line":"    with the given name."},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    \u003e\u003e get_sys_meta_header(\u0027account\u0027, \u0027core-access-control\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FB1I%3D","line":190,"in_reply_to":"AAAAWH%2F%2FElE%3D","updated":"2014-03-20 20:08:02.000000000","message":"Done","commit_id":"00952fe4184e7c988eb291932ed3732e795eb094"}],"swift/proxy/controllers/account.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a7ee1a80b1cb9ae663d0bd77bd5f61a2e2fe48d7","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # (although possibly empty) value, otherwise it\u0027s an invalid ACL"},{"line_number":45,"context_line":"        msg \u003d (\u0027Invalid account ACL: %r\\nPossible faulty auth system?\u0027"},{"line_number":46,"context_line":"               % acl_data)"},{"line_number":47,"context_line":"        raise HTTPBadRequest(request\u003dreq, body\u003dmsg)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class AccountController(Controller):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FEgU%3D","line":47,"updated":"2014-03-20 14:24:27.000000000","message":"paranoid, but...you are returning in the response body the value of a sysmeta header (acl_data)  that has by definition been added by middleware and *may* in some future implementation contain sensitive or at least internal info. There is no guarantee that acl_data is what the user provided e.g. if the auth middleware has constructed/annotated acl_data with other (private) parameters.","commit_id":"00952fe4184e7c988eb291932ed3732e795eb094"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"af439e891551fb9675fb76829bcae3c7ed441a55","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # (although possibly empty) value, otherwise it\u0027s an invalid ACL"},{"line_number":45,"context_line":"        msg \u003d (\u0027Invalid account ACL: %r\\nPossible faulty auth system?\u0027"},{"line_number":46,"context_line":"               % acl_data)"},{"line_number":47,"context_line":"        raise HTTPBadRequest(request\u003dreq, body\u003dmsg)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class AccountController(Controller):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FB2I%3D","line":47,"in_reply_to":"AAAAWH%2F%2FEgU%3D","updated":"2014-03-20 20:08:02.000000000","message":"Done","commit_id":"00952fe4184e7c988eb291932ed3732e795eb094"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a7ee1a80b1cb9ae663d0bd77bd5f61a2e2fe48d7","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            acl_dict \u003d parse_acl_v2(acl_data)"},{"line_number":83,"context_line":"            if acl_dict:  # ignore empty dict as empty header"},{"line_number":84,"context_line":"                resp.headers[\u0027x-account-access-control\u0027] \u003d \\"},{"line_number":85,"context_line":"                    format_acl_v2(acl_dict)"},{"line_number":86,"context_line":"        else:"},{"line_number":87,"context_line":"            for header in self.app.swift_owner_headers:"},{"line_number":88,"context_line":"                resp.headers.pop(header, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FEUE%3D","line":85,"updated":"2014-03-20 14:24:27.000000000","message":"I realise there\u0027s no change in behaviour here, but it always struck me as strange that the core moves the sysmeta back into a user-visible header, rather than the auth middleware, which is what set the sysmeta. Related to comment above, but at least in this case it is predicated by swift_owner.","commit_id":"00952fe4184e7c988eb291932ed3732e795eb094"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"af439e891551fb9675fb76829bcae3c7ed441a55","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            acl_dict \u003d parse_acl_v2(acl_data)"},{"line_number":83,"context_line":"            if acl_dict:  # ignore empty dict as empty header"},{"line_number":84,"context_line":"                resp.headers[\u0027x-account-access-control\u0027] \u003d \\"},{"line_number":85,"context_line":"                    format_acl_v2(acl_dict)"},{"line_number":86,"context_line":"        else:"},{"line_number":87,"context_line":"            for header in self.app.swift_owner_headers:"},{"line_number":88,"context_line":"                resp.headers.pop(header, None)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FB2g%3D","line":85,"in_reply_to":"AAAAWH%2F%2FEUE%3D","updated":"2014-03-20 20:08:02.000000000","message":"yup me too.  But there\u0027s no change here, and i\u0027m not sure how to make it any different without breaking the contract.","commit_id":"00952fe4184e7c988eb291932ed3732e795eb094"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a7ee1a80b1cb9ae663d0bd77bd5f61a2e2fe48d7","unresolved":false,"context_lines":[{"line_number":5478,"context_line":""},{"line_number":5479,"context_line":"        self.assertEquals(len(connect_headers), 3)"},{"line_number":5480,"context_line":"        for headers in connect_headers:"},{"line_number":5481,"context_line":"            # backends should all recieve the valid request headers"},{"line_number":5482,"context_line":"            for name, value in req_headers.items():"},{"line_number":5483,"context_line":"                self.assertEquals(headers[name], value)"},{"line_number":5484,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FEdQ%3D","line":5481,"updated":"2014-03-20 14:24:27.000000000","message":"/recieve/receive","commit_id":"00952fe4184e7c988eb291932ed3732e795eb094"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"af439e891551fb9675fb76829bcae3c7ed441a55","unresolved":false,"context_lines":[{"line_number":5478,"context_line":""},{"line_number":5479,"context_line":"        self.assertEquals(len(connect_headers), 3)"},{"line_number":5480,"context_line":"        for headers in connect_headers:"},{"line_number":5481,"context_line":"            # backends should all recieve the valid request headers"},{"line_number":5482,"context_line":"            for name, value in req_headers.items():"},{"line_number":5483,"context_line":"                self.assertEquals(headers[name], value)"},{"line_number":5484,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FB1c%3D","line":5481,"in_reply_to":"AAAAWH%2F%2FEdQ%3D","updated":"2014-03-20 20:08:02.000000000","message":"Done","commit_id":"00952fe4184e7c988eb291932ed3732e795eb094"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a7ee1a80b1cb9ae663d0bd77bd5f61a2e2fe48d7","unresolved":false,"context_lines":[{"line_number":5520,"context_line":""},{"line_number":5521,"context_line":"        self.assertEquals(len(connect_headers), 3)"},{"line_number":5522,"context_line":"        for headers in connect_headers:"},{"line_number":5523,"context_line":"            # backends should all recieve the valid request headers"},{"line_number":5524,"context_line":"            for name, value in req_headers.items():"},{"line_number":5525,"context_line":"                self.assertEquals(headers[name], value)"},{"line_number":5526,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FEXU%3D","line":5523,"updated":"2014-03-20 14:24:27.000000000","message":"/recieve/receive","commit_id":"00952fe4184e7c988eb291932ed3732e795eb094"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"af439e891551fb9675fb76829bcae3c7ed441a55","unresolved":false,"context_lines":[{"line_number":5520,"context_line":""},{"line_number":5521,"context_line":"        self.assertEquals(len(connect_headers), 3)"},{"line_number":5522,"context_line":"        for headers in connect_headers:"},{"line_number":5523,"context_line":"            # backends should all recieve the valid request headers"},{"line_number":5524,"context_line":"            for name, value in req_headers.items():"},{"line_number":5525,"context_line":"                self.assertEquals(headers[name], value)"},{"line_number":5526,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FB1Y%3D","line":5523,"in_reply_to":"AAAAWH%2F%2FEXU%3D","updated":"2014-03-20 20:08:02.000000000","message":"Done","commit_id":"00952fe4184e7c988eb291932ed3732e795eb094"}]}
