)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18784,"name":"Michael Carden","email":"mike.carden@gmail.com","username":"mcarden"},"change_message_id":"f06b186716b4580a70fb4edc9b1d4f90f7e47328","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently keystone does not allow for redelegation of trust."},{"line_number":10,"context_line":"The only way for creating a new trust with the currect implementation"},{"line_number":11,"context_line":"using a trusted token was with impersonatation. This patch fixes the"},{"line_number":12,"context_line":"workflow for redelegating a trust."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: If8f537b7525bfa26604dbce891dc193169aa21e2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a68dd71_8db0538d","line":11,"range":{"start_line":11,"start_character":31,"end_line":11,"end_character":46},"updated":"2016-01-20 17:14:05.000000000","message":"impersonation","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"}],"keystone/tests/unit/test_v3_auth.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"413d1976620715fbb240b6b808c51f8752713918","unresolved":false,"context_lines":[{"line_number":3044,"context_line":"    def setUp(self):"},{"line_number":3045,"context_line":"        super(TestTrustChain, self).setUp()"},{"line_number":3046,"context_line":"        # Create trust chain"},{"line_number":3047,"context_line":"        self.user_chain \u003d list()"},{"line_number":3048,"context_line":"        self.trust_chain \u003d list()"},{"line_number":3049,"context_line":"        for _ in range(3):"},{"line_number":3050,"context_line":"            user \u003d unit.create_user(self.identity_api,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_a5e8927d","line":3047,"range":{"start_line":3047,"start_character":13,"end_line":3047,"end_character":23},"updated":"2016-01-19 21:41:34.000000000","message":"We should improve the naming of this variable. I don\u0027t think we are creating a chain of users, we just have a list of users.\n\n    self.user_list \u003d list()","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"31ce0f2b9c37e77a4f09da3268fd669c8a56b846","unresolved":false,"context_lines":[{"line_number":3044,"context_line":"    def setUp(self):"},{"line_number":3045,"context_line":"        super(TestTrustChain, self).setUp()"},{"line_number":3046,"context_line":"        # Create trust chain"},{"line_number":3047,"context_line":"        self.user_chain \u003d list()"},{"line_number":3048,"context_line":"        self.trust_chain \u003d list()"},{"line_number":3049,"context_line":"        for _ in range(3):"},{"line_number":3050,"context_line":"            user \u003d unit.create_user(self.identity_api,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_694590b1","line":3047,"range":{"start_line":3047,"start_character":13,"end_line":3047,"end_character":23},"in_reply_to":"ba63e191_a5e8927d","updated":"2016-01-20 00:21:48.000000000","message":"Done","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"413d1976620715fbb240b6b808c51f8752713918","unresolved":false,"context_lines":[{"line_number":3045,"context_line":"        super(TestTrustChain, self).setUp()"},{"line_number":3046,"context_line":"        # Create trust chain"},{"line_number":3047,"context_line":"        self.user_chain \u003d list()"},{"line_number":3048,"context_line":"        self.trust_chain \u003d list()"},{"line_number":3049,"context_line":"        for _ in range(3):"},{"line_number":3050,"context_line":"            user \u003d unit.create_user(self.identity_api,"},{"line_number":3051,"context_line":"                                    domain_id\u003dself.domain_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_65b13a8f","line":3048,"range":{"start_line":3048,"start_character":13,"end_line":3048,"end_character":24},"updated":"2016-01-19 21:41:34.000000000","message":"This is a chain of trusts because self.trust_chain[1] is created from token from self.trust_chain[0]\u0027s trust.","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"31ce0f2b9c37e77a4f09da3268fd669c8a56b846","unresolved":false,"context_lines":[{"line_number":3045,"context_line":"        super(TestTrustChain, self).setUp()"},{"line_number":3046,"context_line":"        # Create trust chain"},{"line_number":3047,"context_line":"        self.user_chain \u003d list()"},{"line_number":3048,"context_line":"        self.trust_chain \u003d list()"},{"line_number":3049,"context_line":"        for _ in range(3):"},{"line_number":3050,"context_line":"            user \u003d unit.create_user(self.identity_api,"},{"line_number":3051,"context_line":"                                    domain_id\u003dself.domain_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_c90cbc96","line":3048,"range":{"start_line":3048,"start_character":13,"end_line":3048,"end_character":24},"in_reply_to":"ba63e191_65b13a8f","updated":"2016-01-20 00:21:48.000000000","message":"Correct","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"413d1976620715fbb240b6b808c51f8752713918","unresolved":false,"context_lines":[{"line_number":3051,"context_line":"                                    domain_id\u003dself.domain_id)"},{"line_number":3052,"context_line":"            self.user_chain.append(user)"},{"line_number":3053,"context_line":""},{"line_number":3054,"context_line":"        # trustor-\u003etrustee"},{"line_number":3055,"context_line":"        trustee \u003d self.user_chain[0]"},{"line_number":3056,"context_line":"        trust_ref \u003d unit.new_trust_ref("},{"line_number":3057,"context_line":"            trustor_user_id\u003dself.user_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_08edf524","line":3054,"range":{"start_line":3054,"start_character":10,"end_line":3054,"end_character":26},"updated":"2016-01-19 21:41:34.000000000","message":"We should update this comment to be a little more descriptive. This reference is creating a trust between self.user (who is an admin, right?) and the first user in the list of users that we created.\n\nWe are also *not* allowing impersonation, which would make tokens generated from this trust seem like they came from self.user.","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"31ce0f2b9c37e77a4f09da3268fd669c8a56b846","unresolved":false,"context_lines":[{"line_number":3051,"context_line":"                                    domain_id\u003dself.domain_id)"},{"line_number":3052,"context_line":"            self.user_chain.append(user)"},{"line_number":3053,"context_line":""},{"line_number":3054,"context_line":"        # trustor-\u003etrustee"},{"line_number":3055,"context_line":"        trustee \u003d self.user_chain[0]"},{"line_number":3056,"context_line":"        trust_ref \u003d unit.new_trust_ref("},{"line_number":3057,"context_line":"            trustor_user_id\u003dself.user_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_4978ccf2","line":3054,"range":{"start_line":3054,"start_character":10,"end_line":3054,"end_character":26},"in_reply_to":"ba63e191_08edf524","updated":"2016-01-20 00:21:48.000000000","message":"Done","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"413d1976620715fbb240b6b808c51f8752713918","unresolved":false,"context_lines":[{"line_number":3074,"context_line":"            trust_id\u003dtrust[\u0027id\u0027])"},{"line_number":3075,"context_line":"        trust_token \u003d self.get_requested_token(auth_data)"},{"line_number":3076,"context_line":"        self.trust_chain.append(trust)"},{"line_number":3077,"context_line":"        trustor_id \u003d trustee[\u0027id\u0027]"},{"line_number":3078,"context_line":"        redelegated_trust_id \u003d trust[\u0027id\u0027]"},{"line_number":3079,"context_line":""},{"line_number":3080,"context_line":"        for trustee in self.user_chain[1:]:"},{"line_number":3081,"context_line":"            trust_ref \u003d unit.new_trust_ref("}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_280479be","line":3078,"range":{"start_line":3077,"start_character":8,"end_line":3078,"end_character":42},"updated":"2016-01-19 21:41:34.000000000","message":"So, now we are going to create a trust with the token from the first trust in the chain.","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b7dcd0c2fef63874a3a3f58b70b443bd520f20b1","unresolved":false,"context_lines":[{"line_number":3043,"context_line":""},{"line_number":3044,"context_line":"    def setUp(self):"},{"line_number":3045,"context_line":"        super(TestTrustChain, self).setUp()"},{"line_number":3046,"context_line":"        # Create trust chain"},{"line_number":3047,"context_line":"        self.user_list \u003d list()"},{"line_number":3048,"context_line":"        self.trust_chain \u003d list()"},{"line_number":3049,"context_line":"        for _ in range(3):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_95ffff33","line":3046,"range":{"start_line":3046,"start_character":7,"end_line":3046,"end_character":28},"updated":"2016-01-20 15:58:48.000000000","message":"We should take the opportunity to update and clarify all the code in this setUp. \n\nWhat is a trust chain?\n\nA trust chain is a series of trusts that are redelegated. For example, self.user_list consists of userA, userB, and userC. The first trust in the trust chain is going to be established between self.user and userA, call it trustA. Then, userA is going to obtain a trust scoped token using trustA, and with that token create a trust between userA and userB called trustB. This pattern will continue with userB creating a trust with userC.\n\nSo the trust chain should look something like: \n\n    trustA -\u003e trustB -\u003e trustC \n\nWhere: \n\n    self.user is trusting userA with trustA\n    userA is trusting userB with trustB\n    userB is trusting userC with trustC","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"080f1b2ebb6afa36ecfef4a2a390830fa25d8d37","unresolved":false,"context_lines":[{"line_number":3043,"context_line":""},{"line_number":3044,"context_line":"    def setUp(self):"},{"line_number":3045,"context_line":"        super(TestTrustChain, self).setUp()"},{"line_number":3046,"context_line":"        # Create trust chain"},{"line_number":3047,"context_line":"        self.user_list \u003d list()"},{"line_number":3048,"context_line":"        self.trust_chain \u003d list()"},{"line_number":3049,"context_line":"        for _ in range(3):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_997c1922","line":3046,"range":{"start_line":3046,"start_character":7,"end_line":3046,"end_character":28},"in_reply_to":"9a68dd71_95ffff33","updated":"2016-01-20 18:38:10.000000000","message":"Good description, will use for a doc string explaining the setup for this test class.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"c83e8e22081ba5595360fd42d94c143d9e30532b","unresolved":false,"context_lines":[{"line_number":3074,"context_line":"            trust_id\u003dtrust[\u0027id\u0027])"},{"line_number":3075,"context_line":"        trust_token \u003d self.get_requested_token(auth_data)"},{"line_number":3076,"context_line":"        self.trust_chain.append(trust)"},{"line_number":3077,"context_line":"        trustor_id \u003d trustee[\u0027id\u0027]"},{"line_number":3078,"context_line":"        redelegated_trust_id \u003d trust[\u0027id\u0027]"},{"line_number":3079,"context_line":""},{"line_number":3080,"context_line":"        for trustee in self.user_list[1:]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_0a553bc5","line":3077,"updated":"2016-01-20 12:21:00.000000000","message":"This is weird: is this trustor or trustee id?","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"080f1b2ebb6afa36ecfef4a2a390830fa25d8d37","unresolved":false,"context_lines":[{"line_number":3074,"context_line":"            trust_id\u003dtrust[\u0027id\u0027])"},{"line_number":3075,"context_line":"        trust_token \u003d self.get_requested_token(auth_data)"},{"line_number":3076,"context_line":"        self.trust_chain.append(trust)"},{"line_number":3077,"context_line":"        trustor_id \u003d trustee[\u0027id\u0027]"},{"line_number":3078,"context_line":"        redelegated_trust_id \u003d trust[\u0027id\u0027]"},{"line_number":3079,"context_line":""},{"line_number":3080,"context_line":"        for trustee in self.user_list[1:]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_9574dfcf","line":3077,"in_reply_to":"9a68dd71_0a553bc5","updated":"2016-01-20 18:38:10.000000000","message":"Added comment.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b7dcd0c2fef63874a3a3f58b70b443bd520f20b1","unresolved":false,"context_lines":[{"line_number":3077,"context_line":"        trustor_id \u003d trustee[\u0027id\u0027]"},{"line_number":3078,"context_line":"        redelegated_trust_id \u003d trust[\u0027id\u0027]"},{"line_number":3079,"context_line":""},{"line_number":3080,"context_line":"        for trustee in self.user_list[1:]:"},{"line_number":3081,"context_line":"            trust_ref \u003d unit.new_trust_ref("},{"line_number":3082,"context_line":"                trustor_user_id\u003dtrustor_id,"},{"line_number":3083,"context_line":"                trustee_user_id\u003dtrustee[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_7525abc0","line":3080,"range":{"start_line":3080,"start_character":7,"end_line":3080,"end_character":42},"updated":"2016-01-20 15:58:48.000000000","message":"This is what creates trustB and trustC for the other two users in the user list.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"c83e8e22081ba5595360fd42d94c143d9e30532b","unresolved":false,"context_lines":[{"line_number":3080,"context_line":"        for trustee in self.user_list[1:]:"},{"line_number":3081,"context_line":"            trust_ref \u003d unit.new_trust_ref("},{"line_number":3082,"context_line":"                trustor_user_id\u003dtrustor_id,"},{"line_number":3083,"context_line":"                trustee_user_id\u003dtrustee[\u0027id\u0027],"},{"line_number":3084,"context_line":"                project_id\u003dself.project_id,"},{"line_number":3085,"context_line":"                impersonation\u003dFalse,"},{"line_number":3086,"context_line":"                role_ids\u003d[self.role_id])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_4a72537e","line":3083,"updated":"2016-01-20 12:21:00.000000000","message":"Here you are: a circular trust","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"dce53e203e6b3f440ed24d4427d80758d4ae3e6f","unresolved":false,"context_lines":[{"line_number":3080,"context_line":"        for trustee in self.user_list[1:]:"},{"line_number":3081,"context_line":"            trust_ref \u003d unit.new_trust_ref("},{"line_number":3082,"context_line":"                trustor_user_id\u003dtrustor_id,"},{"line_number":3083,"context_line":"                trustee_user_id\u003dtrustee[\u0027id\u0027],"},{"line_number":3084,"context_line":"                project_id\u003dself.project_id,"},{"line_number":3085,"context_line":"                impersonation\u003dFalse,"},{"line_number":3086,"context_line":"                role_ids\u003d[self.role_id])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_d55b372d","line":3083,"in_reply_to":"9a68dd71_4a72537e","updated":"2016-01-20 15:49:56.000000000","message":"I don\u0027t think this ends up being circular, this just iterates through and creates a trust for each user in the chain.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"080f1b2ebb6afa36ecfef4a2a390830fa25d8d37","unresolved":false,"context_lines":[{"line_number":3080,"context_line":"        for trustee in self.user_list[1:]:"},{"line_number":3081,"context_line":"            trust_ref \u003d unit.new_trust_ref("},{"line_number":3082,"context_line":"                trustor_user_id\u003dtrustor_id,"},{"line_number":3083,"context_line":"                trustee_user_id\u003dtrustee[\u0027id\u0027],"},{"line_number":3084,"context_line":"                project_id\u003dself.project_id,"},{"line_number":3085,"context_line":"                impersonation\u003dFalse,"},{"line_number":3086,"context_line":"                role_ids\u003d[self.role_id])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_e248f92f","line":3083,"in_reply_to":"9a68dd71_68c14d2e","updated":"2016-01-20 18:38:10.000000000","message":"For a redelegated trust, the trustee becomes the trustor.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"fb3415d6fe66df880befd1022f6ad120ad5ef148","unresolved":false,"context_lines":[{"line_number":3080,"context_line":"        for trustee in self.user_list[1:]:"},{"line_number":3081,"context_line":"            trust_ref \u003d unit.new_trust_ref("},{"line_number":3082,"context_line":"                trustor_user_id\u003dtrustor_id,"},{"line_number":3083,"context_line":"                trustee_user_id\u003dtrustee[\u0027id\u0027],"},{"line_number":3084,"context_line":"                project_id\u003dself.project_id,"},{"line_number":3085,"context_line":"                impersonation\u003dFalse,"},{"line_number":3086,"context_line":"                role_ids\u003d[self.role_id])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_68c14d2e","line":3083,"in_reply_to":"9a68dd71_d55b372d","updated":"2016-01-20 17:24:55.000000000","message":"I\u0027m about the situation in this test, when trustor \u003d\u003d trustee.\nThe test is buggy.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"3cc143ad2c844e28c51932651585f0a38dadccd9","unresolved":false,"context_lines":[{"line_number":3067,"context_line":"                                    domain_id\u003dself.domain_id)"},{"line_number":3068,"context_line":"            self.user_list.append(user)"},{"line_number":3069,"context_line":""},{"line_number":3070,"context_line":"        # trustor-\u003etrustee redelegation without impersonation"},{"line_number":3071,"context_line":"        trustee \u003d self.user_list[0]"},{"line_number":3072,"context_line":"        trust_ref \u003d unit.new_trust_ref("},{"line_number":3073,"context_line":"            trustor_user_id\u003dself.user_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_981deabf","line":3070,"range":{"start_line":3070,"start_character":10,"end_line":3070,"end_character":61},"updated":"2016-01-20 19:05:16.000000000","message":"nit: we could lay out the steps in a way that ties back to the overall description above.\n\n    # create a trust between self.user and the first user in the self.user_list","commit_id":"b402ca64afab0fbf24e77de0010b4557e0ea2de7"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"6530b9b24e694499c85d2e50e47088e945c2c3fd","unresolved":false,"context_lines":[{"line_number":3067,"context_line":"                                    domain_id\u003dself.domain_id)"},{"line_number":3068,"context_line":"            self.user_list.append(user)"},{"line_number":3069,"context_line":""},{"line_number":3070,"context_line":"        # trustor-\u003etrustee redelegation without impersonation"},{"line_number":3071,"context_line":"        trustee \u003d self.user_list[0]"},{"line_number":3072,"context_line":"        trust_ref \u003d unit.new_trust_ref("},{"line_number":3073,"context_line":"            trustor_user_id\u003dself.user_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_2cb03bdd","line":3070,"range":{"start_line":3070,"start_character":10,"end_line":3070,"end_character":61},"in_reply_to":"9a68dd71_981deabf","updated":"2016-01-20 21:59:39.000000000","message":"Done","commit_id":"b402ca64afab0fbf24e77de0010b4557e0ea2de7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"3cc143ad2c844e28c51932651585f0a38dadccd9","unresolved":false,"context_lines":[{"line_number":3079,"context_line":"        trust_ref.update("},{"line_number":3080,"context_line":"            allow_redelegation\u003dTrue,"},{"line_number":3081,"context_line":"            redelegation_count\u003d3)"},{"line_number":3082,"context_line":""},{"line_number":3083,"context_line":"        r \u003d self.post(\u0027/OS-TRUST/trusts\u0027,"},{"line_number":3084,"context_line":"                      body\u003d{\u0027trust\u0027: trust_ref})"},{"line_number":3085,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_7877d602","line":3082,"updated":"2016-01-20 19:05:16.000000000","message":"nit: could remove this line and refactor: \n\n    # create a trust between self.user and the first user in self.user_list\n    trustee \u003d self.user_list[0]\n    trust_ref \u003d unit.new_trust_ref(\n        trustor_user_id\u003dself.user_id,\n        trustee_user_id\u003dtrustee[\u0027id\u0027],\n        project_id\u003dself.project_id,\n        impersonation\u003dFalse,\n        expires\u003ddict(minutes\u003d1),\n        role_ids\u003d[self.role_id])\n    trust_ref.update(\n        allow_redelegation\u003dTrue,\n        redelegation_count\u003d3)\n    r \u003d self.post(\u0027/OS-TRUST/trusts\u0027,\n                      body\u003d{\u0027trust\u0027: trust_ref})\n    trust \u003d self.assertValidTrustResponse(r)\n\n\n    # save the trust as the first trust in the self.trust_chain\n    self.trust_chain.append(trust)\n\n\n    # get a trust scoped token as the first user in the chain\n    auth_data \u003d self.build_authentication_request(\n            user_id\u003dtrustee[\u0027id\u0027],\n            password\u003dtrustee[\u0027password\u0027],\n            trust_id\u003dtrust[\u0027id\u0027])\n    trust_token \u003d self.get_requested_token(auth_data)","commit_id":"b402ca64afab0fbf24e77de0010b4557e0ea2de7"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"6530b9b24e694499c85d2e50e47088e945c2c3fd","unresolved":false,"context_lines":[{"line_number":3079,"context_line":"        trust_ref.update("},{"line_number":3080,"context_line":"            allow_redelegation\u003dTrue,"},{"line_number":3081,"context_line":"            redelegation_count\u003d3)"},{"line_number":3082,"context_line":""},{"line_number":3083,"context_line":"        r \u003d self.post(\u0027/OS-TRUST/trusts\u0027,"},{"line_number":3084,"context_line":"                      body\u003d{\u0027trust\u0027: trust_ref})"},{"line_number":3085,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_a9773d01","line":3082,"in_reply_to":"9a68dd71_7877d602","updated":"2016-01-20 21:59:39.000000000","message":"The first trust in the chain is created differently, it does not use a trusted token and it sets up redelegation_count.","commit_id":"b402ca64afab0fbf24e77de0010b4557e0ea2de7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"3cc143ad2c844e28c51932651585f0a38dadccd9","unresolved":false,"context_lines":[{"line_number":3091,"context_line":"        trust_token \u003d self.get_requested_token(auth_data)"},{"line_number":3092,"context_line":"        self.trust_chain.append(trust)"},{"line_number":3093,"context_line":""},{"line_number":3094,"context_line":"        # Set trustor and redelegated_trust_id for next trust in the chain"},{"line_number":3095,"context_line":"        next_trustor_id \u003d trustee[\u0027id\u0027]"},{"line_number":3096,"context_line":"        redelegated_trust_id \u003d trust[\u0027id\u0027]"},{"line_number":3097,"context_line":""},{"line_number":3098,"context_line":"        for trustee in self.user_list[1:]:"},{"line_number":3099,"context_line":"            trust_ref \u003d unit.new_trust_ref("}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_db103c51","line":3096,"range":{"start_line":3094,"start_character":8,"end_line":3096,"end_character":42},"updated":"2016-01-20 19:05:16.000000000","message":"this is essentially the magic piece that makes the trust chain possible.","commit_id":"b402ca64afab0fbf24e77de0010b4557e0ea2de7"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"6530b9b24e694499c85d2e50e47088e945c2c3fd","unresolved":false,"context_lines":[{"line_number":3091,"context_line":"        trust_token \u003d self.get_requested_token(auth_data)"},{"line_number":3092,"context_line":"        self.trust_chain.append(trust)"},{"line_number":3093,"context_line":""},{"line_number":3094,"context_line":"        # Set trustor and redelegated_trust_id for next trust in the chain"},{"line_number":3095,"context_line":"        next_trustor_id \u003d trustee[\u0027id\u0027]"},{"line_number":3096,"context_line":"        redelegated_trust_id \u003d trust[\u0027id\u0027]"},{"line_number":3097,"context_line":""},{"line_number":3098,"context_line":"        for trustee in self.user_list[1:]:"},{"line_number":3099,"context_line":"            trust_ref \u003d unit.new_trust_ref("}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_8c17e7a2","line":3096,"range":{"start_line":3094,"start_character":8,"end_line":3096,"end_character":42},"in_reply_to":"9a68dd71_db103c51","updated":"2016-01-20 21:59:39.000000000","message":"Yes.","commit_id":"b402ca64afab0fbf24e77de0010b4557e0ea2de7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"3cc143ad2c844e28c51932651585f0a38dadccd9","unresolved":false,"context_lines":[{"line_number":3103,"context_line":"                impersonation\u003dFalse,"},{"line_number":3104,"context_line":"                role_ids\u003d[self.role_id])"},{"line_number":3105,"context_line":"            trust_ref.update("},{"line_number":3106,"context_line":"                allow_redelegation\u003dTrue,"},{"line_number":3107,"context_line":"                redelegated_trust_id\u003dredelegated_trust_id)"},{"line_number":3108,"context_line":"            r \u003d self.post(\u0027/OS-TRUST/trusts\u0027,"},{"line_number":3109,"context_line":"                          body\u003d{\u0027trust\u0027: trust_ref},"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_fb40a009","line":3106,"range":{"start_line":3106,"start_character":16,"end_line":3106,"end_character":39},"updated":"2016-01-20 19:05:16.000000000","message":"nit: I should have caught this before, but this should be included into the call above: \n\n    trust_ref \u003d unit.new_trust_ref(\n        trustor_user_id\u003dnext_trustor_id,\n        trustee_user_id\u003dtrustee[\u0027id\u0027],\n        project_id\u003dself.project_id,\n        impersonation\u003dFalse,\n        role_ids\u003d[self.role_id],\n        allow_redelegation\u003dTrue)\n\nActually - could we just incorporate the redelegated_trust_id into new_trust_ref, too? That way we just end up with one call to new_trust_ref for everything we need? \n\n        trust_ref \u003d unit.new_trust_ref(\n            trustor_user_id\u003dnext_trustor_id,\n            trustee_user_id\u003dtrustee[\u0027id\u0027],\n            project_id\u003dself.project_id,\n            impersonation\u003dFalse,\n            role_ids\u003d[self.role_id],\n            allow_redelegation\u003dTrue,\n            redelegated_trust_id\u003dredelegated_trust_id)","commit_id":"b402ca64afab0fbf24e77de0010b4557e0ea2de7"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"6530b9b24e694499c85d2e50e47088e945c2c3fd","unresolved":false,"context_lines":[{"line_number":3103,"context_line":"                impersonation\u003dFalse,"},{"line_number":3104,"context_line":"                role_ids\u003d[self.role_id])"},{"line_number":3105,"context_line":"            trust_ref.update("},{"line_number":3106,"context_line":"                allow_redelegation\u003dTrue,"},{"line_number":3107,"context_line":"                redelegated_trust_id\u003dredelegated_trust_id)"},{"line_number":3108,"context_line":"            r \u003d self.post(\u0027/OS-TRUST/trusts\u0027,"},{"line_number":3109,"context_line":"                          body\u003d{\u0027trust\u0027: trust_ref},"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_0ca1b794","line":3106,"range":{"start_line":3106,"start_character":16,"end_line":3106,"end_character":39},"in_reply_to":"9a68dd71_fb40a009","updated":"2016-01-20 21:59:39.000000000","message":"Done","commit_id":"b402ca64afab0fbf24e77de0010b4557e0ea2de7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"3cc143ad2c844e28c51932651585f0a38dadccd9","unresolved":false,"context_lines":[{"line_number":3186,"context_line":"            self.user_id, self.project_id, self.role_id"},{"line_number":3187,"context_line":"        )"},{"line_number":3188,"context_line":""},{"line_number":3189,"context_line":"        trustee \u003d self.user_list[-1]"},{"line_number":3190,"context_line":"        auth_data \u003d self.build_authentication_request("},{"line_number":3191,"context_line":"            user_id\u003dtrustee[\u0027id\u0027],"},{"line_number":3192,"context_line":"            password\u003dtrustee[\u0027password\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_fb25005c","line":3189,"range":{"start_line":3189,"start_character":8,"end_line":3189,"end_character":36},"updated":"2016-01-20 19:05:16.000000000","message":"nit: This is grabbing the last user in the chain and validating that because the original trustor\u0027s role was revoked on self.project_id, the trust chain is no longer valid. Right?","commit_id":"b402ca64afab0fbf24e77de0010b4557e0ea2de7"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"6530b9b24e694499c85d2e50e47088e945c2c3fd","unresolved":false,"context_lines":[{"line_number":3186,"context_line":"            self.user_id, self.project_id, self.role_id"},{"line_number":3187,"context_line":"        )"},{"line_number":3188,"context_line":""},{"line_number":3189,"context_line":"        trustee \u003d self.user_list[-1]"},{"line_number":3190,"context_line":"        auth_data \u003d self.build_authentication_request("},{"line_number":3191,"context_line":"            user_id\u003dtrustee[\u0027id\u0027],"},{"line_number":3192,"context_line":"            password\u003dtrustee[\u0027password\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_ec546355","line":3189,"range":{"start_line":3189,"start_character":8,"end_line":3189,"end_character":36},"in_reply_to":"9a68dd71_fb25005c","updated":"2016-01-20 21:59:39.000000000","message":"Correct.","commit_id":"b402ca64afab0fbf24e77de0010b4557e0ea2de7"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"e1e96e20cff2a3466a594af2a6f84a02ce21e40a","unresolved":false,"context_lines":[{"line_number":3214,"context_line":"        redelegated_trust_id \u003d trust[\u0027id\u0027]"},{"line_number":3215,"context_line":""},{"line_number":3216,"context_line":"        # Loop through the user to create a chain of redelegated trust."},{"line_number":3217,"context_line":"        for trustee in self.user_list[1:]:"},{"line_number":3218,"context_line":"            trust_ref \u003d unit.new_trust_ref("},{"line_number":3219,"context_line":"                trustor_user_id\u003dnext_trustor_id,"},{"line_number":3220,"context_line":"                trustee_user_id\u003dtrustee[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_c49caa5f","line":3217,"updated":"2016-01-21 16:12:18.000000000","message":"This has missed my attention: you redefine trustee here.\nMaybe rename it to \"next_trustee\" then?","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"296b2f644c52561debfb04576e6a97a83e93bfca","unresolved":false,"context_lines":[{"line_number":3214,"context_line":"        redelegated_trust_id \u003d trust[\u0027id\u0027]"},{"line_number":3215,"context_line":""},{"line_number":3216,"context_line":"        # Loop through the user to create a chain of redelegated trust."},{"line_number":3217,"context_line":"        for trustee in self.user_list[1:]:"},{"line_number":3218,"context_line":"            trust_ref \u003d unit.new_trust_ref("},{"line_number":3219,"context_line":"                trustor_user_id\u003dnext_trustor_id,"},{"line_number":3220,"context_line":"                trustee_user_id\u003dtrustee[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_a3f5e3cb","line":3217,"in_reply_to":"9a68dd71_c49caa5f","updated":"2016-01-21 19:31:37.000000000","message":"Done","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cb84822c1f0f079a5daf323f4360d03fa864ea1b","unresolved":false,"context_lines":[{"line_number":3283,"context_line":""},{"line_number":3284,"context_line":"    def test_delete_broken_chain(self):"},{"line_number":3285,"context_line":"        self.assert_user_authenticate(self.user_list[0])"},{"line_number":3286,"context_line":"        self.delete(\u0027/OS-TRUST/trusts/%(trust_id)s\u0027 % {"},{"line_number":3287,"context_line":"            \u0027trust_id\u0027: self.trust_chain[0][\u0027id\u0027]})"},{"line_number":3288,"context_line":""},{"line_number":3289,"context_line":"        auth_data \u003d self.build_authentication_request("},{"line_number":3290,"context_line":"            user_id\u003dself.user_list[0][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_c20d7f3f","line":3287,"range":{"start_line":3286,"start_character":8,"end_line":3287,"end_character":51},"updated":"2016-01-21 15:39:21.000000000","message":"So, this deletes the trust between self.user and the first user in the user_list.\n\nIs it possible to do a GET on all the trusts in the trust chain to validate they were deleted (in a cascading order)? Technically, they would all be deleted - right?","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"e1e96e20cff2a3466a594af2a6f84a02ce21e40a","unresolved":false,"context_lines":[{"line_number":3283,"context_line":""},{"line_number":3284,"context_line":"    def test_delete_broken_chain(self):"},{"line_number":3285,"context_line":"        self.assert_user_authenticate(self.user_list[0])"},{"line_number":3286,"context_line":"        self.delete(\u0027/OS-TRUST/trusts/%(trust_id)s\u0027 % {"},{"line_number":3287,"context_line":"            \u0027trust_id\u0027: self.trust_chain[0][\u0027id\u0027]})"},{"line_number":3288,"context_line":""},{"line_number":3289,"context_line":"        auth_data \u003d self.build_authentication_request("},{"line_number":3290,"context_line":"            user_id\u003dself.user_list[0][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_c486eada","line":3287,"range":{"start_line":3286,"start_character":8,"end_line":3287,"end_character":51},"in_reply_to":"9a68dd71_c20d7f3f","updated":"2016-01-21 16:12:18.000000000","message":"Yes, delete is cascaded","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"296b2f644c52561debfb04576e6a97a83e93bfca","unresolved":false,"context_lines":[{"line_number":3283,"context_line":""},{"line_number":3284,"context_line":"    def test_delete_broken_chain(self):"},{"line_number":3285,"context_line":"        self.assert_user_authenticate(self.user_list[0])"},{"line_number":3286,"context_line":"        self.delete(\u0027/OS-TRUST/trusts/%(trust_id)s\u0027 % {"},{"line_number":3287,"context_line":"            \u0027trust_id\u0027: self.trust_chain[0][\u0027id\u0027]})"},{"line_number":3288,"context_line":""},{"line_number":3289,"context_line":"        auth_data \u003d self.build_authentication_request("},{"line_number":3290,"context_line":"            user_id\u003dself.user_list[0][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_9e36f2e5","line":3287,"range":{"start_line":3286,"start_character":8,"end_line":3287,"end_character":51},"in_reply_to":"9a68dd71_c486eada","updated":"2016-01-21 19:31:37.000000000","message":"Done","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cb84822c1f0f079a5daf323f4360d03fa864ea1b","unresolved":false,"context_lines":[{"line_number":3316,"context_line":"            token\u003dtoken,"},{"line_number":3317,"context_line":"            trust_id\u003dself.trust_chain[-1][\u0027id\u0027])"},{"line_number":3318,"context_line":""},{"line_number":3319,"context_line":"        # Trustee has no delegated roles"},{"line_number":3320,"context_line":"        self.v3_create_token(auth_data,"},{"line_number":3321,"context_line":"                             expected_status\u003dhttp_client.FORBIDDEN)"},{"line_number":3322,"context_line":""},{"line_number":3323,"context_line":"    def test_intermediate_user_disabled(self):"},{"line_number":3324,"context_line":"        self.assert_user_authenticate(self.user_list[0])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_dd479e1b","line":3321,"range":{"start_line":3319,"start_character":8,"end_line":3321,"end_character":67},"updated":"2016-01-21 15:39:21.000000000","message":"Sweet, we could do this check for everyone in the user_list, right?","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"296b2f644c52561debfb04576e6a97a83e93bfca","unresolved":false,"context_lines":[{"line_number":3316,"context_line":"            token\u003dtoken,"},{"line_number":3317,"context_line":"            trust_id\u003dself.trust_chain[-1][\u0027id\u0027])"},{"line_number":3318,"context_line":""},{"line_number":3319,"context_line":"        # Trustee has no delegated roles"},{"line_number":3320,"context_line":"        self.v3_create_token(auth_data,"},{"line_number":3321,"context_line":"                             expected_status\u003dhttp_client.FORBIDDEN)"},{"line_number":3322,"context_line":""},{"line_number":3323,"context_line":"    def test_intermediate_user_disabled(self):"},{"line_number":3324,"context_line":"        self.assert_user_authenticate(self.user_list[0])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_7efa1ebf","line":3321,"range":{"start_line":3319,"start_character":8,"end_line":3321,"end_character":67},"in_reply_to":"9a68dd71_dd479e1b","updated":"2016-01-21 19:31:37.000000000","message":"Done","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"}],"keystone/token/providers/common.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"00b8bae5a06e9fcea4a06bc7526de5b95e98b4ae","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":379,"context_line":" "},{"line_number":380,"context_line":"                roles_id \u003d [x[\u0027id\u0027] for x in roles]"},{"line_number":381,"context_line":"                for r in t_roles:"},{"line_number":382,"context_line":"                    if not r in roles_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba63e191_0b5976fe","line":379,"range":{"start_line":379,"start_character":0,"end_line":379,"end_character":1},"updated":"2016-01-19 19:36:51.000000000","message":"nit: remove extra whitespace.","commit_id":"4d2acb8580a78c3c115256facc1984313cf71153"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"413d1976620715fbb240b6b808c51f8752713918","unresolved":false,"context_lines":[{"line_number":372,"context_line":"                                             token_project_id)"},{"line_number":373,"context_line":"            filtered_roles \u003d []"},{"line_number":374,"context_line":"            if CONF.trust.enabled and trust:"},{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_e888a124","line":375,"range":{"start_line":375,"start_character":16,"end_line":375,"end_character":27},"updated":"2016-01-19 21:41:34.000000000","message":"This is a list of trusts references if trust[\u0027id\u0027] is the id of a trust that has been redelegated, right?","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"31ce0f2b9c37e77a4f09da3268fd669c8a56b846","unresolved":false,"context_lines":[{"line_number":372,"context_line":"                                             token_project_id)"},{"line_number":373,"context_line":"            filtered_roles \u003d []"},{"line_number":374,"context_line":"            if CONF.trust.enabled and trust:"},{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_49e68cb5","line":375,"range":{"start_line":375,"start_character":16,"end_line":375,"end_character":27},"in_reply_to":"ba63e191_e888a124","updated":"2016-01-20 00:21:48.000000000","message":"Correct, this will return the chain of trust from the originator of the first trust.","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"413d1976620715fbb240b6b808c51f8752713918","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            if CONF.trust.enabled and trust:"},{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"                roles_id \u003d [x[\u0027id\u0027] for x in roles]"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_e88f4121","line":377,"range":{"start_line":377,"start_character":20,"end_line":377,"end_character":35},"updated":"2016-01-19 21:41:34.000000000","message":"Is the last trust in the `trust_chain` always `trust`?","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"31ce0f2b9c37e77a4f09da3268fd669c8a56b846","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            if CONF.trust.enabled and trust:"},{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"                roles_id \u003d [x[\u0027id\u0027] for x in roles]"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_e9ebc076","line":377,"range":{"start_line":377,"start_character":20,"end_line":377,"end_character":35},"in_reply_to":"ba63e191_e88f4121","updated":"2016-01-20 00:21:48.000000000","message":"The last trust is the first trust in the chain.","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"413d1976620715fbb240b6b808c51f8752713918","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"                roles_id \u003d [x[\u0027id\u0027] for x in roles]"},{"line_number":381,"context_line":"                for r in t_roles:"},{"line_number":382,"context_line":"                    if not r in roles_id:"},{"line_number":383,"context_line":"                        roles.append(self.role_api.get_role(r))"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"                for trust_role in trust[\u0027roles\u0027]:"},{"line_number":386,"context_line":"                    match_roles \u003d [x for x in roles"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_48452db1","line":383,"range":{"start_line":380,"start_character":16,"end_line":383,"end_character":63},"updated":"2016-01-19 21:41:34.000000000","message":"So, this makes it so that if the trust has a role that the user doesn\u0027t already have, it add it?","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"31ce0f2b9c37e77a4f09da3268fd669c8a56b846","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"                roles_id \u003d [x[\u0027id\u0027] for x in roles]"},{"line_number":381,"context_line":"                for r in t_roles:"},{"line_number":382,"context_line":"                    if not r in roles_id:"},{"line_number":383,"context_line":"                        roles.append(self.role_api.get_role(r))"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"                for trust_role in trust[\u0027roles\u0027]:"},{"line_number":386,"context_line":"                    match_roles \u003d [x for x in roles"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_a985c8ad","line":383,"range":{"start_line":380,"start_character":16,"end_line":383,"end_character":63},"in_reply_to":"ba63e191_48452db1","updated":"2016-01-20 00:21:48.000000000","message":"Right, these roles are from the trust.","commit_id":"996f2c944716b40f64e14f18de340286b8d20904"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"342b62ffe79a7b09cc915f5a86cbefe397429142","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            filtered_roles \u003d []"},{"line_number":374,"context_line":"            if CONF.trust.enabled and trust:"},{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":379,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_bfac5dee","line":376,"range":{"start_line":376,"start_character":16,"end_line":376,"end_character":23},"updated":"2016-01-20 16:38:54.000000000","message":"nit: these are the trustor roles on a project.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"080f1b2ebb6afa36ecfef4a2a390830fa25d8d37","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            filtered_roles \u003d []"},{"line_number":374,"context_line":"            if CONF.trust.enabled and trust:"},{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":379,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_62096995","line":376,"range":{"start_line":376,"start_character":16,"end_line":376,"end_character":23},"in_reply_to":"9a68dd71_bfac5dee","updated":"2016-01-20 18:38:10.000000000","message":"Done","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"342b62ffe79a7b09cc915f5a86cbefe397429142","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"                roles_id \u003d [x[\u0027id\u0027] for x in roles]"},{"line_number":381,"context_line":"                for r in t_roles:"},{"line_number":382,"context_line":"                    if r not in roles_id:"},{"line_number":383,"context_line":"                        roles.append(self.role_api.get_role(r))"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"                for trust_role in trust[\u0027roles\u0027]:"},{"line_number":386,"context_line":"                    match_roles \u003d [x for x in roles"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_bfcbfd71","line":383,"range":{"start_line":380,"start_character":16,"end_line":383,"end_character":63},"updated":"2016-01-20 16:38:54.000000000","message":"This will need to verify that we aren\u0027t adding all roles from the trustor to the trustee on a project. We should check that the roles being appended here are only coming from the trust.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"080f1b2ebb6afa36ecfef4a2a390830fa25d8d37","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"                roles_id \u003d [x[\u0027id\u0027] for x in roles]"},{"line_number":381,"context_line":"                for r in t_roles:"},{"line_number":382,"context_line":"                    if r not in roles_id:"},{"line_number":383,"context_line":"                        roles.append(self.role_api.get_role(r))"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"                for trust_role in trust[\u0027roles\u0027]:"},{"line_number":386,"context_line":"                    match_roles \u003d [x for x in roles"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_c2d135fd","line":383,"range":{"start_line":380,"start_character":16,"end_line":383,"end_character":63},"in_reply_to":"9a68dd71_bfcbfd71","updated":"2016-01-20 18:38:10.000000000","message":"Done","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cb84822c1f0f079a5daf323f4360d03fa864ea1b","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            filtered_roles \u003d []"},{"line_number":374,"context_line":"            if CONF.trust.enabled and trust:"},{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                # Trustor roles"},{"line_number":377,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":379,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_ddcd5e5e","line":376,"range":{"start_line":376,"start_character":16,"end_line":376,"end_character":31},"updated":"2016-01-21 15:39:21.000000000","message":"nit: we could remove this comment and just incorporate it into the variable name?\n\n    trustor_roles \u003d self.assignment_api.get_roles_for_user_and_project()\n\n(me saying to *remove* a comment is weird!! totally up to you)","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"e1e96e20cff2a3466a594af2a6f84a02ce21e40a","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            filtered_roles \u003d []"},{"line_number":374,"context_line":"            if CONF.trust.enabled and trust:"},{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                # Trustor roles"},{"line_number":377,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":379,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_84ac7236","line":376,"range":{"start_line":376,"start_character":16,"end_line":376,"end_character":31},"in_reply_to":"9a68dd71_ddcd5e5e","updated":"2016-01-21 16:12:18.000000000","message":"++","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"296b2f644c52561debfb04576e6a97a83e93bfca","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            filtered_roles \u003d []"},{"line_number":374,"context_line":"            if CONF.trust.enabled and trust:"},{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                # Trustor roles"},{"line_number":377,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":379,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_9e9fd24f","line":376,"range":{"start_line":376,"start_character":16,"end_line":376,"end_character":31},"in_reply_to":"9a68dd71_ddcd5e5e","updated":"2016-01-21 19:31:37.000000000","message":"Done","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cb84822c1f0f079a5daf323f4360d03fa864ea1b","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                # Trustor roles"},{"line_number":377,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":379,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"                roles_id \u003d [x[\u0027id\u0027] for x in roles]"},{"line_number":382,"context_line":"                trust_role_ids \u003d [x[\u0027id\u0027] for x in trust[\u0027roles\u0027]]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_bd274a11","line":379,"range":{"start_line":378,"start_character":20,"end_line":379,"end_character":50},"updated":"2016-01-21 15:39:21.000000000","message":"nit: why do we grab the last trust in the chain?","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"296b2f644c52561debfb04576e6a97a83e93bfca","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                # Trustor roles"},{"line_number":377,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":379,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"                roles_id \u003d [x[\u0027id\u0027] for x in roles]"},{"line_number":382,"context_line":"                trust_role_ids \u003d [x[\u0027id\u0027] for x in trust[\u0027roles\u0027]]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_de01ca6b","line":379,"range":{"start_line":378,"start_character":20,"end_line":379,"end_character":50},"in_reply_to":"9a68dd71_448f5acc","updated":"2016-01-21 19:31:37.000000000","message":"Yes, the last trust on the chain belongs to the originator of the trusted role on a given project.","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"e1e96e20cff2a3466a594af2a6f84a02ce21e40a","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":376,"context_line":"                # Trustor roles"},{"line_number":377,"context_line":"                t_roles \u003d self.assignment_api.get_roles_for_user_and_project("},{"line_number":378,"context_line":"                    trust_chain[-1][\u0027trustor_user_id\u0027],"},{"line_number":379,"context_line":"                    trust_chain[-1][\u0027project_id\u0027])"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"                roles_id \u003d [x[\u0027id\u0027] for x in roles]"},{"line_number":382,"context_line":"                trust_role_ids \u003d [x[\u0027id\u0027] for x in trust[\u0027roles\u0027]]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_448f5acc","line":379,"range":{"start_line":378,"start_character":20,"end_line":379,"end_character":50},"in_reply_to":"9a68dd71_bd274a11","updated":"2016-01-21 16:12:18.000000000","message":"That\u0027s because it has the narrowest scope","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"cb84822c1f0f079a5daf323f4360d03fa864ea1b","unresolved":false,"context_lines":[{"line_number":383,"context_line":"                # Verify that roles belongs to trust and avoid adding"},{"line_number":384,"context_line":"                # duplicate roles"},{"line_number":385,"context_line":"                for r in t_roles:"},{"line_number":386,"context_line":"                    if r in trust_role_ids and r not in roles_id:"},{"line_number":387,"context_line":"                        roles.append(self.role_api.get_role(r))"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"                for trust_role in trust[\u0027roles\u0027]:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_9d1cc6c2","line":386,"range":{"start_line":386,"start_character":20,"end_line":386,"end_character":65},"updated":"2016-01-21 15:39:21.000000000","message":"++","commit_id":"991c884ef9eae8ae957f49e49f9997e65055d2bf"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"153ee3cc94fabffa617fa40e7e61d4b7138a48ac","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                trust_role_ids \u003d [x[\u0027id\u0027] for x in trust[\u0027roles\u0027]]"},{"line_number":383,"context_line":"                # Verify that roles belongs to trust and avoid adding"},{"line_number":384,"context_line":"                # duplicate roles"},{"line_number":385,"context_line":"                for r in trustor_roles:"},{"line_number":386,"context_line":"                    if r in trust_role_ids and r not in roles_id:"},{"line_number":387,"context_line":"                        roles.append(self.role_api.get_role(r))"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"                for trust_role in trust[\u0027roles\u0027]:"},{"line_number":390,"context_line":"                    match_roles \u003d [x for x in roles"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_1fd8b71c","line":387,"range":{"start_line":385,"start_character":16,"end_line":387,"end_character":63},"updated":"2016-01-21 22:28:26.000000000","message":"Does this only apply if impersonation is being used on the trust?","commit_id":"a5df81651ba1e72133772484664888a06d416c29"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"08c6cb9f2a4240f3954334956a8c239c476970e1","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                trust_role_ids \u003d [x[\u0027id\u0027] for x in trust[\u0027roles\u0027]]"},{"line_number":383,"context_line":"                # Verify that roles belongs to trust and avoid adding"},{"line_number":384,"context_line":"                # duplicate roles"},{"line_number":385,"context_line":"                for r in trustor_roles:"},{"line_number":386,"context_line":"                    if r in trust_role_ids and r not in roles_id:"},{"line_number":387,"context_line":"                        roles.append(self.role_api.get_role(r))"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"                for trust_role in trust[\u0027roles\u0027]:"},{"line_number":390,"context_line":"                    match_roles \u003d [x for x in roles"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_2f7affbd","line":387,"range":{"start_line":385,"start_character":16,"end_line":387,"end_character":63},"in_reply_to":"9a68dd71_1fd8b71c","updated":"2016-01-22 16:46:13.000000000","message":"Actually - this makes sense.\n\nI think we need a follow on patch to detail some of this behavior. For example - consider the following case: \n\nUser A creates an *impersonated* trust with User B as the trustee, with role 1 on project 1. User A also has roles 1 and 2 and project 1, but they are only giving User B role 1. Even though impersonation is set to True, User B will only get role 1 on project 1 despite the fact they are suppose to impersonate User A.\n\nNot saying this need to be addressed in this patch - just marking it for discussion. Do we want to allow impersonation to be true impersonation between User A and User B where User B will actually get all roles that User A has on a project, i.e. making it so that impersonated trusts don\u0027t have roles specified? \n\nMidcycle topic?","commit_id":"a5df81651ba1e72133772484664888a06d416c29"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"280746a1598d318f845f914998135073207a61ac","unresolved":false,"context_lines":[{"line_number":357,"context_line":"            return"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        if CONF.trust.enabled and trust:"},{"line_number":360,"context_line":"            # If redelegated_trust_id is defined, set token_user_id to"},{"line_number":361,"context_line":"            # originator of the trust user\u0027s id"},{"line_number":362,"context_line":"            if trust.get(\u0027redelegated_trust_id\u0027):"},{"line_number":363,"context_line":"                trust_chain \u003d self.trust_api.get_trust_pedigree(trust[\u0027id\u0027])"},{"line_number":364,"context_line":"                token_user_id \u003d trust_chain[-1][\u0027trustor_user_id\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_13dfcb3a","line":361,"range":{"start_line":360,"start_character":49,"end_line":361,"end_character":47},"updated":"2016-01-25 19:10:25.000000000","message":"nit: \n\nIf redelegated_trust_id is set, then we must traverse the trust_chain in order to determine who the original trustor is. We need to do this because the user ID of the original trustor helps us determine scope in the redelegated context.","commit_id":"0cad05fb8b7fefc730f4e913b39ce8600785bbbe"}],"keystone/trust/controllers.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"00b8bae5a06e9fcea4a06bc7526de5b95e98b4ae","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        while original_trust.get(\u0027redelegated_trust_id\u0027):"},{"line_number":178,"context_line":"            original_trust \u003d self.trust_api.get_trust("},{"line_number":179,"context_line":"                    original_trust[\u0027redelegated_trust_id\u0027])"},{"line_number":180,"context_line":" "},{"line_number":181,"context_line":"        if not self._attribute_is_empty(trust, \u0027project_id\u0027):"},{"line_number":182,"context_line":"            return self.assignment_api.get_roles_for_user_and_project("},{"line_number":183,"context_line":"                original_trust[\u0027trustor_user_id\u0027], original_trust[\u0027project_id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba63e191_ab514ada","line":180,"range":{"start_line":180,"start_character":0,"end_line":180,"end_character":1},"updated":"2016-01-19 19:36:51.000000000","message":"nit: remove extra whitespace.","commit_id":"4d2acb8580a78c3c115256facc1984313cf71153"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"342b62ffe79a7b09cc915f5a86cbefe397429142","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            raise exception.Forbidden("},{"line_number":173,"context_line":"                _(\u0027At least one role should be specified.\u0027))"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _get_user_role(self, trust):"},{"line_number":176,"context_line":"        original_trust \u003d trust.copy()"},{"line_number":177,"context_line":"        while original_trust.get(\u0027redelegated_trust_id\u0027):"},{"line_number":178,"context_line":"            original_trust \u003d self.trust_api.get_trust("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_bcf6abd5","line":175,"range":{"start_line":175,"start_character":13,"end_line":175,"end_character":17},"updated":"2016-01-20 16:38:54.000000000","message":"nit: we should rename this to be more specific. What user are we talking about here, the trustor or the trustee?","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"080f1b2ebb6afa36ecfef4a2a390830fa25d8d37","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            raise exception.Forbidden("},{"line_number":173,"context_line":"                _(\u0027At least one role should be specified.\u0027))"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _get_user_role(self, trust):"},{"line_number":176,"context_line":"        original_trust \u003d trust.copy()"},{"line_number":177,"context_line":"        while original_trust.get(\u0027redelegated_trust_id\u0027):"},{"line_number":178,"context_line":"            original_trust \u003d self.trust_api.get_trust("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_a2ef61af","line":175,"range":{"start_line":175,"start_character":13,"end_line":175,"end_character":17},"in_reply_to":"9a68dd71_bcf6abd5","updated":"2016-01-20 18:38:10.000000000","message":"Done","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"c83e8e22081ba5595360fd42d94c143d9e30532b","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                _(\u0027At least one role should be specified.\u0027))"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _get_user_role(self, trust):"},{"line_number":176,"context_line":"        original_trust \u003d trust.copy()"},{"line_number":177,"context_line":"        while original_trust.get(\u0027redelegated_trust_id\u0027):"},{"line_number":178,"context_line":"            original_trust \u003d self.trust_api.get_trust("},{"line_number":179,"context_line":"                original_trust[\u0027redelegated_trust_id\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_6af5d781","line":176,"updated":"2016-01-20 12:21:00.000000000","message":"This is broken. Here is an example:\ntrust[roles] \u003d\u003d [role1]\noriginal_trust[roles] \u003d\u003d [role1, role2, .., roleN]\nroleN wasn\u0027t delegated by trust, but it still be in the result.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"080f1b2ebb6afa36ecfef4a2a390830fa25d8d37","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                _(\u0027At least one role should be specified.\u0027))"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _get_user_role(self, trust):"},{"line_number":176,"context_line":"        original_trust \u003d trust.copy()"},{"line_number":177,"context_line":"        while original_trust.get(\u0027redelegated_trust_id\u0027):"},{"line_number":178,"context_line":"            original_trust \u003d self.trust_api.get_trust("},{"line_number":179,"context_line":"                original_trust[\u0027redelegated_trust_id\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_42d54a41","line":176,"in_reply_to":"9a68dd71_6af5d781","updated":"2016-01-20 18:38:10.000000000","message":"Right, that is the indented behavior, _get_user_role() should return the list of roles for the trustor. This list will be used on method _require_trustor_has_role_in_project to ensure that the trustor still has the assignment to the roles in the trust.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"}],"keystone/trust/core.py":[{"author":{"_account_id":13055,"name":"Alexander Makarov","email":"ajiekcahdp.makapob@gmail.com","username":"amakarov"},"change_message_id":"c83e8e22081ba5595360fd42d94c143d9e30532b","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    def get_trust_pedigree(self, trust_id):"},{"line_number":91,"context_line":"        trust \u003d self.driver.get_trust(trust_id)"},{"line_number":92,"context_line":"        trust_chain \u003d [trust]"},{"line_number":93,"context_line":"        while trust and trust.get(\u0027redelegated_trust_id\u0027):"},{"line_number":94,"context_line":"            trust \u003d self.driver.get_trust(trust[\u0027redelegated_trust_id\u0027])"},{"line_number":95,"context_line":"            trust_chain.append(trust)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_aaec2f90","line":93,"updated":"2016-01-20 12:21:00.000000000","message":"This improves readability, but also spams backend with requests by id.\nDoesn\u0027t look a good trade-off for me...","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"eed1dfb143c51723666feffac648a5c8753e916c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    def get_trust_pedigree(self, trust_id):"},{"line_number":91,"context_line":"        trust \u003d self.driver.get_trust(trust_id)"},{"line_number":92,"context_line":"        trust_chain \u003d [trust]"},{"line_number":93,"context_line":"        while trust and trust.get(\u0027redelegated_trust_id\u0027):"},{"line_number":94,"context_line":"            trust \u003d self.driver.get_trust(trust[\u0027redelegated_trust_id\u0027])"},{"line_number":95,"context_line":"            trust_chain.append(trust)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_7876f63f","line":93,"in_reply_to":"9a68dd71_a2b6813b","updated":"2016-01-20 18:50:07.000000000","message":"We would need to have some mechanism that returned the original trustor of the chain in order to not loop through each redelegated trust. As far as I know, I don\u0027t think that exists.\n\nWe need to protect against the case where trusts are created between user1, user2, and user3. If user1 was the original trustor, the old logic doesn\u0027t actually return the roles for user1, only user2.\n\nWhile this might not be as performant, the behavior is correct.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"},{"author":{"_account_id":13152,"name":"Jorge Munoz","email":"elkidster@gmail.com","username":"jmunoz"},"change_message_id":"080f1b2ebb6afa36ecfef4a2a390830fa25d8d37","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    def get_trust_pedigree(self, trust_id):"},{"line_number":91,"context_line":"        trust \u003d self.driver.get_trust(trust_id)"},{"line_number":92,"context_line":"        trust_chain \u003d [trust]"},{"line_number":93,"context_line":"        while trust and trust.get(\u0027redelegated_trust_id\u0027):"},{"line_number":94,"context_line":"            trust \u003d self.driver.get_trust(trust[\u0027redelegated_trust_id\u0027])"},{"line_number":95,"context_line":"            trust_chain.append(trust)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_a2b6813b","line":93,"in_reply_to":"9a68dd71_aaec2f90","updated":"2016-01-20 18:38:10.000000000","message":"Well, list_trust_for_trustor would only return trust created by the trustor. If the trustor was redelegating a trust, then we would not get the full trust chain. A redelegation can be multiple levels deep.","commit_id":"9a1fc1367f4ac4b5af1e950e61c38179a579d8a0"}]}
