)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"78c61dfff7191e254955b8b08d9d57c079f0f1e1","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I1a6bcdebdb46ef03c342428aeed73ae76db29922"},{"line_number":16,"context_line":"Co-Author: Thomas Goirand \u003cthomas@goirand.fr\u003e"},{"line_number":17,"context_line":"Closes-Bug: #1813725"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9fdfeff1_13b0e389","line":17,"updated":"2019-01-29 19:56:58.000000000","message":"I think I\u0027d want some more investigation before declaring the bug closed. Partial-Bug, maybe?","commit_id":"795a57745a3919e9840c04f820f04262501b5e90"}],"swift/common/middleware/crypto/decrypter.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5e2f71fe6db4d25ca8bdeeda71861d92a1710c4d","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                                      \u0027match object key stored in metadata : \u0027"},{"line_number":334,"context_line":"                                      \u0027[%s] vs [%s]\u0027),"},{"line_number":335,"context_line":"                                      put_keys[\u0027id\u0027][\u0027path\u0027],"},{"line_number":336,"context_line":"                                      put_crypto_meta[\u0027key_id\u0027][\u0027path\u0027])"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        mod_resp_headers \u003d self.decrypt_resp_headers(put_keys, post_keys)"},{"line_number":339,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_e8f6495d","line":336,"updated":"2019-02-02 00:00:14.000000000","message":"I might prefer to have this logging go in keymaster... as it is, we aren\u0027t going to have any message about post_keys not matching post_crypto_meta...","commit_id":"d39c67442a05ddde4216b822f02bfb27d7135949"}],"swift/common/middleware/crypto/keymaster.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"78c61dfff7191e254955b8b08d9d57c079f0f1e1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        key_path \u003d None"},{"line_number":77,"context_line":"        if key_id:"},{"line_number":78,"context_line":"            secret_id \u003d key_id.get(\u0027secret_id\u0027)"},{"line_number":79,"context_line":"            key_path \u003d key_id.get(\u0027path\u0027)"},{"line_number":80,"context_line":"        else:"},{"line_number":81,"context_line":"            secret_id \u003d self.keymaster.active_secret_id"},{"line_number":82,"context_line":"        if secret_id in self._keys:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_f33f5f22","line":79,"updated":"2019-01-29 19:56:58.000000000","message":"I\u0027m inclined to say we ought to log a warning if key_path doesn\u0027t match path...","commit_id":"795a57745a3919e9840c04f820f04262501b5e90"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"78c61dfff7191e254955b8b08d9d57c079f0f1e1","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            if self.container:"},{"line_number":90,"context_line":"                path \u003d os.path.join(account_path, self.container)"},{"line_number":91,"context_line":"                keys[\u0027container\u0027] \u003d self.keymaster.create_key("},{"line_number":92,"context_line":"                    path, secret_id\u003dsecret_id)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"                if self.obj:"},{"line_number":95,"context_line":"                    path \u003d os.path.join(path, self.obj)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_f3899fc9","line":92,"range":{"start_line":92,"start_character":20,"end_line":92,"end_character":24},"updated":"2019-01-29 19:56:58.000000000","message":"Have you observed any truncation so severe that the container path is wrong as well? *Hopefully*, following https://github.com/openstack/swift/commit/2722e49 that would just result in a listing with \"\u003cunknown\u003e\" hashes... but there\u0027s a chance it\u0027d trip a UnicodeDecodeError that\u0027d result in a 500...","commit_id":"795a57745a3919e9840c04f820f04262501b5e90"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5e2f71fe6db4d25ca8bdeeda71861d92a1710c4d","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            if self.container:"},{"line_number":90,"context_line":"                path \u003d os.path.join(account_path, self.container)"},{"line_number":91,"context_line":"                keys[\u0027container\u0027] \u003d self.keymaster.create_key("},{"line_number":92,"context_line":"                    path, secret_id\u003dsecret_id)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"                if self.obj:"},{"line_number":95,"context_line":"                    path \u003d os.path.join(path, self.obj)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_08794dc6","line":92,"updated":"2019-02-02 00:00:14.000000000","message":"So if my repro case was valid (i.e., copy middleware is *after* encryption in the pipeline and an encrypted object gets copied to a new location), we definitely *do* need to worry about the container being wrong, too.\n\nAnd yeah, it\u0027ll be a 500 at the moment -- https://review.openstack.org/#/c/634507/ should make that suck less.","commit_id":"d39c67442a05ddde4216b822f02bfb27d7135949"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9c44d0413e187df70732ffda9598ca6c6b2003a6","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            version \u003d key_id[\u0027v\u0027]"},{"line_number":79,"context_line":"            if version not in (\u00271\u0027, \u00272\u0027):"},{"line_number":80,"context_line":"                raise ValueError(\u0027Unknown key_id version: %s\u0027 % version)"},{"line_number":81,"context_line":"            if version \u003d\u003d \u00271\u0027 and self.obj and self.obj.startswith(\u0027/\u0027):"},{"line_number":82,"context_line":"                # Well shoot. This was the bug that made us notice we needed"},{"line_number":83,"context_line":"                # a v2! Hope the current account/container was the original!"},{"line_number":84,"context_line":"                a, c, o \u003d self.account, self.container, key_id[\u0027path\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_e202863e","line":81,"range":{"start_line":81,"start_character":34,"end_line":81,"end_character":71},"updated":"2019-02-08 02:37:18.000000000","message":"Should be\n\n if version \u003d\u003d \u00271\u0027 and (self.obj is None or self.obj.startswith(\u0027/\u0027)):\n\nOtherwise, data that got copied-but-not-re-encrypted within the same container may break listings, and that seems like a no-unreasonable thing to have had happen.","commit_id":"dab923e8142c248b74fd91a02b8636ddca9d5b7b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e0cd4eab0c914c70a9b315adccd941da238d272f","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            version \u003d key_id[\u0027v\u0027]"},{"line_number":79,"context_line":"            if version not in (\u00271\u0027, \u00272\u0027):"},{"line_number":80,"context_line":"                raise ValueError(\u0027Unknown key_id version: %s\u0027 % version)"},{"line_number":81,"context_line":"            if version \u003d\u003d \u00271\u0027 and self.obj and self.obj.startswith(\u0027/\u0027):"},{"line_number":82,"context_line":"                # Well shoot. This was the bug that made us notice we needed"},{"line_number":83,"context_line":"                # a v2! Hope the current account/container was the original!"},{"line_number":84,"context_line":"                a, c, o \u003d self.account, self.container, key_id[\u0027path\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_e6533615","line":81,"range":{"start_line":81,"start_character":34,"end_line":81,"end_character":71},"in_reply_to":"9fdfeff1_e202863e","updated":"2019-02-12 20:13:45.000000000","message":"Better idea! (I think.) Cross-account copies seem unlikely, so check whether key_id[\u0027path\u0027] starts with \"/\u003caccount\u003e/\"","commit_id":"dab923e8142c248b74fd91a02b8636ddca9d5b7b"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"c5c68d202f4156cf10ff71d655fc09788969563f","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        account_path \u003d \u0027/\u0027 + a"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        try:"},{"line_number":110,"context_line":"            if self.container:"},{"line_number":111,"context_line":"                path \u003d account_path + \u0027/\u0027 + c"},{"line_number":112,"context_line":"                keys[\u0027container\u0027] \u003d self.keymaster.create_key("},{"line_number":113,"context_line":"                    path, secret_id\u003dsecret_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_62ef7687","line":110,"updated":"2019-02-08 02:10:15.000000000","message":"Are you sure you don\u0027t want to check c here instead? There\u0027s \"c \u003d self.container or c\" above. It appears to permit for self.container to be None (or empty) but c is not. This is what you intend, right?","commit_id":"dab923e8142c248b74fd91a02b8636ddca9d5b7b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9c44d0413e187df70732ffda9598ca6c6b2003a6","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        account_path \u003d \u0027/\u0027 + a"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        try:"},{"line_number":110,"context_line":"            if self.container:"},{"line_number":111,"context_line":"                path \u003d account_path + \u0027/\u0027 + c"},{"line_number":112,"context_line":"                keys[\u0027container\u0027] \u003d self.keymaster.create_key("},{"line_number":113,"context_line":"                    path, secret_id\u003dsecret_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_e2b0468e","line":110,"in_reply_to":"9fdfeff1_62ef7687","updated":"2019-02-08 02:37:18.000000000","message":"Way I figure it, the Context is specific to the request that\u0027s being made... so a request to /v1/a wouldn\u0027t have a self.container and shouldn\u0027t get a container key. Whatever is providing the *path* may (indeed, likely does) have a container, though -- and we only want to log the warning if the account part doesn\u0027t match.\n\nWhole thing\u0027s probably moot though -- I\u0027m not actually sure the `self.container or c` is necessary above. I *think* we should only be calling fetch_keys() if we\u0027re at the container or object level... I included that fallback just in case.","commit_id":"dab923e8142c248b74fd91a02b8636ddca9d5b7b"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"7a1c633c9d60993280308d31f0390d0950aa82e6","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                # Well shoot. This was the bug that made us notice we needed"},{"line_number":84,"context_line":"                # a v2! Hope the current account/container was the original!"},{"line_number":85,"context_line":"                key_acct, key_cont, key_obj \u003d ("},{"line_number":86,"context_line":"                    self.account, self.container, key_id[\u0027path\u0027])"},{"line_number":87,"context_line":"            else:"},{"line_number":88,"context_line":"                key_acct, key_cont, key_obj \u003d split_path("},{"line_number":89,"context_line":"                    key_id[\u0027path\u0027], 1, 3, True)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5fc1f717_b51fbf6e","line":86,"updated":"2019-03-22 21:06:04.000000000","message":"well it\u0027s definitely the case that before 43103319d0aa27f24e6520c0962bd19e55568ad4 the value of path for object names starting with / was different \n\nbefore\n\n  \"key_id\": {\n    \"path\": \"/test8\",\n    \"secret_id\": \"2018\",\n    \"v\": \"1\"\n  }\n\nafter\n\n  \"key_id\": {\n    \"path\": \"/AUTH_test/dest//test9\",\n    \"secret_id\": \"2018\",\n    \"v\": \"2\"\n  }\n\ni tested a copy, but that seemed to re-write as expected, i\u0027m not really sure what kind of data movement could cause the current a/c to be different w/o having to re-write the crypto meta...","commit_id":"9b3ca9423eb8cf9420a3e98f60cd56dd281b4208"}],"test/unit/common/middleware/crypto/test_keymaster.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"7a1c633c9d60993280308d31f0390d0950aa82e6","unresolved":false,"context_lines":[{"line_number":552,"context_line":"                {\u0027path\u0027: \u0027/a/c//o\u0027, \u0027v\u0027: \u00272\u0027},"},{"line_number":553,"context_line":"                {\u0027path\u0027: \u0027/a/c//o\u0027, \u0027secret_id\u0027: \u002722\u0027, \u0027v\u0027: \u00272\u0027}]}"},{"line_number":554,"context_line":"        self.assertEqual(expected_keys, keys)"},{"line_number":555,"context_line":"        self.assertEqual([(\u0027/a/c\u0027, None), (\u0027/a/c//o\u0027, None)], calls)"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"    @mock.patch(\u0027swift.common.middleware.crypto.keymaster.readconf\u0027)"},{"line_number":558,"context_line":"    def test_keymaster_config_path(self, mock_readconf):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5fc1f717_88970691","line":555,"updated":"2019-03-22 21:06:04.000000000","message":"this seems to cover the bases pretty well","commit_id":"9b3ca9423eb8cf9420a3e98f60cd56dd281b4208"}]}
