)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d4b11509d18c81ed29288eceb75be5f64e4c35a9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Hash for PKIZ"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Only PKI (asn1) based tokens were being check for format and hashed"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: 1355125"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1abeadc6_d81d5bbf","line":9,"updated":"2014-08-18 22:59:11.000000000","message":"change \"check\" to \"checked\"","commit_id":"4c5df677e384f57725815c2f3fda323fca6409c6"}],"keystonemiddleware/tests/test_auth_token_middleware.py":[{"author":{"_account_id":11428,"name":"Ajaya Agrawal","email":"ajku.agr@gmail.com","username":"ajayaa"},"change_message_id":"f7ad06d4790524d1469e2b9be589d6e32b3d07ce","unresolved":false,"context_lines":[{"line_number":643,"context_line":"        self._test_cache_revoked(token, revoked_form)"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"    def test_cached_revoked_pkiz(self):"},{"line_number":646,"context_line":"        # When the PKI token is cached and revoked, 401 is returned."},{"line_number":647,"context_line":"        token \u003d self.token_dict[\u0027signed_token_scoped_pkiz\u0027]"},{"line_number":648,"context_line":"        revoked_form \u003d cms.cms_hash_token(token)"},{"line_number":649,"context_line":"        self._test_cache_revoked(token, revoked_form)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ac7a964_98d57cbb","line":646,"updated":"2014-08-15 20:37:17.000000000","message":"s/PKI/PKIZ","commit_id":"99e50363c910d7d4b3a25e156a4ad094e06c1f36"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"51db34d346bef35797238d562ea38f191cdb823f","unresolved":false,"context_lines":[{"line_number":661,"context_line":"        self.middleware(req.environ, self.start_fake_response)"},{"line_number":662,"context_line":"        self.assertEqual(self.response_status, 401)"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    def test_revoked_hashed_pki_token(self):"},{"line_number":665,"context_line":"        # If hash_algorithms is set as [\u0027sha256\u0027, \u0027md5\u0027],"},{"line_number":666,"context_line":"        # and check_revocations_for_cached is True,"},{"line_number":667,"context_line":"        # and a token is in the cache because it was successfully validated"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_423daedd","line":664,"updated":"2014-08-15 21:08:34.000000000","message":"do we need a test_revoked_hashed_pkiz_token ?","commit_id":"62465a186ca383aa5193e164b6f69654c5b29ec3"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"d4216fa5db95c347951c59ea9d5c68cce61becd7","unresolved":false,"context_lines":[{"line_number":661,"context_line":"        self.middleware(req.environ, self.start_fake_response)"},{"line_number":662,"context_line":"        self.assertEqual(self.response_status, 401)"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    def test_revoked_hashed_pki_token(self):"},{"line_number":665,"context_line":"        # If hash_algorithms is set as [\u0027sha256\u0027, \u0027md5\u0027],"},{"line_number":666,"context_line":"        # and check_revocations_for_cached is True,"},{"line_number":667,"context_line":"        # and a token is in the cache because it was successfully validated"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_25043c14","line":664,"in_reply_to":"7ac7a964_423daedd","updated":"2014-08-15 21:10:43.000000000","message":"This would be good to do as well. But i think the *cached* version does this as a side effect. For consistency, doing both makes a lot of sense.","commit_id":"62465a186ca383aa5193e164b6f69654c5b29ec3"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"3e7b6f26ffecf58599a9685f28ba7b2847d2e635","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        self.conf[\u0027check_revocations_for_cached\u0027] \u003d True"},{"line_number":673,"context_line":"        self.set_middleware()"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"        token \u003d self.token_dict[\u0027signed_token_scoped\u0027]"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"        # Put the token in the revocation list."},{"line_number":678,"context_line":"        token_hashed \u003d cms.cms_hash_token(token)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_057660a4","line":675,"updated":"2014-08-15 21:13:01.000000000","message":"an exact copy of this test with self.token_dict[\u0027signed_token_scoped_pkiz\u0027] here as the only change might address my comment on 664","commit_id":"62465a186ca383aa5193e164b6f69654c5b29ec3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d4b11509d18c81ed29288eceb75be5f64e4c35a9","unresolved":false,"context_lines":[{"line_number":643,"context_line":"        self._test_cache_revoked(token, revoked_form)"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"    def test_cached_revoked_pkiz(self):"},{"line_number":646,"context_line":"        # When the PKI token is cached and revoked, 401 is returned."},{"line_number":647,"context_line":"        token \u003d self.token_dict[\u0027signed_token_scoped_pkiz\u0027]"},{"line_number":648,"context_line":"        revoked_form \u003d cms.cms_hash_token(token)"},{"line_number":649,"context_line":"        self._test_cache_revoked(token, revoked_form)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_786d2732","line":646,"updated":"2014-08-18 22:59:11.000000000","message":"change \"PKI\" to \"PKIZ\"","commit_id":"4c5df677e384f57725815c2f3fda323fca6409c6"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d4b11509d18c81ed29288eceb75be5f64e4c35a9","unresolved":false,"context_lines":[{"line_number":661,"context_line":"        self.middleware(req.environ, self.start_fake_response)"},{"line_number":662,"context_line":"        self.assertEqual(self.response_status, 401)"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    def _test_revoked_hashed_token(self, token_key):"},{"line_number":665,"context_line":"        # If hash_algorithms is set as [\u0027sha256\u0027, \u0027md5\u0027],"},{"line_number":666,"context_line":"        # and check_revocations_for_cached is True,"},{"line_number":667,"context_line":"        # and a token is in the cache because it was successfully validated"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_38a00f43","line":664,"updated":"2014-08-18 22:59:11.000000000","message":"suggest change \"token_key\" to \"token_name\"","commit_id":"4c5df677e384f57725815c2f3fda323fca6409c6"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d4b11509d18c81ed29288eceb75be5f64e4c35a9","unresolved":false,"context_lines":[{"line_number":676,"context_line":""},{"line_number":677,"context_line":"        token \u003d self.token_dict[token_key]"},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        # seed the Cached with the token."},{"line_number":680,"context_line":"        req \u003d webob.Request.blank(\u0027/\u0027)"},{"line_number":681,"context_line":"        req.headers[\u0027X-Auth-Token\u0027] \u003d token"},{"line_number":682,"context_line":"        self.middleware(req.environ, self.start_fake_response)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_385baf88","line":679,"updated":"2014-08-18 22:59:11.000000000","message":"change \"Cached\" to \"cache\"","commit_id":"4c5df677e384f57725815c2f3fda323fca6409c6"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d4b11509d18c81ed29288eceb75be5f64e4c35a9","unresolved":false,"context_lines":[{"line_number":685,"context_line":"        token_hashed \u003d cms.cms_hash_token(token, hash_algorithms[0])"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"        # request is using the hashed token, is valid so goes in"},{"line_number":688,"context_line":"        # cache using the given hash."},{"line_number":689,"context_line":"        req \u003d webob.Request.blank(\u0027/\u0027)"},{"line_number":690,"context_line":"        req.headers[\u0027X-Auth-Token\u0027] \u003d token_hashed"},{"line_number":691,"context_line":"        self.middleware(req.environ, self.start_fake_response)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_386e4f02","line":688,"updated":"2014-08-18 22:59:11.000000000","message":"The token is already in the cache so it doesn\u0027t need to go in the cache again.","commit_id":"4c5df677e384f57725815c2f3fda323fca6409c6"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c485b0d26bd799ca991c0abf25c27515d461e154","unresolved":false,"context_lines":[{"line_number":682,"context_line":"        self.middleware(req.environ, self.start_fake_response)"},{"line_number":683,"context_line":"        self.assertEqual(200, self.response_status)"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        token_hashed \u003d cms.cms_hash_token(token, hash_algorithms[0])"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"        # request is using the hashed token, is valid so matches the one in"},{"line_number":688,"context_line":"        # the cache keyed with given hash."}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_f6620cd7","line":685,"updated":"2014-08-19 14:26:03.000000000","message":"The point of this test, as described in the comment at line 669, is that the token is in the revocation list by md5 hash, but this is going to use sha256 instead. This is testing the scenario described in the comment and it\u0027s verifying that revocations work as designed during the time when both token hash formats need to be supported.\n\nIf this change is going to be made then the comment will need to be updated.","commit_id":"8196d5327d43ab4860f2c6105c9342f5f6faf35a"}]}
