)]}'
{"keystone/common/controller.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c60eda37435865796164a4894af5d11f6d5b0c4c","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        raise exception.Unauthorized()"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    creds \u003d {}"},{"line_number":30,"context_line":"    if \u0027token_data\u0027 in token_ref and \u0027token\u0027 in token_ref[\u0027token_data\u0027]:"},{"line_number":31,"context_line":"        #V3 Tokens"},{"line_number":32,"context_line":"        token_data \u003d token_ref[\u0027token_data\u0027][\u0027token\u0027]"},{"line_number":33,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FpOE%3D","line":30,"updated":"2013-06-26 03:04:29.000000000","message":"This looks like a bug fix.  Is it?","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"f8488bce8f57d3c5c328d1ad66a6f96f8d8610c5","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    except exception.TokenNotFound:"},{"line_number":25,"context_line":"        LOG.warning(_(\u0027RBAC: Invalid token\u0027))"},{"line_number":26,"context_line":"        raise exception.Unauthorized()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    creds \u003d {}"},{"line_number":29,"context_line":"    if \u0027token_data\u0027 in token_ref and \u0027token\u0027 in token_ref[\u0027token_data\u0027]:"},{"line_number":30,"context_line":"        #V3 Tokens"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fbl4%3D","line":27,"updated":"2013-07-02 04:40:26.000000000","message":"How are we handling  REMOTE_USER??  If the user is externally authenticated, what will happen to RBAC?","commit_id":"3d9669685d6e2b638931c3f517614ce6697da585"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"6a70b4ea3239e65af3e8c90769e1f52067921f01","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    except exception.TokenNotFound:"},{"line_number":25,"context_line":"        LOG.warning(_(\u0027RBAC: Invalid token\u0027))"},{"line_number":26,"context_line":"        raise exception.Unauthorized()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    creds \u003d {}"},{"line_number":29,"context_line":"    if \u0027token_data\u0027 in token_ref and \u0027token\u0027 in token_ref[\u0027token_data\u0027]:"},{"line_number":30,"context_line":"        #V3 Tokens"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fbcs%3D","line":27,"in_reply_to":"AAAAPn%2F%2Fbl4%3D","updated":"2013-07-02 06:09:16.000000000","message":"RBAC does not change regardless how the user is authenticated. Currently REMOTE_USER simply means Keystone does not need to authenticate the user again. Once authenticated, user will get a token, which is no different then user authenticated an Keystone internal mechanism (i.e. username/password).","commit_id":"3d9669685d6e2b638931c3f517614ce6697da585"}],"keystone/contrib/ec2/core.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c60eda37435865796164a4894af5d11f6d5b0c4c","unresolved":false,"context_lines":[{"line_number":46,"context_line":"from keystone import config"},{"line_number":47,"context_line":"from keystone import exception"},{"line_number":48,"context_line":"from keystone import token"},{"line_number":49,"context_line":"from keystone.token import provider as token_provider"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"CONF \u003d config.CONF"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FpNw%3D","line":49,"updated":"2013-06-26 03:04:29.000000000","message":"SHould not be required if you are using @dependency","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                               id\u003d\u0027placeholder\u0027)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        (token_id, token_data) \u003d self.token_provider_api.issue_token("},{"line_number":191,"context_line":"            context\u003dNone,"},{"line_number":192,"context_line":"            user_id\u003dNone,"},{"line_number":193,"context_line":"            method_names\u003d[],"},{"line_number":194,"context_line":"            version\u003dtoken_provider.V2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk%2FY%3D","line":191,"updated":"2013-06-27 14:11:24.000000000","message":"As far as I can tell, context, user_id, and method_names are being passed on this call. If they\u0027re not used then suggest don\u0027t pass them on this call.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"}],"keystone/token/controllers.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c60eda37435865796164a4894af5d11f6d5b0c4c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"from keystone import exception"},{"line_number":10,"context_line":"from keystone.openstack.common import timeutils"},{"line_number":11,"context_line":"from keystone.token import core"},{"line_number":12,"context_line":"from keystone.token import provider as token_provider"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"CONF \u003d config.CONF"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FpNk%3D","line":12,"updated":"2013-06-26 03:04:29.000000000","message":"Should not be required if you are using @dependency","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c60eda37435865796164a4894af5d11f6d5b0c4c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        auth_token_data[\u0027id\u0027] \u003d \u0027placeholder\u0027"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        roles_ref \u003d []"},{"line_number":104,"context_line":"        for role_id in metadata_ref.get(\u0027roles\u0027, []):"},{"line_number":105,"context_line":"            role_ref \u003d self.identity_api.get_role(context, role_id)"},{"line_number":106,"context_line":"            roles_ref.append(dict(name\u003drole_ref[\u0027name\u0027]))"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FpMY%3D","line":104,"updated":"2013-06-26 03:04:29.000000000","message":"This logic doesn\u0027t belong here, either.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            roles_ref.append(dict(name\u003drole_ref[\u0027name\u0027]))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        (token_id, token_data) \u003d self.token_provider_api.issue_token("},{"line_number":109,"context_line":"            context\u003dNone,"},{"line_number":110,"context_line":"            user_id\u003dNone,"},{"line_number":111,"context_line":"            method_names\u003d[],"},{"line_number":112,"context_line":"            version\u003dtoken_provider.V2,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk%2FA%3D","line":109,"updated":"2013-06-27 14:11:24.000000000","message":"same comment as on this call in ec2/core.py. I don\u0027t see context, user_id, or method_names used by this function. If not, remove them.\n\nAlso, the issue_token function could use some documentation if these arguments are really required.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"f8488bce8f57d3c5c328d1ad66a6f96f8d8610c5","unresolved":false,"context_lines":[{"line_number":432,"context_line":"        \"\"\""},{"line_number":433,"context_line":"        belongs_to \u003d context[\u0027query_string\u0027].get(\u0027belongsTo\u0027)"},{"line_number":434,"context_line":"        self.token_provider_api.check_token(context, token_id,"},{"line_number":435,"context_line":"                                            belongs_to\u003dbelongs_to,"},{"line_number":436,"context_line":"                                            version\u003dtoken_provider.V2)"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    @controller.protected"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fblw%3D","line":435,"updated":"2013-07-02 04:40:26.000000000","message":"Sorry, don\u0027t understand, does this mean  check_token is not available in v3","commit_id":"3d9669685d6e2b638931c3f517614ce6697da585"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"6a70b4ea3239e65af3e8c90769e1f52067921f01","unresolved":false,"context_lines":[{"line_number":432,"context_line":"        \"\"\""},{"line_number":433,"context_line":"        belongs_to \u003d context[\u0027query_string\u0027].get(\u0027belongsTo\u0027)"},{"line_number":434,"context_line":"        self.token_provider_api.check_token(context, token_id,"},{"line_number":435,"context_line":"                                            belongs_to\u003dbelongs_to,"},{"line_number":436,"context_line":"                                            version\u003dtoken_provider.V2)"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    @controller.protected"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fbcg%3D","line":435,"in_reply_to":"AAAAPn%2F%2Fblw%3D","updated":"2013-07-02 06:09:16.000000000","message":"it does. token_provider_api works for both v2 and v3. Version is one of the parameters.","commit_id":"3d9669685d6e2b638931c3f517614ce6697da585"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"f8488bce8f57d3c5c328d1ad66a6f96f8d8610c5","unresolved":false,"context_lines":[{"line_number":452,"context_line":"    def delete_token(self, context, token_id):"},{"line_number":453,"context_line":"        \"\"\"Delete a token, effectively invalidating it for authz.\"\"\""},{"line_number":454,"context_line":"        # TODO(termie): this stuff should probably be moved to middleware"},{"line_number":455,"context_line":"        self.assert_admin(context)"},{"line_number":456,"context_line":"        self.token_api.delete_token(token_id)"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    @controller.protected"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fbls%3D","line":455,"updated":"2013-07-02 04:40:26.000000000","message":"Is this a valid assertion?   Can\u0027t I revoke my token?","commit_id":"3d9669685d6e2b638931c3f517614ce6697da585"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"6a70b4ea3239e65af3e8c90769e1f52067921f01","unresolved":false,"context_lines":[{"line_number":452,"context_line":"    def delete_token(self, context, token_id):"},{"line_number":453,"context_line":"        \"\"\"Delete a token, effectively invalidating it for authz.\"\"\""},{"line_number":454,"context_line":"        # TODO(termie): this stuff should probably be moved to middleware"},{"line_number":455,"context_line":"        self.assert_admin(context)"},{"line_number":456,"context_line":"        self.token_api.delete_token(token_id)"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    @controller.protected"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fbcc%3D","line":455,"in_reply_to":"AAAAPn%2F%2Fbls%3D","updated":"2013-07-02 06:09:16.000000000","message":"Not with V2 you don\u0027t. Only user with is_admin flag set to true can do it. That usually means using the *special* ADMIN static token. :)","commit_id":"3d9669685d6e2b638931c3f517614ce6697da585"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"608edffefb8ed5911caa1eca40f992fcba77deb3","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            role_ref \u003d self.identity_api.get_role(role_id)"},{"line_number":105,"context_line":"            roles_ref.append(dict(name\u003drole_ref[\u0027name\u0027]))"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        (token_id, token_data) \u003d self.token_provider_api.issue_token("},{"line_number":108,"context_line":"            context,"},{"line_number":109,"context_line":"            version\u003dtoken_provider.V2,"},{"line_number":110,"context_line":"            token_ref\u003dauth_token_data,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2F7%2B0%3D","line":107,"updated":"2013-07-08 21:19:28.000000000","message":"Code in the controller looks so much cleaner!","commit_id":"cc45acb6b4d3e93b3e32cf23470ecd1b086ced93"}],"keystone/token/provider.py":[{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"608edffefb8ed5911caa1eca40f992fcba77deb3","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        domain-scoped token; and \u0027auth_context\u0027 from the authentication"},{"line_number":73,"context_line":"        plugins."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        For V2 tokens, \u0027token_ref\u0027 must present in kwargs."},{"line_number":76,"context_line":"        Optionally, kwargs may contain \u0027roles_ref\u0027 and \u0027catalog_ref\u0027."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        :param context: request context"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2F7%2FI%3D","line":75,"updated":"2013-07-08 21:19:28.000000000","message":"I appreciate all the comments you put in the driver","commit_id":"cc45acb6b4d3e93b3e32cf23470ecd1b086ced93"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"2627f656e856e05fa75840b4c00d97ceefee902c","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        domain-scoped token; and \u0027auth_context\u0027 from the authentication"},{"line_number":82,"context_line":"        plugins."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        For V2 tokens, \u0027token_ref\u0027 must present in kwargs."},{"line_number":85,"context_line":"        Optionally, kwargs may contain \u0027roles_ref\u0027 and \u0027catalog_ref\u0027."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        :param context: request context"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAP3%2F%2FnpQ%3D","line":84,"updated":"2013-07-15 19:25:58.000000000","message":"typo:  put a \"be\"  between must and present","commit_id":"6283e55454b10f671323f4370aeef901046be016"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"04deddedf8ebba00f4d108c28ffc335502c465ef","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        domain-scoped token; and \u0027auth_context\u0027 from the authentication"},{"line_number":82,"context_line":"        plugins."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        For V2 tokens, \u0027token_ref\u0027 must present in kwargs."},{"line_number":85,"context_line":"        Optionally, kwargs may contain \u0027roles_ref\u0027 and \u0027catalog_ref\u0027."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        :param context: request context"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAP3%2F%2Fndk%3D","line":84,"in_reply_to":"AAAAP3%2F%2FnpQ%3D","updated":"2013-07-15 19:53:22.000000000","message":"good catch!","commit_id":"6283e55454b10f671323f4370aeef901046be016"}],"keystone/token/providers/keystone.py":[{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"f8488bce8f57d3c5c328d1ad66a6f96f8d8610c5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                        }"},{"line_number":65,"context_line":"             }"},{"line_number":66,"context_line":"        if \u0027tenant\u0027 in token_ref and token_ref[\u0027tenant\u0027]:"},{"line_number":67,"context_line":"            token_ref[\u0027tenant\u0027][\u0027enabled\u0027] \u003d True"},{"line_number":68,"context_line":"            o[\u0027access\u0027][\u0027token\u0027][\u0027tenant\u0027] \u003d token_ref[\u0027tenant\u0027]"},{"line_number":69,"context_line":"        if catalog_ref is not None:"},{"line_number":70,"context_line":"            o[\u0027access\u0027][\u0027serviceCatalog\u0027] \u003d V2TokenDataHelper.format_catalog("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fblo%3D","line":67,"updated":"2013-07-02 04:40:26.000000000","message":"V2 token doesn\u0027t have enabled as per v2 spec","commit_id":"3d9669685d6e2b638931c3f517614ce6697da585"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"6a70b4ea3239e65af3e8c90769e1f52067921f01","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                        }"},{"line_number":65,"context_line":"             }"},{"line_number":66,"context_line":"        if \u0027tenant\u0027 in token_ref and token_ref[\u0027tenant\u0027]:"},{"line_number":67,"context_line":"            token_ref[\u0027tenant\u0027][\u0027enabled\u0027] \u003d True"},{"line_number":68,"context_line":"            o[\u0027access\u0027][\u0027token\u0027][\u0027tenant\u0027] \u003d token_ref[\u0027tenant\u0027]"},{"line_number":69,"context_line":"        if catalog_ref is not None:"},{"line_number":70,"context_line":"            o[\u0027access\u0027][\u0027serviceCatalog\u0027] \u003d V2TokenDataHelper.format_catalog("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2FbcQ%3D","line":67,"in_reply_to":"AAAAPn%2F%2Fblo%3D","updated":"2013-07-02 06:09:16.000000000","message":"it does. This code has always been there. I am simply move it here.","commit_id":"3d9669685d6e2b638931c3f517614ce6697da585"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"f8488bce8f57d3c5c328d1ad66a6f96f8d8610c5","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            o[\u0027access\u0027][\u0027serviceCatalog\u0027] \u003d V2TokenDataHelper.format_catalog("},{"line_number":71,"context_line":"                catalog_ref)"},{"line_number":72,"context_line":"        if metadata_ref:"},{"line_number":73,"context_line":"            if \u0027is_admin\u0027 in metadata_ref:"},{"line_number":74,"context_line":"                o[\u0027access\u0027][\u0027metadata\u0027] \u003d {\u0027is_admin\u0027:"},{"line_number":75,"context_line":"                                           metadata_ref[\u0027is_admin\u0027]}"},{"line_number":76,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fblk%3D","line":73,"updated":"2013-07-02 04:40:26.000000000","message":"Which spec does this code refer to?\n\nhttp://docs.openstack.org/api/openstack-identity-service/2.0/content/POST_authenticate_v2.0_tokens_Token_Operations.html\n\nAs per this spec, v2 token doesn\u0027t have meta_data","commit_id":"3d9669685d6e2b638931c3f517614ce6697da585"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"6a70b4ea3239e65af3e8c90769e1f52067921f01","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            o[\u0027access\u0027][\u0027serviceCatalog\u0027] \u003d V2TokenDataHelper.format_catalog("},{"line_number":71,"context_line":"                catalog_ref)"},{"line_number":72,"context_line":"        if metadata_ref:"},{"line_number":73,"context_line":"            if \u0027is_admin\u0027 in metadata_ref:"},{"line_number":74,"context_line":"                o[\u0027access\u0027][\u0027metadata\u0027] \u003d {\u0027is_admin\u0027:"},{"line_number":75,"context_line":"                                           metadata_ref[\u0027is_admin\u0027]}"},{"line_number":76,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2FbcI%3D","line":73,"in_reply_to":"AAAAPn%2F%2Fblk%3D","updated":"2013-07-02 06:09:16.000000000","message":"This is legacy Keystone code. I am not changing any functionality here.","commit_id":"3d9669685d6e2b638931c3f517614ce6697da585"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"608edffefb8ed5911caa1eca40f992fcba77deb3","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"@dependency.requires(\u0027catalog_api\u0027, \u0027identity_api\u0027)"},{"line_number":43,"context_line":"class V2TokenDataHelper(object):"},{"line_number":44,"context_line":"    \"\"\"Creates V2 token data.\"\"\""},{"line_number":45,"context_line":"    @classmethod"},{"line_number":46,"context_line":"    def format_token(cls, token_ref, roles_ref, catalog_ref\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2F7%2BQ%3D","line":43,"updated":"2013-07-08 21:19:28.000000000","message":"This helps  with my previous comment on the other patch regarding having only one sample. Now you have two! Would still be good to have a statement in the rst on where new plugins should be added. But this helps a lot!","commit_id":"cc45acb6b4d3e93b3e32cf23470ecd1b086ced93"}],"keystone/token/providers/keystone_provider.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c60eda37435865796164a4894af5d11f6d5b0c4c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from keystone import exception"},{"line_number":29,"context_line":"from keystone.openstack.common import timeutils"},{"line_number":30,"context_line":"from keystone import token"},{"line_number":31,"context_line":"from keystone.token import core"},{"line_number":32,"context_line":"from keystone.token import provider as token_provider"},{"line_number":33,"context_line":"from keystone import trust"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FpNg%3D","line":31,"updated":"2013-06-26 03:04:29.000000000","message":"should be from keystone import token.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c60eda37435865796164a4894af5d11f6d5b0c4c","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"@dependency.requires(\u0027catalog_api\u0027, \u0027identity_api\u0027)"},{"line_number":42,"context_line":"class V2TokenDataHelper(object):"},{"line_number":43,"context_line":"    \"\"\"Creates V2 token data.\"\"\""},{"line_number":44,"context_line":"    @classmethod"},{"line_number":45,"context_line":"    def format_token(cls, token_ref, roles_ref, catalog_ref\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FpMw%3D","line":42,"updated":"2013-06-26 03:04:29.000000000","message":"Dislike the name helper in these classes.  V2TokenFormat","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c60eda37435865796164a4894af5d11f6d5b0c4c","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"@dependency.requires(\u0027catalog_api\u0027, \u0027identity_api\u0027)"},{"line_number":144,"context_line":"class V3TokenDataHelper(object):"},{"line_number":145,"context_line":"    \"\"\"Token data helper.\"\"\""},{"line_number":146,"context_line":"    def __init__(self, context):"},{"line_number":147,"context_line":"        self.context \u003d context"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FpMo%3D","line":144,"updated":"2013-06-26 03:04:29.000000000","message":"V3TokenFormat","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"@dependency.requires(\u0027catalog_api\u0027, \u0027identity_api\u0027)"},{"line_number":144,"context_line":"class V3TokenDataHelper(object):"},{"line_number":145,"context_line":"    \"\"\"Token data helper.\"\"\""},{"line_number":146,"context_line":"    def __init__(self, context):"},{"line_number":147,"context_line":"        self.context \u003d context"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk64%3D","line":144,"in_reply_to":"AAAAPn%2F%2FpMo%3D","updated":"2013-06-27 14:11:24.000000000","message":"Note that this should probably be changed in the parent review.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        return token_id"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def _issue_v2_token(self, **kwargs):"},{"line_number":349,"context_line":"        # no need for context"},{"line_number":350,"context_line":"        context \u003d None"},{"line_number":351,"context_line":"        token_data \u003d V2TokenDataHelper.get_token_data(**kwargs)"},{"line_number":352,"context_line":"        token_id \u003d self._get_token_id(token_data)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk%2F8%3D","line":349,"updated":"2013-06-27 14:11:24.000000000","message":"If context isn\u0027t needed then don\u0027t create it. Suggest remove this comment.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def _issue_v2_token(self, **kwargs):"},{"line_number":349,"context_line":"        # no need for context"},{"line_number":350,"context_line":"        context \u003d None"},{"line_number":351,"context_line":"        token_data \u003d V2TokenDataHelper.get_token_data(**kwargs)"},{"line_number":352,"context_line":"        token_id \u003d self._get_token_id(token_data)"},{"line_number":353,"context_line":"        token_data[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d token_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FlAE%3D","line":350,"updated":"2013-06-27 14:11:24.000000000","message":"the only place context is used is at line 374, suggest move it down there.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        except Exception:"},{"line_number":370,"context_line":"            exc_info \u003d sys.exc_info()"},{"line_number":371,"context_line":"            # an identical token may have been created already."},{"line_number":372,"context_line":"            # if so, return the token_data as it is also identical"},{"line_number":373,"context_line":"            try:"},{"line_number":374,"context_line":"                self.token_api.get_token(context, token_id\u003dtoken_id)"},{"line_number":375,"context_line":"            except exception.TokenNotFound:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk6g%3D","line":372,"updated":"2013-06-27 14:11:24.000000000","message":"Will get into this exception handling for any number of reasons, for example, if key error at line 355, or parse error from 359. So if the idea is that this is only entered if an identical token was created then this is not the case.\n\nThere should be a specific exception thrown by create_token that can be caught here.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":465,"context_line":"        if (token_ref.get(\u0027token_data\u0027) and"},{"line_number":466,"context_line":"                self.get_token_version(token_ref.get(\u0027token_data\u0027)) \u003d\u003d"},{"line_number":467,"context_line":"                token_provider.V3):"},{"line_number":468,"context_line":"            # this is a V3 token"},{"line_number":469,"context_line":"            msg \u003d _(\u0027Non-default domain is not supported\u0027)"},{"line_number":470,"context_line":"            # user in a non-default is prohibited"},{"line_number":471,"context_line":"            if (token_ref[\u0027token_data\u0027][\u0027token\u0027][\u0027user\u0027][\u0027domain\u0027][\u0027id\u0027] !\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk5s%3D","line":468,"updated":"2013-06-27 14:11:24.000000000","message":"Why do V3 tokens need to be in default domain?","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def _validate_v2_token(self, token_id, belongs_to\u003dNone, **kwargs):"},{"line_number":506,"context_line":"        try:"},{"line_number":507,"context_line":"            token_ref \u003d self._verify_token(token_id, belongs_to)"},{"line_number":508,"context_line":"            self._assert_default_domain(context\u003dNone, token_ref\u003dtoken_ref)"},{"line_number":509,"context_line":"            # FIXME(gyee): performance or correctness? Should we return the"},{"line_number":510,"context_line":"            # cached token or reconstruct it? Obviously if we are going with"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk5c%3D","line":507,"updated":"2013-06-27 14:11:24.000000000","message":"belongs_to is a keyword argument, so suggest\n\n token_ref \u003d self._verify_token(token_id, belongs_to\u003dbelongs_to)","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":505,"context_line":"    def _validate_v2_token(self, token_id, belongs_to\u003dNone, **kwargs):"},{"line_number":506,"context_line":"        try:"},{"line_number":507,"context_line":"            token_ref \u003d self._verify_token(token_id, belongs_to)"},{"line_number":508,"context_line":"            self._assert_default_domain(context\u003dNone, token_ref\u003dtoken_ref)"},{"line_number":509,"context_line":"            # FIXME(gyee): performance or correctness? Should we return the"},{"line_number":510,"context_line":"            # cached token or reconstruct it? Obviously if we are going with"},{"line_number":511,"context_line":"            # the cached token, any role, project, or domain name changes"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk5k%3D","line":508,"updated":"2013-06-27 14:11:24.000000000","message":"context and token_ref are positional argument, not a keyword argument, so suggest\n\n context \u003d None\n self._assert_default_domain(context, token_ref)\n\nIf context can be None, why is it a positional argument?\n\nSince the internal function is always called with context\u003dNone, change _assert_default_domain so that it doesn\u0027t take context as a parameter.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                for role_id in metadata_ref.get(\u0027roles\u0027, []):"},{"line_number":525,"context_line":"                    role_refs.append("},{"line_number":526,"context_line":"                        self.identity_api.get_role(context\u003dNone,"},{"line_number":527,"context_line":"                                                   role_id\u003drole_id))"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":"                # Get a service catalog if possible"},{"line_number":530,"context_line":"                # This is needed for on-behalf-of requests"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk4w%3D","line":527,"updated":"2013-06-27 14:11:24.000000000","message":"context and role_id are positional parameters, so call that way.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":533,"context_line":"                    catalog_ref \u003d self.catalog_api.get_catalog("},{"line_number":534,"context_line":"                        context\u003dNone,"},{"line_number":535,"context_line":"                        user_id\u003dtoken_ref[\u0027user\u0027][\u0027id\u0027],"},{"line_number":536,"context_line":"                        tenant_id\u003dtoken_ref[\u0027tenant\u0027][\u0027id\u0027],"},{"line_number":537,"context_line":"                        metadata\u003dmetadata_ref)"},{"line_number":538,"context_line":"                token_data \u003d V2TokenDataHelper.get_token_data("},{"line_number":539,"context_line":"                    token_ref\u003dtoken_ref,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk4o%3D","line":536,"updated":"2013-06-27 14:11:24.000000000","message":"context, user_id, and tenant_id are positional parameters, so call that way.\n\nThis is becoming a common comment here... so I\u0027m just going to say go through and check all the function calls and make them consistent with the function spec.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"effd1194ea5ea5c9b13280d23c8ab7f89885341a","unresolved":false,"context_lines":[{"line_number":578,"context_line":"            LOG.exception(_(\u0027Failed to validate token\u0027))"},{"line_number":579,"context_line":"            raise exception.Unauthorized(e)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def validate_token(self, token_id, belongs_to\u003dNone, version\u003d\u0027v3.0\u0027,"},{"line_number":582,"context_line":"                       **kwargs):"},{"line_number":583,"context_line":"        if version \u003d\u003d token_provider.V3:"},{"line_number":584,"context_line":"            return self._validate_v3_token(token_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fk7o%3D","line":581,"updated":"2013-06-27 14:11:24.000000000","message":"suggest change \u0027v3.0\u0027 here to token_provider.V3 (Note to self: this comment should be on the parent review).","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"}],"keystone/token/providers/uuid.py":[{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"2627f656e856e05fa75840b4c00d97ceefee902c","unresolved":false,"context_lines":[{"line_number":485,"context_line":"            # FIXME(gyee): performance or correctness? Should we return the"},{"line_number":486,"context_line":"            # cached token or reconstruct it? Obviously if we are going with"},{"line_number":487,"context_line":"            # the cached token, any role, project, or domain name changes"},{"line_number":488,"context_line":"            # will not be reflected. One may argue that with PKI tokens,"},{"line_number":489,"context_line":"            # we are essentially doing cached token validation anyway."},{"line_number":490,"context_line":"            # Lets go with the cached token strategy. Since token"},{"line_number":491,"context_line":"            # management layer is now pluggable, one can always provide"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAP3%2F%2FnnE%3D","line":488,"updated":"2013-07-15 19:25:58.000000000","message":"So you mention PKI tokens in this comment but it appears you structured the code to split UUID and PKI into 2 separate providers. So I don\u0027t think referring to PKI tokens in this UUID provider makes sense. Also, V2 tokens did not provide PKI support so that is why the V2 token patch is not the patch that is providing a PKI provider, correct?","commit_id":"6283e55454b10f671323f4370aeef901046be016"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"04deddedf8ebba00f4d108c28ffc335502c465ef","unresolved":false,"context_lines":[{"line_number":485,"context_line":"            # FIXME(gyee): performance or correctness? Should we return the"},{"line_number":486,"context_line":"            # cached token or reconstruct it? Obviously if we are going with"},{"line_number":487,"context_line":"            # the cached token, any role, project, or domain name changes"},{"line_number":488,"context_line":"            # will not be reflected. One may argue that with PKI tokens,"},{"line_number":489,"context_line":"            # we are essentially doing cached token validation anyway."},{"line_number":490,"context_line":"            # Lets go with the cached token strategy. Since token"},{"line_number":491,"context_line":"            # management layer is now pluggable, one can always provide"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAP3%2F%2Fnc8%3D","line":488,"in_reply_to":"AAAAP3%2F%2FnnE%3D","updated":"2013-07-15 19:53:22.000000000","message":"This code is common to and shared by both uuid and pki providers. Pki provider inherited from uuid provider. We do optionally support PKI tokens since Grizzly.","commit_id":"6283e55454b10f671323f4370aeef901046be016"}],"tests/test_keystoneclient.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c60eda37435865796164a4894af5d11f6d5b0c4c","unresolved":false,"context_lines":[{"line_number":840,"context_line":"    def get_checkout(self):"},{"line_number":841,"context_line":"        return KEYSTONECLIENT_REPO, \u0027master\u0027"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"    def test_ec2_auth(self):"},{"line_number":844,"context_line":"        client \u003d self.get_client()"},{"line_number":845,"context_line":"        cred \u003d client.ec2.create(user_id\u003dself.user_foo[\u0027id\u0027],"},{"line_number":846,"context_line":"                                 tenant_id\u003dself.tenant_bar[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FpNY%3D","line":843,"updated":"2013-06-26 03:04:29.000000000","message":"Good. We need this.  Could be a stand alone patch.  But good as is.","commit_id":"bb4750ae4c6266142607375c0e36fccd4a78e8ea"}]}
