)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0c650b5df705ebd72d4a583dedbc2d8a30b42f82","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Lance Bragstad \u003clbragstad@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-08-03 20:51:22 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make all token provider behave the same with trusts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I0a4fefe34a0c6912200d256e7bc3cbef66b34a16"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3ac371cc_e039b0d8","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":51},"updated":"2016-08-17 09:54:28.000000000","message":"Does this commit message is what this patch for? Mostly change from point of view is enabling validate trust-scoped token against V2.0 API except some comments from the testcases.","commit_id":"3efd271fbc579b9510c13507092d1aca6ca88e96"}],"keystone/tests/unit/test_auth.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"af6d0284e7feaf949fee57249ad1d3d7d0d742d0","unresolved":false,"context_lines":[{"line_number":1337,"context_line":"        msg \u003d \u0027The Fernet token provider does not support token persistence\u0027"},{"line_number":1338,"context_line":"        self.skipTest(msg)"},{"line_number":1339,"context_line":""},{"line_number":1340,"context_line":"    def test_trust_get_token_fails_if_trustee_disabled(self):"},{"line_number":1341,"context_line":"        # why is this still different than the UUID case?!?!"},{"line_number":1342,"context_line":"        time \u003d datetime.datetime.utcnow()"},{"line_number":1343,"context_line":"        with freezegun.freeze_time(time) as frozen_time:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_9fb97231","line":1340,"updated":"2016-08-03 20:00:35.000000000","message":"I did some digging on this. The reason why the fernet provider behaves differently than the uuid provider is because the fernet provider letting the v2.0 token controller deal with the exception. \n\nhttps://github.com/openstack/keystone/blob/b79e08b9bce25427e67ad7f74948f93777b9df03/keystone/token/controllers.py#L214-L215\n\nThe uuid provider raises a 404 TokenNotFound error because when a user is disabled a callback in the token provider removes all the tokens for that user.\n\nhttps://github.com/openstack/keystone/blob/b79e08b9bce25427e67ad7f74948f93777b9df03/keystone/token/provider.py#L161\n\nIt seems that the intended behavior for this test is to raise a 403 Forbidden according to the controllers, but with the callbacks + persistent tokens, that is not the case...","commit_id":"adfaf30bc1eae726efde729acc2da2aa8e9da6d3"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b36ccbc04c8583f192e972d0bd88bc33a3bf3921","unresolved":false,"context_lines":[{"line_number":1183,"context_line":"        request_body \u003d _build_user_auth(token\u003d{\u0027id\u0027: trust_token_id},"},{"line_number":1184,"context_line":"                                        tenant_id\u003dself.tenant_bar[\u0027id\u0027])"},{"line_number":1185,"context_line":"        self.assertRaises("},{"line_number":1186,"context_line":"            exception.Forbidden,"},{"line_number":1187,"context_line":"            self.controller.authenticate, self.make_request(), request_body)"},{"line_number":1188,"context_line":""},{"line_number":1189,"context_line":"    def test_delete_trust_revokes_token(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_0b0bde7e","line":1186,"updated":"2016-08-18 19:29:13.000000000","message":"++","commit_id":"3efd271fbc579b9510c13507092d1aca6ca88e96"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b36ccbc04c8583f192e972d0bd88bc33a3bf3921","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"            # keystone asks for are under control of the context manager. If we"},{"line_number":1200,"context_line":"            # don\u0027t do this, we could end up with situations where timeutils"},{"line_number":1201,"context_line":"            # can give unpatched datetimes outside of the context we are"},{"line_number":1202,"context_line":"            # expecting, which leads to debugging frustrating race conditions."},{"line_number":1203,"context_line":"            timeutils.set_time_override(frozen_time.time_to_freeze)"},{"line_number":1204,"context_line":"            unscoped_token \u003d self.get_unscoped_token(self.trustor[\u0027name\u0027])"},{"line_number":1205,"context_line":"            new_trust \u003d self.create_trust(self.sample_data,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_ab660a27","line":1202,"updated":"2016-08-18 19:29:13.000000000","message":"Reviewing this is weird, considering I\u0027ve already approved a change to delete this comment. It was a good comment while it lasted, anyway.","commit_id":"3efd271fbc579b9510c13507092d1aca6ca88e96"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b36ccbc04c8583f192e972d0bd88bc33a3bf3921","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"                self.make_request(is_admin\u003dTrue),"},{"line_number":1213,"context_line":"                token_id\u003dtrust_scoped_token_id"},{"line_number":1214,"context_line":"            )"},{"line_number":1215,"context_line":"            trust_id \u003d new_trust[\u0027id\u0027]"},{"line_number":1216,"context_line":"            frozen_time.tick(delta\u003ddatetime.timedelta(seconds\u003d1))"},{"line_number":1217,"context_line":"            self.trust_controller.delete_trust(request, trust_id\u003dtrust_id)"},{"line_number":1218,"context_line":"            self.assertRaises("}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_2e64e8e3","line":1215,"updated":"2016-08-18 19:29:13.000000000","message":"nit: unnecessary indirection.","commit_id":"3efd271fbc579b9510c13507092d1aca6ca88e96"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"3aa10e5a7eb46032837f7e3a2cf7c1356e3981f5","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"    def test_trust_get_token_fails_if_trustee_disabled(self):"},{"line_number":1347,"context_line":"        # NOTE(lbragtad) But why does the Fernet token provider behave"},{"line_number":1348,"context_line":"        # differently than the UUID provider?!"},{"line_number":1349,"context_line":"        # I\u0027m so happy you asked! It turns out that the v2.0 token controllers"},{"line_number":1350,"context_line":"        # actually assert that the actors of a trust are enabled. If they"},{"line_number":1351,"context_line":"        # aren\u0027t enabled, the controller will raise a Forbidden exception. This"},{"line_number":1352,"context_line":"        # is exactly what happens in the Fernet case. The UUID token provider"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_9b7e58e2","line":1349,"range":{"start_line":1349,"start_character":10,"end_line":1349,"end_character":33},"updated":"2016-08-05 05:45:35.000000000","message":"\\o/","commit_id":"3efd271fbc579b9510c13507092d1aca6ca88e96"}],"keystone/tests/unit/test_v3_auth.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b36ccbc04c8583f192e972d0bd88bc33a3bf3921","unresolved":false,"context_lines":[{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"    def test_validate_trust_token_on_v2_fails_outside_default_domain(self):"},{"line_number":1191,"context_line":"        # NOTE(lbragstad): This fails validation against the v2.0 API because"},{"line_number":1192,"context_line":"        # the actors of the trust are not within the default domain."},{"line_number":1193,"context_line":"        trustee_user, trust \u003d self._create_trust()"},{"line_number":1194,"context_line":"        trust_scoped_token \u003d self._get_trust_scoped_token(trustee_user, trust)"},{"line_number":1195,"context_line":"        self.assertRaises(exception.Unauthorized,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_ab344afb","line":1192,"updated":"2016-08-18 19:29:13.000000000","message":"++","commit_id":"3efd271fbc579b9510c13507092d1aca6ca88e96"}],"keystone/token/provider.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"dcdb83581add052f86b431ca5d63257518974ec4","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            # that makes sense for the request."},{"line_number":247,"context_line":"            v3_token_ref \u003d self.validate_non_persistent_token(token_id)"},{"line_number":248,"context_line":"            v2_token_data_helper \u003d providers.common.V2TokenDataHelper()"},{"line_number":249,"context_line":"            token \u003d v2_token_data_helper.v3_to_v2_token(v3_token_ref, token_id)"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # these are common things that happen regardless of token provider"},{"line_number":252,"context_line":"        self._token_belongs_to(token, belongs_to)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_c28af119","line":249,"updated":"2016-08-03 20:51:52.000000000","message":"this should use a kwarg","commit_id":"adfaf30bc1eae726efde729acc2da2aa8e9da6d3"}],"keystone/token/providers/common.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b36ccbc04c8583f192e972d0bd88bc33a3bf3921","unresolved":false,"context_lines":[{"line_number":37,"context_line":"class V2TokenDataHelper(object):"},{"line_number":38,"context_line":"    \"\"\"Create V2 token data.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def v3_to_v2_token(self, v3_token_data, token_id\u003dNone):"},{"line_number":41,"context_line":"        \"\"\"Convert v3 token data into v2.0 token data."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        This method expects a dictionary generated from"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_4ec3248b","line":40,"updated":"2016-08-18 19:29:13.000000000","message":"Seems like this should be a required argument? Do we ever not pass it in?","commit_id":"3efd271fbc579b9510c13507092d1aca6ca88e96"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"31a3341ed477bc31a1759ed5d8fdeb8c01f3b3f5","unresolved":false,"context_lines":[{"line_number":37,"context_line":"class V2TokenDataHelper(object):"},{"line_number":38,"context_line":"    \"\"\"Create V2 token data.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def v3_to_v2_token(self, v3_token_data, token_id\u003dNone):"},{"line_number":41,"context_line":"        \"\"\"Convert v3 token data into v2.0 token data."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        This method expects a dictionary generated from"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_2fc0e329","line":40,"in_reply_to":"3ac371cc_4ec3248b","updated":"2016-08-29 15:19:41.000000000","message":"It should be - but we call it *without* token_id here. \n\nhttps://github.com/openstack/keystone/blob/ed5df6f26fa41a9500e68177f3e7306d64da8651/keystone/token/providers/common.py#L782-L783\n\nThis should be refactored to *always* require a token_id.","commit_id":"3efd271fbc579b9510c13507092d1aca6ca88e96"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b36ccbc04c8583f192e972d0bd88bc33a3bf3921","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        token[\u0027expires\u0027] \u003d v3_token.get(\u0027expires_at\u0027)"},{"line_number":67,"context_line":"        token[\u0027issued_at\u0027] \u003d v3_token.get(\u0027issued_at\u0027)"},{"line_number":68,"context_line":"        token[\u0027audit_ids\u0027] \u003d v3_token.get(\u0027audit_ids\u0027)"},{"line_number":69,"context_line":"        token[\u0027id\u0027] \u003d token_id"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        if \u0027project\u0027 in v3_token:"},{"line_number":72,"context_line":"            # v3 token_data does not contain all tenant attributes"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_0e400c07","line":69,"updated":"2016-08-18 19:29:13.000000000","message":"i.e. why would (or should) this ever be null?","commit_id":"3efd271fbc579b9510c13507092d1aca6ca88e96"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b36ccbc04c8583f192e972d0bd88bc33a3bf3921","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            # be in the default domain. Furthermore, the delegated project"},{"line_number":89,"context_line":"            # must also be in the default domain"},{"line_number":90,"context_line":"            msg \u003d _(\u0027Non-default domain is not supported\u0027)"},{"line_number":91,"context_line":"            if CONF.trust.enabled:"},{"line_number":92,"context_line":"                try:"},{"line_number":93,"context_line":"                    trust_ref \u003d self.trust_api.get_trust(v3_trust[\u0027id\u0027])"},{"line_number":94,"context_line":"                except exception.TrustNotFound:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_0e0e4ce5","line":91,"updated":"2016-08-18 19:29:13.000000000","message":"Shouldn\u0027t this be on L85, or just not here at all? Not sure how we\u0027d get to this point with trusts being disabled.","commit_id":"3efd271fbc579b9510c13507092d1aca6ca88e96"}]}
