)]}'
{".git-correct":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"gitdir: ../.git/modules/swift"}],"source_content_type":"application/octet-stream","patch_set":11,"id":"AAAAUH%2F%2FD6k%3D","line":1,"updated":"2014-01-18 00:07:49.000000000","message":"what\u0027s this file for?","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"}],"doc/source/deployment_guide.rst":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"e7dadd77b7a66079315cbf80fc312083526b6c5e","unresolved":false,"context_lines":[{"line_number":929,"context_line":"                              default header   definition of a swift_owner is"},{"line_number":930,"context_line":"                              prefixes\u003e        up to the auth system in use,"},{"line_number":931,"context_line":"                                               but usually indicates"},{"line_number":932,"context_line":"                                               administrative responsibilities."},{"line_number":933,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"[tempauth]"}],"source_content_type":"text/x-rst","patch_set":13,"id":"AAAAUH%2F%2BlSk%3D","line":932,"updated":"2014-01-24 06:32:27.000000000","message":"I don\u0027t think this is in here any more.","commit_id":"d97db22a6509c6308a66511099e795ac5364aca8"}],"doc/source/overview_auth.rst":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                       **acl_data)"},{"line_number":63,"context_line":"``"},{"line_number":64,"context_line":"Note that, if your ACL is very long, it may be split across multiple headers,"},{"line_number":65,"context_line":"e.g. ``X-Account-Access-Control-1, X-Account-Access-Control-2, ...``  Using"},{"line_number":66,"context_line":"the ``format_acl`` method will split the JSON string if necessary, ensure"},{"line_number":67,"context_line":"that JSON is encoded as ASCII (using e.g. \u0027\\u1234\u0027 for Unicode).  While"},{"line_number":68,"context_line":"it\u0027s permissible to manually send ``curl`` commands containing"}],"source_content_type":"text/x-rst","patch_set":11,"id":"AAAAUH%2F%2FD4E%3D","line":65,"updated":"2014-01-18 00:07:49.000000000","message":"I think this only existed in an earlier patch set and has been removed from this one, but I could be wrong.","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":60,"context_line":"  acl_data \u003d { \u0027admin\u0027: [\u0027alice\u0027], \u0027read-write\u0027: [\u0027bob\u0027, \u0027carol\u0027] }"},{"line_number":61,"context_line":"  headers \u003d format_acl(version\u003d2, _header_name\u003d\u0027x-account-access-control\u0027,"},{"line_number":62,"context_line":"                       **acl_data)"},{"line_number":63,"context_line":"``"},{"line_number":64,"context_line":"Using the ``format_acl`` method will ensure"},{"line_number":65,"context_line":"that JSON is encoded as ASCII (using e.g. \u0027\\u1234\u0027 for Unicode).  While"},{"line_number":66,"context_line":"it\u0027s permissible to manually send ``curl`` commands containing"}],"source_content_type":"text/x-rst","patch_set":12,"id":"AAAAUH%2F%2Brtw%3D","line":63,"updated":"2014-01-23 09:54:41.000000000","message":"this does not render for me.  I think using \"::\" at the end of the above paragraph and dropping the double backticks would help (at least it did for me)\n\nActually I get a few sphinx errors building this document - let me know if you need help building docs, but the saio guide has a brief explanation.","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"5766ef394d11916cc44abc1fa2278910c0e9cdab","unresolved":false,"context_lines":[{"line_number":60,"context_line":"  acl_data \u003d { \u0027admin\u0027: [\u0027alice\u0027], \u0027read-write\u0027: [\u0027bob\u0027, \u0027carol\u0027] }"},{"line_number":61,"context_line":"  headers \u003d format_acl(version\u003d2, _header_name\u003d\u0027x-account-access-control\u0027,"},{"line_number":62,"context_line":"                       **acl_data)"},{"line_number":63,"context_line":"``"},{"line_number":64,"context_line":"Using the ``format_acl`` method will ensure"},{"line_number":65,"context_line":"that JSON is encoded as ASCII (using e.g. \u0027\\u1234\u0027 for Unicode).  While"},{"line_number":66,"context_line":"it\u0027s permissible to manually send ``curl`` commands containing"}],"source_content_type":"text/x-rst","patch_set":12,"id":"AAAAUH%2F%2Bn0U%3D","line":63,"in_reply_to":"AAAAUH%2F%2Brtw%3D","updated":"2014-01-23 22:31:58.000000000","message":"I *think* the doc errors are fixed now.","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":61,"context_line":"  headers \u003d format_acl(version\u003d2, _header_name\u003d\u0027x-account-access-control\u0027,"},{"line_number":62,"context_line":"                       **acl_data)"},{"line_number":63,"context_line":"``"},{"line_number":64,"context_line":"Using the ``format_acl`` method will ensure"},{"line_number":65,"context_line":"that JSON is encoded as ASCII (using e.g. \u0027\\u1234\u0027 for Unicode).  While"},{"line_number":66,"context_line":"it\u0027s permissible to manually send ``curl`` commands containing"},{"line_number":67,"context_line":"``X-Account-Access-Control`` headers, you should exercise caution when"}],"source_content_type":"text/x-rst","patch_set":12,"id":"AAAAUH%2F%2Brs8%3D","line":64,"updated":"2014-01-23 09:54:41.000000000","message":":func:`format_acl` ???","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"5766ef394d11916cc44abc1fa2278910c0e9cdab","unresolved":false,"context_lines":[{"line_number":61,"context_line":"  headers \u003d format_acl(version\u003d2, _header_name\u003d\u0027x-account-access-control\u0027,"},{"line_number":62,"context_line":"                       **acl_data)"},{"line_number":63,"context_line":"``"},{"line_number":64,"context_line":"Using the ``format_acl`` method will ensure"},{"line_number":65,"context_line":"that JSON is encoded as ASCII (using e.g. \u0027\\u1234\u0027 for Unicode).  While"},{"line_number":66,"context_line":"it\u0027s permissible to manually send ``curl`` commands containing"},{"line_number":67,"context_line":"``X-Account-Access-Control`` headers, you should exercise caution when"}],"source_content_type":"text/x-rst","patch_set":12,"id":"AAAAUH%2F%2Bn0Q%3D","line":64,"in_reply_to":"AAAAUH%2F%2Brs8%3D","updated":"2014-01-23 22:31:58.000000000","message":"Done","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9b3277854f25ef8511cda4a9064bf346738a68ba","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  from swift.common.middleware.acl import format_acl"},{"line_number":60,"context_line":"  acl_data \u003d { \u0027admin\u0027: [\u0027alice\u0027], \u0027read-write\u0027: [\u0027bob\u0027, \u0027carol\u0027] }"},{"line_number":61,"context_line":"  headers \u003d format_acl(version\u003d2, _header_name\u003d\u0027x-account-access-control\u0027,"},{"line_number":62,"context_line":"                       **acl_data)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"Using the :func:`format_acl` method will ensure"},{"line_number":65,"context_line":"that JSON is encoded as ASCII (using e.g. \u0027\\u1234\u0027 for Unicode).  While"}],"source_content_type":"text/x-rst","patch_set":18,"id":"AAAAUH%2F%2BRHw%3D","line":62,"updated":"2014-01-28 19:25:45.000000000","message":"This needs to be updated/made consistent with the comment in tempauth.py:\n\n        from swift.common.middleware.acl import format_acl\n        acl_data \u003d { \u0027admin\u0027: [\u0027alice\u0027], \u0027read-write\u0027: [\u0027bob\u0027, \u0027carol\u0027] }\n        header_value \u003d format_acl(version\u003d2, acl_dict\u003dacl_data)","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"dc8e708863815d0178aa9a4fd90fd867ac677f4a","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  from swift.common.middleware.acl import format_acl"},{"line_number":60,"context_line":"  acl_data \u003d { \u0027admin\u0027: [\u0027alice\u0027], \u0027read-write\u0027: [\u0027bob\u0027, \u0027carol\u0027] }"},{"line_number":61,"context_line":"  headers \u003d format_acl(version\u003d2, _header_name\u003d\u0027x-account-access-control\u0027,"},{"line_number":62,"context_line":"                       **acl_data)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"Using the :func:`format_acl` method will ensure"},{"line_number":65,"context_line":"that JSON is encoded as ASCII (using e.g. \u0027\\u1234\u0027 for Unicode).  While"}],"source_content_type":"text/x-rst","patch_set":18,"id":"AAAAUH%2F%2BOSs%3D","line":62,"in_reply_to":"AAAAUH%2F%2BRHw%3D","updated":"2014-01-29 01:33:03.000000000","message":"Done","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"}],"etc/proxy-server.conf-sample":[{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"7f1f126a4d7a3ef48ff46223f9d67eb17f8e37a9","unresolved":false,"context_lines":[{"line_number":198,"context_line":"# usually indicates administrative responsibilities."},{"line_number":199,"context_line":"# swift_owner_headers \u003d x-container-read, x-container-write, x-container-sync-key, x-container-sync-to, x-account-meta-temp-url-key, x-account-meta-temp-url-key-2, x-account-access-control"},{"line_number":200,"context_line":"#"},{"line_number":201,"context_line":"# Headers may also be restricted to swift_owners by specifying a prefix."},{"line_number":202,"context_line":"# swift_owner_header_prefixes \u003d x-account-access-control-"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":8,"id":"AAAAUH%2F%2FjEQ%3D","line":201,"updated":"2014-01-11 19:33:35.000000000","message":"Probably worth being explicit that this list is comma-separated, since the example doesn\u0027t disambiguate between that and space-separated.","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"64fd7d26c7afaa3adb5808be41eb169d663e46ac","unresolved":false,"context_lines":[{"line_number":198,"context_line":"# usually indicates administrative responsibilities."},{"line_number":199,"context_line":"# swift_owner_headers \u003d x-container-read, x-container-write, x-container-sync-key, x-container-sync-to, x-account-meta-temp-url-key, x-account-meta-temp-url-key-2, x-account-access-control"},{"line_number":200,"context_line":"#"},{"line_number":201,"context_line":"# Headers may also be restricted to swift_owners by specifying a prefix."},{"line_number":202,"context_line":"# swift_owner_header_prefixes \u003d x-account-access-control-"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":8,"id":"AAAAUH%2F%2FV3c%3D","line":201,"in_reply_to":"AAAAUH%2F%2FjEQ%3D","updated":"2014-01-14 21:27:48.000000000","message":"Reverting this change, since swift_owner_header_prefixes are unnecessary if multiheaders aren\u0027t implemented.","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4030a51e2c138408dc12671fa4cbf75e93c2ef0a","unresolved":false,"context_lines":[{"line_number":199,"context_line":"# swift_owner_headers \u003d x-container-read, x-container-write, x-container-sync-key, x-container-sync-to, x-account-meta-temp-url-key, x-account-meta-temp-url-key-2, x-account-access-control"},{"line_number":200,"context_line":"#"},{"line_number":201,"context_line":"# Headers may also be restricted to swift_owners by specifying a prefix."},{"line_number":202,"context_line":"# swift_owner_header_prefixes \u003d x-account-access-control-"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"[filter:tempauth]"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"AAAAUH%2F%2Fly4%3D","line":202,"updated":"2014-01-10 18:47:49.000000000","message":"The comment implies that instead of specifying swift_owner_headers I could specify:\n\n swift_owner_header_prefixes \u003d  x-container-\n\nand expect that alone to restrict x-container-write, x-container-read. But this patch only implements the prefix approach for account requests - perhaps it should be applied in container controller too?","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"64fd7d26c7afaa3adb5808be41eb169d663e46ac","unresolved":false,"context_lines":[{"line_number":199,"context_line":"# swift_owner_headers \u003d x-container-read, x-container-write, x-container-sync-key, x-container-sync-to, x-account-meta-temp-url-key, x-account-meta-temp-url-key-2, x-account-access-control"},{"line_number":200,"context_line":"#"},{"line_number":201,"context_line":"# Headers may also be restricted to swift_owners by specifying a prefix."},{"line_number":202,"context_line":"# swift_owner_header_prefixes \u003d x-account-access-control-"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"[filter:tempauth]"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"AAAAUH%2F%2FV3A%3D","line":202,"in_reply_to":"AAAAUH%2F%2Fly4%3D","updated":"2014-01-14 21:27:48.000000000","message":"Reverting this change, since swift_owner_header_prefixes are unnecessary if multiheaders aren\u0027t implemented.","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"}],"swift/common/middleware/acl.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"caaa7dddb69abaf529c954a9839830fb58bbd002","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    if header_name in headers:"},{"line_number":238,"context_line":"        return headers[header_name]"},{"line_number":239,"context_line":"    else:"},{"line_number":240,"context_line":"        header_keys \u003d [h for h in headers if h.startswith(header_name)]"},{"line_number":241,"context_line":"        if not header_keys:"},{"line_number":242,"context_line":"            return None"},{"line_number":243,"context_line":"        return \u0027\u0027.join([headers[hk] for hk in sorted(header_keys)])"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Ffcs%3D","line":240,"updated":"2014-01-13 11:29:01.000000000","message":"headers is a swift.common.swob.HeaderKeyDict, thus the comparison is not working here","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import json"},{"line_number":17,"context_line":"from swift.common.utils import urlparse"},{"line_number":18,"context_line":"from swift.common.request_helpers import data_from_header, data_to_header"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FDwA%3D","line":16,"updated":"2014-01-18 00:07:49.000000000","message":"Should probably use \"from swift.common.utils import json\" as that gets you the simplejson/json conditional import.","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        return {}"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"def parse_acl(*args, **kwargs):"},{"line_number":224,"context_line":"    if (len(args) \u003d\u003d 1 and type(args[0]) in (str, unicode, None.__class__)"},{"line_number":225,"context_line":"            and not kwargs):"},{"line_number":226,"context_line":"        return parse_acl_v1(*args)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2Brxc%3D","line":223,"updated":"2014-01-23 09:54:41.000000000","message":"I find the interface for this method to be particularly confusing, and the introspection sorta scary.  Do we *need* to be implicit?  Maybe parse_acl should just always point to parse_acl_v1 and we use parse_acl_v2 when that\u0027s what we mean?  IDK, maybe \"liberal in what you accept\" applies but I\u0027m skeptical - maybe a doc string would help me out?","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"5766ef394d11916cc44abc1fa2278910c0e9cdab","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        return {}"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"def parse_acl(*args, **kwargs):"},{"line_number":224,"context_line":"    if (len(args) \u003d\u003d 1 and type(args[0]) in (str, unicode, None.__class__)"},{"line_number":225,"context_line":"            and not kwargs):"},{"line_number":226,"context_line":"        return parse_acl_v1(*args)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2Bm8g%3D","line":223,"in_reply_to":"AAAAUH%2F%2Brxc%3D","updated":"2014-01-23 22:31:58.000000000","message":"Done","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":267,"context_line":"       {\u0027admin\u0027: [...], \u0027read-write\u0027: [...], \u0027read-only\u0027: [...]}"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    Caller must check for ValueError (syntactically invalid header) and"},{"line_number":270,"context_line":"    NotImplementedError (future version, checked for forward-compatibility)"},{"line_number":271,"context_line":"    \"\"\""},{"line_number":272,"context_line":"    acl \u003d parse_acl(headers\u003dinfo.get(\u0027sysmeta\u0027, {}),"},{"line_number":273,"context_line":"                    header_name\u003d\u0027access-control\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2Bryo%3D","line":270,"updated":"2014-01-23 09:54:41.000000000","message":"I think the :returns: :raises: syntax would render better.\n\nCan the interface be simplified to always return a dict (maybe empty?)  I see one place where temp auth checks for \"if not acct_acls\"","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"5766ef394d11916cc44abc1fa2278910c0e9cdab","unresolved":false,"context_lines":[{"line_number":267,"context_line":"       {\u0027admin\u0027: [...], \u0027read-write\u0027: [...], \u0027read-only\u0027: [...]}"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    Caller must check for ValueError (syntactically invalid header) and"},{"line_number":270,"context_line":"    NotImplementedError (future version, checked for forward-compatibility)"},{"line_number":271,"context_line":"    \"\"\""},{"line_number":272,"context_line":"    acl \u003d parse_acl(headers\u003dinfo.get(\u0027sysmeta\u0027, {}),"},{"line_number":273,"context_line":"                    header_name\u003d\u0027access-control\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BnOw%3D","line":270,"in_reply_to":"AAAAUH%2F%2Bryo%3D","updated":"2014-01-23 22:31:58.000000000","message":"Done","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    NotImplementedError (future version, checked for forward-compatibility)"},{"line_number":271,"context_line":"    \"\"\""},{"line_number":272,"context_line":"    acl \u003d parse_acl(headers\u003dinfo.get(\u0027sysmeta\u0027, {}),"},{"line_number":273,"context_line":"                    header_name\u003d\u0027access-control\u0027)"},{"line_number":274,"context_line":"    if acl is None:"},{"line_number":275,"context_line":"        return None"},{"line_number":276,"context_line":"    admin_members \u003d acl.get(\u0027admin\u0027, [])"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BrwM%3D","line":273,"updated":"2014-01-23 09:54:41.000000000","message":"again on the explicit, just use parse_acl_v2?  I think the return value for parse_acl can be like a tuple like ([], []) in some cases... idk I\u0027m sure you could justify that that would never happen because of reasons...","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"e7dadd77b7a66079315cbf80fc312083526b6c5e","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                   (see :func:`parse_acl_v1` or :func:`parse_acl_v2`)"},{"line_number":238,"context_line":"    :returns: the return value of :func:`parse_acl_v1` or :func:`parse_acl_v2`"},{"line_number":239,"context_line":"    \"\"\""},{"line_number":240,"context_line":"    if (len(args) \u003d\u003d 1 and type(args[0]) in (str, unicode, None.__class__)"},{"line_number":241,"context_line":"            and not kwargs):"},{"line_number":242,"context_line":"        return parse_acl_v1(*args)"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2Bldc%3D","line":240,"updated":"2014-01-24 06:32:27.000000000","message":"Minor nit: I\u0027d rather see \n\n    (args[0] is None or type(args[0]) in (str, unicode))\n\n\"None.__class__\" just looks odd to me. I mean, I know what it is; it looks odd that we\u0027re comparing to the type of a singleton. However, if you prefer the way it is, I\u0027ll get over it.","commit_id":"d97db22a6509c6308a66511099e795ac5364aca8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9b3277854f25ef8511cda4a9064bf346738a68ba","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    return (clean_acl(header_name, result) if header_name else result)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def format_acl_v2(header_name, acl_dict):"},{"line_number":143,"context_line":"    \"\"\""},{"line_number":144,"context_line":"    Returns a version-2 Swift ACL dict of (header, value) pairs for the inputs."},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BRrc%3D","line":142,"updated":"2014-01-28 19:25:45.000000000","message":"header_name is not used","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"dc8e708863815d0178aa9a4fd90fd867ac677f4a","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    return (clean_acl(header_name, result) if header_name else result)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def format_acl_v2(header_name, acl_dict):"},{"line_number":143,"context_line":"    \"\"\""},{"line_number":144,"context_line":"    Returns a version-2 Swift ACL dict of (header, value) pairs for the inputs."},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BOWw%3D","line":142,"in_reply_to":"AAAAUH%2F%2BRrc%3D","updated":"2014-01-29 01:33:03.000000000","message":"Left over from careful migration to new function signature requested in previous patchset.  Fixed now.","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9b3277854f25ef8511cda4a9064bf346738a68ba","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def format_acl_v2(header_name, acl_dict):"},{"line_number":143,"context_line":"    \"\"\""},{"line_number":144,"context_line":"    Returns a version-2 Swift ACL dict of (header, value) pairs for the inputs."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    HTTP headers for Version 2 ACLs have the following form:"},{"line_number":147,"context_line":"      Header-Name: {\"arbitrary\":\"json\",\"encoded\":\"string\"}"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BRqs%3D","line":144,"updated":"2014-01-28 19:25:45.000000000","message":"Func returns just a single header value (I guess this is a hangover from the multi-header version)","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"dc8e708863815d0178aa9a4fd90fd867ac677f4a","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def format_acl_v2(header_name, acl_dict):"},{"line_number":143,"context_line":"    \"\"\""},{"line_number":144,"context_line":"    Returns a version-2 Swift ACL dict of (header, value) pairs for the inputs."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    HTTP headers for Version 2 ACLs have the following form:"},{"line_number":147,"context_line":"      Header-Name: {\"arbitrary\":\"json\",\"encoded\":\"string\"}"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BOWo%3D","line":144,"in_reply_to":"AAAAUH%2F%2BRqs%3D","updated":"2014-01-29 01:33:03.000000000","message":"Ditto -- fixed.","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9b3277854f25ef8511cda4a9064bf346738a68ba","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    :param acl_dict: dict of arbitrary data to put in the ACL; see specific"},{"line_number":160,"context_line":"                     auth systems such as tempauth for supported values"},{"line_number":161,"context_line":"    :returns: a HeaderKeyDict of (header-name, header-value) pairs which"},{"line_number":162,"context_line":"              encode the ACL"},{"line_number":163,"context_line":"    \"\"\""},{"line_number":164,"context_line":"    return json.dumps(acl_dict, ensure_ascii\u003dTrue, separators\u003d(\u0027,\u0027, \u0027:\u0027),"},{"line_number":165,"context_line":"                      sort_keys\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BRq4%3D","line":162,"updated":"2014-01-28 19:25:45.000000000","message":"ditto: function just returns header-value","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"dc8e708863815d0178aa9a4fd90fd867ac677f4a","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    :param acl_dict: dict of arbitrary data to put in the ACL; see specific"},{"line_number":160,"context_line":"                     auth systems such as tempauth for supported values"},{"line_number":161,"context_line":"    :returns: a HeaderKeyDict of (header-name, header-value) pairs which"},{"line_number":162,"context_line":"              encode the ACL"},{"line_number":163,"context_line":"    \"\"\""},{"line_number":164,"context_line":"    return json.dumps(acl_dict, ensure_ascii\u003dTrue, separators\u003d(\u0027,\u0027, \u0027:\u0027),"},{"line_number":165,"context_line":"                      sort_keys\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BOWk%3D","line":162,"in_reply_to":"AAAAUH%2F%2BRq4%3D","updated":"2014-01-29 01:33:03.000000000","message":"ditto -- fixed.","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"638a3d8e878030cc6c203e82afca22882fd1a5fe","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :param kwargs: keyword args appropriate for the selected ACL syntax version"},{"line_number":175,"context_line":"                   (see :func:`format_acl_v1` or :func:`format_acl_v2`)"},{"line_number":176,"context_line":"    \"\"\""},{"line_number":177,"context_line":"    if version \u003d\u003d 1:"},{"line_number":178,"context_line":"        return format_acl_v1("},{"line_number":179,"context_line":"            groups\u003dkwargs.get(\u0027groups\u0027), referrers\u003dkwargs.get(\u0027referrers\u0027),"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BUAM%3D","line":176,"updated":"2014-01-28 04:40:04.000000000","message":"I just can\u0027t fathom this love of kwargs for fixed arguments like header_name. If it were a normal argument, it could be documented.","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"dc8e708863815d0178aa9a4fd90fd867ac677f4a","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :param kwargs: keyword args appropriate for the selected ACL syntax version"},{"line_number":175,"context_line":"                   (see :func:`format_acl_v1` or :func:`format_acl_v2`)"},{"line_number":176,"context_line":"    \"\"\""},{"line_number":177,"context_line":"    if version \u003d\u003d 1:"},{"line_number":178,"context_line":"        return format_acl_v1("},{"line_number":179,"context_line":"            groups\u003dkwargs.get(\u0027groups\u0027), referrers\u003dkwargs.get(\u0027referrers\u0027),"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BOWI%3D","line":176,"in_reply_to":"AAAAUH%2F%2BUAM%3D","updated":"2014-01-29 01:33:03.000000000","message":"Each version takes different args/kwargs.  The doc for format_acl basically says \"This delegates to the version-specific function.  See the doc for whichever version you\u0027re using.\"","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9b3277854f25ef8511cda4a9064bf346738a68ba","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    return allow"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"def acls_from_account_info(info):"},{"line_number":276,"context_line":"    \"\"\""},{"line_number":277,"context_line":"    Extract the account ACLs from the given account_info, and return the ACLs."},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BRFo%3D","line":275,"updated":"2014-01-28 19:25:45.000000000","message":"more of a question than comment: I\u0027m curious why this function is here rather than in tempauth.py since it exposes the structure of the \u0027opaque\u0027 acl json blob? Or is it that the top level elements (admin, read-write, read-only) should be generic to any auth system?","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"dc8e708863815d0178aa9a4fd90fd867ac677f4a","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    return allow"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"def acls_from_account_info(info):"},{"line_number":276,"context_line":"    \"\"\""},{"line_number":277,"context_line":"    Extract the account ACLs from the given account_info, and return the ACLs."},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BOfw%3D","line":275,"in_reply_to":"AAAAUH%2F%2BRFo%3D","updated":"2014-01-29 01:33:03.000000000","message":"The goal was to make it easy for other auth systems to behave like TempAuth if they choose to do so.","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9b3277854f25ef8511cda4a9064bf346738a68ba","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    :raises ValueError: on a syntactically invalid header"},{"line_number":284,"context_line":"    :raises NotImplementedError: on future-version ACLs (checked for"},{"line_number":285,"context_line":"       forward-compatibility)"},{"line_number":286,"context_line":"    \"\"\""},{"line_number":287,"context_line":"    acl \u003d parse_acl("},{"line_number":288,"context_line":"        version\u003d2, data\u003dinfo.get(\u0027sysmeta\u0027, {}).get(\u0027core-access-control\u0027))"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BQ70%3D","line":285,"updated":"2014-01-28 19:25:45.000000000","message":"? can\u0027t see where NotImplementedError is raised","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"dc8e708863815d0178aa9a4fd90fd867ac677f4a","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    :raises ValueError: on a syntactically invalid header"},{"line_number":284,"context_line":"    :raises NotImplementedError: on future-version ACLs (checked for"},{"line_number":285,"context_line":"       forward-compatibility)"},{"line_number":286,"context_line":"    \"\"\""},{"line_number":287,"context_line":"    acl \u003d parse_acl("},{"line_number":288,"context_line":"        version\u003d2, data\u003dinfo.get(\u0027sysmeta\u0027, {}).get(\u0027core-access-control\u0027))"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BOUg%3D","line":285,"in_reply_to":"AAAAUH%2F%2BQ70%3D","updated":"2014-01-29 01:33:03.000000000","message":"The NotImplementedError is not implemented.\n(Fixed.)","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    groups, referrers \u003d groups or [], referrers or []"},{"line_number":137,"context_line":"    referrers \u003d [\u0027.r:%s\u0027 % r for r in referrers]"},{"line_number":138,"context_line":"    result \u003d \u0027,\u0027.join(groups + referrers)"},{"line_number":139,"context_line":"    return (clean_acl(header_name, result) if header_name else result)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def format_acl_v2(acl_dict):"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMe0%3D","line":139,"updated":"2014-01-29 19:17:50.000000000","message":"Does anyone ever call this function?  I grepped for \"format_acl_v1\" and \"format_acl\" but I *think* it\u0027s not being used anywhere?","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        \u0027admin\u0027: admin_members,"},{"line_number":292,"context_line":"        \u0027read-write\u0027: readwrite_members,"},{"line_number":293,"context_line":"        \u0027read-only\u0027: readonly_members,"},{"line_number":294,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMf4%3D","line":294,"updated":"2014-01-29 19:17:50.000000000","message":"All the key\u0027s are here already - where\u0027s acls_from_req_headers!?","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"}],"swift/common/middleware/tempauth.py":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        \"\"\""},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        try:"},{"line_number":324,"context_line":"            _, account, container, obj \u003d req.split_path(1, 4, True)"},{"line_number":325,"context_line":"        except ValueError:"},{"line_number":326,"context_line":"            self.logger.increment(\u0027errors\u0027)"},{"line_number":327,"context_line":"            return HTTPNotFound(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FDWY%3D","line":324,"updated":"2014-01-18 00:07:49.000000000","message":"should be \"_junk\" instead of \"_\"; I think we pretend like we have i18n, and gettext installs _ in builtins or something.\n\nI mean, there are no calls to _ in the rest of the function so it doesn\u0027t technically break anything, but it\u0027s still a little land mine for the future.","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            user_group_set \u003d set(user_groups)"},{"line_number":398,"context_line":"            if user_group_set.intersection(acct_acls[\u0027admin\u0027]):"},{"line_number":399,"context_line":"                req.environ[\u0027swift_owner\u0027] \u003d True"},{"line_number":400,"context_line":"                self.logger.debug(\u0027User %s allowed by X-Account-Access-Control\u0027"},{"line_number":401,"context_line":"                                  % account_user)"},{"line_number":402,"context_line":"                return None"},{"line_number":403,"context_line":"            if (user_group_set.intersection(acct_acls[\u0027read-write\u0027]) and"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FDNA%3D","line":400,"updated":"2014-01-18 00:07:49.000000000","message":"As long as we\u0027re talking debug messages, could you add the acl name (admin/read-write/read-only) to the log message so it\u0027s clear which one let the user in?","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            if (user_group_set.intersection(acct_acls[\u0027read-write\u0027]) and"},{"line_number":404,"context_line":"                    (container or req.method in (\u0027GET\u0027, \u0027HEAD\u0027))):"},{"line_number":405,"context_line":"                # The RW ACL allows all operations to containers/objects, but"},{"line_number":406,"context_line":"                # only GET/HEAD/OPTIONS to accounts"},{"line_number":407,"context_line":"                self.logger.debug(\u0027User %s allowed by X-Account-Access-Control\u0027"},{"line_number":408,"context_line":"                                  % account_user)"},{"line_number":409,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FDKA%3D","line":406,"updated":"2014-01-18 00:07:49.000000000","message":"your comment says GET/HEAD/OPTIONS, but your code says GET/HEAD","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":610,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":611,"context_line":"    conf.update(local_conf)"},{"line_number":612,"context_line":"    register_swift_info(\u0027tempauth\u0027)"},{"line_number":613,"context_line":"    register_swift_info(\u0027account_acls\u0027)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def auth_filter(app):"},{"line_number":616,"context_line":"        return TempAuth(app, conf)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FDMk%3D","line":613,"updated":"2014-01-18 00:07:49.000000000","message":"perhaps \"tempauth_account_acls\" instead? That makes it clear which auth system (if there are multiple in use) supports them.","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":346,"context_line":"            for key in result:"},{"line_number":347,"context_line":"                if key not in req.environ.get(\u0027account_acl_allowed_keys\u0027, []):"},{"line_number":348,"context_line":"                    return HTTPBadRequest("},{"line_number":349,"context_line":"                        request\u003dreq, body\u003d\u0027Invalid key in ACL: %r\u0027 % key)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        user_groups \u003d (req.remote_user or \u0027\u0027).split(\u0027,\u0027)"},{"line_number":352,"context_line":"        account_user \u003d user_groups[1] if len(user_groups) \u003e 1 else None"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BruI%3D","line":349,"updated":"2014-01-23 09:54:41.000000000","message":"Here we validate the keys, seems reasonable, I\u0027m sure other implementations will have their own set of checks they want to apply to the dictionary, but in our case why not make sure that the value is a list?  I was able to set \u0027{\"read-only\": \"test2:tester2\"}\u0027 and it wasn\u0027t so fun.","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"5766ef394d11916cc44abc1fa2278910c0e9cdab","unresolved":false,"context_lines":[{"line_number":346,"context_line":"            for key in result:"},{"line_number":347,"context_line":"                if key not in req.environ.get(\u0027account_acl_allowed_keys\u0027, []):"},{"line_number":348,"context_line":"                    return HTTPBadRequest("},{"line_number":349,"context_line":"                        request\u003dreq, body\u003d\u0027Invalid key in ACL: %r\u0027 % key)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        user_groups \u003d (req.remote_user or \u0027\u0027).split(\u0027,\u0027)"},{"line_number":352,"context_line":"        account_user \u003d user_groups[1] if len(user_groups) \u003e 1 else None"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BnOg%3D","line":349,"in_reply_to":"AAAAUH%2F%2BruI%3D","updated":"2014-01-23 22:31:58.000000000","message":"Done","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":616,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":617,"context_line":"    conf.update(local_conf)"},{"line_number":618,"context_line":"    register_swift_info(\u0027tempauth\u0027)"},{"line_number":619,"context_line":"    register_swift_info(\u0027account_acls\u0027)"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def auth_filter(app):"},{"line_number":622,"context_line":"        return TempAuth(app, conf)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BroA%3D","line":619,"updated":"2014-01-23 09:54:41.000000000","message":"This should be an attribute of the tempauth \"feature\" it\u0027s not a clusterwide feature (at least I think a multi-auth pipeline would be confused by which who supports account_acls)\n\n    register_swift_info(\u0027tempauth\u0027, account_acls\u003d\u0027v2\u0027)\n\n...or just True, or something like that.","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"5766ef394d11916cc44abc1fa2278910c0e9cdab","unresolved":false,"context_lines":[{"line_number":616,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":617,"context_line":"    conf.update(local_conf)"},{"line_number":618,"context_line":"    register_swift_info(\u0027tempauth\u0027)"},{"line_number":619,"context_line":"    register_swift_info(\u0027account_acls\u0027)"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def auth_filter(app):"},{"line_number":622,"context_line":"        return TempAuth(app, conf)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2Bm8s%3D","line":619,"in_reply_to":"AAAAUH%2F%2BroA%3D","updated":"2014-01-23 22:31:58.000000000","message":"This and your account controller comment are getting at the same issue: is the X-Account-Access-Control a core Swift thing, or a per-auth-system thing?  My thought was that it\u0027s a core Swift thing: different auth systems are required to coordinate on their use of it, and if they fail to do so, they introduce incompatibilities that prohibit conflicting auth systems from both being in the pipeline (or more mildly, doing so would break certain features of those auth systems).\n\nIt\u0027s certainly possible to say that each auth system defines its own header and maps it to sysmeta independently, but then that obscures the fact that coordination may be necessary.\n\nContainer ACLs were what I had in mind for a model.  The implementation of container ACLs is scattered throughout the code base (some in the base proxy controller, some in get_container_info, some in the proxy server, etc.), but definitely not localized in tempauth, for example.\n\nI agree that it\u0027s legit to say that we can improve on this, but how about the first pass of account ACLs goes in like this, and we refactor later?","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"e7dadd77b7a66079315cbf80fc312083526b6c5e","unresolved":false,"context_lines":[{"line_number":641,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":642,"context_line":"    conf.update(local_conf)"},{"line_number":643,"context_line":"    register_swift_info(\u0027tempauth\u0027)"},{"line_number":644,"context_line":"    register_swift_info(\u0027account_acls\u0027)"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"    def auth_filter(app):"},{"line_number":647,"context_line":"        return TempAuth(app, conf)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2BlO4%3D","line":644,"updated":"2014-01-24 06:32:27.000000000","message":"The way you\u0027re calling register_swift_info, it\u0027s announcing that the whole cluster supports account ACLs, and that might not be true. It\u0027s a reasonable thing to run two separate auth systems with different reseller prefixes. Maybe just\n\n    register_swift_info(\u0027tempauth\u0027, account_acls\u003dTrue)\n\nThat leaves the problem of how to determine which auth system governs a given account, but that problem was there already, so let\u0027s not tackle it here.","commit_id":"d97db22a6509c6308a66511099e795ac5364aca8"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"8aca551cee0180bbdacc0073e51c92fd8ea3d27b","unresolved":false,"context_lines":[{"line_number":640,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":641,"context_line":"    conf.update(local_conf)"},{"line_number":642,"context_line":"    register_swift_info(\u0027tempauth\u0027)"},{"line_number":643,"context_line":"    register_swift_info(\u0027account_acls\u0027)"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"    def auth_filter(app):"},{"line_number":646,"context_line":"        return TempAuth(app, conf)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F%2Bdmg%3D","line":643,"updated":"2014-01-25 18:57:25.000000000","message":"Could you change this to\n\n    register_swift_info(\u0027tempauth\u0027, account_acls\u003dTrue)\n\ninstead?\n\nSince there can be multiple auth systems active at a given time, it doesn\u0027t really make sense to say the cluster as a whole supports account ACLs. (If a client wants to know if they can store account ACLs at all, they can determine that from the Swift version, which is already reported via /info.)\n\n(I mentioned this before, but there was a lot of text in the last review and I tend to ramble, so it was easy to miss.)","commit_id":"76fde897ff9e8bc93eb97faee4e7877f4e402e5c"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"638a3d8e878030cc6c203e82afca22882fd1a5fe","unresolved":false,"context_lines":[{"line_number":306,"context_line":"         * :func:`swift.common.middleware.acl.parse_acl()`"},{"line_number":307,"context_line":"         * :func:`swift.common.middleware.acl.format_acl()`"},{"line_number":308,"context_line":"        \"\"\""},{"line_number":309,"context_line":"        info \u003d get_account_info(req.environ, self.app, swift_source\u003d\u0027TA\u0027)"},{"line_number":310,"context_line":"        try:"},{"line_number":311,"context_line":"            acls \u003d acls_from_account_info(info)"},{"line_number":312,"context_line":"        except ValueError as e1:"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BT1o%3D","line":309,"updated":"2014-01-28 04:40:04.000000000","message":"Is there a particular reason we break with the old way of pre-loading the ACL into the request attribute (e.g.  req[\u0027acacl\u0027] or something) in controller? I understand that get_info() is cached, so this extra call is not a big deal. But still... The docs define the header name stored as sysmeta anyhow, so it\u0027s not a blow to flexibility to make core do it: it\u0027s not interpreting the ACL value as was mentioned in docs. So... why?\n\n(reading more I realized that the surgery to make account controller more like container controller would take more lines of code, but it seems that would not be too bad)","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"dc8e708863815d0178aa9a4fd90fd867ac677f4a","unresolved":false,"context_lines":[{"line_number":306,"context_line":"         * :func:`swift.common.middleware.acl.parse_acl()`"},{"line_number":307,"context_line":"         * :func:`swift.common.middleware.acl.format_acl()`"},{"line_number":308,"context_line":"        \"\"\""},{"line_number":309,"context_line":"        info \u003d get_account_info(req.environ, self.app, swift_source\u003d\u0027TA\u0027)"},{"line_number":310,"context_line":"        try:"},{"line_number":311,"context_line":"            acls \u003d acls_from_account_info(info)"},{"line_number":312,"context_line":"        except ValueError as e1:"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BOYQ%3D","line":309,"in_reply_to":"AAAAUH%2F%2BT1o%3D","updated":"2014-01-29 01:33:03.000000000","message":"By \"the old way\", you mean the mechanism used by X-Container-Read/Write?  The early-development answer was that I had trouble following that, so I tried to implement something I found easier to follow.  (Given my lack of understanding, it seemed too easy for me to mess things up.)\n\nThe later-development answer is that I\u0027m trying to keep as much functionality out of core Swift as possible, if it can be given to the middleware (as per gholt\u0027s comments).  In addition to keeping core Swift smaller and simpler, it also keeps the code more localized -- anyone making a change has fewer files to look through.","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9b3277854f25ef8511cda4a9064bf346738a68ba","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        acl_header \u003d \u0027x-account-access-control\u0027"},{"line_number":326,"context_line":"        acl_data \u003d req.headers.get(acl_header)"},{"line_number":327,"context_line":"        result \u003d parse_acl(version\u003d2, data\u003dreq.headers.get(acl_header))"},{"line_number":328,"context_line":"        if (not result and acl_data not in (\u0027\u0027, \u0027{}\u0027)):"},{"line_number":329,"context_line":"            return \u0027Syntax error in input (%r)\u0027 % acl_data"},{"line_number":330,"context_line":"        for key in result:"},{"line_number":331,"context_line":"            # Don\u0027t blindly reject a non-tempauth key -- it might be valid."}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BRjQ%3D","line":328,"updated":"2014-01-28 19:25:45.000000000","message":"s/req.headers.get(acl_header)/acl_data  maybe","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"dc8e708863815d0178aa9a4fd90fd867ac677f4a","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        acl_header \u003d \u0027x-account-access-control\u0027"},{"line_number":326,"context_line":"        acl_data \u003d req.headers.get(acl_header)"},{"line_number":327,"context_line":"        result \u003d parse_acl(version\u003d2, data\u003dreq.headers.get(acl_header))"},{"line_number":328,"context_line":"        if (not result and acl_data not in (\u0027\u0027, \u0027{}\u0027)):"},{"line_number":329,"context_line":"            return \u0027Syntax error in input (%r)\u0027 % acl_data"},{"line_number":330,"context_line":"        for key in result:"},{"line_number":331,"context_line":"            # Don\u0027t blindly reject a non-tempauth key -- it might be valid."}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BOeg%3D","line":328,"in_reply_to":"AAAAUH%2F%2BRjQ%3D","updated":"2014-01-29 01:33:03.000000000","message":"Done","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9b3277854f25ef8511cda4a9064bf346738a68ba","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        if acl_data is not None:"},{"line_number":369,"context_line":"            error \u003d self.errors_in_acl(req)"},{"line_number":370,"context_line":"            if error:"},{"line_number":371,"context_line":"                msg \u003d \u0027Invalid ACL: %s\\n\\nInput: %s\\n\u0027 % (error, acl_data)"},{"line_number":372,"context_line":"                headers \u003d [(\u0027Content-Type\u0027, \u0027text/plain; charset\u003dUTF-8\u0027)]"},{"line_number":373,"context_line":"                return HTTPBadRequest(request\u003dreq, headers\u003dheaders, body\u003dmsg)"},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BRQ4%3D","line":371,"updated":"2014-01-28 19:25:45.000000000","message":"This could be more explicit in referring to the X-Account-Access-Control header rather than just \u0027ACL\u0027","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"dc8e708863815d0178aa9a4fd90fd867ac677f4a","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        if acl_data is not None:"},{"line_number":369,"context_line":"            error \u003d self.errors_in_acl(req)"},{"line_number":370,"context_line":"            if error:"},{"line_number":371,"context_line":"                msg \u003d \u0027Invalid ACL: %s\\n\\nInput: %s\\n\u0027 % (error, acl_data)"},{"line_number":372,"context_line":"                headers \u003d [(\u0027Content-Type\u0027, \u0027text/plain; charset\u003dUTF-8\u0027)]"},{"line_number":373,"context_line":"                return HTTPBadRequest(request\u003dreq, headers\u003dheaders, body\u003dmsg)"},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUH%2F%2BOdk%3D","line":371,"in_reply_to":"AAAAUH%2F%2BRQ4%3D","updated":"2014-01-29 01:33:03.000000000","message":"Done","commit_id":"34dc8d429dc0a5f3a371e498e9557bf4a7e6c64a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        \"\"\""},{"line_number":308,"context_line":"        info \u003d get_account_info(req.environ, self.app, swift_source\u003d\u0027TA\u0027)"},{"line_number":309,"context_line":"        try:"},{"line_number":310,"context_line":"            acls \u003d acls_from_account_info(info)"},{"line_number":311,"context_line":"        except ValueError as e1:"},{"line_number":312,"context_line":"            self.logger.warn(\"Invalid ACL stored in metadata: %r\" % e1)"},{"line_number":313,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMiQ%3D","line":310,"updated":"2014-01-29 19:17:50.000000000","message":"I think having this in a library is very helpful.","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        except ValueError as e1:"},{"line_number":312,"context_line":"            self.logger.warn(\"Invalid ACL stored in metadata: %r\" % e1)"},{"line_number":313,"context_line":"            return None"},{"line_number":314,"context_line":"        except NotImplementedError as e2:"},{"line_number":315,"context_line":"            self.logger.warn(\"ACL version exceeds middleware version: %r\" % e2)"},{"line_number":316,"context_line":"            return None"},{"line_number":317,"context_line":"        return acls"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMjY%3D","line":314,"updated":"2014-01-29 19:17:50.000000000","message":"This doesn\u0027t get raised?","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        \"\"\""},{"line_number":321,"context_line":"        Return a user-readable string indicating the errors in the input ACL,"},{"line_number":322,"context_line":"        or None if there are no errors."},{"line_number":323,"context_line":"        \"\"\""},{"line_number":324,"context_line":"        acl_header \u003d \u0027x-account-access-control\u0027"},{"line_number":325,"context_line":"        acl_data \u003d req.headers.get(acl_header)"},{"line_number":326,"context_line":"        result \u003d parse_acl(version\u003d2, data\u003dacl_data)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMjQ%3D","line":323,"updated":"2014-01-29 19:17:50.000000000","message":"Should the doc string include the reference/description to the side effect?","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        for key in tempauth_acl_keys:"},{"line_number":339,"context_line":"            if key not in result:"},{"line_number":340,"context_line":"                continue"},{"line_number":341,"context_line":"            if not isinstance(result[key], list):"},{"line_number":342,"context_line":"                return \u0027Value for key %r must be a list\u0027 % key"},{"line_number":343,"context_line":"            for grantee in result[key]:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMjA%3D","line":340,"updated":"2014-01-29 19:17:50.000000000","message":"I think it\u0027d be clearer if these two loops were just expressed as a single trip over the data passed in.","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":345,"context_line":"                    return \u0027Elements of %r list must be strings\u0027 % key"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        # Everything looks fine, no errors found"},{"line_number":348,"context_line":"        internal_hdr \u003d get_sys_meta_prefix(\u0027account\u0027) + \u0027core-access-control\u0027"},{"line_number":349,"context_line":"        req.headers[internal_hdr] \u003d req.headers.pop(acl_header)"},{"line_number":350,"context_line":"        return None"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMjI%3D","line":348,"updated":"2014-01-29 19:17:50.000000000","message":"how does an implementer know to stick it here and that it has to be json?","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        # At this point, TempAuth is convinced that it is authoritative."},{"line_number":371,"context_line":"        # If you are sending an ACL header, it must be syntactically valid"},{"line_number":372,"context_line":"        # according to TempAuth\u0027s rules for ACL syntax."},{"line_number":373,"context_line":"        acl_data \u003d req.headers.get(\u0027x-account-access-control\u0027)"},{"line_number":374,"context_line":"        if acl_data is not None:"},{"line_number":375,"context_line":"            error \u003d self.extract_acl_and_report_errors(req)"},{"line_number":376,"context_line":"            if error:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMgc%3D","line":373,"updated":"2014-01-29 19:17:50.000000000","message":"this header is validated on every request, GET\u0027s and HEAD\u0027s included.  Why?","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":372,"context_line":"        # according to TempAuth\u0027s rules for ACL syntax."},{"line_number":373,"context_line":"        acl_data \u003d req.headers.get(\u0027x-account-access-control\u0027)"},{"line_number":374,"context_line":"        if acl_data is not None:"},{"line_number":375,"context_line":"            error \u003d self.extract_acl_and_report_errors(req)"},{"line_number":376,"context_line":"            if error:"},{"line_number":377,"context_line":"                msg \u003d \u0027X-Account-Access-Control invalid: %s\\n\\nInput: %s\\n\u0027 % ("},{"line_number":378,"context_line":"                    error, acl_data)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMg8%3D","line":375,"updated":"2014-01-29 19:17:50.000000000","message":"I think acls_from_account_info is super great, and think a symmetric counterpart acls_from_req_headers would be even more useful as the complexity of extract_acl_and_report_errors grows.  Also Swift is slowly moving towards the pattern of \"raise HTTPException\" (you see it alot in newer middleware slo \u0026 bulk) and I think it would fit the bill for this utility function so that you can have it return the computed value rather than doing the \"persistence\" as a side effect.","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                return None"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"        # Check for access via X-Account-Access-Control"},{"line_number":430,"context_line":"        acct_acls \u003d self.account_acls(req)"},{"line_number":431,"context_line":"        if acct_acls:"},{"line_number":432,"context_line":"            # At least one account ACL is set in this account\u0027s sysmeta data,"},{"line_number":433,"context_line":"            # so we should see whether this user is authorized by the ACLs."}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMgA%3D","line":430,"updated":"2014-01-29 19:17:50.000000000","message":"I like having this here, even in delayed denial kicks in the account existence check was going to have to run anyway so why not load it here and make the decision the first time (if possible).","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"}],"swift/common/request_helpers.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    :param header_name: (str) user-visible name of the metadata key"},{"line_number":205,"context_line":"    :param headers: a HeaderKeyDict containing the request headers"},{"line_number":206,"context_line":"    :returns: headers[header_name] or None if header_name is not a dict key"},{"line_number":207,"context_line":"    \"\"\""},{"line_number":208,"context_line":"    if not isinstance(headers, HeaderKeyDict):"},{"line_number":209,"context_line":"        headers \u003d HeaderKeyDict(headers)"},{"line_number":210,"context_line":"    return headers.get(header_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BrqM%3D","line":207,"updated":"2014-01-23 09:54:41.000000000","message":"I had no idea what this did from the docstring, do we ever pass it something that is *not* a HeaderKeyDict because it didn\u0027t jump out at me... meh, what\u0027s a bit more stack in python!  I guess there is the fact that req.headers.get(header_name) has an expected meaning to me and others thave have used webob/swob, but data_from_headers(header_name, req.headers) i\u0027ll have to get used to.","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"5766ef394d11916cc44abc1fa2278910c0e9cdab","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    :param header_name: (str) user-visible name of the metadata key"},{"line_number":205,"context_line":"    :param headers: a HeaderKeyDict containing the request headers"},{"line_number":206,"context_line":"    :returns: headers[header_name] or None if header_name is not a dict key"},{"line_number":207,"context_line":"    \"\"\""},{"line_number":208,"context_line":"    if not isinstance(headers, HeaderKeyDict):"},{"line_number":209,"context_line":"        headers \u003d HeaderKeyDict(headers)"},{"line_number":210,"context_line":"    return headers.get(header_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BnNA%3D","line":207,"in_reply_to":"AAAAUH%2F%2BrqM%3D","updated":"2014-01-23 22:31:58.000000000","message":"It started when I accidentally wrote my tests with dicts rather than HeaderKeyDicts, and then I figured that people might want to test it out in an interactive Python session.","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    :param header_name: (str) user-visible name of the metadata key"},{"line_number":220,"context_line":"    :param headers: a HeaderKeyDict containing the request headers"},{"line_number":221,"context_line":"    :returns: headers[header_name] or None if header_name is not a dict key"},{"line_number":222,"context_line":"    \"\"\""},{"line_number":223,"context_line":"    return HeaderKeyDict({header_name: data})"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BrqI%3D","line":222,"updated":"2014-01-23 09:54:41.000000000","message":"This can\u0027t be right?  This always returns a HeaderKeyDict? It\u0027s like a Factory or something?","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"5766ef394d11916cc44abc1fa2278910c0e9cdab","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    :param header_name: (str) user-visible name of the metadata key"},{"line_number":220,"context_line":"    :param headers: a HeaderKeyDict containing the request headers"},{"line_number":221,"context_line":"    :returns: headers[header_name] or None if header_name is not a dict key"},{"line_number":222,"context_line":"    \"\"\""},{"line_number":223,"context_line":"    return HeaderKeyDict({header_name: data})"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BnM0%3D","line":222,"in_reply_to":"AAAAUH%2F%2BrqI%3D","updated":"2014-01-23 22:31:58.000000000","message":"Copy-paste documentation error.  Fixed.","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"}],"swift/proxy/controllers/account.py":[{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"7f1f126a4d7a3ef48ff46223f9d67eb17f8e37a9","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        if acls is not None:    # but empty dict is fine!"},{"line_number":47,"context_line":"            swift_info \u003d get_swift_info()"},{"line_number":48,"context_line":"            max_len \u003d len(intname) + swift_info.get(\u0027swift\u0027, {}).get("},{"line_number":49,"context_line":"                \u0027max_meta_value_length\u0027, 256)  # conservative by a few chars"},{"line_number":50,"context_line":"            new_headers \u003d format_acl("},{"line_number":51,"context_line":"                version\u003d2, _header_name\u003dintname, _max_header_length\u003dmax_len,"},{"line_number":52,"context_line":"                **acls)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FjFA%3D","line":49,"updated":"2014-01-11 19:33:35.000000000","message":"The \"max_meta_value_length\" is a restriction on user metadata.  If you look at swift.common.constraints.check_metadata(), a header named \"a-account-access-control\" or \"x-account-sysmeta-...\" will only have the value compared against MAX_HEADER_SIZE, but will stop checking further because the header key will not start with \"x-account-meta\".\n\nSo I think the constraint used here should be\n\n  swift.common.constraints.MAX_HEADER_SIZE\n\nnot \"max_meta_value_length\".\n\nAlso, only the value\u0027s length is checked, so if you want to be conservative by a few chars, it\u0027d be clearer as\n\n  from swift.common.constraints import MAX_HEADER_SIZE\n  ...\n  max_len \u003d MAX_HEADER_SIZE - 12\n\nor however conservative you wanted to be (I don\u0027t think it\u0027s necessary, though).\n\nA functional test which proves an acl value exactly equal to MAX_HEADER_SIZE can be stored and retrieved would then also be good (if there\u0027s an existing test like that using the \"max_meta_value_length\", it could just be adjusted to use the correct constraint).","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"64fd7d26c7afaa3adb5808be41eb169d663e46ac","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        if acls is not None:    # but empty dict is fine!"},{"line_number":47,"context_line":"            swift_info \u003d get_swift_info()"},{"line_number":48,"context_line":"            max_len \u003d len(intname) + swift_info.get(\u0027swift\u0027, {}).get("},{"line_number":49,"context_line":"                \u0027max_meta_value_length\u0027, 256)  # conservative by a few chars"},{"line_number":50,"context_line":"            new_headers \u003d format_acl("},{"line_number":51,"context_line":"                version\u003d2, _header_name\u003dintname, _max_header_length\u003dmax_len,"},{"line_number":52,"context_line":"                **acls)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FV2E%3D","line":49,"in_reply_to":"AAAAUH%2F%2FjFA%3D","updated":"2014-01-14 21:27:48.000000000","message":"Removed much of this code in the process of ripping out multiheader support.  This is now checked via old code in constraints.py\u0027s check_metadata().","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"7f1f126a4d7a3ef48ff46223f9d67eb17f8e37a9","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            max_len \u003d len(intname) + swift_info.get(\u0027swift\u0027, {}).get("},{"line_number":49,"context_line":"                \u0027max_meta_value_length\u0027, 256)  # conservative by a few chars"},{"line_number":50,"context_line":"            new_headers \u003d format_acl("},{"line_number":51,"context_line":"                version\u003d2, _header_name\u003dintname, _max_header_length\u003dmax_len,"},{"line_number":52,"context_line":"                **acls)"},{"line_number":53,"context_line":"            for int_hdr, value in new_headers.items():"},{"line_number":54,"context_line":"                ext_hdr \u003d \u0027x-account-\u0027 + int_hdr[len(prefix):]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FjGA%3D","line":51,"updated":"2014-01-11 19:33:35.000000000","message":"Is there any particular reason for having the leading underscores on the kwargs, here?  They\u0027re obviously not private.","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"64fd7d26c7afaa3adb5808be41eb169d663e46ac","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            max_len \u003d len(intname) + swift_info.get(\u0027swift\u0027, {}).get("},{"line_number":49,"context_line":"                \u0027max_meta_value_length\u0027, 256)  # conservative by a few chars"},{"line_number":50,"context_line":"            new_headers \u003d format_acl("},{"line_number":51,"context_line":"                version\u003d2, _header_name\u003dintname, _max_header_length\u003dmax_len,"},{"line_number":52,"context_line":"                **acls)"},{"line_number":53,"context_line":"            for int_hdr, value in new_headers.items():"},{"line_number":54,"context_line":"                ext_hdr \u003d \u0027x-account-\u0027 + int_hdr[len(prefix):]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FV%2Bk%3D","line":51,"in_reply_to":"AAAAUH%2F%2FjGA%3D","updated":"2014-01-14 21:27:48.000000000","message":"The reason for the leading underscores (which aren\u0027t private/protected/anything) is that I want to make an attempt not to step into the namespace of the auth system\u0027s ACL syntax.  Although you could argue that the same should apply to the \"version\" kwarg, which seems the most likely to be reused by an auth system...  Thoughts?","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4030a51e2c138408dc12671fa4cbf75e93c2ef0a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                version\u003d2, _header_name\u003dintname, _max_header_length\u003dmax_len,"},{"line_number":52,"context_line":"                **acls)"},{"line_number":53,"context_line":"            for int_hdr, value in new_headers.items():"},{"line_number":54,"context_line":"                ext_hdr \u003d \u0027x-account-\u0027 + int_hdr[len(prefix):]"},{"line_number":55,"context_line":"                del req.headers[ext_hdr]"},{"line_number":56,"context_line":"                req.headers[int_hdr] \u003d value"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Flxk%3D","line":54,"updated":"2014-01-10 18:47:49.000000000","message":"FYI, there is a strip_sys_meta_prefix() func in request_helpers that\u0027s equivalent to int_hdr[len(prefix):] here. Not saying it is better though:).","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"64fd7d26c7afaa3adb5808be41eb169d663e46ac","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                version\u003d2, _header_name\u003dintname, _max_header_length\u003dmax_len,"},{"line_number":52,"context_line":"                **acls)"},{"line_number":53,"context_line":"            for int_hdr, value in new_headers.items():"},{"line_number":54,"context_line":"                ext_hdr \u003d \u0027x-account-\u0027 + int_hdr[len(prefix):]"},{"line_number":55,"context_line":"                del req.headers[ext_hdr]"},{"line_number":56,"context_line":"                req.headers[int_hdr] \u003d value"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FV1s%3D","line":54,"in_reply_to":"AAAAUH%2F%2Flxk%3D","updated":"2014-01-14 21:27:48.000000000","message":"Removed in the process of ripping out multiheader support.","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"7f1f126a4d7a3ef48ff46223f9d67eb17f8e37a9","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            acls \u003d parse_acl(intname, resp.headers)"},{"line_number":66,"context_line":"            if acls:"},{"line_number":67,"context_line":"                new_headers \u003d format_acl(version\u003d2, _header_name\u003dextname,"},{"line_number":68,"context_line":"                                         **acls)"},{"line_number":69,"context_line":"                for ext_hdr, value in new_headers.items():"},{"line_number":70,"context_line":"                    int_hdr \u003d prefix + ext_hdr[len(\u0027x-account-\u0027):]"},{"line_number":71,"context_line":"                    del resp.headers[int_hdr]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FjE4%3D","line":68,"updated":"2014-01-11 19:33:35.000000000","message":"Shouldn\u0027t this format_acl() call also get a\n\n  max_header_length\u003dMAX_HEADER_SIZE\n\nkwarg for consistency (having Swift send back headers which match length constraints it imposes on incoming headers seems good).  The above snippet assumes the leading underscore is removed, of course.","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"64fd7d26c7afaa3adb5808be41eb169d663e46ac","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            acls \u003d parse_acl(intname, resp.headers)"},{"line_number":66,"context_line":"            if acls:"},{"line_number":67,"context_line":"                new_headers \u003d format_acl(version\u003d2, _header_name\u003dextname,"},{"line_number":68,"context_line":"                                         **acls)"},{"line_number":69,"context_line":"                for ext_hdr, value in new_headers.items():"},{"line_number":70,"context_line":"                    int_hdr \u003d prefix + ext_hdr[len(\u0027x-account-\u0027):]"},{"line_number":71,"context_line":"                    del resp.headers[int_hdr]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FV1g%3D","line":68,"in_reply_to":"AAAAUH%2F%2FjE4%3D","updated":"2014-01-14 21:27:48.000000000","message":"Removed in the process of ripping out multiheader support.","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4030a51e2c138408dc12671fa4cbf75e93c2ef0a","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                         **acls)"},{"line_number":69,"context_line":"                for ext_hdr, value in new_headers.items():"},{"line_number":70,"context_line":"                    int_hdr \u003d prefix + ext_hdr[len(\u0027x-account-\u0027):]"},{"line_number":71,"context_line":"                    del resp.headers[int_hdr]"},{"line_number":72,"context_line":"                    resp.headers[ext_hdr] \u003d value"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def GETorHEAD(self, req):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FloA%3D","line":71,"updated":"2014-01-10 18:47:49.000000000","message":"I like the fact that you are removing sysmeta headers here and not relying on gatekeeper.","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4030a51e2c138408dc12671fa4cbf75e93c2ef0a","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                for prefix in (pre.title() for pre in"},{"line_number":100,"context_line":"                               self.app.swift_owner_header_prefixes):"},{"line_number":101,"context_line":"                    if header.startswith(prefix):"},{"line_number":102,"context_line":"                        del resp.headers[header]"},{"line_number":103,"context_line":"        return resp"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @public"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FlpI%3D","line":102,"updated":"2014-01-10 18:47:49.000000000","message":"I think this could be simplified by:\n\n(a) title()\u0027ing swift_owner_header_prefixes when they are initialised in proxy server (same would be true for swift_owner_headers but they are used elsewhere in container.py)\n\n(b) passing swift_owner_header_prefixes as a tuple arg to header.startswith()\n\nSee http://paste.openstack.org/show/60997/\n\n(there\u0027s also request_helpers.remove_items() but questionable if using that makes this any simpler).\n\nAlso, I *think* prefix based filtering should also be implemented in container.py, in which case this chunk of code might be refactored into a remove_swift_owner_headers method in base.py??","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"64fd7d26c7afaa3adb5808be41eb169d663e46ac","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                for prefix in (pre.title() for pre in"},{"line_number":100,"context_line":"                               self.app.swift_owner_header_prefixes):"},{"line_number":101,"context_line":"                    if header.startswith(prefix):"},{"line_number":102,"context_line":"                        del resp.headers[header]"},{"line_number":103,"context_line":"        return resp"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @public"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FV1U%3D","line":102,"in_reply_to":"AAAAUH%2F%2FlpI%3D","updated":"2014-01-14 21:27:48.000000000","message":"Removed in the process of ripping out multiheader support.","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"a2a06806050e05a161bc58e1d2cc811b579f3d2f","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        acls \u003d parse_acl(extname, req.headers)"},{"line_number":46,"context_line":"        if acls is not None:    # but empty dict is fine!"},{"line_number":47,"context_line":"            new_headers \u003d format_acl("},{"line_number":48,"context_line":"                version\u003d2, _header_name\u003dintname, **acls)"},{"line_number":49,"context_line":"            # new_headers only has one key for now, but could be extended later"},{"line_number":50,"context_line":"            for int_hdr, value in new_headers.items():"},{"line_number":51,"context_line":"                req.headers[int_hdr] \u003d value"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FU2w%3D","line":48,"updated":"2014-01-15 01:07:04.000000000","message":"re: what to do about these argument names, I would suggest either of these options as better than the current state:\n\n1) make acls an argument whose value will be a dictionary instead of mixing the namespace of ACL values and format_acl() function parameter names.\n\n2) Add a leading underscore to version also.\n\nI lean toward 1) because I think the leading underscores on the arguments looks ugly, and the only reason they exist is to avoid key namespace collision because trailing **acls kwargs were chosen to carry the acl key/values.","commit_id":"f2559a179d387e3feb8e5f20ef07f12764c63539"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                del req.headers[ext_hdr]"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def add_acls_from_sys_metadata(self, resp):"},{"line_number":57,"context_line":"        if resp.environ.get(\u0027PATH_INFO\u0027) is None:"},{"line_number":58,"context_line":"            return"},{"line_number":59,"context_line":"        if resp.environ[\u0027REQUEST_METHOD\u0027] in (\u0027HEAD\u0027, \u0027GET\u0027, \u0027PUT\u0027, \u0027POST\u0027):"},{"line_number":60,"context_line":"            prefix \u003d get_sys_meta_prefix(\u0027account\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FC9k%3D","line":57,"updated":"2014-01-18 00:07:49.000000000","message":"Holy cow, when does this happen? Just tests? Any actual WSGI server that does this is horribly broken.","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        else:"},{"line_number":94,"context_line":"            for header in self.app.swift_owner_headers:"},{"line_number":95,"context_line":"                if header in resp.headers:"},{"line_number":96,"context_line":"                    del resp.headers[header]"},{"line_number":97,"context_line":"        return resp"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @public"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FDEI%3D","line":96,"updated":"2014-01-18 00:07:49.000000000","message":"could simplify last 2 lines to resp.headers.pop(header, None)","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            return error_response"},{"line_number":136,"context_line":"        account_partition, accounts \u003d \\"},{"line_number":137,"context_line":"            self.app.account_ring.get_nodes(self.account_name)"},{"line_number":138,"context_line":"        self.send_acls_to_sys_metadata(req)"},{"line_number":139,"context_line":"        headers \u003d self.generate_request_headers(req, transfer\u003dTrue)"},{"line_number":140,"context_line":"        clear_info_cache(self.app, req.environ, self.account_name)"},{"line_number":141,"context_line":"        resp \u003d self.make_requests("}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FC9E%3D","line":138,"updated":"2014-01-18 00:07:49.000000000","message":"I sort of wonder if doing this in self.generate_request_headers would be a better place. That way you could avoid mutating the original request and just send off the X-Account-Sysmeat-Access-Control to the backend.\n\nNot critical, though... I just like avoiding object mutation when I can avoid it.","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        if resp.environ.get(\u0027PATH_INFO\u0027) is None:"},{"line_number":58,"context_line":"            return"},{"line_number":59,"context_line":"        if resp.environ[\u0027REQUEST_METHOD\u0027] in (\u0027HEAD\u0027, \u0027GET\u0027, \u0027PUT\u0027, \u0027POST\u0027):"},{"line_number":60,"context_line":"            prefix \u003d get_sys_meta_prefix(\u0027account\u0027)"},{"line_number":61,"context_line":"            name \u003d \u0027access-control\u0027"},{"line_number":62,"context_line":"            (extname, intname) \u003d (\u0027x-account-\u0027 + name, prefix + name)"},{"line_number":63,"context_line":"            acl_dict \u003d parse_acl(intname, resp.headers)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BrmE%3D","line":60,"updated":"2014-01-23 09:54:41.000000000","message":"those blasted PATCH requests are the worst...\n\nThis and the \u0027PATH_INFO\u0027 in resp.environ check above are a bit overly defensive for my tastes.  It\u0027s just distracting.  \"Why is this code here?  How does this happen?  Is swob broken?  Should I re-read pep333?\"\n\nwait... should I?\n\n/me wastes an 10 mins\n\nnope - MUST be present - phew.","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"5766ef394d11916cc44abc1fa2278910c0e9cdab","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        if resp.environ.get(\u0027PATH_INFO\u0027) is None:"},{"line_number":58,"context_line":"            return"},{"line_number":59,"context_line":"        if resp.environ[\u0027REQUEST_METHOD\u0027] in (\u0027HEAD\u0027, \u0027GET\u0027, \u0027PUT\u0027, \u0027POST\u0027):"},{"line_number":60,"context_line":"            prefix \u003d get_sys_meta_prefix(\u0027account\u0027)"},{"line_number":61,"context_line":"            name \u003d \u0027access-control\u0027"},{"line_number":62,"context_line":"            (extname, intname) \u003d (\u0027x-account-\u0027 + name, prefix + name)"},{"line_number":63,"context_line":"            acl_dict \u003d parse_acl(intname, resp.headers)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BnLE%3D","line":60,"in_reply_to":"AAAAUH%2F%2BrmE%3D","updated":"2014-01-23 22:31:58.000000000","message":"DELETE and OPTIONS were what I had in mind.  Swift actually uses those...\n\nRemoving the overly-defensive PATH_INFO check sounds like a great thing to do in the follow-on.","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        if resp.environ[\u0027REQUEST_METHOD\u0027] in (\u0027HEAD\u0027, \u0027GET\u0027, \u0027PUT\u0027, \u0027POST\u0027):"},{"line_number":60,"context_line":"            prefix \u003d get_sys_meta_prefix(\u0027account\u0027)"},{"line_number":61,"context_line":"            name \u003d \u0027access-control\u0027"},{"line_number":62,"context_line":"            (extname, intname) \u003d (\u0027x-account-\u0027 + name, prefix + name)"},{"line_number":63,"context_line":"            acl_dict \u003d parse_acl(intname, resp.headers)"},{"line_number":64,"context_line":"            if acl_dict:  # treat empty dict as empty header"},{"line_number":65,"context_line":"                new_headers \u003d format_acl(version\u003d2, header_name\u003dextname,"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2BrnE%3D","line":62,"updated":"2014-01-23 09:54:41.000000000","message":"pubname, privname?  Dunno if it\u0027s any better, but I read int as integer at first, probably can\u0027t be helped.","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8afc11ea86b8291d9866dbed4a013cc81b0099ac","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            resp \u003d self.make_requests("},{"line_number":146,"context_line":"                req, self.app.account_ring, account_partition, \u0027POST\u0027,"},{"line_number":147,"context_line":"                req.swift_entity_path, [headers] * len(accounts))"},{"line_number":148,"context_line":"        self.add_acls_from_sys_metadata(resp)"},{"line_number":149,"context_line":"        return resp"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    @public"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F%2Brvo%3D","line":148,"updated":"2014-01-23 09:54:41.000000000","message":"This seems to stray from the spirt of sysmeta, which I expect to only be translated to real headers if upstream middleware is in place that thinks it reasonable to expose/translate sysmeta into the response for the client.  If you have to hack the core swift anyway, why not just add it to pass-through-headers and leave sysmeta out of it?  I think moving the translation helpers out to middleware.acl and letting keystone grab them and do the translation when they decide to support x-account-acl with their own validation would be quite reasonable.  Adding it here now leaves a window where users can put in data that is even less useful that would generally be allowed with middleware that can \"validate\" it!","commit_id":"c4fd9bacd55b47c569e5939d02a8f002718a8bc0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        resp \u003d self.make_requests("},{"line_number":96,"context_line":"            req, self.app.account_ring, account_partition, \u0027PUT\u0027,"},{"line_number":97,"context_line":"            req.swift_entity_path, [headers] * len(accounts))"},{"line_number":98,"context_line":"        self.add_acls_from_sys_metadata(resp)"},{"line_number":99,"context_line":"        return resp"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    @public"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BMco%3D","line":98,"updated":"2014-01-29 19:17:50.000000000","message":"This would be the response headers from the account server(s) on a PUT right?  There\u0027s not going to be anything sysmeta-y in there.","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"dbdb4f47830538a7d5cdf131e0c7fae4b4a076b6","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            resp \u003d self.make_requests("},{"line_number":122,"context_line":"                req, self.app.account_ring, account_partition, \u0027POST\u0027,"},{"line_number":123,"context_line":"                req.swift_entity_path, [headers] * len(accounts))"},{"line_number":124,"context_line":"        self.add_acls_from_sys_metadata(resp)"},{"line_number":125,"context_line":"        return resp"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @public"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAUH%2F%2BJCY%3D","line":124,"updated":"2014-01-29 19:17:50.000000000","message":"ditto","commit_id":"598f6ccfad05455016d8f473c9882759345d60e2"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":267,"context_line":"    Get the info structure for a container, based on env and app."},{"line_number":268,"context_line":"    This is useful to middlewares."},{"line_number":269,"context_line":"    Note: This call bypasses auth. Success does not imply that the"},{"line_number":270,"context_line":"          request has authorization to the container."},{"line_number":271,"context_line":"    \"\"\""},{"line_number":272,"context_line":"    (version, account, container, unused) \u003d \\"},{"line_number":273,"context_line":"        split_path(env[\u0027PATH_INFO\u0027], 3, 4, True)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FC80%3D","line":270,"updated":"2014-01-18 00:07:49.000000000","message":"heh","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":283,"context_line":"    Get the info structure for an account, based on env and app."},{"line_number":284,"context_line":"    This is useful to middlewares."},{"line_number":285,"context_line":"    Note: This call bypasses auth. Success does not imply that the"},{"line_number":286,"context_line":"          request has authorization to the account."},{"line_number":287,"context_line":"    \"\"\""},{"line_number":288,"context_line":"    (version, account, _junk, _junk) \u003d \\"},{"line_number":289,"context_line":"        split_path(env[\u0027PATH_INFO\u0027], 2, 4, True)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FC8w%3D","line":286,"updated":"2014-01-18 00:07:49.000000000","message":"LOL","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"}],"swift/proxy/server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4030a51e2c138408dc12671fa4cbf75e93c2ef0a","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            \u0027x-account-meta-temp-url-key, x-account-meta-temp-url-key-2, \u0027"},{"line_number":184,"context_line":"            \u0027x-account-access-control\u0027)"},{"line_number":185,"context_line":"        self.swift_owner_headers \u003d ["},{"line_number":186,"context_line":"            name.strip()"},{"line_number":187,"context_line":"            for name in swift_owner_headers.split(\u0027,\u0027) if name.strip()]"},{"line_number":188,"context_line":"        # swift_owner_header_prefixes are stripped by the account controller"},{"line_number":189,"context_line":"        # only; extend header prefix stripping to container and object"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Flns%3D","line":186,"updated":"2014-01-10 18:47:49.000000000","message":"you could title() the names here too. (see comment in account.py)","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"64fd7d26c7afaa3adb5808be41eb169d663e46ac","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            \u0027x-account-meta-temp-url-key, x-account-meta-temp-url-key-2, \u0027"},{"line_number":184,"context_line":"            \u0027x-account-access-control\u0027)"},{"line_number":185,"context_line":"        self.swift_owner_headers \u003d ["},{"line_number":186,"context_line":"            name.strip()"},{"line_number":187,"context_line":"            for name in swift_owner_headers.split(\u0027,\u0027) if name.strip()]"},{"line_number":188,"context_line":"        # swift_owner_header_prefixes are stripped by the account controller"},{"line_number":189,"context_line":"        # only; extend header prefix stripping to container and object"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FV1A%3D","line":186,"in_reply_to":"AAAAUH%2F%2Flns%3D","updated":"2014-01-14 21:27:48.000000000","message":"Done, since it seems to me like this reflects reality better.  (But with the removal of multiheader support, this isn\u0027t strictly necessary.)","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            raise ValueError("},{"line_number":173,"context_line":"                \u0027Invalid write_affinity_node_count value: %r\u0027 % \u0027\u0027.join(value))"},{"line_number":174,"context_line":"        # swift_owner_headers are stripped by the account and container"},{"line_number":175,"context_line":"        # controllers; extend header stripping to object controller when"},{"line_number":176,"context_line":"        # a privileged object header is implemented."},{"line_number":177,"context_line":"        swift_owner_headers \u003d conf.get("},{"line_number":178,"context_line":"            \u0027swift_owner_headers\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FC8k%3D","line":175,"updated":"2014-01-18 00:07:49.000000000","message":"Maybe something like \"we should extend header stripping...\" or other future-tense words? At first glance, this made me think we were doing this now.","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            \u0027x-container-sync-key, x-container-sync-to, \u0027"},{"line_number":181,"context_line":"            \u0027x-account-meta-temp-url-key, x-account-meta-temp-url-key-2, \u0027"},{"line_number":182,"context_line":"            \u0027x-account-access-control\u0027)"},{"line_number":183,"context_line":"        self.swift_owner_headers \u003d ["},{"line_number":184,"context_line":"            name.strip().title()"},{"line_number":185,"context_line":"            for name in swift_owner_headers.split(\u0027,\u0027) if name.strip()]"},{"line_number":186,"context_line":"        # Initialization was successful, so now apply the client chunk size"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FC7g%3D","line":183,"updated":"2014-01-18 00:07:49.000000000","message":"Hm, swift_owner_headers is sort of broken for this use case. I almost feel like it should be split (NOT as part of this patch) into default and extra headers, because when we add one like this, anyone who\u0027s added custom ones in has to know about the new default header or else the stripping stuff doesn\u0027t work.\n\nThis patch isn\u0027t the place to fix it, though. Just sad that the setting is painful for deployers.","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            \u0027x-account-meta-temp-url-key, x-account-meta-temp-url-key-2, \u0027"},{"line_number":182,"context_line":"            \u0027x-account-access-control\u0027)"},{"line_number":183,"context_line":"        self.swift_owner_headers \u003d ["},{"line_number":184,"context_line":"            name.strip().title()"},{"line_number":185,"context_line":"            for name in swift_owner_headers.split(\u0027,\u0027) if name.strip()]"},{"line_number":186,"context_line":"        # Initialization was successful, so now apply the client chunk size"},{"line_number":187,"context_line":"        # parameter as the default read / write buffer size for the network"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FC68%3D","line":184,"updated":"2014-01-18 00:07:49.000000000","message":"Just personal preference? :)\n\nI\u0027m pretty sure all our headers are in swob.HeaderKeyDict objects so the comparison is case-insensitive.","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"e7dadd77b7a66079315cbf80fc312083526b6c5e","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            raise ValueError("},{"line_number":173,"context_line":"                \u0027Invalid write_affinity_node_count value: %r\u0027 % \u0027\u0027.join(value))"},{"line_number":174,"context_line":"        # swift_owner_headers are stripped by the account and container"},{"line_number":175,"context_line":"        # controllers; we shouldextend header stripping to object controller"},{"line_number":176,"context_line":"        # when a privileged object header is implemented."},{"line_number":177,"context_line":"        swift_owner_headers \u003d conf.get("},{"line_number":178,"context_line":"            \u0027swift_owner_headers\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2BlOo%3D","line":175,"updated":"2014-01-24 06:32:27.000000000","message":"tiny nit: space needed between \"should\" and \"extend\"","commit_id":"d97db22a6509c6308a66511099e795ac5364aca8"}],"test/functional/tests.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"d83c2ba163e2af6efe681e3fbe3bdb1fbd57965b","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    return False"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"class Utils(object):"},{"line_number":122,"context_line":"    @classmethod"},{"line_number":123,"context_line":"    def create_ascii_name(cls, length\u003dNone):"},{"line_number":124,"context_line":"        return uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FDvM%3D","line":121,"updated":"2014-01-17 20:49:01.000000000","message":"Nice catch!","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"}],"test/unit/common/middleware/test_acl.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"caaa7dddb69abaf529c954a9839830fb58bbd002","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"            # ACL data split across two header lines"},{"line_number":91,"context_line":"            ({\u0027hdr-1\u0027: \u0027{\"a\":1,\"b\u0027, \u0027hdr-2\u0027: \u0027\":\"foo\"}\u0027},"},{"line_number":92,"context_line":"             {\u0027a\u0027: 1, \u0027b\u0027: \u0027foo\u0027}),"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            # No header \"hdr\" exists -- should return None"},{"line_number":95,"context_line":"            ({}, None),"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Ffck%3D","line":92,"updated":"2014-01-13 11:29:01.000000000","message":"You need to use a swift.common.swob.HeaderKeyDict here to ensure that this works; in fact tests will fail if doing this","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"},{"author":{"_account_id":8262,"name":"Jon Snitow","email":"otherjon@swiftstack.com","username":"otherjon"},"change_message_id":"64fd7d26c7afaa3adb5808be41eb169d663e46ac","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"            # ACL data split across two header lines"},{"line_number":91,"context_line":"            ({\u0027hdr-1\u0027: \u0027{\"a\":1,\"b\u0027, \u0027hdr-2\u0027: \u0027\":\"foo\"}\u0027},"},{"line_number":92,"context_line":"             {\u0027a\u0027: 1, \u0027b\u0027: \u0027foo\u0027}),"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"            # No header \"hdr\" exists -- should return None"},{"line_number":95,"context_line":"            ({}, None),"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2FV0k%3D","line":92,"in_reply_to":"AAAAUH%2F%2Ffck%3D","updated":"2014-01-14 21:27:48.000000000","message":"Done.  I opted for fixing the problem as close to the root as possible, in data_to_header() and data_from_header() in request_helpers.py.  Now even these tests work, because the plain dicts are converted to HeaderKeyDicts in those methods.","commit_id":"4cac6dcfb73a55be811868dc76a721dbaa6cd9ce"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"30e930213005431660ebe4cabec38cc61256416e","unresolved":false,"context_lines":[{"line_number":5948,"context_line":"                setattr(proxy_server.AccountController, verb, new_method)"},{"line_number":5949,"context_line":"                yield"},{"line_number":5950,"context_line":"            finally:"},{"line_number":5951,"context_line":"                setattr(proxy_server.AccountController, verb, old_method)"},{"line_number":5952,"context_line":""},{"line_number":5953,"context_line":"        def make_test_request(http_method, swift_owner\u003dTrue):"},{"line_number":5954,"context_line":"            env \u003d {"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FC4k%3D","line":5951,"updated":"2014-01-18 00:07:49.000000000","message":"I think you can do this with the \"side_effect\" parameter to mock, like\n\n    mock.patch.object(AccountController, verb, lambda *a, **kw: resps_to_send.pop(0))\n\nNot necessary, but it might be worth a shot.","commit_id":"9318f29ab6b6a87d280c09b6e7a16e5d6246486f"}]}
