)]}'
{"keystone/common/ldap/core.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"77de39e5e269e927064fb92c6972394af207c061","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        return ldap.dn.str2dn(dn)[0][0][1]"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def _ldap_res_to_model(self, res):"},{"line_number":281,"context_line":"        if self.id_attr \u003d\u003d self.DEFAULT_ID_ATTR:"},{"line_number":282,"context_line":"            obj \u003d self.model(id\u003dself._dn_to_id(res[0]))"},{"line_number":283,"context_line":"        else:"},{"line_number":284,"context_line":"            obj \u003d self.model(id\u003dres[1][self.id_attr][0])"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2FN%2B8%3D","line":281,"updated":"2014-03-07 15:02:07.000000000","message":"I\u0027m not certain that this is going to work.  I think it is going to break people that have DNs that end with something other than cn.  I suspect we need a more explicit way to find a user based on something other than DN.","commit_id":"fc58831bf96f4d36a07ea299eb8f1e446471e8a8"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"408cc4ca8516cd2d6b014134047e7d3bb525dddf","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        if self.id_attr \u003d\u003d self.DEFAULT_ID_ATTR:"},{"line_number":282,"context_line":"            obj \u003d self.model(id\u003dself._dn_to_id(res[0]))"},{"line_number":283,"context_line":"        else:"},{"line_number":284,"context_line":"            obj \u003d self.model(id\u003dres[1][self.id_attr][0])"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        for k in obj.known_keys:"},{"line_number":287,"context_line":"            if k in self.attribute_ignore:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2FG8A%3D","line":284,"updated":"2014-03-09 15:21:46.000000000","message":"why do we need to call _dn_to_id at all? Should be able to always do\n\n obj \u003d self.model(id\u003dres[1][self.id_attr][0])","commit_id":"fc58831bf96f4d36a07ea299eb8f1e446471e8a8"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"c6b327d9ed4fc32fb79aa42232294092458e1162","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        if self.id_attr \u003d\u003d self.DEFAULT_ID_ATTR:"},{"line_number":282,"context_line":"            obj \u003d self.model(id\u003dself._dn_to_id(res[0]))"},{"line_number":283,"context_line":"        else:"},{"line_number":284,"context_line":"            obj \u003d self.model(id\u003dres[1][self.id_attr][0])"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        for k in obj.known_keys:"},{"line_number":287,"context_line":"            if k in self.attribute_ignore:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2FAD4%3D","line":284,"in_reply_to":"AAAAVn%2F%2FG8A%3D","updated":"2014-03-21 01:43:15.000000000","message":"_dn_to_id is far less necessary with the Remember The DN Patch.  It would be necessary in cases where you look up a user by username and then use this to translate to the user id when populating the object.","commit_id":"fc58831bf96f4d36a07ea299eb8f1e446471e8a8"}],"keystone/tests/test_backend_ldap.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c1e65316fbe3e0256c16a72fbc1f35cb08516eb6","unresolved":false,"context_lines":[{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def test_user_attribute_mapping(self):"},{"line_number":710,"context_line":"        sam_account_name \u003d \u0027sam_value\u0027"},{"line_number":711,"context_line":"        common_name \u003d \u0027Test Usersname\u0027"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"        # NOTE(cjellick): We need to first create the user with the"},{"line_number":714,"context_line":"        # user_id_attribute mapped to the default \u0027cn\u0027 and with the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F964w%3D","line":711,"updated":"2013-12-04 13:42:12.000000000","message":"instead of a typo, just use uuid.uuid4().hex to produce arbitrary values :)","commit_id":"62f54292862c38b4922cf4f9d65bb374b79cc09e"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4f4b165457c3b5ead6cbf1fc7f3162a6ab045571","unresolved":false,"context_lines":[{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def test_user_attribute_mapping(self):"},{"line_number":710,"context_line":"        sam_account_name \u003d \u0027sam_value\u0027"},{"line_number":711,"context_line":"        common_name \u003d \u0027Test Usersname\u0027"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"        # NOTE(cjellick): We need to first create the user with the"},{"line_number":714,"context_line":"        # user_id_attribute mapped to the default \u0027cn\u0027 and with the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9H7s%3D","line":711,"in_reply_to":"AAAATn%2F93Nw%3D","updated":"2013-12-16 15:38:18.000000000","message":"I prefer uuid.uuid4().hex here too since it matches how the other tests work.","commit_id":"62f54292862c38b4922cf4f9d65bb374b79cc09e"},{"author":{"_account_id":8340,"name":"Craig Jellick","email":"craig.jellick@gmail.com","username":"cjellick"},"change_message_id":"36afd5c3e18b469f459f02ff6cfa880449e9713f","unresolved":false,"context_lines":[{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def test_user_attribute_mapping(self):"},{"line_number":710,"context_line":"        sam_account_name \u003d \u0027sam_value\u0027"},{"line_number":711,"context_line":"        common_name \u003d \u0027Test Usersname\u0027"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"        # NOTE(cjellick): We need to first create the user with the"},{"line_number":714,"context_line":"        # user_id_attribute mapped to the default \u0027cn\u0027 and with the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9EYc%3D","line":711,"in_reply_to":"AAAATn%2F964w%3D","updated":"2013-12-17 04:32:03.000000000","message":"Done","commit_id":"62f54292862c38b4922cf4f9d65bb374b79cc09e"},{"author":{"_account_id":8340,"name":"Craig Jellick","email":"craig.jellick@gmail.com","username":"cjellick"},"change_message_id":"3025498e5f47d5e5187ca0eda0122816781f4137","unresolved":false,"context_lines":[{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def test_user_attribute_mapping(self):"},{"line_number":710,"context_line":"        sam_account_name \u003d \u0027sam_value\u0027"},{"line_number":711,"context_line":"        common_name \u003d \u0027Test Usersname\u0027"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"        # NOTE(cjellick): We need to first create the user with the"},{"line_number":714,"context_line":"        # user_id_attribute mapped to the default \u0027cn\u0027 and with the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F93Nw%3D","line":711,"in_reply_to":"AAAATn%2F964w%3D","updated":"2013-12-05 05:21:39.000000000","message":"Good catch on the typo. I feel that the uuid approach would add an extra computation or two without adding any real value to the test. But if you feel strongly about it or I\u0027m missing something, I\u0027ll switch it to the uuid approach","commit_id":"62f54292862c38b4922cf4f9d65bb374b79cc09e"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c1e65316fbe3e0256c16a72fbc1f35cb08516eb6","unresolved":false,"context_lines":[{"line_number":719,"context_line":"        user \u003d {"},{"line_number":720,"context_line":"            \u0027id\u0027: common_name,"},{"line_number":721,"context_line":"            \u0027name\u0027: sam_account_name,"},{"line_number":722,"context_line":"            \u0027password\u0027: \u0027pass\u0027,"},{"line_number":723,"context_line":"            \u0027domain_id\u0027: CONF.identity.default_domain_id"},{"line_number":724,"context_line":"        }"},{"line_number":725,"context_line":"        self.identity_api.create_user(common_name, user)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F964o%3D","line":722,"updated":"2013-12-04 13:42:12.000000000","message":"same as above","commit_id":"62f54292862c38b4922cf4f9d65bb374b79cc09e"},{"author":{"_account_id":8340,"name":"Craig Jellick","email":"craig.jellick@gmail.com","username":"cjellick"},"change_message_id":"36afd5c3e18b469f459f02ff6cfa880449e9713f","unresolved":false,"context_lines":[{"line_number":719,"context_line":"        user \u003d {"},{"line_number":720,"context_line":"            \u0027id\u0027: common_name,"},{"line_number":721,"context_line":"            \u0027name\u0027: sam_account_name,"},{"line_number":722,"context_line":"            \u0027password\u0027: \u0027pass\u0027,"},{"line_number":723,"context_line":"            \u0027domain_id\u0027: CONF.identity.default_domain_id"},{"line_number":724,"context_line":"        }"},{"line_number":725,"context_line":"        self.identity_api.create_user(common_name, user)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9EYY%3D","line":722,"in_reply_to":"AAAATn%2F964o%3D","updated":"2013-12-17 04:32:03.000000000","message":"Done","commit_id":"62f54292862c38b4922cf4f9d65bb374b79cc09e"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4f4b165457c3b5ead6cbf1fc7f3162a6ab045571","unresolved":false,"context_lines":[{"line_number":729,"context_line":"        # otherwise take a shortcut and try to always construct"},{"line_number":730,"context_line":"        # the DN from the id"},{"line_number":731,"context_line":"        CONF.ldap.query_scope \u003d \u0027sub\u0027"},{"line_number":732,"context_line":"        CONF.ldap.user_id_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":733,"context_line":"        self.load_backends()"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"        user_ref \u003d self.identity_api.get_user(sam_account_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9H6g%3D","line":732,"updated":"2013-12-16 15:38:18.000000000","message":"why split up the configuration setting? This doesn\u0027t happen when the keystone server is running. Put all the CONF setting up front.","commit_id":"62f54292862c38b4922cf4f9d65bb374b79cc09e"},{"author":{"_account_id":8340,"name":"Craig Jellick","email":"craig.jellick@gmail.com","username":"cjellick"},"change_message_id":"36afd5c3e18b469f459f02ff6cfa880449e9713f","unresolved":false,"context_lines":[{"line_number":729,"context_line":"        # otherwise take a shortcut and try to always construct"},{"line_number":730,"context_line":"        # the DN from the id"},{"line_number":731,"context_line":"        CONF.ldap.query_scope \u003d \u0027sub\u0027"},{"line_number":732,"context_line":"        CONF.ldap.user_id_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":733,"context_line":"        self.load_backends()"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"        user_ref \u003d self.identity_api.get_user(sam_account_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9EZ8%3D","line":732,"in_reply_to":"AAAATn%2F9H6g%3D","updated":"2013-12-17 04:32:03.000000000","message":"This is intentionally split up. The user must be created with the user_id_attribute not set to the default \u0027cn\u0027. This creates a fakeldap entry where cn\u003d\u0027foo\u0027 and sAMAccountName\u003d\u0027bar\u0027. We then switch the user_id_attribute to sAMAccountName and verify that when we look the user up by id\u003dbar, we get back the appropriate user and that that user\u0027s id attribute is set to \u0027bar\u0027.","commit_id":"62f54292862c38b4922cf4f9d65bb374b79cc09e"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"bb974f64414cdca1ce470aae83dc47fcc278237c","unresolved":false,"context_lines":[{"line_number":729,"context_line":"        # otherwise take a shortcut and try to always construct"},{"line_number":730,"context_line":"        # the DN from the id"},{"line_number":731,"context_line":"        CONF.ldap.query_scope \u003d \u0027sub\u0027"},{"line_number":732,"context_line":"        CONF.ldap.user_id_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":733,"context_line":"        self.load_backends()"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"        user_ref \u003d self.identity_api.get_user(sam_account_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAT3%2F%2F3Iw%3D","line":732,"updated":"2013-12-30 00:16:03.000000000","message":"The configuration shouldn\u0027t be changed in the middle of a test because that\u0027s not something Keystone supports. Since this test needs a user with certain values then create the user by going directly to LDAP.","commit_id":"a1bd6e9358ee4c02277bd5d75a62dee2d912efba"},{"author":{"_account_id":8340,"name":"Craig Jellick","email":"craig.jellick@gmail.com","username":"cjellick"},"change_message_id":"a121a26edc0bbca9164f71f5b99aaf63d0c4bb63","unresolved":false,"context_lines":[{"line_number":729,"context_line":"        # otherwise take a shortcut and try to always construct"},{"line_number":730,"context_line":"        # the DN from the id"},{"line_number":731,"context_line":"        CONF.ldap.query_scope \u003d \u0027sub\u0027"},{"line_number":732,"context_line":"        CONF.ldap.user_id_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":733,"context_line":"        self.load_backends()"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"        user_ref \u003d self.identity_api.get_user(sam_account_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FW%2FI%3D","line":732,"in_reply_to":"AAAAT3%2F%2F3Iw%3D","updated":"2014-03-06 16:38:56.000000000","message":"Done","commit_id":"a1bd6e9358ee4c02277bd5d75a62dee2d912efba"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"408cc4ca8516cd2d6b014134047e7d3bb525dddf","unresolved":false,"context_lines":[{"line_number":902,"context_line":"        dn, attrs \u003d self.identity_api.driver.user._ldap_get(user[\u0027id\u0027])"},{"line_number":903,"context_line":"        self.assertTrue(user[\u0027name\u0027] in attrs[\u0027description\u0027])"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    def test_user_attribute_mapping(self):"},{"line_number":906,"context_line":"        CONF.ldap.query_scope \u003d \u0027sub\u0027"},{"line_number":907,"context_line":"        CONF.ldap.user_id_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":908,"context_line":"        CONF.ldap.user_name_attribute \u003d \u0027sAMAccountName\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2FG7Y%3D","line":905,"updated":"2014-03-09 15:21:46.000000000","message":"this should be test_user_id_attr","commit_id":"fc58831bf96f4d36a07ea299eb8f1e446471e8a8"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"408cc4ca8516cd2d6b014134047e7d3bb525dddf","unresolved":false,"context_lines":[{"line_number":903,"context_line":"        self.assertTrue(user[\u0027name\u0027] in attrs[\u0027description\u0027])"},{"line_number":904,"context_line":""},{"line_number":905,"context_line":"    def test_user_attribute_mapping(self):"},{"line_number":906,"context_line":"        CONF.ldap.query_scope \u003d \u0027sub\u0027"},{"line_number":907,"context_line":"        CONF.ldap.user_id_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":908,"context_line":"        CONF.ldap.user_name_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":909,"context_line":"        self.load_backends()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2FG70%3D","line":906,"updated":"2014-03-09 15:21:46.000000000","message":"use self.opt_in_group for setting the options.","commit_id":"fc58831bf96f4d36a07ea299eb8f1e446471e8a8"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"408cc4ca8516cd2d6b014134047e7d3bb525dddf","unresolved":false,"context_lines":[{"line_number":905,"context_line":"    def test_user_attribute_mapping(self):"},{"line_number":906,"context_line":"        CONF.ldap.query_scope \u003d \u0027sub\u0027"},{"line_number":907,"context_line":"        CONF.ldap.user_id_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":908,"context_line":"        CONF.ldap.user_name_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":909,"context_line":"        self.load_backends()"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"        sam_account_name \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2FG7E%3D","line":908,"updated":"2014-03-09 15:21:46.000000000","message":"suggest use different attributes for name and id so that this test will validate that the code is using the correct config setting for the different attributes.","commit_id":"fc58831bf96f4d36a07ea299eb8f1e446471e8a8"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f900ba375d10c4b98735a6b5387f3b562589b141","unresolved":false,"context_lines":[{"line_number":905,"context_line":"    def test_user_attribute_mapping(self):"},{"line_number":906,"context_line":"        CONF.ldap.query_scope \u003d \u0027sub\u0027"},{"line_number":907,"context_line":"        CONF.ldap.user_id_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":908,"context_line":"        CONF.ldap.user_name_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":909,"context_line":"        self.load_backends()"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"        sam_account_name \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2FyLA%3D","line":908,"in_reply_to":"AAAAVn%2F%2FG7E%3D","updated":"2014-03-13 20:35:42.000000000","message":"This will need to use the fixtures for tests I believe?","commit_id":"fc58831bf96f4d36a07ea299eb8f1e446471e8a8"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"29ee6456f74380f3b19b30287f7670f2a5514249","unresolved":false,"context_lines":[{"line_number":905,"context_line":"    def test_user_attribute_mapping(self):"},{"line_number":906,"context_line":"        CONF.ldap.query_scope \u003d \u0027sub\u0027"},{"line_number":907,"context_line":"        CONF.ldap.user_id_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":908,"context_line":"        CONF.ldap.user_name_attribute \u003d \u0027sAMAccountName\u0027"},{"line_number":909,"context_line":"        self.load_backends()"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"        sam_account_name \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_34554e50","line":908,"in_reply_to":"AAAAWH%2F%2FyLA%3D","updated":"2014-09-02 16:00:26.000000000","message":"++ for fixtures","commit_id":"fc58831bf96f4d36a07ea299eb8f1e446471e8a8"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"29ee6456f74380f3b19b30287f7670f2a5514249","unresolved":false,"context_lines":[{"line_number":920,"context_line":"        ldap_.add_s(dn, user_attrs)"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"        user_ref \u003d self.identity_api.get_user(sam_account_name)"},{"line_number":923,"context_line":"        self.assertEqual(user_ref[\u0027id\u0027], sam_account_name)"},{"line_number":924,"context_line":"        self.assertEqual(user_ref[\u0027name\u0027], sam_account_name)"},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"    def test_parse_extra_attribute_mapping(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_74e6f6b5","line":923,"updated":"2014-09-02 16:00:26.000000000","message":"Reverse the order here for these. It should be (expected, observed)","commit_id":"fc58831bf96f4d36a07ea299eb8f1e446471e8a8"}]}
