)]}'
{"swift/common/middleware/encrypter.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"de2b04d9167850d5e8d1920de0d28682a569e231","unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def _check_headers(self, req):"},{"line_number":177,"context_line":"        # Check the user-metadata length before encrypting and encoding"},{"line_number":178,"context_line":"        error_response \u003d check_metadata(req, self.server_type.lower())"},{"line_number":179,"context_line":"        if error_response:"},{"line_number":180,"context_line":"                raise error_response"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_e4d132cf","line":178,"range":{"start_line":178,"start_character":61,"end_line":178,"end_character":69},"updated":"2016-05-06 21:25:51.000000000","message":"Why not just self.server_type? Paranoia?","commit_id":"a5cdb2d878c54ecc609eee68f1a1b3cd35219ea0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"c4f04f0ca40c25d6b42277d659c5922703c1299f","unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def _check_headers(self, req):"},{"line_number":177,"context_line":"        # Check the user-metadata length before encrypting and encoding"},{"line_number":178,"context_line":"        error_response \u003d check_metadata(req, self.server_type.lower())"},{"line_number":179,"context_line":"        if error_response:"},{"line_number":180,"context_line":"                raise error_response"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_e7c57d8e","line":178,"range":{"start_line":178,"start_character":61,"end_line":178,"end_character":69},"in_reply_to":"dab17558_e4d132cf","updated":"2016-05-09 17:48:06.000000000","message":"IDK but I agree it\u0027s not necessary","commit_id":"a5cdb2d878c54ecc609eee68f1a1b3cd35219ea0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"de2b04d9167850d5e8d1920de0d28682a569e231","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def PUT(self, req, start_response):"},{"line_number":202,"context_line":"        self._check_headers(req)"},{"line_number":203,"context_line":"        keys \u003d self.get_keys(req.environ, required\u003d[\u0027object\u0027, \u0027container\u0027])"},{"line_number":204,"context_line":"        self.encrypt_user_metadata(req, keys)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        enc_input_proxy \u003d EncInputWrapper(self.crypto, keys, req, self.logger)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_05dc3911","line":203,"range":{"start_line":203,"start_character":42,"end_line":203,"end_character":74},"updated":"2016-05-06 21:25:51.000000000","message":"I just want to make sure I understand why we need container here for PUT but not for POST. Container servers get the following pieces of metadata about an object:\n\n- name\n- etag\n- timestamp\n- size\n- content-type\n\nEtag *is* encrypted, but only ever changes on PUT. So, PUT requires the container key.\n\nAll the rest are *not* encrypted, so POST (which can only change timestamp and content-type) does not need the key.\n\nRight?\n\nMind reminding me how we deal with SLOs, where the Etag is embedded in the Content-Type?","commit_id":"a5cdb2d878c54ecc609eee68f1a1b3cd35219ea0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"c4f04f0ca40c25d6b42277d659c5922703c1299f","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def PUT(self, req, start_response):"},{"line_number":202,"context_line":"        self._check_headers(req)"},{"line_number":203,"context_line":"        keys \u003d self.get_keys(req.environ, required\u003d[\u0027object\u0027, \u0027container\u0027])"},{"line_number":204,"context_line":"        self.encrypt_user_metadata(req, keys)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        enc_input_proxy \u003d EncInputWrapper(self.crypto, keys, req, self.logger)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_2252d3dd","line":203,"range":{"start_line":203,"start_character":42,"end_line":203,"end_character":74},"in_reply_to":"dab17558_05dc3911","updated":"2016-05-09 17:48:06.000000000","message":"Right. Only etag is encrypted out of the object non-user metadata, only on a PUT, and that requires the container key.\n\nSLO appends size to content-type (swift_bytes param), but not etag I think?\n\nFWIW IMHO we can add content-type encryption later, but there are some hoops to jump through w.r.t. multipart responses so we decided to leave that out of initial scope.","commit_id":"a5cdb2d878c54ecc609eee68f1a1b3cd35219ea0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"46c6dac0f032cdd3e26e5494fd65166cec8bd330","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def PUT(self, req, start_response):"},{"line_number":202,"context_line":"        self._check_headers(req)"},{"line_number":203,"context_line":"        keys \u003d self.get_keys(req.environ, required\u003d[\u0027object\u0027, \u0027container\u0027])"},{"line_number":204,"context_line":"        self.encrypt_user_metadata(req, keys)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        enc_input_proxy \u003d EncInputWrapper(self.crypto, keys, req, self.logger)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_08ec8e28","line":203,"range":{"start_line":203,"start_character":42,"end_line":203,"end_character":74},"in_reply_to":"dab17558_2252d3dd","updated":"2016-05-11 19:41:34.000000000","message":"Ah, right. I keep forgetting how exactly slo works, and I\u0027m always slightly surprised to (re)discover that the container listing gives the correct length for the large object, but not the correct etag.","commit_id":"a5cdb2d878c54ecc609eee68f1a1b3cd35219ea0"}]}
