)]}'
{"keystone/auth/plugins/token.py":[{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"074d15cf2beaf98b9fe61924bbcb92d0b620850d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            if not CONF.token.allow_rescope_scoped_token:"},{"line_number":52,"context_line":"                # Do not allow conversion from scoped tokens."},{"line_number":53,"context_line":"                if token_ref.project_scoped or token_ref.domain_scoped:"},{"line_number":54,"context_line":"                    raise exception.Forbidden()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"            wsgi.validate_token_bind(context, token_ref)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_fc770e8c","line":54,"updated":"2015-01-14 18:05:11.000000000","message":"Would be nice to add a msg here, but seems that in the whole file it pattern is raising Forbidden without any useful information.","commit_id":"b4bbfd4215c411c1eb57ee2e734deccab6ed01ef"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"e922f84d00c34d7d1b88dc41ec6c30855501dc81","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            if not CONF.token.allow_rescope_scoped_token:"},{"line_number":52,"context_line":"                # Do not allow conversion from scoped tokens."},{"line_number":53,"context_line":"                if token_ref.project_scoped or token_ref.domain_scoped:"},{"line_number":54,"context_line":"                    raise exception.Forbidden()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"            wsgi.validate_token_bind(context, token_ref)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_d44142a7","line":54,"in_reply_to":"3a961159_adeab29d","updated":"2015-01-14 21:57:09.000000000","message":"I meant something like that: https://github.com/openstack/keystone/blob/master/keystone/assignment/core.py#L90\n\nexception.ForbiddenAction has an \"action\" attribute: https://github.com/openstack/keystone/blob/master/keystone/exception.py#L197","commit_id":"b4bbfd4215c411c1eb57ee2e734deccab6ed01ef"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"346a344b66dbd26d30c5356ed332459220367211","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            if not CONF.token.allow_rescope_scoped_token:"},{"line_number":52,"context_line":"                # Do not allow conversion from scoped tokens."},{"line_number":53,"context_line":"                if token_ref.project_scoped or token_ref.domain_scoped:"},{"line_number":54,"context_line":"                    raise exception.Forbidden()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"            wsgi.validate_token_bind(context, token_ref)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_bbbab008","line":54,"in_reply_to":"3a961159_d44142a7","updated":"2015-01-16 02:40:25.000000000","message":"Done","commit_id":"b4bbfd4215c411c1eb57ee2e734deccab6ed01ef"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"de44f395a2c4c1c9030c95d91f912a1c9d048543","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            if not CONF.token.allow_rescope_scoped_token:"},{"line_number":52,"context_line":"                # Do not allow conversion from scoped tokens."},{"line_number":53,"context_line":"                if token_ref.project_scoped or token_ref.domain_scoped:"},{"line_number":54,"context_line":"                    raise exception.Forbidden()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"            wsgi.validate_token_bind(context, token_ref)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_adeab29d","line":54,"in_reply_to":"3a961159_fc770e8c","updated":"2015-01-14 19:39:21.000000000","message":"I\u0027m not sure about the message. It is a security requirement not to say why it is forbidden in many places.   As an example we can \u0027t say 401 invalid password.\n\nThat doesn\u0027t mean we should not log any log message. I believe we should log at why this is forbidden, so that some one triaging will know the reason","commit_id":"b4bbfd4215c411c1eb57ee2e734deccab6ed01ef"}],"keystone/common/config.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"d057e0af074d09d2a6b411a24ca488357d40f183","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                    \u0027list of tokens to revoke. Only disable if you are \u0027"},{"line_number":269,"context_line":"                    \u0027switching to using the Revoke extension with a \u0027"},{"line_number":270,"context_line":"                    \u0027backend other than KVS, which stores events in memory.\u0027),"},{"line_number":271,"context_line":"        cfg.BoolOpt(\u0027rescoped_scoped\u0027, default\u003dTrue,"},{"line_number":272,"context_line":"                    help\u003d\u0027Allow rescoping of scoped token. Setting \u0027"},{"line_number":273,"context_line":"                    \u0027rescoped_scoped to false prevents a user from exchanging \u0027"},{"line_number":274,"context_line":"                    \u0027a scoped token for any other token.\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_b980a6c0","line":271,"updated":"2015-01-11 23:57:31.000000000","message":"Suggest renaming this to \"allow_token_rescope\".\n\n\"rescoped_token\" is not that descriptive.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"cd7a55514add94dfae143c6b44a6606bd27a18d2","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                    \u0027list of tokens to revoke. Only disable if you are \u0027"},{"line_number":269,"context_line":"                    \u0027switching to using the Revoke extension with a \u0027"},{"line_number":270,"context_line":"                    \u0027backend other than KVS, which stores events in memory.\u0027),"},{"line_number":271,"context_line":"        cfg.BoolOpt(\u0027rescoped_scoped\u0027, default\u003dTrue,"},{"line_number":272,"context_line":"                    help\u003d\u0027Allow rescoping of scoped token. Setting \u0027"},{"line_number":273,"context_line":"                    \u0027rescoped_scoped to false prevents a user from exchanging \u0027"},{"line_number":274,"context_line":"                    \u0027a scoped token for any other token.\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_8f28fc86","line":271,"in_reply_to":"3a961159_b980a6c0","updated":"2015-01-12 02:24:09.000000000","message":"++","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"cd7a55514add94dfae143c6b44a6606bd27a18d2","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                    \u0027backend other than KVS, which stores events in memory.\u0027),"},{"line_number":271,"context_line":"        cfg.BoolOpt(\u0027rescoped_scoped\u0027, default\u003dTrue,"},{"line_number":272,"context_line":"                    help\u003d\u0027Allow rescoping of scoped token. Setting \u0027"},{"line_number":273,"context_line":"                    \u0027rescoped_scoped to false prevents a user from exchanging \u0027"},{"line_number":274,"context_line":"                    \u0027a scoped token for any other token.\u0027),"},{"line_number":275,"context_line":"        cfg.StrOpt(\u0027hash_algorithm\u0027, default\u003d\u0027md5\u0027,"},{"line_number":276,"context_line":"                   help\u003d\"The hash algorithm to use for PKI tokens. This can \""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_af1db864","line":273,"updated":"2015-01-12 02:24:09.000000000","message":"rescoped_scoped -\u003e allow_token_rescope, if you take above suggestion.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"fe4e63e404c7dc0ab093083b3a2a2d1944945b4a","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        cfg.BoolOpt(\u0027rescoped_scoped\u0027, default\u003dTrue,"},{"line_number":272,"context_line":"                    help\u003d\u0027Allow rescoping of scoped token. Setting \u0027"},{"line_number":273,"context_line":"                    \u0027rescoped_scoped to false prevents a user from exchanging \u0027"},{"line_number":274,"context_line":"                    \u0027a scoped token for any other token.\u0027),"},{"line_number":275,"context_line":"        cfg.StrOpt(\u0027hash_algorithm\u0027, default\u003d\u0027md5\u0027,"},{"line_number":276,"context_line":"                   help\u003d\"The hash algorithm to use for PKI tokens. This can \""},{"line_number":277,"context_line":"                        \"be set to any algorithm that hashlib supports. \""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_44c8e021","line":274,"updated":"2015-01-09 02:51:26.000000000","message":"Should add this option in etc/keystone.conf.sample too.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"d057e0af074d09d2a6b411a24ca488357d40f183","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        cfg.BoolOpt(\u0027rescoped_scoped\u0027, default\u003dTrue,"},{"line_number":272,"context_line":"                    help\u003d\u0027Allow rescoping of scoped token. Setting \u0027"},{"line_number":273,"context_line":"                    \u0027rescoped_scoped to false prevents a user from exchanging \u0027"},{"line_number":274,"context_line":"                    \u0027a scoped token for any other token.\u0027),"},{"line_number":275,"context_line":"        cfg.StrOpt(\u0027hash_algorithm\u0027, default\u003d\u0027md5\u0027,"},{"line_number":276,"context_line":"                   help\u003d\"The hash algorithm to use for PKI tokens. This can \""},{"line_number":277,"context_line":"                        \"be set to any algorithm that hashlib supports. \""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_1967fa52","line":274,"in_reply_to":"3a961159_44c8e021","updated":"2015-01-11 23:57:31.000000000","message":"This can be done outside of this review - sample config is generated via tox as needed.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"}],"keystone/tests/test_v3_auth.py":[{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"cd7a55514add94dfae143c6b44a6606bd27a18d2","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        self.assertValidProjectScopedTokenResponse(r, require_catalog\u003dFalse)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"class RescopingScopedDisabledTests(test_v3.RestfulTestCase):"},{"line_number":405,"context_line":"    def setUp(self):"},{"line_number":406,"context_line":"        super(RescopingScopedDisabledTests, self).setUp()"},{"line_number":407,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_7460030e","line":404,"updated":"2015-01-12 02:24:09.000000000","message":"In the case you take Morgan\u0027 suggestion, remeber to rename this class to AllowTokenRescopeDisabledTests.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"fe4e63e404c7dc0ab093083b3a2a2d1944945b4a","unresolved":false,"context_lines":[{"line_number":414,"context_line":"            group\u003d\u0027token\u0027,"},{"line_number":415,"context_line":"            provider\u003d\u0027keystone.token.providers.uuid.Provider\u0027)"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def _v3_token(self):"},{"line_number":418,"context_line":"        unscoped_token \u003d self.get_requested_token("},{"line_number":419,"context_line":"            self.build_authentication_request("},{"line_number":420,"context_line":"                user_id\u003dself.user[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_04f9784d","line":417,"updated":"2015-01-09 02:51:26.000000000","message":"_v3_token_from_token?","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"cd7a55514add94dfae143c6b44a6606bd27a18d2","unresolved":false,"context_lines":[{"line_number":414,"context_line":"            group\u003d\u0027token\u0027,"},{"line_number":415,"context_line":"            provider\u003d\u0027keystone.token.providers.uuid.Provider\u0027)"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def _v3_token(self):"},{"line_number":418,"context_line":"        unscoped_token \u003d self.get_requested_token("},{"line_number":419,"context_line":"            self.build_authentication_request("},{"line_number":420,"context_line":"                user_id\u003dself.user[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_54006702","line":417,"in_reply_to":"3a961159_04f9784d","updated":"2015-01-12 02:24:09.000000000","message":"No. This method only returns a valid v3 token, as _v2_token does for v2 token.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"fe4e63e404c7dc0ab093083b3a2a2d1944945b4a","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                project_id\u003dself.project_id))"},{"line_number":426,"context_line":"        return scoped_token"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"    def test_rescoping_v3_to_v3__disabled(self):"},{"line_number":429,"context_line":"        self.v3_authenticate_token("},{"line_number":430,"context_line":"            self.build_authentication_request("},{"line_number":431,"context_line":"                token\u003dself._v3_token(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_248bd4c0","line":428,"updated":"2015-01-09 02:51:26.000000000","message":"\"test_rescoping_v3_to_v3__disabled\" to \"test_rescoping_v3_to_v3_disabled\"","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"cd7a55514add94dfae143c6b44a6606bd27a18d2","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                project_id\u003dself.project_id))"},{"line_number":426,"context_line":"        return scoped_token"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"    def test_rescoping_v3_to_v3__disabled(self):"},{"line_number":429,"context_line":"        self.v3_authenticate_token("},{"line_number":430,"context_line":"            self.build_authentication_request("},{"line_number":431,"context_line":"                token\u003dself._v3_token(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_14589f56","line":428,"in_reply_to":"3a961159_248bd4c0","updated":"2015-01-12 02:24:09.000000000","message":"I\u0027d suggest removing __disabled, since the class is already telling us the rescoping is disabled.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"fe4e63e404c7dc0ab093083b3a2a2d1944945b4a","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            self.build_authentication_request("},{"line_number":431,"context_line":"                token\u003dself._v3_token(),"},{"line_number":432,"context_line":"                project_id\u003dself.project_id),"},{"line_number":433,"context_line":"            expected_status\u003d403)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def _v2_token(self):"},{"line_number":436,"context_line":"        body \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a43b44e8","line":433,"updated":"2015-01-09 02:51:26.000000000","message":"I think we should add another test that the scoped_token gotten directly from password can\u0027t be rescoped.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"cd7a55514add94dfae143c6b44a6606bd27a18d2","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            self.build_authentication_request("},{"line_number":431,"context_line":"                token\u003dself._v3_token(),"},{"line_number":432,"context_line":"                project_id\u003dself.project_id),"},{"line_number":433,"context_line":"            expected_status\u003d403)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    def _v2_token(self):"},{"line_number":436,"context_line":"        body \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_4f17f445","line":433,"in_reply_to":"3a961159_a43b44e8","updated":"2015-01-12 02:24:09.000000000","message":"Not sure it\u0027s worth, since v3 tokens are treated equally independently if they were scoped from an unscoped token or got from password directly.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"fe4e63e404c7dc0ab093083b3a2a2d1944945b4a","unresolved":false,"context_lines":[{"line_number":458,"context_line":"                           body\u003dbody,"},{"line_number":459,"context_line":"                           expected_status\u003d403)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def test_rescoping_v2_to_v3__disabled(self):"},{"line_number":462,"context_line":"        token \u003d self._v2_token()"},{"line_number":463,"context_line":"        self.v3_authenticate_token("},{"line_number":464,"context_line":"            self.build_authentication_request("}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_44ef0087","line":461,"updated":"2015-01-09 02:51:26.000000000","message":"\"test_rescoping_v2_to_v3__disabled\" to \"test_rescoping_v2_to_v3_disabled\"","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"cd7a55514add94dfae143c6b44a6606bd27a18d2","unresolved":false,"context_lines":[{"line_number":458,"context_line":"                           body\u003dbody,"},{"line_number":459,"context_line":"                           expected_status\u003d403)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def test_rescoping_v2_to_v3__disabled(self):"},{"line_number":462,"context_line":"        token \u003d self._v2_token()"},{"line_number":463,"context_line":"        self.v3_authenticate_token("},{"line_number":464,"context_line":"            self.build_authentication_request("}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_54522736","line":461,"in_reply_to":"3a961159_44ef0087","updated":"2015-01-12 02:24:09.000000000","message":"Same as line 428.\nI\u0027d suggest removing __disabled.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"cd7a55514add94dfae143c6b44a6606bd27a18d2","unresolved":false,"context_lines":[{"line_number":464,"context_line":"            self.build_authentication_request("},{"line_number":465,"context_line":"                token\u003dtoken[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027],"},{"line_number":466,"context_line":"                project_id\u003dself.project_id),"},{"line_number":467,"context_line":"            expected_status\u003d403)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def test_rescoping_v3_to_v2__disabled(self):"},{"line_number":470,"context_line":"        token \u003d {\u0027id\u0027: self._v3_token()}"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_342cbbac","line":467,"updated":"2015-01-12 02:24:09.000000000","message":"I\u0027d suggest the creation of a method called _v3_token_from_token, as you did for v2 tokens (_v2_token_from_token).\n\nThis method would then be called here and by v3 rescoping tests (L428).","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"fe4e63e404c7dc0ab093083b3a2a2d1944945b4a","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                project_id\u003dself.project_id),"},{"line_number":467,"context_line":"            expected_status\u003d403)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def test_rescoping_v3_to_v2__disabled(self):"},{"line_number":470,"context_line":"        token \u003d {\u0027id\u0027: self._v3_token()}"},{"line_number":471,"context_line":"        self._v2_token_from_token(token)"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_84e568a5","line":469,"updated":"2015-01-09 02:51:26.000000000","message":"This too.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"cd7a55514add94dfae143c6b44a6606bd27a18d2","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                project_id\u003dself.project_id),"},{"line_number":467,"context_line":"            expected_status\u003d403)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def test_rescoping_v3_to_v2__disabled(self):"},{"line_number":470,"context_line":"        token \u003d {\u0027id\u0027: self._v3_token()}"},{"line_number":471,"context_line":"        self._v2_token_from_token(token)"},{"line_number":472,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_9433af12","line":469,"in_reply_to":"3a961159_84e568a5","updated":"2015-01-12 02:24:09.000000000","message":"Same as line 428.\nI\u0027d suggest removing __disabled.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"fe4e63e404c7dc0ab093083b3a2a2d1944945b4a","unresolved":false,"context_lines":[{"line_number":470,"context_line":"        token \u003d {\u0027id\u0027: self._v3_token()}"},{"line_number":471,"context_line":"        self._v2_token_from_token(token)"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def test_rescoping_v2_to_v2__disabled(self):"},{"line_number":474,"context_line":"        token \u003d self._v2_token()"},{"line_number":475,"context_line":"        self._v2_token_from_token(token[\u0027access\u0027][\u0027token\u0027])"},{"line_number":476,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a4e8a47b","line":473,"updated":"2015-01-09 02:51:26.000000000","message":"This too.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"cd7a55514add94dfae143c6b44a6606bd27a18d2","unresolved":false,"context_lines":[{"line_number":470,"context_line":"        token \u003d {\u0027id\u0027: self._v3_token()}"},{"line_number":471,"context_line":"        self._v2_token_from_token(token)"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def test_rescoping_v2_to_v2__disabled(self):"},{"line_number":474,"context_line":"        token \u003d self._v2_token()"},{"line_number":475,"context_line":"        self._v2_token_from_token(token[\u0027access\u0027][\u0027token\u0027])"},{"line_number":476,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_b438abef","line":473,"in_reply_to":"3a961159_a4e8a47b","updated":"2015-01-12 02:24:09.000000000","message":"Same as line 428.\nI\u0027d suggest removing __disabled.","commit_id":"1f05c9a2bcdb0fe6c23af64c28934862a7183fda"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"6b87cada363a251b19e9090fedee6e89cad59d8f","unresolved":false,"context_lines":[{"line_number":404,"context_line":""},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"class AllowRescopeScopedTokenDisabledTests(test_v3.RestfulTestCase):"},{"line_number":407,"context_line":"    def setUp(self):"},{"line_number":408,"context_line":"        super(AllowRescopeScopedTokenDisabledTests, self).setUp()"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def config_overrides(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_49c9ff77","line":407,"updated":"2015-01-16 10:49:16.000000000","message":"I\u0027m not sure why we need to define setUp here. It can be removed.","commit_id":"a74aafaacb89255b2ef1f7eccfaf78a64a9626eb"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"180e20bf388962036206d28ec620b526f3a8c502","unresolved":false,"context_lines":[{"line_number":404,"context_line":""},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"class AllowRescopeScopedTokenDisabledTests(test_v3.RestfulTestCase):"},{"line_number":407,"context_line":"    def setUp(self):"},{"line_number":408,"context_line":"        super(AllowRescopeScopedTokenDisabledTests, self).setUp()"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def config_overrides(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_b7dd4d16","line":407,"in_reply_to":"3a961159_49c9ff77","updated":"2015-01-16 17:05:36.000000000","message":"Done","commit_id":"a74aafaacb89255b2ef1f7eccfaf78a64a9626eb"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"6b87cada363a251b19e9090fedee6e89cad59d8f","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        self.config_fixture.config("},{"line_number":413,"context_line":"            group\u003d\u0027token\u0027,"},{"line_number":414,"context_line":"            allow_rescope_scoped_token\u003dFalse)"},{"line_number":415,"context_line":"        self.config_fixture.config("},{"line_number":416,"context_line":"            group\u003d\u0027token\u0027,"},{"line_number":417,"context_line":"            provider\u003d\u0027keystone.token.providers.uuid.Provider\u0027)"},{"line_number":418,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_09dd3741","line":415,"updated":"2015-01-16 10:49:16.000000000","message":"is it intended to work with uuid-only tokens? I tried removing these 3 lines and the tests passed ok","commit_id":"a74aafaacb89255b2ef1f7eccfaf78a64a9626eb"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"180e20bf388962036206d28ec620b526f3a8c502","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        self.config_fixture.config("},{"line_number":413,"context_line":"            group\u003d\u0027token\u0027,"},{"line_number":414,"context_line":"            allow_rescope_scoped_token\u003dFalse)"},{"line_number":415,"context_line":"        self.config_fixture.config("},{"line_number":416,"context_line":"            group\u003d\u0027token\u0027,"},{"line_number":417,"context_line":"            provider\u003d\u0027keystone.token.providers.uuid.Provider\u0027)"},{"line_number":418,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_97bbf1bc","line":415,"in_reply_to":"3a961159_09dd3741","updated":"2015-01-16 17:05:36.000000000","message":"Done","commit_id":"a74aafaacb89255b2ef1f7eccfaf78a64a9626eb"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"6b87cada363a251b19e9090fedee6e89cad59d8f","unresolved":false,"context_lines":[{"line_number":416,"context_line":"            group\u003d\u0027token\u0027,"},{"line_number":417,"context_line":"            provider\u003d\u0027keystone.token.providers.uuid.Provider\u0027)"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    def _v3_token(self):"},{"line_number":420,"context_line":"        unscoped_token \u003d self.get_requested_token("},{"line_number":421,"context_line":"            self.build_authentication_request("},{"line_number":422,"context_line":"                user_id\u003dself.user[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_ac26f1b7","line":419,"updated":"2015-01-16 10:49:16.000000000","message":"self.get_scoped_token() can be used instead of this method","commit_id":"a74aafaacb89255b2ef1f7eccfaf78a64a9626eb"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"180e20bf388962036206d28ec620b526f3a8c502","unresolved":false,"context_lines":[{"line_number":416,"context_line":"            group\u003d\u0027token\u0027,"},{"line_number":417,"context_line":"            provider\u003d\u0027keystone.token.providers.uuid.Provider\u0027)"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    def _v3_token(self):"},{"line_number":420,"context_line":"        unscoped_token \u003d self.get_requested_token("},{"line_number":421,"context_line":"            self.build_authentication_request("},{"line_number":422,"context_line":"                user_id\u003dself.user[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_775e8514","line":419,"in_reply_to":"3a961159_ac26f1b7","updated":"2015-01-16 17:05:36.000000000","message":"Done","commit_id":"a74aafaacb89255b2ef1f7eccfaf78a64a9626eb"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"8badd31b817b464b31ecfe5bc644463bf501d3ee","unresolved":false,"context_lines":[{"line_number":460,"context_line":"        self._v2_token_from_token(token[\u0027access\u0027][\u0027token\u0027])"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"    def test_rescoped_domain_token_disabled(self):"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        self.domainA \u003d self.new_domain_ref()"},{"line_number":465,"context_line":"        self.assignment_api.create_domain(self.domainA[\u0027id\u0027], self.domainA)"},{"line_number":466,"context_line":"        self.assignment_api.create_grant(self.role[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_b33713fd","line":463,"updated":"2015-01-17 03:35:52.000000000","message":"nit: This line could be removed","commit_id":"b9c079c307a16b4cee53d5337b4a994977630279"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"8badd31b817b464b31ecfe5bc644463bf501d3ee","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            self.build_authentication_request("},{"line_number":476,"context_line":"                token\u003dunscoped_token,"},{"line_number":477,"context_line":"                domain_id\u003dself.domainA[\u0027id\u0027]))"},{"line_number":478,"context_line":"        self.v3_authenticate_token("},{"line_number":479,"context_line":"            self.build_authentication_request("},{"line_number":480,"context_line":"                token\u003ddomain_scoped_token,"},{"line_number":481,"context_line":"                project_id\u003dself.project_id),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_d33adfe4","line":478,"updated":"2015-01-17 03:35:52.000000000","message":"A comment here saying what is being asserted could be helpful. Something like:\n\n# Get a project-scoped token from the domain-scoped token","commit_id":"b9c079c307a16b4cee53d5337b4a994977630279"}],"keystone/token/controllers.py":[{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"074d15cf2beaf98b9fe61924bbcb92d0b620850d","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    def _restrict_scope(self, token_model_ref):"},{"line_number":153,"context_line":"        # A trust token cannot be used to get another token"},{"line_number":154,"context_line":"        if token_model_ref.trust_scoped:"},{"line_number":155,"context_line":"            raise exception.Forbidden()"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        if not CONF.token.allow_rescope_scoped_token:"},{"line_number":158,"context_line":"            # Do not allow conversion from scoped tokens."}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_3cdc3674","line":155,"updated":"2015-01-14 18:05:11.000000000","message":"Again, think that it needs a msg to explain what\u0027s going on to the user.","commit_id":"b4bbfd4215c411c1eb57ee2e734deccab6ed01ef"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"346a344b66dbd26d30c5356ed332459220367211","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    def _restrict_scope(self, token_model_ref):"},{"line_number":153,"context_line":"        # A trust token cannot be used to get another token"},{"line_number":154,"context_line":"        if token_model_ref.trust_scoped:"},{"line_number":155,"context_line":"            raise exception.Forbidden()"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        if not CONF.token.allow_rescope_scoped_token:"},{"line_number":158,"context_line":"            # Do not allow conversion from scoped tokens."}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_3bc7a099","line":155,"in_reply_to":"3a961159_3cdc3674","updated":"2015-01-16 02:40:25.000000000","message":"This is a pre-existing check.  Just moved","commit_id":"b4bbfd4215c411c1eb57ee2e734deccab6ed01ef"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"074d15cf2beaf98b9fe61924bbcb92d0b620850d","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        if not CONF.token.allow_rescope_scoped_token:"},{"line_number":158,"context_line":"            # Do not allow conversion from scoped tokens."},{"line_number":159,"context_line":"            if token_model_ref.project_scoped or token_model_ref.domain_scoped:"},{"line_number":160,"context_line":"                raise exception.Forbidden()"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _authenticate_token(self, context, auth):"},{"line_number":163,"context_line":"        \"\"\"Try to authenticate using an already existing token."}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_bccf46b2","line":160,"updated":"2015-01-14 18:05:11.000000000","message":"Same as above.","commit_id":"b4bbfd4215c411c1eb57ee2e734deccab6ed01ef"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"346a344b66dbd26d30c5356ed332459220367211","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        if not CONF.token.allow_rescope_scoped_token:"},{"line_number":158,"context_line":"            # Do not allow conversion from scoped tokens."},{"line_number":159,"context_line":"            if token_model_ref.project_scoped or token_model_ref.domain_scoped:"},{"line_number":160,"context_line":"                raise exception.Forbidden()"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _authenticate_token(self, context, auth):"},{"line_number":163,"context_line":"        \"\"\"Try to authenticate using an already existing token."}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_5bcaaca0","line":160,"in_reply_to":"3a961159_bccf46b2","updated":"2015-01-16 02:40:25.000000000","message":"Done","commit_id":"b4bbfd4215c411c1eb57ee2e734deccab6ed01ef"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"6b87cada363a251b19e9090fedee6e89cad59d8f","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            raise exception.Forbidden()"},{"line_number":156,"context_line":"        if not CONF.token.allow_rescope_scoped_token:"},{"line_number":157,"context_line":"            # Do not allow conversion from scoped tokens."},{"line_number":158,"context_line":"            if token_model_ref.project_scoped or token_model_ref.domain_scoped:"},{"line_number":159,"context_line":"                raise exception.Forbidden(action\u003d_(\"rescope a scoped token\"))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _authenticate_token(self, context, auth):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_ec955932","line":158,"updated":"2015-01-16 10:49:16.000000000","message":"domain scoped tokens are not tested","commit_id":"a74aafaacb89255b2ef1f7eccfaf78a64a9626eb"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"180e20bf388962036206d28ec620b526f3a8c502","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            raise exception.Forbidden()"},{"line_number":156,"context_line":"        if not CONF.token.allow_rescope_scoped_token:"},{"line_number":157,"context_line":"            # Do not allow conversion from scoped tokens."},{"line_number":158,"context_line":"            if token_model_ref.project_scoped or token_model_ref.domain_scoped:"},{"line_number":159,"context_line":"                raise exception.Forbidden(action\u003d_(\"rescope a scoped token\"))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _authenticate_token(self, context, auth):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_725133d8","line":158,"in_reply_to":"3a961159_ec955932","updated":"2015-01-16 17:05:36.000000000","message":"Done","commit_id":"a74aafaacb89255b2ef1f7eccfaf78a64a9626eb"}]}
