)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"0ec9d369a0661d1bfd2990dbe2c7f5a46f83c1dd","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2016-05-03 17:09:11 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Replace revoke tree with linear search"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ib6a686494e897840b09d134ecf1ca50ce712f281"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a122d0e_69adb69a","line":8,"updated":"2016-05-04 18:08:12.000000000","message":"think this commit deserves a really detailed commit message :)","commit_id":"b2ef3f1b643fa70aaeec5add60107f58c468daaf"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"cd74e13ced099209f55d74e431fd86473e28f463","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1a122d0e_26d3e839","updated":"2016-05-04 19:47:23.000000000","message":"great commit message!","commit_id":"5125e6b84f01bb52804c02476413564a4354d423"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"129320f31d91312ff2aa3093f203d2f9c1472774","unresolved":false,"context_lines":[{"line_number":26,"context_line":"not expected to slow down token validations in live deployments."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Future work will also reduce the number of revocation events."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Change-Id: Ib6a686494e897840b09d134ecf1ca50ce712f281"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"bab6814e_64f2c79b","line":29,"updated":"2016-05-23 02:09:45.000000000","message":"Please include a bug/related-bug/bp for tracking.","commit_id":"c612e9ddf856a6717290b580741fcc6cbfd5f289"}],"keystone/common/cache/_context_cache.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"9fd9d51af6b4c1dac65f3238930683c05c0563cc","unresolved":false,"context_lines":[{"line_number":45,"context_line":"_registry.frozen \u003d False"},{"line_number":46,"context_line":"_registry.register(_RevokeModelHandler(registry\u003d_registry))"},{"line_number":47,"context_line":"_registry.frozen \u003d True"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class _ResponseCacheProxy(proxy.ProxyBackend):"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_48e743b0","side":"PARENT","line":48,"updated":"2016-05-09 14:30:05.000000000","message":"It would be worthwhile seeing a followup patch that move the whole serialize/deserialize to json (I\u0027ll take care of this followup)","commit_id":"61a135cf7d76f0bf4322d44aed18312c711c1eea"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"d515ee876bb5febaa5444f162b6cf8062fcf27b5","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from keystone.models import revoke_model"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class _RevokeModelHandler(object):"},{"line_number":23,"context_line":"    # NOTE(morganfainberg): There needs to be reserved \"registry\" entries set"},{"line_number":24,"context_line":"    # in oslo_serialization for application-specific handlers. We picked 127"},{"line_number":25,"context_line":"    # here since it\u0027s waaaaaay far out before oslo_serialization will use it."},{"line_number":26,"context_line":"    identity \u003d 127"},{"line_number":27,"context_line":"    handles \u003d (revoke_model.RevokeTree,)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def __init__(self, registry):"},{"line_number":30,"context_line":"        self._registry \u003d registry"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def serialize(self, obj):"},{"line_number":33,"context_line":"        return msgpackutils.dumps(obj.revoke_map,"},{"line_number":34,"context_line":"                                  registry\u003dself._registry)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def deserialize(self, data):"},{"line_number":37,"context_line":"        revoke_map \u003d msgpackutils.loads(data, registry\u003dself._registry)"},{"line_number":38,"context_line":"        revoke_tree \u003d revoke_model.RevokeTree()"},{"line_number":39,"context_line":"        revoke_tree.revoke_map \u003d revoke_map"},{"line_number":40,"context_line":"        return revoke_tree"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# Register our new handler."},{"line_number":44,"context_line":"_registry \u003d msgpackutils.default_registry"},{"line_number":45,"context_line":"_registry.frozen \u003d False"},{"line_number":46,"context_line":"_registry.register(_RevokeModelHandler(registry\u003d_registry))"},{"line_number":47,"context_line":"_registry.frozen \u003d True"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class _ResponseCacheProxy(proxy.ProxyBackend):"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_680bc3d6","side":"PARENT","line":47,"range":{"start_line":22,"start_character":0,"end_line":47,"end_character":23},"updated":"2016-05-11 20:09:33.000000000","message":"yay for removing this","commit_id":"8b4ed8a1ffbea1fa0f7772fc14cd49ef226ec8b9"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"4c322b5b8a16c869552fbf6604d451014f32d11e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from oslo_context import context as oslo_context"},{"line_number":17,"context_line":"from oslo_serialization import msgpackutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from keystone.models import revoke_model"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"bab6814e_7de5b9a6","line":19,"updated":"2016-05-25 05:31:34.000000000","message":"unrelated change (NIT)","commit_id":"75abc21ecfc2a37c10be61289204b5056403dd5c"}],"keystone/models/revoke_model.py":[{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"33fc34b3fdf528056c277dcc16a50986c29f9cd4","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        for target in self._events:"},{"line_number":172,"context_line":"            if target \u003d\u003d event:"},{"line_number":173,"context_line":"                self._events.remove(target)"},{"line_number":174,"context_line":"        "},{"line_number":175,"context_line":"    def add_events(self, revoke_events):"},{"line_number":176,"context_line":"        for event in revoke_events:"},{"line_number":177,"context_line":"            self._events.append(event)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_3780758b","line":174,"updated":"2016-05-03 17:44:11.000000000","message":"nit: white spaces","commit_id":"82853bc41581ebaf4e9da16c3c13592af321e96d"},{"author":{"_account_id":9301,"name":"Navid Pustchi","email":"npustchi@gmail.com","username":"Navid"},"change_message_id":"dd28e8592073a368b9d97979c4a5faa0f0a46e51","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    \"\"\"See if the token matches the revocation event."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    Used as a secondary check on the logic to Check"},{"line_number":153,"context_line":"    By Tree Below:  This is abrute force approach to checking."},{"line_number":154,"context_line":"    Compare each attribute from the event with the corresponding"},{"line_number":155,"context_line":"    value from the token.  If the event does not have a value for"},{"line_number":156,"context_line":"    the attribute, a match is still possible.  If the event has a"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_ed58df33","line":153,"range":{"start_line":153,"start_character":28,"end_line":153,"end_character":34},"updated":"2016-05-03 21:26:58.000000000","message":"typo, a brute","commit_id":"b2ef3f1b643fa70aaeec5add60107f58c468daaf"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"cd74e13ced099209f55d74e431fd86473e28f463","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    \"\"\"See if the token matches the revocation event."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    Used as a secondary check on the logic to Check"},{"line_number":153,"context_line":"    By Tree Below:  This is abrute force approach to checking."},{"line_number":154,"context_line":"    Compare each attribute from the event with the corresponding"},{"line_number":155,"context_line":"    value from the token.  If the event does not have a value for"},{"line_number":156,"context_line":"    the attribute, a match is still possible.  If the event has a"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_86511c65","line":153,"range":{"start_line":153,"start_character":28,"end_line":153,"end_character":34},"updated":"2016-05-04 19:47:23.000000000","message":"a brute","commit_id":"5125e6b84f01bb52804c02476413564a4354d423"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"cd74e13ced099209f55d74e431fd86473e28f463","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    the attribute, a match is still possible.  If the event has a"},{"line_number":157,"context_line":"    value for the attribute, and it does not match the token, no match"},{"line_number":158,"context_line":"    is possible, so skip the remaining checks."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    :param event: one revocation event to match"},{"line_number":161,"context_line":"    :param token_values: dictionary with set of values taken from the"},{"line_number":162,"context_line":"    token"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_e6f8d04c","line":159,"updated":"2016-05-04 19:47:23.000000000","message":"maybe add the steps taken in the verification: first user_id, second domain_id... This is intend to fail fast for the most common types of revoke events going first, right?","commit_id":"5125e6b84f01bb52804c02476413564a4354d423"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"ebdca52879dfcd9feca6c424842e654a5799d748","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    the attribute, a match is still possible.  If the event has a"},{"line_number":157,"context_line":"    value for the attribute, and it does not match the token, no match"},{"line_number":158,"context_line":"    is possible, so skip the remaining checks."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    :param event: one revocation event to match"},{"line_number":161,"context_line":"    :param token_values: dictionary with set of values taken from the"},{"line_number":162,"context_line":"    token"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_803c57e2","line":159,"in_reply_to":"1a122d0e_e6f8d04c","updated":"2016-05-05 01:46:12.000000000","message":"too much detail for the comments, and too hard to keep in sync if we tune things below.","commit_id":"5125e6b84f01bb52804c02476413564a4354d423"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"ef29007aafcd3d7ef847ccf58d45e6df63ab2934","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    # rest of the logic."},{"line_number":190,"context_line":"    attribute_names \u003d [\u0027project_id\u0027,"},{"line_number":191,"context_line":"                       \u0027expires_at\u0027, \u0027trust_id\u0027, \u0027consumer_id\u0027,"},{"line_number":192,"context_line":"                       \u0027access_token_id\u0027, \u0027audit_id\u0027, \u0027audit_chain_id\u0027]"},{"line_number":193,"context_line":"    for attribute_name in attribute_names:"},{"line_number":194,"context_line":"        if getattr(event, attribute_name) is not None:"},{"line_number":195,"context_line":"            if (getattr(event, attribute_name) !\u003d"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_f7ed18f1","line":192,"range":{"start_line":192,"start_character":42,"end_line":192,"end_character":52},"updated":"2016-05-04 20:55:25.000000000","message":"Isn\u0027t revoked by audit_id/audit_chain_id the most common case? If so, you may want to move them to the top to short circuit the check.","commit_id":"5125e6b84f01bb52804c02476413564a4354d423"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"ebdca52879dfcd9feca6c424842e654a5799d748","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    # rest of the logic."},{"line_number":190,"context_line":"    attribute_names \u003d [\u0027project_id\u0027,"},{"line_number":191,"context_line":"                       \u0027expires_at\u0027, \u0027trust_id\u0027, \u0027consumer_id\u0027,"},{"line_number":192,"context_line":"                       \u0027access_token_id\u0027, \u0027audit_id\u0027, \u0027audit_chain_id\u0027]"},{"line_number":193,"context_line":"    for attribute_name in attribute_names:"},{"line_number":194,"context_line":"        if getattr(event, attribute_name) is not None:"},{"line_number":195,"context_line":"            if (getattr(event, attribute_name) !\u003d"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_202c63ab","line":192,"range":{"start_line":192,"start_character":42,"end_line":192,"end_character":52},"in_reply_to":"1a122d0e_f7ed18f1","updated":"2016-05-05 01:46:12.000000000","message":"THis is a direct copy of the code from the test, where it has been running all along.  I would rather leave tuning for another patch.","commit_id":"5125e6b84f01bb52804c02476413564a4354d423"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"ef29007aafcd3d7ef847ccf58d45e6df63ab2934","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                    token_values[attribute_name]):"},{"line_number":197,"context_line":"                        return False"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    if event.role_id is not None:"},{"line_number":200,"context_line":"        roles \u003d token_values[\u0027roles\u0027]"},{"line_number":201,"context_line":"        for role in roles:"},{"line_number":202,"context_line":"            if event.role_id \u003d\u003d role:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_b7ce0081","line":199,"range":{"start_line":199,"start_character":7,"end_line":199,"end_character":20},"updated":"2016-05-04 20:55:25.000000000","message":"Thought we don\u0027t revoke by role_id anymore. At least not for fernet right?","commit_id":"5125e6b84f01bb52804c02476413564a4354d423"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"ebdca52879dfcd9feca6c424842e654a5799d748","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                    token_values[attribute_name]):"},{"line_number":197,"context_line":"                        return False"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    if event.role_id is not None:"},{"line_number":200,"context_line":"        roles \u003d token_values[\u0027roles\u0027]"},{"line_number":201,"context_line":"        for role in roles:"},{"line_number":202,"context_line":"            if event.role_id \u003d\u003d role:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_401d1f72","line":199,"range":{"start_line":199,"start_character":7,"end_line":199,"end_character":20},"in_reply_to":"1a122d0e_b7ce0081","updated":"2016-05-05 01:46:12.000000000","message":"Fernet won;t need this, but we do revoke by role in tests for now.  A follow on patch will remove many, if not most of these checks.","commit_id":"5125e6b84f01bb52804c02476413564a4354d423"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"cd74e13ced099209f55d74e431fd86473e28f463","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    if event.role_id is not None:"},{"line_number":200,"context_line":"        roles \u003d token_values[\u0027roles\u0027]"},{"line_number":201,"context_line":"        for role in roles:"},{"line_number":202,"context_line":"            if event.role_id \u003d\u003d role:"},{"line_number":203,"context_line":"                break"},{"line_number":204,"context_line":"        else:"},{"line_number":205,"context_line":"            return False"},{"line_number":206,"context_line":"    if token_values[\u0027issued_at\u0027] \u003e event.issued_before:"},{"line_number":207,"context_line":"        return False"},{"line_number":208,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_a6541854","line":205,"range":{"start_line":201,"start_character":0,"end_line":205,"end_character":24},"updated":"2016-05-04 19:47:23.000000000","message":"roles is list, right? this could be only:\n\n  if event.role_id not in roles:\n    return False","commit_id":"5125e6b84f01bb52804c02476413564a4354d423"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"ebdca52879dfcd9feca6c424842e654a5799d748","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    if event.role_id is not None:"},{"line_number":200,"context_line":"        roles \u003d token_values[\u0027roles\u0027]"},{"line_number":201,"context_line":"        for role in roles:"},{"line_number":202,"context_line":"            if event.role_id \u003d\u003d role:"},{"line_number":203,"context_line":"                break"},{"line_number":204,"context_line":"        else:"},{"line_number":205,"context_line":"            return False"},{"line_number":206,"context_line":"    if token_values[\u0027issued_at\u0027] \u003e event.issued_before:"},{"line_number":207,"context_line":"        return False"},{"line_number":208,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_c0092f33","line":205,"range":{"start_line":201,"start_character":0,"end_line":205,"end_character":24},"in_reply_to":"1a122d0e_a6541854","updated":"2016-05-05 01:46:12.000000000","message":"Again, this is a direct copy of the code from the test side.  Lots of tuning we can do after, but I want it in as-is to avoid silently breaking something.","commit_id":"5125e6b84f01bb52804c02476413564a4354d423"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"efc46aced0150cff564f4a42417e7a85d9653070","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    return list(map(event.key_for_name, _EVENT_NAMES))"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"def is_revoked(events, token_data):"},{"line_number":130,"context_line":"    \"\"\"Check if a token matches the revocation event."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    Compare the values for each level of the tree with the values from"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_e069238d","line":129,"updated":"2016-05-06 19:14:21.000000000","message":"nit: We should add formal docstrings for each of these.","commit_id":"c337875d79d5656409701c6a12cd46110fe015a6"},{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"427020e9ee2b1cf94a2b21c8f577b9cce3d0b4b7","unresolved":false,"context_lines":[{"line_number":129,"context_line":"def is_revoked(events, token_data):"},{"line_number":130,"context_line":"    \"\"\"Check if a token matches the revocation event."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    Compare the values for each level of the tree with the values from"},{"line_number":133,"context_line":"    the token, accounting for attributes that have alternative"},{"line_number":134,"context_line":"    keys, and for wildcard matches."},{"line_number":135,"context_line":"    if there is a match, continue down the tree."}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_99f6dad5","line":132,"updated":"2016-05-06 17:21:04.000000000","message":"What tree? This is a list now. s/tree/list/ in the comments and docs please.","commit_id":"c337875d79d5656409701c6a12cd46110fe015a6"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"efc46aced0150cff564f4a42417e7a85d9653070","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    Compare the values for each level of the tree with the values from"},{"line_number":133,"context_line":"    the token, accounting for attributes that have alternative"},{"line_number":134,"context_line":"    keys, and for wildcard matches."},{"line_number":135,"context_line":"    if there is a match, continue down the tree."},{"line_number":136,"context_line":"    if there is no match, exit early."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    token_data is a map based on a flattened view of token."}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_00bf07fc","line":135,"updated":"2016-05-06 19:14:21.000000000","message":"If there is a match continue down the tree? If there is a match wouldn\u0027t we want to exit early? If there isn\u0027t a match we would want to process the token data against the next entry in the list, right?","commit_id":"c337875d79d5656409701c6a12cd46110fe015a6"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"efc46aced0150cff564f4a42417e7a85d9653070","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    if there is a match, continue down the tree."},{"line_number":136,"context_line":"    if there is no match, exit early."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    token_data is a map based on a flattened view of token."},{"line_number":139,"context_line":"    The required fields are:"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    \u0027expires_at\u0027,\u0027user_id\u0027, \u0027project_id\u0027, \u0027identity_domain_id\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_0056e7d1","line":138,"updated":"2016-05-06 19:14:21.000000000","message":"nit: view of the token.","commit_id":"c337875d79d5656409701c6a12cd46110fe015a6"},{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"427020e9ee2b1cf94a2b21c8f577b9cce3d0b4b7","unresolved":false,"context_lines":[{"line_number":149,"context_line":"def matches(event, token_values):"},{"line_number":150,"context_line":"    \"\"\"See if the token matches the revocation event."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    Used as a secondary check on the logic to Check"},{"line_number":153,"context_line":"    By Tree Below:  This is a brute force approach to checking."},{"line_number":154,"context_line":"    Compare each attribute from the event with the corresponding"},{"line_number":155,"context_line":"    value from the token.  If the event does not have a value for"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_79d176cd","line":152,"updated":"2016-05-06 17:21:04.000000000","message":"where is \"Check by Tree\"? Why not drop this fragment and start with \"This is a brute...\".","commit_id":"c337875d79d5656409701c6a12cd46110fe015a6"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"efc46aced0150cff564f4a42417e7a85d9653070","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        if event.domain_scope_id !\u003d token_values[\u0027assignment_domain_id\u0027]:"},{"line_number":184,"context_line":"            return False"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    # If any one check does not match, the while token does"},{"line_number":187,"context_line":"    # not match the event. The numerous return False indicate"},{"line_number":188,"context_line":"    # that the token is still valid and short-circuits the"},{"line_number":189,"context_line":"    # rest of the logic."}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_9b488a2f","line":186,"updated":"2016-05-06 19:14:21.000000000","message":"while?","commit_id":"c337875d79d5656409701c6a12cd46110fe015a6"},{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"110cfeaa2e6406f2a97d2581eebec24c2dfee9b4","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                    token_values[attribute_name]):"},{"line_number":197,"context_line":"                        return False"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    if event.role_id is not None:"},{"line_number":200,"context_line":"        roles \u003d token_values[\u0027roles\u0027]"},{"line_number":201,"context_line":"        for role in roles:"},{"line_number":202,"context_line":"            if event.role_id \u003d\u003d role:"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_4faae0d5","line":199,"updated":"2016-05-06 17:26:01.000000000","message":"Was this done in this style to match the rest of the code?\nThe following would be simpler.\n\nif event.role_id is not None:\n    if event.role_id not in token_values[\u0027roles\u0027]:\n        return False","commit_id":"c337875d79d5656409701c6a12cd46110fe015a6"},{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"427020e9ee2b1cf94a2b21c8f577b9cce3d0b4b7","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                break"},{"line_number":204,"context_line":"        else:"},{"line_number":205,"context_line":"            return False"},{"line_number":206,"context_line":"    if token_values[\u0027issued_at\u0027] \u003e event.issued_before:"},{"line_number":207,"context_line":"        return False"},{"line_number":208,"context_line":"    return True"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_4cbb0e73","line":206,"updated":"2016-05-06 17:21:04.000000000","message":"Every other logic stanza is separated by a blank line. For consistency one should be above this line too.","commit_id":"c337875d79d5656409701c6a12cd46110fe015a6"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"9fd9d51af6b4c1dac65f3238930683c05c0563cc","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        for attribute_name in [\u0027user_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027]:"},{"line_number":170,"context_line":"            if event.user_id \u003d\u003d token_values[attribute_name]:"},{"line_number":171,"context_line":"                break"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            return False"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    # The token has two attributes that can match the domain_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_e85a774f","line":172,"updated":"2016-05-09 14:30:05.000000000","message":"Do not use a for/else. This can always be written a better way that is more friendly/easier to maintain/understand. This is the main reason for the -1.","commit_id":"e5e03b774821d51ce91d99ce6c85071ba15eb372"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"9fd9d51af6b4c1dac65f3238930683c05c0563cc","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        for attribute_name in [\u0027identity_domain_id\u0027, \u0027assignment_domain_id\u0027]:"},{"line_number":178,"context_line":"            if event.domain_id \u003d\u003d token_values[attribute_name]:"},{"line_number":179,"context_line":"                break"},{"line_number":180,"context_line":"        else:"},{"line_number":181,"context_line":"            return False"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    if event.domain_scope_id is not None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_a816af52","line":180,"updated":"2016-05-09 14:30:05.000000000","message":"Do not use for/else. See above.","commit_id":"e5e03b774821d51ce91d99ce6c85071ba15eb372"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"9fd9d51af6b4c1dac65f3238930683c05c0563cc","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        for role in roles:"},{"line_number":203,"context_line":"            if event.role_id \u003d\u003d role:"},{"line_number":204,"context_line":"                break"},{"line_number":205,"context_line":"        else:"},{"line_number":206,"context_line":"            return False"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    if token_values[\u0027issued_at\u0027] \u003e event.issued_before:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_8b000503","line":205,"updated":"2016-05-09 14:30:05.000000000","message":"Do not use for/else. See above.","commit_id":"e5e03b774821d51ce91d99ce6c85071ba15eb372"},{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"e973c3a680d40494c31413bb59a9d289a23db6a0","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                       \u0027expires_at\u0027, \u0027trust_id\u0027, \u0027consumer_id\u0027,"},{"line_number":193,"context_line":"                       \u0027access_token_id\u0027, \u0027audit_id\u0027, \u0027audit_chain_id\u0027]"},{"line_number":194,"context_line":"    for attribute_name in attribute_names:"},{"line_number":195,"context_line":"        if getattr(event, attribute_name) is not None:"},{"line_number":196,"context_line":"            if (getattr(event, attribute_name) !\u003d"},{"line_number":197,"context_line":"                    token_values[attribute_name]):"},{"line_number":198,"context_line":"                        return False"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_5d089a91","line":195,"range":{"start_line":195,"start_character":11,"end_line":195,"end_character":18},"updated":"2016-05-09 18:27:01.000000000","message":"s/getattr/hasattr/","commit_id":"09d893b70daf068556ee82819f7e6b9730076294"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"f9f32a7d8074c1a0afe3fe8f177fd9f1fe7005aa","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                       \u0027expires_at\u0027, \u0027trust_id\u0027, \u0027consumer_id\u0027,"},{"line_number":193,"context_line":"                       \u0027access_token_id\u0027, \u0027audit_id\u0027, \u0027audit_chain_id\u0027]"},{"line_number":194,"context_line":"    for attribute_name in attribute_names:"},{"line_number":195,"context_line":"        if getattr(event, attribute_name) is not None:"},{"line_number":196,"context_line":"            if (getattr(event, attribute_name) !\u003d"},{"line_number":197,"context_line":"                    token_values[attribute_name]):"},{"line_number":198,"context_line":"                        return False"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_33a187a4","line":195,"range":{"start_line":195,"start_character":11,"end_line":195,"end_character":18},"in_reply_to":"dab17558_5d089a91","updated":"2016-05-09 19:16:40.000000000","message":"Nope, we need more than that is has the attribute, some of them come through as None.","commit_id":"09d893b70daf068556ee82819f7e6b9730076294"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"d515ee876bb5febaa5444f162b6cf8062fcf27b5","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    against every item in the list without a match, it is not considered"},{"line_number":135,"context_line":"    revoked from the `revoke_api`."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    :param events: a list data structure of events"},{"line_number":138,"context_line":"    :param token_data: map based on a flattened view of the token. The required"},{"line_number":139,"context_line":"                       fields are `expires_at`,`user_id`, `project_id`,"},{"line_number":140,"context_line":"                       `identity_domain_id`, `assignment_domain_id`,"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_437b197b","line":137,"range":{"start_line":137,"start_character":26,"end_line":137,"end_character":40},"updated":"2016-05-11 20:09:33.000000000","message":"\"a list of events\" is enough of a description","commit_id":"e8479bf0ad4495197eaabcaaf16ce6e5bd845633"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"d515ee876bb5febaa5444f162b6cf8062fcf27b5","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    value for the attribute, and it does not match the token, no match"},{"line_number":159,"context_line":"    is possible, so skip the remaining checks."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    :param event: one revocation event to match"},{"line_number":162,"context_line":"    :param token_values: dictionary with set of values taken from the"},{"line_number":163,"context_line":"    token"},{"line_number":164,"context_line":"    :returns: True if the token matches the revocation event, indicating the"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_23437514","line":161,"range":{"start_line":161,"start_character":11,"end_line":161,"end_character":16},"updated":"2016-05-11 20:09:33.000000000","message":"what does an event look like? you describe the token_data above, which is very helpful","commit_id":"e8479bf0ad4495197eaabcaaf16ce6e5bd845633"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"d515ee876bb5febaa5444f162b6cf8062fcf27b5","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    :param event: one revocation event to match"},{"line_number":162,"context_line":"    :param token_values: dictionary with set of values taken from the"},{"line_number":163,"context_line":"    token"},{"line_number":164,"context_line":"    :returns: True if the token matches the revocation event, indicating the"},{"line_number":165,"context_line":"    token has been revoked"},{"line_number":166,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_e3d5ed42","line":163,"range":{"start_line":163,"start_character":4,"end_line":163,"end_character":9},"updated":"2016-05-11 20:09:33.000000000","message":"bump this over, under \"dictionary\"","commit_id":"e8479bf0ad4495197eaabcaaf16ce6e5bd845633"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"d515ee876bb5febaa5444f162b6cf8062fcf27b5","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    :param token_values: dictionary with set of values taken from the"},{"line_number":163,"context_line":"    token"},{"line_number":164,"context_line":"    :returns: True if the token matches the revocation event, indicating the"},{"line_number":165,"context_line":"    token has been revoked"},{"line_number":166,"context_line":"    \"\"\""},{"line_number":167,"context_line":"    # If any one check does not match, the whole token does"},{"line_number":168,"context_line":"    # not match the event. The numerous return False indicate"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_23cc15ba","line":165,"range":{"start_line":165,"start_character":4,"end_line":165,"end_character":26},"updated":"2016-05-11 20:09:33.000000000","message":"same as above","commit_id":"e8479bf0ad4495197eaabcaaf16ce6e5bd845633"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"0686a4bde41cd16f118897c138be0c93b461ea3d","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        if all(event.role_id !\u003d role for role in roles):"},{"line_number":203,"context_line":"            return False"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    if token_values[\u0027issued_at\u0027] \u003e event.issued_before:"},{"line_number":206,"context_line":"        return False"},{"line_number":207,"context_line":"    return True"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_68ae2ce7","line":205,"updated":"2016-05-11 00:45:01.000000000","message":"I had to double check this because the logic is opposite here https://github.com/openstack/keystone/blob/02562069d8e48eadcec8ab66fb82d6427a6a749c/keystone/models/revoke_model.py#L223\n\nIf token_values[\u0027issued_at\u0027] is within the same second as event.issued_before, this statement should evaluate to false. Which is what we want since it should keep the tokens from being revoked and successfully validated in the same second.","commit_id":"e8479bf0ad4495197eaabcaaf16ce6e5bd845633"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"d515ee876bb5febaa5444f162b6cf8062fcf27b5","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        if all(event.role_id !\u003d role for role in roles):"},{"line_number":203,"context_line":"            return False"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    if token_values[\u0027issued_at\u0027] \u003e event.issued_before:"},{"line_number":206,"context_line":"        return False"},{"line_number":207,"context_line":"    return True"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_e3d84d55","line":205,"range":{"start_line":205,"start_character":4,"end_line":205,"end_character":55},"updated":"2016-05-11 20:09:33.000000000","message":"minor optimization, shouldn\u0027t this be at the top? before we loop over attributes on line 194, this is a very fast comparison","commit_id":"e8479bf0ad4495197eaabcaaf16ce6e5bd845633"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c46d904762eb308057aee94e64e7e87daa1e2fe1","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        if all(event.role_id !\u003d role for role in roles):"},{"line_number":203,"context_line":"            return False"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    if token_values[\u0027issued_at\u0027] \u003e event.issued_before:"},{"line_number":206,"context_line":"        return False"},{"line_number":207,"context_line":"    return True"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_c600cd36","line":205,"in_reply_to":"dab17558_68ae2ce7","updated":"2016-05-11 13:59:35.000000000","message":"Right.  I always have to reread the one from the old version because the true/false in the return is determined by the result of the evaluation.  Thus, to me, this version is easier to read quickly and see what is going on, but the result and performance is the same.","commit_id":"e8479bf0ad4495197eaabcaaf16ce6e5bd845633"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"8c6f0c7a1df7181e8f00f6789294a7d5c127e82c","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        if all(event.role_id !\u003d role for role in roles):"},{"line_number":203,"context_line":"            return False"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    if token_values[\u0027issued_at\u0027] \u003e event.issued_before:"},{"line_number":206,"context_line":"        return False"},{"line_number":207,"context_line":"    return True"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_f20502c2","line":205,"range":{"start_line":205,"start_character":4,"end_line":205,"end_character":55},"in_reply_to":"dab17558_e3d84d55","updated":"2016-05-16 15:18:21.000000000","message":"I don\u0027t think we have enough data to decide what the ordering of the checks should be.  I can make guesses, but really we need to know what the most common check is, and I don\u0027t think it is this one.  It really depends on why tokens get revoked.","commit_id":"e8479bf0ad4495197eaabcaaf16ce6e5bd845633"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"3ce741e54d8a291b6a3efb9e74963e3095798f02","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    for attribute_name in attribute_names:"},{"line_number":195,"context_line":"        if getattr(event, attribute_name) is not None:"},{"line_number":196,"context_line":"            if (getattr(event, attribute_name) !\u003d"},{"line_number":197,"context_line":"                    token_values[attribute_name]):"},{"line_number":198,"context_line":"                        return False"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    if event.role_id is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_40434613","line":197,"range":{"start_line":197,"start_character":20,"end_line":197,"end_character":48},"updated":"2016-05-16 20:54:47.000000000","message":"I assume all these attributes are mandatory in the token data. Is this right?","commit_id":"1c3f61cd068d15bd40c3c7cd7d3acf7e0a106671"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"b7f5c22602e7c231f95b5e31cc094a6235a5daed","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    for attribute_name in attribute_names:"},{"line_number":195,"context_line":"        if getattr(event, attribute_name) is not None:"},{"line_number":196,"context_line":"            if (getattr(event, attribute_name) !\u003d"},{"line_number":197,"context_line":"                    token_values[attribute_name]):"},{"line_number":198,"context_line":"                        return False"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    if event.role_id is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_4037c64c","line":197,"range":{"start_line":197,"start_character":20,"end_line":197,"end_character":48},"in_reply_to":"dab17558_40434613","updated":"2016-05-16 21:00:08.000000000","message":"yes","commit_id":"1c3f61cd068d15bd40c3c7cd7d3acf7e0a106671"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"3ce741e54d8a291b6a3efb9e74963e3095798f02","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        if all(event.role_id !\u003d role for role in roles):"},{"line_number":203,"context_line":"            return False"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    if token_values[\u0027issued_at\u0027] \u003e event.issued_before:"},{"line_number":206,"context_line":"        return False"},{"line_number":207,"context_line":"    return True"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_000bfed6","line":205,"range":{"start_line":205,"start_character":4,"end_line":205,"end_character":55},"updated":"2016-05-16 20:54:47.000000000","message":"So if the token data has matched all the data from the event, let\u0027s finally check the datetimes. Could you add a comment here to be clearer?","commit_id":"1c3f61cd068d15bd40c3c7cd7d3acf7e0a106671"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"b7f5c22602e7c231f95b5e31cc094a6235a5daed","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        if all(event.role_id !\u003d role for role in roles):"},{"line_number":203,"context_line":"            return False"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    if token_values[\u0027issued_at\u0027] \u003e event.issued_before:"},{"line_number":206,"context_line":"        return False"},{"line_number":207,"context_line":"    return True"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_e046babe","line":205,"range":{"start_line":205,"start_character":4,"end_line":205,"end_character":55},"in_reply_to":"dab17558_000bfed6","updated":"2016-05-16 21:00:08.000000000","message":"All of the rules are fall through. There is no reason this needs to be last","commit_id":"1c3f61cd068d15bd40c3c7cd7d3acf7e0a106671"}],"keystone/revoke/core.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"600ebf517ff716624dfb0e25b4a277156c471bf2","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        :raises keystone.exception.TokenNotFound: If the token is invalid."},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        \"\"\""},{"line_number":218,"context_line":"        if revoke_model.is_revoked(self.driver.list_events(), token_values):"},{"line_number":219,"context_line":"            raise exception.TokenNotFound(_(\u0027Failed to validate token\u0027))"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def revoke(self, event):"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_1d8c20d9","line":218,"updated":"2016-05-10 14:27:01.000000000","message":"I\u0027d like to see this load tested. My main concern is that we\u0027d select pulling all of the events for every token check , where it looks like it was actually only doing that periodically.","commit_id":"e8479bf0ad4495197eaabcaaf16ce6e5bd845633"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c46d904762eb308057aee94e64e7e87daa1e2fe1","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        :raises keystone.exception.TokenNotFound: If the token is invalid."},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        \"\"\""},{"line_number":218,"context_line":"        if revoke_model.is_revoked(self.driver.list_events(), token_values):"},{"line_number":219,"context_line":"            raise exception.TokenNotFound(_(\u0027Failed to validate token\u0027))"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def revoke(self, event):"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_064495b4","line":218,"in_reply_to":"dab17558_1d8c20d9","updated":"2016-05-11 13:59:35.000000000","message":"That caching was origianlly done assuming that the code was run external to the Keystone server, and needed to be updated based on a new fetch.  This one counts on caching at the driver level, and thus has less memory footprint.","commit_id":"e8479bf0ad4495197eaabcaaf16ce6e5bd845633"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"6567180b78fec590b88a870e1c08725f625525c2","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        :raises keystone.exception.TokenNotFound: If the token is invalid."},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        \"\"\""},{"line_number":218,"context_line":"        if revoke_model.is_revoked(self.driver.list_events(), token_values):"},{"line_number":219,"context_line":"            raise exception.TokenNotFound(_(\u0027Failed to validate token\u0027))"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def revoke(self, event):"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_5a1df760","line":218,"range":{"start_line":218,"start_character":35,"end_line":218,"end_character":60},"updated":"2016-05-16 19:52:55.000000000","message":"You need to implement manager .list_events() with @memoize on it and still do the proper invalidation of the new .list_events(). calling driver.list_events() circumvents the manager (at the very least always call self.list_events() it should pass through to the driver) and you\u0027ve eliminated caching for the events.","commit_id":"1cb3e888e8aaa6f1d1aee38fce31d96119930161"}],"keystone/tests/unit/test_revoke.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"9fd9d51af6b4c1dac65f3238930683c05c0563cc","unresolved":false,"context_lines":[{"line_number":195,"context_line":"    return event"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"def remove_event(events, event):"},{"line_number":199,"context_line":"    for target in events:"},{"line_number":200,"context_line":"        if target \u003d\u003d event:"},{"line_number":201,"context_line":"            events.remove(target)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class RevokeListTests(unit.TestCase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_ebca716d","line":201,"range":{"start_line":198,"start_character":0,"end_line":201,"end_character":33},"updated":"2016-05-09 14:30:05.000000000","message":"We should look at moving to something more directly indexed rather than needing to iterate. But since this is in support of testing, this comment is more of a nit than anything else. (Perhaps worthy of a future cleanup)","commit_id":"e5e03b774821d51ce91d99ce6c85071ba15eb372"}]}
