)]}'
{"keystone/auth/plugins/token.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5a488cb93bbc1d5eadc8b85dbef1416f59a46b5e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        response_data.setdefault(\u0027user_id\u0027, token.user_id)"},{"line_number":124,"context_line":"        # TODO(morganfainberg: determine if token \u0027extras\u0027 can be removed"},{"line_number":125,"context_line":"        # from the response_data"},{"line_number":126,"context_line":"        # response_data.setdefault(\u0027extras\u0027, {}).update("},{"line_number":127,"context_line":"        #     token.get(\u0027extras\u0027, {}))"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        return response_data"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_5cbae8e0","line":127,"range":{"start_line":126,"start_character":0,"end_line":127,"end_character":38},"updated":"2018-06-22 21:41:16.000000000","message":"Need to figure out what to do with this.","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"}],"keystone/common/authorization.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e6949ef91ec77f72cfb8bcce4c0dcd17d14183c2","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        policy_dict[\u0027target\u0027].setdefault(self.member_name, {})"},{"line_number":97,"context_line":"        policy_dict[\u0027target\u0027][self.member_name][\u0027user_id\u0027] \u003d (token.user_id)"},{"line_number":98,"context_line":"        try:"},{"line_number":99,"context_line":"            user_domain_id \u003d token.user_domain[\u0027id\u0027]"},{"line_number":100,"context_line":"        except exception.UnexpectedError:"},{"line_number":101,"context_line":"            user_domain_id \u003d None"},{"line_number":102,"context_line":"        if user_domain_id:"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_8be23d9b","line":99,"range":{"start_line":99,"start_character":28,"end_line":99,"end_character":52},"updated":"2018-08-01 15:01:09.000000000","message":"We should eliminate reference of dict as well, can be done later, but token.user_domain_id would be better.","commit_id":"b47e84dac185adcc3e068237fb4cd285c1ae5583"}],"keystone/common/wsgi.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5a488cb93bbc1d5eadc8b85dbef1416f59a46b5e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                                 \u0027application/json-home\u0027])"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def validate_token_bind(context, token):"},{"line_number":61,"context_line":"    bind_mode \u003d CONF.token.enforce_token_bind"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    if bind_mode \u003d\u003d \u0027disabled\u0027:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_3cb5aced","line":60,"updated":"2018-06-22 21:41:16.000000000","message":"This was refactored out in https://review.openstack.org/#/c/577524/","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"}],"keystone/models/token_model.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ada1486766099460f79fef41259fecced0800311","unresolved":false,"context_lines":[{"line_number":569,"context_line":"                    constants.PROTOCOL in self.auth_context)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"    @property"},{"line_number":572,"context_line":"    def roles(self):"},{"line_number":573,"context_line":"        roles \u003d []"},{"line_number":574,"context_line":"        if self.system_scoped:"},{"line_number":575,"context_line":"            groups \u003d PROVIDERS.identity_api.list_groups_for_user(self.user_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_e17f6363","line":572,"updated":"2018-03-15 15:33:40.000000000","message":"This method is ridiculously complex and ugly. It pretty much contains all the different permutations we were doing in the V3TokenDataHelper to populate roles in different cases.\n\nNow that we have it all in one place, let\u0027s review it and see what makes sense and what doesn\u0027t. We\u0027re likely doing a bunch of duplicate stuff, not to mention order of operations needs to be enforced. The goal of this property method should be to return a list of role references given a scope. How can we make that as simple as possible to understand?","commit_id":"9dfa341357db2c0face5e691f8fa3b4df5176a25"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"0ebbbbbf4d1e7ec24a65d8893e688c2e923a945e","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        self.identity_provider_id \u003d None"},{"line_number":308,"context_line":"        self.protocol_id \u003d None"},{"line_number":309,"context_line":"        self.federated_groups \u003d None"},{"line_number":310,"context_line":"        self.access_token_id \u003d None"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def __repr__(self):"},{"line_number":313,"context_line":"        \"\"\"Return string representation of KeystoneToken.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_160bff23","line":310,"updated":"2018-03-23 06:49:55.000000000","message":"some properties such as \"methods\" and \"system\" and so on don\u0027t exist here. Is it done intentionally?","commit_id":"f22c80119c5405b0a4e9f151101e6e8f123b9ef4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4d9ed1103f98ed589002d0319bce41dd95e4a261","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        self.identity_provider_id \u003d None"},{"line_number":308,"context_line":"        self.protocol_id \u003d None"},{"line_number":309,"context_line":"        self.federated_groups \u003d None"},{"line_number":310,"context_line":"        self.access_token_id \u003d None"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def __repr__(self):"},{"line_number":313,"context_line":"        \"\"\"Return string representation of KeystoneToken.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_59475f78","line":310,"in_reply_to":"df7087c5_160bff23","updated":"2018-03-23 13:57:18.000000000","message":"Yeah - I just did it this way since these don\u0027t have their own @property wrapped getter and setter methods. Technically, I don\u0027t think we\u0027re required to do it this way, because you could create them on the fly.\n\nIt might be considered better to have the attributes be consistent:\n\n  \u003e\u003e\u003e token \u003d token_model.TokenModel()\n  \u003e\u003e\u003e print token.is_federated  \n  None\n\nWhere as if we don\u0027t include it, and we don\u0027t decide to specify a property method for it:\n\n  \u003e\u003e\u003e token \u003d token_model.TokenModel()\n  \u003e\u003e\u003e token.is_federated\n  Traceback (most recent call last):\n    File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  AttributeError: \u0027TokenModel\u0027 object has no attribute \u0027is_federated\u0027","commit_id":"f22c80119c5405b0a4e9f151101e6e8f123b9ef4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9c9604b171cd658ae781f99cd3aeb7e0b22dbde6","unresolved":false,"context_lines":[{"line_number":32,"context_line":"# supported token versions"},{"line_number":33,"context_line":"V3 \u003d \u0027v3.0\u0027"},{"line_number":34,"context_line":"VERSIONS \u003d frozenset([V3])"},{"line_number":35,"context_line":"CONF \u003d keystone.conf.CONF"},{"line_number":36,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":37,"context_line":"PROVIDERS \u003d provider_api.ProviderAPIs"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def _parse_and_normalize_time(time_data):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_6c6ac41b","line":37,"range":{"start_line":35,"start_character":0,"end_line":37,"end_character":37},"updated":"2018-06-20 18:16:54.000000000","message":"This is duplicating lines 28 - 30","commit_id":"e319baae6e0d87290c209981a2ee0583746a15f4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"805f76f5f24e25cf8e4d71a5c6d13d3dc2a18a4f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import itertools"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from oslo_log import log"},{"line_number":18,"context_line":"from oslo_serialization import msgpackutils"},{"line_number":19,"context_line":"from oslo_utils import reflection"},{"line_number":20,"context_line":"from oslo_utils import timeutils"},{"line_number":21,"context_line":"import six"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_9e413366","line":18,"updated":"2018-06-25 21:47:46.000000000","message":"We should make a separate change that adds the caching serialization for this new object.","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7cce50eee977ac443b0e6d35382161de97c08014","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import itertools"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from oslo_log import log"},{"line_number":18,"context_line":"from oslo_serialization import msgpackutils"},{"line_number":19,"context_line":"from oslo_utils import reflection"},{"line_number":20,"context_line":"from oslo_utils import timeutils"},{"line_number":21,"context_line":"import six"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_ed82cea4","line":18,"in_reply_to":"5f7c97a3_9e413366","updated":"2018-06-27 14:13:42.000000000","message":"Done","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"805f76f5f24e25cf8e4d71a5c6d13d3dc2a18a4f","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        self.parent_audit_id \u003d None"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        self.__expires_at \u003d None"},{"line_number":323,"context_line":"        self.__issued_at \u003d None"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        self.system \u003d None"},{"line_number":326,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_5e5f1b40","line":323,"updated":"2018-06-25 21:47:46.000000000","message":"This should be done in https://review.openstack.org/#/c/559129/","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7cce50eee977ac443b0e6d35382161de97c08014","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        self.parent_audit_id \u003d None"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        self.__expires_at \u003d None"},{"line_number":323,"context_line":"        self.__issued_at \u003d None"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        self.system \u003d None"},{"line_number":326,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_4d2ae2e6","line":323,"in_reply_to":"5f7c97a3_5e5f1b40","updated":"2018-06-27 14:13:42.000000000","message":"Done","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"805f76f5f24e25cf8e4d71a5c6d13d3dc2a18a4f","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        desc \u003d (\u0027\u003c%(type)s (audit_id\u003d%(audit_id)s, \u0027"},{"line_number":355,"context_line":"                \u0027audit_chain_id\u003d%(audit_ids)s) at %(loc)s\u003e\u0027)"},{"line_number":356,"context_line":"        self_cls_name \u003d reflection.get_class_name(self, fully_qualified\u003dFalse)"},{"line_number":357,"context_line":"        return desc % {\u0027type\u0027: self_cls_name,"},{"line_number":358,"context_line":"                       \u0027audit_id\u0027: self.audit_id,"},{"line_number":359,"context_line":"                       \u0027audit_ids\u0027: self.audit_ids,"},{"line_number":360,"context_line":"                       \u0027loc\u0027: hex(id(self))}"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_3e501f2c","line":357,"updated":"2018-06-25 21:47:46.000000000","message":"This should be reverted since it fails when you try to use it. NOTE: ask morgan about this.","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7cce50eee977ac443b0e6d35382161de97c08014","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        desc \u003d (\u0027\u003c%(type)s (audit_id\u003d%(audit_id)s, \u0027"},{"line_number":355,"context_line":"                \u0027audit_chain_id\u003d%(audit_ids)s) at %(loc)s\u003e\u0027)"},{"line_number":356,"context_line":"        self_cls_name \u003d reflection.get_class_name(self, fully_qualified\u003dFalse)"},{"line_number":357,"context_line":"        return desc % {\u0027type\u0027: self_cls_name,"},{"line_number":358,"context_line":"                       \u0027audit_id\u0027: self.audit_id,"},{"line_number":359,"context_line":"                       \u0027audit_ids\u0027: self.audit_ids,"},{"line_number":360,"context_line":"                       \u0027loc\u0027: hex(id(self))}"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_ade936ab","line":357,"in_reply_to":"5f7c97a3_3e501f2c","updated":"2018-06-27 14:13:42.000000000","message":"Done","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"805f76f5f24e25cf8e4d71a5c6d13d3dc2a18a4f","unresolved":false,"context_lines":[{"line_number":383,"context_line":"    def issued_at(self, value):"},{"line_number":384,"context_line":"        if not isinstance(value, six.string_types):"},{"line_number":385,"context_line":"            raise ValueError(\u0027issued_at must be a string.\u0027)"},{"line_number":386,"context_line":"        self.__issued_at \u003d value"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    @property"},{"line_number":389,"context_line":"    def unscoped(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_9e361302","line":386,"updated":"2018-06-25 21:47:46.000000000","message":"These changes should be moved into https://review.openstack.org/#/c/559129/","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7cce50eee977ac443b0e6d35382161de97c08014","unresolved":false,"context_lines":[{"line_number":383,"context_line":"    def issued_at(self, value):"},{"line_number":384,"context_line":"        if not isinstance(value, six.string_types):"},{"line_number":385,"context_line":"            raise ValueError(\u0027issued_at must be a string.\u0027)"},{"line_number":386,"context_line":"        self.__issued_at \u003d value"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    @property"},{"line_number":389,"context_line":"    def unscoped(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_edf3ae9d","line":386,"in_reply_to":"5f7c97a3_9e361302","updated":"2018-06-27 14:13:42.000000000","message":"Done","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"805f76f5f24e25cf8e4d71a5c6d13d3dc2a18a4f","unresolved":false,"context_lines":[{"line_number":461,"context_line":""},{"line_number":462,"context_line":"    @property"},{"line_number":463,"context_line":"    def oauth_scoped(self):"},{"line_number":464,"context_line":"        return self.access_token_id is not None"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    @property"},{"line_number":467,"context_line":"    def access_token(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_be398ff1","line":464,"updated":"2018-06-25 21:47:46.000000000","message":"This should be moved into https://review.openstack.org/#/c/559129/","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7cce50eee977ac443b0e6d35382161de97c08014","unresolved":false,"context_lines":[{"line_number":461,"context_line":""},{"line_number":462,"context_line":"    @property"},{"line_number":463,"context_line":"    def oauth_scoped(self):"},{"line_number":464,"context_line":"        return self.access_token_id is not None"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    @property"},{"line_number":467,"context_line":"    def access_token(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_2d33e662","line":464,"in_reply_to":"5f7c97a3_be398ff1","updated":"2018-06-27 14:13:42.000000000","message":"Done","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"805f76f5f24e25cf8e4d71a5c6d13d3dc2a18a4f","unresolved":false,"context_lines":[{"line_number":687,"context_line":"            roles \u003d self._get_system_roles()"},{"line_number":688,"context_line":"        elif self.trust_scoped:"},{"line_number":689,"context_line":"            roles \u003d self._get_trust_roles()"},{"line_number":690,"context_line":"        elif self.is_federated and not self.unscoped:"},{"line_number":691,"context_line":"            roles \u003d self._get_federated_roles()"},{"line_number":692,"context_line":"        elif self.domain_scoped:"},{"line_number":693,"context_line":"            roles \u003d self._get_domain_roles()"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_5e24fbc5","line":690,"updated":"2018-06-25 21:47:46.000000000","message":"This should be moved into https://review.openstack.org/#/c/559129/","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7cce50eee977ac443b0e6d35382161de97c08014","unresolved":false,"context_lines":[{"line_number":687,"context_line":"            roles \u003d self._get_system_roles()"},{"line_number":688,"context_line":"        elif self.trust_scoped:"},{"line_number":689,"context_line":"            roles \u003d self._get_trust_roles()"},{"line_number":690,"context_line":"        elif self.is_federated and not self.unscoped:"},{"line_number":691,"context_line":"            roles \u003d self._get_federated_roles()"},{"line_number":692,"context_line":"        elif self.domain_scoped:"},{"line_number":693,"context_line":"            roles \u003d self._get_domain_roles()"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_ad3e1623","line":690,"in_reply_to":"5f7c97a3_5e24fbc5","updated":"2018-06-27 14:13:42.000000000","message":"Done","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"805f76f5f24e25cf8e4d71a5c6d13d3dc2a18a4f","unresolved":false,"context_lines":[{"line_number":739,"context_line":"            msg \u003d _(\u0027Unable to validate token because domain %(id)s is \u0027"},{"line_number":740,"context_line":"                    \u0027disabled\u0027) % {\u0027id\u0027: self.user_domain[\u0027id\u0027]}"},{"line_number":741,"context_line":"            LOG.warning(msg)"},{"line_number":742,"context_line":"            raise exception.DomainNotFound(msg)"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"    def _validate_system_scope(self):"},{"line_number":745,"context_line":"        if self.system_scoped and not self.roles:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_7e1f776f","line":742,"updated":"2018-06-25 21:47:46.000000000","message":"This should be moved into https://review.openstack.org/#/c/559129/","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7cce50eee977ac443b0e6d35382161de97c08014","unresolved":false,"context_lines":[{"line_number":739,"context_line":"            msg \u003d _(\u0027Unable to validate token because domain %(id)s is \u0027"},{"line_number":740,"context_line":"                    \u0027disabled\u0027) % {\u0027id\u0027: self.user_domain[\u0027id\u0027]}"},{"line_number":741,"context_line":"            LOG.warning(msg)"},{"line_number":742,"context_line":"            raise exception.DomainNotFound(msg)"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"    def _validate_system_scope(self):"},{"line_number":745,"context_line":"        if self.system_scoped and not self.roles:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_ad17f69c","line":742,"in_reply_to":"5f7c97a3_7e1f776f","updated":"2018-06-27 14:13:42.000000000","message":"Done","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"805f76f5f24e25cf8e4d71a5c6d13d3dc2a18a4f","unresolved":false,"context_lines":[{"line_number":814,"context_line":"        self.issued_at \u003d issued_at"},{"line_number":815,"context_line":""},{"line_number":816,"context_line":""},{"line_number":817,"context_line":"class _TokenModelHandler(object):"},{"line_number":818,"context_line":"    identity \u003d 126"},{"line_number":819,"context_line":"    handles \u003d (TokenModel,)"},{"line_number":820,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_3e257fbf","line":817,"updated":"2018-06-25 21:47:46.000000000","message":"This should be its own change.","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7cce50eee977ac443b0e6d35382161de97c08014","unresolved":false,"context_lines":[{"line_number":814,"context_line":"        self.issued_at \u003d issued_at"},{"line_number":815,"context_line":""},{"line_number":816,"context_line":""},{"line_number":817,"context_line":"class _TokenModelHandler(object):"},{"line_number":818,"context_line":"    identity \u003d 126"},{"line_number":819,"context_line":"    handles \u003d (TokenModel,)"},{"line_number":820,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_6dc0fee0","line":817,"in_reply_to":"5f7c97a3_3e257fbf","updated":"2018-06-27 14:13:42.000000000","message":"Done","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e6949ef91ec77f72cfb8bcce4c0dcd17d14183c2","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from keystone.common import cache"},{"line_number":24,"context_line":"from keystone.common import provider_api"},{"line_number":25,"context_line":"import keystone.conf"},{"line_number":26,"context_line":"from keystone import exception"},{"line_number":27,"context_line":"from keystone.federation import constants"},{"line_number":28,"context_line":"from keystone.i18n import _"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_2bf1a964","side":"PARENT","line":25,"range":{"start_line":25,"start_character":0,"end_line":25,"end_character":20},"updated":"2018-08-01 15:01:09.000000000","message":"Unrelated changes. next time skip them. Same for the change below.","commit_id":"693a86f2a17c0d7871e5700257942badd8090533"}],"keystone/tests/unit/common/test_rbac_enforcer.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e6949ef91ec77f72cfb8bcce4c0dcd17d14183c2","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            self.assertEqual(token.user_id, subj_token_data[\u0027user_id\u0027])"},{"line_number":243,"context_line":"            self.assertIn(\u0027user\u0027, subj_token_data)"},{"line_number":244,"context_line":"            self.assertIn(\u0027domain\u0027, subj_token_data[\u0027user\u0027])"},{"line_number":245,"context_line":"            self.assertEqual(token.user_domain[\u0027id\u0027],"},{"line_number":246,"context_line":"                             subj_token_data[\u0027user\u0027][\u0027domain\u0027][\u0027id\u0027])"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def test_extract_filter_data(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_6ba9e122","line":245,"range":{"start_line":245,"start_character":29,"end_line":245,"end_character":53},"updated":"2018-08-01 15:01:09.000000000","message":"see previous comment.","commit_id":"b47e84dac185adcc3e068237fb4cd285c1ae5583"}],"keystone/tests/unit/test_token_bind.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5a488cb93bbc1d5eadc8b85dbef1416f59a46b5e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_9c15e0e8","side":"PARENT","line":1,"updated":"2018-06-22 21:41:16.000000000","message":"This was pulled into https://review.openstack.org/#/c/577524/","commit_id":"2e86d903f495d3077fb4cd2cbb410bbbc8e15673"}],"keystone/token/provider.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b0974217db4340212d1c90d828638e50c1698a11","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            # NOTE(amakarov): here and above TOKENS_REGION is to be passed"},{"line_number":175,"context_line":"            # to serve as required positional \"self\" argument. It\u0027s ignored,"},{"line_number":176,"context_line":"            # so I\u0027ve put it here for convenience - any placeholder is fine."},{"line_number":177,"context_line":"            self._validate_token.set(token_data, TOKENS_REGION, token_id)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        return token_id, token_data"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_c1db3f4c","side":"PARENT","line":177,"updated":"2018-03-15 15:43:23.000000000","message":"This bit is interesting, because we were caching a dictionary and token ID. Now that we\u0027re dealing with objects, we need to find a way to cache that. Or move the caching to a different layer.","commit_id":"3c1270e306de6e35ac7de08c57ce476d7e6ca9a3"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"0ebbbbbf4d1e7ec24a65d8893e688c2e923a945e","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                    system\u003dNone, project_id\u003dNone, is_domain\u003dFalse,"},{"line_number":190,"context_line":"                    domain_id\u003dNone, auth_context\u003dNone, trust_id\u003dNone,"},{"line_number":191,"context_line":"                    app_cred_id\u003dNone, include_catalog\u003dTrue,"},{"line_number":192,"context_line":"                    parent_audit_id\u003dNone):"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        # NOTE(lbragstad): Check if the token provider being used actually"},{"line_number":195,"context_line":"        # supports bind authentication methods before proceeding."}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_cc6979f8","line":192,"updated":"2018-03-23 06:49:55.000000000","message":"\"is_domain\" and \"include_catalog\" is useless. We can remove it now I guess.","commit_id":"f22c80119c5405b0a4e9f151101e6e8f123b9ef4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4d9ed1103f98ed589002d0319bce41dd95e4a261","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                    system\u003dNone, project_id\u003dNone, is_domain\u003dFalse,"},{"line_number":190,"context_line":"                    domain_id\u003dNone, auth_context\u003dNone, trust_id\u003dNone,"},{"line_number":191,"context_line":"                    app_cred_id\u003dNone, include_catalog\u003dTrue,"},{"line_number":192,"context_line":"                    parent_audit_id\u003dNone):"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        # NOTE(lbragstad): Check if the token provider being used actually"},{"line_number":195,"context_line":"        # supports bind authentication methods before proceeding."}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_f92433c8","line":192,"in_reply_to":"df7087c5_cc6979f8","updated":"2018-03-23 13:57:18.000000000","message":"++","commit_id":"f22c80119c5405b0a4e9f151101e6e8f123b9ef4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"0ebbbbbf4d1e7ec24a65d8893e688c2e923a945e","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            # NOTE(amakarov): here and above TOKENS_REGION is to be passed"},{"line_number":251,"context_line":"            # to serve as required positional \"self\" argument. It\u0027s ignored,"},{"line_number":252,"context_line":"            # so I\u0027ve put it here for convenience - any placeholder is fine."},{"line_number":253,"context_line":"            # self._validate_token.set(token, TOKENS_REGION, token.id)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        return token"},{"line_number":256,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_ecb9dd78","line":253,"updated":"2018-03-23 06:49:55.000000000","message":"A way is to add \u0027from_dict\u0027 and \u0027to_dict\u0027 for TokenModel obj","commit_id":"f22c80119c5405b0a4e9f151101e6e8f123b9ef4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"444739c73e7a5f0f15e781f07a9e9f0fdbb1547d","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            # NOTE(amakarov): here and above TOKENS_REGION is to be passed"},{"line_number":251,"context_line":"            # to serve as required positional \"self\" argument. It\u0027s ignored,"},{"line_number":252,"context_line":"            # so I\u0027ve put it here for convenience - any placeholder is fine."},{"line_number":253,"context_line":"            # self._validate_token.set(token, TOKENS_REGION, token.id)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        return token"},{"line_number":256,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_a02577ad","line":253,"in_reply_to":"bf659307_3d22f053","updated":"2018-03-27 09:33:00.000000000","message":"example: http://paste.openstack.org/show/715371/\n\nThe code will let the cache work but it doesn\u0027t work correctly. The \"serialize\" and \"deserialize\" should be updated. It\u0027s just a structure example.","commit_id":"f22c80119c5405b0a4e9f151101e6e8f123b9ef4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"71a6ba64198d1943cabda99ff39daa8036e70e0f","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            # NOTE(amakarov): here and above TOKENS_REGION is to be passed"},{"line_number":251,"context_line":"            # to serve as required positional \"self\" argument. It\u0027s ignored,"},{"line_number":252,"context_line":"            # so I\u0027ve put it here for convenience - any placeholder is fine."},{"line_number":253,"context_line":"            # self._validate_token.set(token, TOKENS_REGION, token.id)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        return token"},{"line_number":256,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_e808fbd9","line":253,"in_reply_to":"bf659307_a02577ad","updated":"2018-06-20 22:27:54.000000000","message":"Thanks for this - incorporated it into the latest patch set and working out some of the kinks.","commit_id":"f22c80119c5405b0a4e9f151101e6e8f123b9ef4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"d6c930d34721fcd3fa6b149d63343d71d168519f","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            # NOTE(amakarov): here and above TOKENS_REGION is to be passed"},{"line_number":251,"context_line":"            # to serve as required positional \"self\" argument. It\u0027s ignored,"},{"line_number":252,"context_line":"            # so I\u0027ve put it here for convenience - any placeholder is fine."},{"line_number":253,"context_line":"            # self._validate_token.set(token, TOKENS_REGION, token.id)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        return token"},{"line_number":256,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_3d22f053","line":253,"in_reply_to":"df7087c5_341e325f","updated":"2018-03-27 09:16:05.000000000","message":"Another way is to register TokenModel into cache serialization like RevokeEvent does:\nhttps://github.com/openstack/keystone/blob/master/keystone/models/revoke_model.py#L299\nThe backend still cache dict, but The obj-\u003estr step will be handled by serialization. Then we can call L253 directly here IMO.","commit_id":"f22c80119c5405b0a4e9f151101e6e8f123b9ef4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4d9ed1103f98ed589002d0319bce41dd95e4a261","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            # NOTE(amakarov): here and above TOKENS_REGION is to be passed"},{"line_number":251,"context_line":"            # to serve as required positional \"self\" argument. It\u0027s ignored,"},{"line_number":252,"context_line":"            # so I\u0027ve put it here for convenience - any placeholder is fine."},{"line_number":253,"context_line":"            # self._validate_token.set(token, TOKENS_REGION, token.id)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"        return token"},{"line_number":256,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_341e325f","line":253,"in_reply_to":"df7087c5_ecb9dd78","updated":"2018-03-23 13:57:18.000000000","message":"Yeah - I was hoping to leave that to the controllers to build the response from the model. I can try giving that a shot thought.\n\nUnless there is a way to cache python objects?","commit_id":"f22c80119c5405b0a4e9f151101e6e8f123b9ef4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"db930aab1d0947e437241af116e9c19773d6df40","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                    system\u003dNone, project_id\u003dNone, domain_id\u003dNone,"},{"line_number":204,"context_line":"                    auth_context\u003dNone, trust_id\u003dNone, app_cred_id\u003dNone,"},{"line_number":205,"context_line":"                    parent_audit_id\u003dNone):"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        # NOTE(lbragstad): Check if the token provider being used actually"},{"line_number":208,"context_line":"        # supports bind authentication methods before proceeding."},{"line_number":209,"context_line":"        if auth_context and auth_context.get(\u0027bind\u0027):"},{"line_number":210,"context_line":"            if not self.driver._supports_bind_authentication:"},{"line_number":211,"context_line":"                raise exception.NotImplemented(_("},{"line_number":212,"context_line":"                    \u0027The configured token provider does not support bind \u0027"},{"line_number":213,"context_line":"                    \u0027authentication.\u0027))"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        # NOTE(lbragstad): Grab a blank token object and use composition to"},{"line_number":216,"context_line":"        # build the token according to the authentication and authorization"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_d5a99cde","line":213,"range":{"start_line":206,"start_character":0,"end_line":213,"end_character":39},"updated":"2018-06-27 14:20:08.000000000","message":"This should be removed.","commit_id":"4dac450f50ed3109a365a3d9cc7f0c49473a8764"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"6676c16237ea4591db185ff2f8cdd1f43f9578bd","unresolved":false,"context_lines":[{"line_number":52,"context_line":"VERSIONS \u003d token_model.VERSIONS"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def default_expire_time():"},{"line_number":56,"context_line":"    \"\"\"Determine when a fresh token should expire."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    Expiration time varies based on configuration (see ``[token] expiration``)."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    :returns: a naive UTC datetime.datetime object"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    \"\"\""},{"line_number":63,"context_line":"    expire_delta \u003d datetime.timedelta(seconds\u003dCONF.token.expiration)"},{"line_number":64,"context_line":"    expires_at \u003d timeutils.utcnow() + expire_delta"},{"line_number":65,"context_line":"    return expires_at.replace(microsecond\u003d0)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def random_urlsafe_str():"},{"line_number":69,"context_line":"    \"\"\"Generate a random URL-safe string."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    :rtype: six.text_type"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    \"\"\""},{"line_number":74,"context_line":"    # chop the padding (\u003d\u003d) off the end of the encoding to save space"},{"line_number":75,"context_line":"    return base64.urlsafe_b64encode(uuid.uuid4().bytes)[:-2].decode(\u0027utf-8\u0027)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class Manager(manager.Manager):"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_bea9f4de","line":75,"range":{"start_line":55,"start_character":0,"end_line":75,"end_character":76},"updated":"2018-07-26 12:19:46.000000000","message":"they are totally the same with the code:\nhttps://github.com/openstack/keystone/blob/master/keystone/token/providers/common.py#L43-L63\n\nwhy add them here?","commit_id":"b47e84dac185adcc3e068237fb4cd285c1ae5583"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d5c6e782baa5b2094d331c18cbefb08d88d9058f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"VERSIONS \u003d token_model.VERSIONS"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def default_expire_time():"},{"line_number":56,"context_line":"    \"\"\"Determine when a fresh token should expire."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    Expiration time varies based on configuration (see ``[token] expiration``)."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    :returns: a naive UTC datetime.datetime object"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    \"\"\""},{"line_number":63,"context_line":"    expire_delta \u003d datetime.timedelta(seconds\u003dCONF.token.expiration)"},{"line_number":64,"context_line":"    expires_at \u003d timeutils.utcnow() + expire_delta"},{"line_number":65,"context_line":"    return expires_at.replace(microsecond\u003d0)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def random_urlsafe_str():"},{"line_number":69,"context_line":"    \"\"\"Generate a random URL-safe string."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    :rtype: six.text_type"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    \"\"\""},{"line_number":74,"context_line":"    # chop the padding (\u003d\u003d) off the end of the encoding to save space"},{"line_number":75,"context_line":"    return base64.urlsafe_b64encode(uuid.uuid4().bytes)[:-2].decode(\u0027utf-8\u0027)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class Manager(manager.Manager):"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_f8e77baa","line":75,"range":{"start_line":55,"start_character":0,"end_line":75,"end_character":76},"in_reply_to":"5f7c97a3_bea9f4de","updated":"2018-07-26 16:31:41.000000000","message":"Good question. I added them here because I didn\u0027t want the token/provider.py module to have a dependency on common.py, which we\u0027ll be removing in a subsequent patch.\n\nI also thought it made sense to pull these functions out of common.py and into a higher level module, making it more apparent that it\u0027s business logic.","commit_id":"b47e84dac185adcc3e068237fb4cd285c1ae5583"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"72ada735628407afeb651a8ffd360194e133faf8","unresolved":false,"context_lines":[{"line_number":52,"context_line":"VERSIONS \u003d token_model.VERSIONS"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def default_expire_time():"},{"line_number":56,"context_line":"    \"\"\"Determine when a fresh token should expire."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    Expiration time varies based on configuration (see ``[token] expiration``)."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    :returns: a naive UTC datetime.datetime object"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    \"\"\""},{"line_number":63,"context_line":"    expire_delta \u003d datetime.timedelta(seconds\u003dCONF.token.expiration)"},{"line_number":64,"context_line":"    expires_at \u003d timeutils.utcnow() + expire_delta"},{"line_number":65,"context_line":"    return expires_at.replace(microsecond\u003d0)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def random_urlsafe_str():"},{"line_number":69,"context_line":"    \"\"\"Generate a random URL-safe string."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    :rtype: six.text_type"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    \"\"\""},{"line_number":74,"context_line":"    # chop the padding (\u003d\u003d) off the end of the encoding to save space"},{"line_number":75,"context_line":"    return base64.urlsafe_b64encode(uuid.uuid4().bytes)[:-2].decode(\u0027utf-8\u0027)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class Manager(manager.Manager):"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_189037f3","line":75,"range":{"start_line":55,"start_character":0,"end_line":75,"end_character":76},"in_reply_to":"5f7c97a3_f8e77baa","updated":"2018-07-26 16:32:07.000000000","message":"Removal is here - https://review.openstack.org/#/c/577507/8","commit_id":"b47e84dac185adcc3e068237fb4cd285c1ae5583"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"256028d0b00b3067d6dd3e7315c3ad2c8a51bf45","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            protocol_id, access_token_id, app_cred_id, issued_at,"},{"line_number":155,"context_line":"            expires_at) \u003d self.driver.validate_token(token_id)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        token \u003d token_model.TokenModel()"},{"line_number":158,"context_line":"        token.user_id \u003d user_id"},{"line_number":159,"context_line":"        token.methods \u003d methods"},{"line_number":160,"context_line":"        if len(audit_ids) \u003e 1:"},{"line_number":161,"context_line":"            token.parent_audit_id \u003d audit_ids.pop()"},{"line_number":162,"context_line":"        token.audit_id \u003d audit_ids.pop()"},{"line_number":163,"context_line":"        token.system \u003d system"},{"line_number":164,"context_line":"        token.domain_id \u003d domain_id"},{"line_number":165,"context_line":"        token.project_id \u003d project_id"},{"line_number":166,"context_line":"        token.trust_id \u003d trust_id"},{"line_number":167,"context_line":"        token.access_token_id \u003d access_token_id"},{"line_number":168,"context_line":"        token.application_credential_id \u003d app_cred_id"},{"line_number":169,"context_line":"        token.expires_at \u003d expires_at"},{"line_number":170,"context_line":"        if federated_group_ids:"},{"line_number":171,"context_line":"            token.is_federated \u003d True"},{"line_number":172,"context_line":"            token.identity_provider_id \u003d identity_provider_id"},{"line_number":173,"context_line":"            token.protocol_id \u003d protocol_id"},{"line_number":174,"context_line":"            token.federated_groups \u003d federated_group_ids"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        token.mint(token_id, issued_at)"},{"line_number":177,"context_line":"        return token"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_0b5004d5","line":174,"range":{"start_line":157,"start_character":0,"end_line":174,"end_character":56},"updated":"2018-07-13 15:25:21.000000000","message":"This makes me think maybe the TokenModel\u0027s __init__ should be setting these?","commit_id":"b47e84dac185adcc3e068237fb4cd285c1ae5583"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"a999012d5ac8a07958b8c3fca87be113fd480f91","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            protocol_id, access_token_id, app_cred_id, issued_at,"},{"line_number":155,"context_line":"            expires_at) \u003d self.driver.validate_token(token_id)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        token \u003d token_model.TokenModel()"},{"line_number":158,"context_line":"        token.user_id \u003d user_id"},{"line_number":159,"context_line":"        token.methods \u003d methods"},{"line_number":160,"context_line":"        if len(audit_ids) \u003e 1:"},{"line_number":161,"context_line":"            token.parent_audit_id \u003d audit_ids.pop()"},{"line_number":162,"context_line":"        token.audit_id \u003d audit_ids.pop()"},{"line_number":163,"context_line":"        token.system \u003d system"},{"line_number":164,"context_line":"        token.domain_id \u003d domain_id"},{"line_number":165,"context_line":"        token.project_id \u003d project_id"},{"line_number":166,"context_line":"        token.trust_id \u003d trust_id"},{"line_number":167,"context_line":"        token.access_token_id \u003d access_token_id"},{"line_number":168,"context_line":"        token.application_credential_id \u003d app_cred_id"},{"line_number":169,"context_line":"        token.expires_at \u003d expires_at"},{"line_number":170,"context_line":"        if federated_group_ids:"},{"line_number":171,"context_line":"            token.is_federated \u003d True"},{"line_number":172,"context_line":"            token.identity_provider_id \u003d identity_provider_id"},{"line_number":173,"context_line":"            token.protocol_id \u003d protocol_id"},{"line_number":174,"context_line":"            token.federated_groups \u003d federated_group_ids"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        token.mint(token_id, issued_at)"},{"line_number":177,"context_line":"        return token"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_4bccbc61","line":174,"range":{"start_line":157,"start_character":0,"end_line":174,"end_character":56},"in_reply_to":"5f7c97a3_0b5004d5","updated":"2018-07-13 15:35:31.000000000","message":"Good point.. Traditionally that\u0027s how we\u0027ve always implemented the issue_token methods.\n\nMy goal in using composition here was to try and keep the logic for mapping properties from authorization to a token in the token provider API, versus having the __init__ accept a bunch of kwargs and reasoning about it during initialization.\n\nFor example, seeing that we clearly start with a blank token and we\u0027re building it how we see fit in here.","commit_id":"b47e84dac185adcc3e068237fb4cd285c1ae5583"}],"keystone/token/providers/base.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e530fb478f79cb0b8f00dce98e843bebab883b79","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @abc.abstractmethod"},{"line_number":58,"context_line":"    def generate_id_and_issued_at(self, token):"},{"line_number":59,"context_line":"        \"\"\"Generate a token based on the information provided."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        :param token: A token object containing information about the"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_987b59be","line":58,"updated":"2018-06-27 15:11:23.000000000","message":"I need to include a release note for this change since it\u0027s modifying an interface.","commit_id":"c821bda24a37146dbba85307ddd24e7d693dc4a4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"bd1fd3034af9eb9150c90392e293e93ff70cd8a5","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @abc.abstractmethod"},{"line_number":58,"context_line":"    def generate_id_and_issued_at(self, token):"},{"line_number":59,"context_line":"        \"\"\"Generate a token based on the information provided."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        :param token: A token object containing information about the"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_775be3f8","line":58,"in_reply_to":"5f7c97a3_987b59be","updated":"2018-06-27 21:25:20.000000000","message":"Done","commit_id":"c821bda24a37146dbba85307ddd24e7d693dc4a4"}]}
