)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4711690fcf9b5d5fcdd85bea1fd40b0558ce91c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Use oslo_utils strutils.mask_password to mask token field"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I5b8fa4233d297722c3af08176901d12887bae3de"},{"line_number":12,"context_line":"Depends-On: Ia07ca4b6f42577d45a53749511cfb6af1492678a"},{"line_number":13,"context_line":"Closes-Bug: #1492140"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da20952f_cc3e628b","line":12,"updated":"2015-09-08 14:27:43.000000000","message":"Technically this would require a bump of the minimum required version of oslo.utils that contains the fix.","commit_id":"86a4dbad81efdd9fa7648f5efbdd33dba4013672"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3bcbf618dcabfb27c1751c6c6a8b30c3628c3831","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Use oslo_utils strutils.mask_password to mask token field"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I5b8fa4233d297722c3af08176901d12887bae3de"},{"line_number":12,"context_line":"Depends-On: Ia07ca4b6f42577d45a53749511cfb6af1492678a"},{"line_number":13,"context_line":"Closes-Bug: #1492140"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da20952f_b0533b39","line":12,"in_reply_to":"da20952f_a794688c","updated":"2015-09-08 17:52:52.000000000","message":"This code will still technically work with the current version of oslo.utils, it\u0027s just that the nova bug can\u0027t really be considered fixed until oslo.utils does a release with that change and it\u0027s the minimum required version that nova is using.","commit_id":"86a4dbad81efdd9fa7648f5efbdd33dba4013672"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"a9232745e403ed3d94188ba61d5e52067f6d9b70","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Use oslo_utils strutils.mask_password to mask token field"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I5b8fa4233d297722c3af08176901d12887bae3de"},{"line_number":12,"context_line":"Depends-On: Ia07ca4b6f42577d45a53749511cfb6af1492678a"},{"line_number":13,"context_line":"Closes-Bug: #1492140"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da20952f_a794688c","line":12,"in_reply_to":"da20952f_cc3e628b","updated":"2015-09-08 14:55:34.000000000","message":"agreed, but this will need to wait till the oslo.utils change has merged and a new version has been generated and released?","commit_id":"86a4dbad81efdd9fa7648f5efbdd33dba4013672"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"8834a93e8008ef60afcfc80809dfcec162d99605","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     paul-carlton2 \u003cpaul.carlton2@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-09-09 18:15:59 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Mask the token used to allow access to vnc console"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Use oslo_utils strutils.mask_password to mask token field"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba15a1d1_3a954f86","line":7,"updated":"2015-09-23 11:06:30.000000000","message":"This is more than just VNC, it covers all the consoles (spice, serial, RDP etc)","commit_id":"2e3f447f28118e0a3daeef9b7a91018fb1a43ead"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"7f08801b7847afad2a4d160496c46646847144e2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     paul-carlton2 \u003cpaul.carlton2@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-09-09 18:15:59 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Mask the token used to allow access to vnc console"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Use oslo_utils strutils.mask_password to mask token field"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a2ca52d_06041115","line":7,"in_reply_to":"ba15a1d1_3a954f86","updated":"2015-10-14 11:21:47.000000000","message":"Done","commit_id":"2e3f447f28118e0a3daeef9b7a91018fb1a43ead"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1fe41db2e39b6d5d50aa90c3824f633061598900","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Parent:     1a226aaa (Merge \"Update compute rpc version alias for train\")"},{"line_number":2,"context_line":"Author:     Balazs Gibizer \u003cbalazs.gibizer@est.tech\u003e"},{"line_number":3,"context_line":"AuthorDate: 2019-08-23 15:51:34 +0200"},{"line_number":4,"context_line":"Commit:     Balazs Gibizer \u003cbalazs.gibizer@est.tech\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-10-16 12:53:04 +0000"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":37,"id":"3fa7e38b_aee35834","line":2,"updated":"2019-10-17 20:45:09.000000000","message":"This is wrong yeah? Probably a rebase snafu.","commit_id":"95a0fcd16e318f023dff382cf152f5a6705b4180"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d047462d66f8e61bb667921e8026c9c4cd10d08e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Parent:     1a226aaa (Merge \"Update compute rpc version alias for train\")"},{"line_number":2,"context_line":"Author:     Balazs Gibizer \u003cbalazs.gibizer@est.tech\u003e"},{"line_number":3,"context_line":"AuthorDate: 2019-08-23 15:51:34 +0200"},{"line_number":4,"context_line":"Commit:     Balazs Gibizer \u003cbalazs.gibizer@est.tech\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-10-16 12:53:04 +0000"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":37,"id":"3fa7e38b_5a8e93d1","line":2,"in_reply_to":"3fa7e38b_aee35834","updated":"2019-10-28 11:25:46.000000000","message":"I don\u0027t remember what I did when I took over this 2 years old patch that reset the author of the commit but as far as I see I attributed the original authors below.","commit_id":"95a0fcd16e318f023dff382cf152f5a6705b4180"}],"nova/console/websocketproxy.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4711690fcf9b5d5fcdd85bea1fd40b0558ce91c","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        rpcapi \u003d consoleauth_rpcapi.ConsoleAuthAPI()"},{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003dtoken)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Verify Origin"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_0cb8dae7","line":107,"updated":"2015-09-08 14:27:43.000000000","message":"Isn\u0027t it kind of pointless scrubbing the token from the logs when we actually expose it in an exception?","commit_id":"86a4dbad81efdd9fa7648f5efbdd33dba4013672"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"a9232745e403ed3d94188ba61d5e52067f6d9b70","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        rpcapi \u003d consoleauth_rpcapi.ConsoleAuthAPI()"},{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003dtoken)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Verify Origin"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_271b7982","line":107,"in_reply_to":"da20952f_0cb8dae7","updated":"2015-09-08 14:55:34.000000000","message":"Done","commit_id":"86a4dbad81efdd9fa7648f5efbdd33dba4013672"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4711690fcf9b5d5fcdd85bea1fd40b0558ce91c","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                raise exception.ValidationError(detail\u003ddetail)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        self.msg(_(\u0027connect info: %s\u0027),"},{"line_number":137,"context_line":"                 str(strutils.mask_password(connect_info)))"},{"line_number":138,"context_line":"        host \u003d connect_info[\u0027host\u0027]"},{"line_number":139,"context_line":"        port \u003d int(connect_info[\u0027port\u0027])"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_ec37a64b","line":137,"updated":"2015-09-08 14:27:43.000000000","message":"In the bug report, access_url also has the token in it and you\u0027re not handling that in the oslo.utils change so this is incomplete.","commit_id":"86a4dbad81efdd9fa7648f5efbdd33dba4013672"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"a9232745e403ed3d94188ba61d5e52067f6d9b70","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                raise exception.ValidationError(detail\u003ddetail)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        self.msg(_(\u0027connect info: %s\u0027),"},{"line_number":137,"context_line":"                 str(strutils.mask_password(connect_info)))"},{"line_number":138,"context_line":"        host \u003d connect_info[\u0027host\u0027]"},{"line_number":139,"context_line":"        port \u003d int(connect_info[\u0027port\u0027])"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_e76b40b8","line":137,"in_reply_to":"da20952f_ec37a64b","updated":"2015-09-08 14:55:34.000000000","message":"This is handled by the current implementation of strutils.mask_password because it parses the token\u003d... in the access_url and sanitizes the token value, test updated to demonstrate this","commit_id":"86a4dbad81efdd9fa7648f5efbdd33dba4013672"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3bb2411ade1f7e2a322c9a58912b82db5e680d9","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003d\u0027***\u0027)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Verify Origin"},{"line_number":111,"context_line":"        expected_origin_hostname \u003d self.headers.getheader(\u0027Host\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_c6db957c","line":108,"updated":"2015-09-08 18:27:45.000000000","message":"This basically makes the error message useless:\n\nmsg_fmt \u003d _(\"The token \u0027%(token)s\u0027 is invalid or has expired\")\n\nSo we should think about what to do here - either scrub the token from the error message or re-word the error message, but we\u0027re also in string freeze so changing translated error messages right now is tricky.","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"20be8c13a92c343e7b4f22ad468793e9a084cf49","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003d\u0027***\u0027)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Verify Origin"},{"line_number":111,"context_line":"        expected_origin_hostname \u003d self.headers.getheader(\u0027Host\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_f6ed07b8","line":108,"in_reply_to":"da20952f_c6db957c","updated":"2015-09-09 14:34:25.000000000","message":"If we can\u0027t change the wording now, we could either leave this till the freeze is over or just live with the message format and fix it in a separate change later?","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef4dce9a8caba0030390927fe1e8d98d76180aa6","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003d\u0027***\u0027)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Verify Origin"},{"line_number":111,"context_line":"        expected_origin_hostname \u003d self.headers.getheader(\u0027Host\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_87bed2ac","line":108,"updated":"2015-09-09 15:00:09.000000000","message":"lets drop the token parameter","commit_id":"fd1cf49f3695a545cc0347fad1f0f9e12e8ff01c"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"9521b722bf38a6765ea72cd8055df46a40d2f52a","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003d\u0027***\u0027)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Verify Origin"},{"line_number":111,"context_line":"        expected_origin_hostname \u003d self.headers.getheader(\u0027Host\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_8ad577e6","line":108,"in_reply_to":"da20952f_87bed2ac","updated":"2015-09-09 15:20:48.000000000","message":"Not sure I follow, if I remove the token\u003d from the exception call it will fail with astring format error?","commit_id":"fd1cf49f3695a545cc0347fad1f0f9e12e8ff01c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3c94e1449531cc772b8f6ec7d44c944b7018c954","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003d\u0027***\u0027)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Verify Origin"},{"line_number":111,"context_line":"        expected_origin_hostname \u003d self.headers.getheader(\u0027Host\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_d7d5c5e4","line":108,"updated":"2015-10-09 15:03:54.000000000","message":"If we\u0027re going to just mask the kwarg to this exception everywhere it\u0027s used, we should probably just remove the kwarg from the exception altogether.  It\u0027s useless to have it in there if we just mask it.","commit_id":"2e3f447f28118e0a3daeef9b7a91018fb1a43ead"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"7f08801b7847afad2a4d160496c46646847144e2","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003d\u0027***\u0027)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Verify Origin"},{"line_number":111,"context_line":"        expected_origin_hostname \u003d self.headers.getheader(\u0027Host\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_8946f221","line":108,"in_reply_to":"7a2fa921_d7d5c5e4","updated":"2015-10-14 11:21:47.000000000","message":"Now mitaka is open I guess I can change this, I was told we couldn\u0027t change this in liberty due to freeze.  However if I need to back port these changes then we\u0027d have to keep the token parameter for back port. Another idea is to only mask part of the token so that it is not compromised but it can still be identified.","commit_id":"2e3f447f28118e0a3daeef9b7a91018fb1a43ead"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"051a31202c1d0b0d8ee7d0310739cf2e5dad06c8","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                raise exception.ValidationError(detail\u003ddetail)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        self.msg(_(\u0027connect info: %s\u0027),"},{"line_number":137,"context_line":"                 str(strutils.mask_password(connect_info)))"},{"line_number":138,"context_line":"        host \u003d connect_info[\u0027host\u0027]"},{"line_number":139,"context_line":"        port \u003d int(connect_info[\u0027port\u0027])"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_f799e1c4","line":137,"updated":"2015-10-09 14:54:20.000000000","message":"connect_info is a dict, strutils.mask_password takes a string, so you\u0027re passing in the wrong thing here, I think you meant:\n\nstrutils.mask_password(str(connect_info))\n\nThe unit tests must be mocking out mask_password here?  Or using the wrong type for connect_info.  Or it just doesn\u0027t fail because of:\n\nhttps://github.com/openstack/oslo.utils/blob/master/oslo_utils/strutils.py#L237","commit_id":"2e3f447f28118e0a3daeef9b7a91018fb1a43ead"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"7f08801b7847afad2a4d160496c46646847144e2","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                raise exception.ValidationError(detail\u003ddetail)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        self.msg(_(\u0027connect info: %s\u0027),"},{"line_number":137,"context_line":"                 str(strutils.mask_password(connect_info)))"},{"line_number":138,"context_line":"        host \u003d connect_info[\u0027host\u0027]"},{"line_number":139,"context_line":"        port \u003d int(connect_info[\u0027port\u0027])"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_4949ba30","line":137,"in_reply_to":"7a2fa921_f799e1c4","updated":"2015-10-14 11:21:47.000000000","message":"Done","commit_id":"2e3f447f28118e0a3daeef9b7a91018fb1a43ead"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"29495f44d53af9f9aa2edf0dc55b162db3f30126","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":104,"context_line":"        rpcapi \u003d consoleauth_rpcapi.ConsoleAuthAPI()"},{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003d\u0027***\u0027)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a2ca52d_8b852608","line":106,"updated":"2015-10-16 03:41:48.000000000","message":"secret \u003d token[:8] + \u0027***\u0027","commit_id":"e0104999a53a1b2150979fb8a0141ae2c81775c3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8fe4cd58bc84fc4d08ab29eef543a7c1a9c69816","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003d\u0027***\u0027)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Verify Origin"},{"line_number":111,"context_line":"        expected_origin_hostname \u003d self.headers.getheader(\u0027Host\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a2ca52d_95d36538","line":108,"updated":"2015-10-14 12:03:24.000000000","message":"why do we need to pass the token? can we just remove this from the exception. It is kind of pointless","commit_id":"e0104999a53a1b2150979fb8a0141ae2c81775c3"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"29495f44d53af9f9aa2edf0dc55b162db3f30126","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        connect_info \u003d rpcapi.check_token(ctxt, token\u003dtoken)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not connect_info:"},{"line_number":108,"context_line":"            raise exception.InvalidToken(token\u003d\u0027***\u0027)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        # Verify Origin"},{"line_number":111,"context_line":"        expected_origin_hostname \u003d self.headers.getheader(\u0027Host\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a2ca52d_6b80caf7","line":108,"in_reply_to":"5a2ca52d_95d36538","updated":"2015-10-16 03:41:48.000000000","message":"raise exception.InvalidToken(token\u003dsecret)","commit_id":"e0104999a53a1b2150979fb8a0141ae2c81775c3"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"29495f44d53af9f9aa2edf0dc55b162db3f30126","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                raise exception.ValidationError(detail\u003ddetail)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        self.msg(_(\u0027connect info: %s\u0027),"},{"line_number":137,"context_line":"                 str(strutils.mask_password(str(connect_info))))"},{"line_number":138,"context_line":"        host \u003d connect_info[\u0027host\u0027]"},{"line_number":139,"context_line":"        port \u003d int(connect_info[\u0027port\u0027])"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a2ca52d_ab910249","line":137,"updated":"2015-10-16 03:41:48.000000000","message":"str(strutils.mask_password(str(connect_info), secret)))","commit_id":"e0104999a53a1b2150979fb8a0141ae2c81775c3"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"6f3afa9b28d25943d4c808e9ddbf5d515033bcff","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                raise exception.ValidationError(detail\u003ddetail)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self.msg(_(\u0027connect info: %s\u0027),"},{"line_number":132,"context_line":"                 str(strutils.mask_password(str(connect_info), secret)))"},{"line_number":133,"context_line":"        host \u003d connect_info[\u0027host\u0027]"},{"line_number":134,"context_line":"        port \u003d int(connect_info[\u0027port\u0027])"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"dada55a8_8e46e478","line":132,"range":{"start_line":132,"start_character":48,"end_line":132,"end_character":60},"updated":"2016-07-21 14:12:40.000000000","message":"hmm what type is connect_info? I\u0027m surprised we need the innermost str()","commit_id":"ba87fbfeda4ef0d426cf648208a354747e0b0ac8"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"7bb5d8d52a77c23272d595ade236b0e42b1ad7bd","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                raise exception.ValidationError(detail\u003ddetail)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self.msg(_(\u0027connect info: %s\u0027),"},{"line_number":132,"context_line":"                 str(strutils.mask_password(str(connect_info), secret)))"},{"line_number":133,"context_line":"        host \u003d connect_info[\u0027host\u0027]"},{"line_number":134,"context_line":"        port \u003d int(connect_info[\u0027port\u0027])"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"bacf61ea_246e6495","line":132,"range":{"start_line":132,"start_character":48,"end_line":132,"end_character":60},"in_reply_to":"dada55a8_8e46e478","updated":"2016-07-29 11:17:59.000000000","message":"it is a dictionary","commit_id":"ba87fbfeda4ef0d426cf648208a354747e0b0ac8"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"fd8ed674f7f06ccbfaa1b53a287e82df08ccc780","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                raise exception.ValidationError(detail\u003ddetail)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        self.msg(_(\u0027connect info: %s\u0027),"},{"line_number":141,"context_line":"                 str(strutils.mask_password(str(connect_info), secret)))"},{"line_number":142,"context_line":"        host \u003d connect_info[\u0027host\u0027]"},{"line_number":143,"context_line":"        port \u003d int(connect_info[\u0027port\u0027])"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ff0f0b1f_0cbf4ad1","line":141,"updated":"2017-05-24 18:56:40.000000000","message":"if connect_info ever includes a secret of a type other than token (e.g. password) that mask_password looks for, you\u0027d be replacing that with the masked token instead of masking the password or whatever it is. But I guess that\u0027s unlikely.","commit_id":"a21cc47f6a58ad89b7ef9979d0c365acf5119ea6"},{"author":{"_account_id":19853,"name":"Nguyen Hung Phuong","email":"phuongnh@vn.fujitsu.com","username":"phuongnh"},"change_message_id":"c98bfe0fdedd546988443f94cefaa5c4b84b7431","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from oslo_log import log as logging"},{"line_number":25,"context_line":"import six"},{"line_number":26,"context_line":"from oslo_utils import strutils"},{"line_number":27,"context_line":"from six.moves import http_cookies as Cookie"},{"line_number":28,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":29,"context_line":"import websockify"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f4b6375_141b44ca","line":26,"updated":"2017-11-02 03:14:50.000000000","message":"should be moved 1 line above.","commit_id":"39584aaf316ae5123ea623622b49004231669297"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"1528172b95a609b814fd834ed1565e36ee06c992","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from oslo_log import log as logging"},{"line_number":25,"context_line":"import six"},{"line_number":26,"context_line":"from oslo_utils import strutils"},{"line_number":27,"context_line":"from six.moves import http_cookies as Cookie"},{"line_number":28,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":29,"context_line":"import websockify"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f4b6375_5dce7f5a","line":26,"in_reply_to":"3f4b6375_141b44ca","updated":"2017-11-02 06:02:17.000000000","message":"Done","commit_id":"39584aaf316ae5123ea623622b49004231669297"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a0da1f970fab988ae3c43466ca80574fbf434530","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright (c) 2012 OpenStack Foundation"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":38,"id":"3fa7e38b_64de8611","line":2,"updated":"2019-11-14 01:07:10.000000000","message":"Unrelated rebase damage?","commit_id":"d659d3bc94b0e7cbcbb4278b5abf09659a6dd7b2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7ff58ea75801cb85d932d0fd54bb887cc910f0dc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright (c) 2012 OpenStack Foundation"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":38,"id":"3fa7e38b_0b792f2f","line":2,"in_reply_to":"3fa7e38b_64de8611","updated":"2019-11-27 13:29:26.000000000","message":"Done","commit_id":"d659d3bc94b0e7cbcbb4278b5abf09659a6dd7b2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"def02dbb0c3377deba8d54f6e3f79e2e50c30ab6","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                detail \u003d _(\"Origin header protocol does not match this host.\")"},{"line_number":222,"context_line":"                raise exception.ValidationError(detail\u003ddetail)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        sanitized_info \u003d copy.copy(connect_info)"},{"line_number":225,"context_line":"        sanitized_info.token \u003d \u0027***\u0027"},{"line_number":226,"context_line":"        self.msg(_(\u0027connect info: %s\u0027), sanitized_info)"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"3fa7e38b_0fd60af4","line":224,"range":{"start_line":224,"start_character":25,"end_line":224,"end_character":34},"updated":"2019-11-28 12:09:23.000000000","message":"No nested objects in the \u0027ConsoleAuthToken\u0027 object, so this is good.","commit_id":"26d4047e17eba9bc271f8868f1d0ffeec97b555e"}],"nova/consoleauth/manager.py":[{"author":{"_account_id":16839,"name":"Cale Rath","email":"ctrath@us.ibm.com","username":"ctrath"},"change_message_id":"fead6a45b0e6a74af54d131747985c4aeab658af","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # instance to not be usable."},{"line_number":85,"context_line":"        if not self.mc.set(token.encode(\u0027UTF-8\u0027),"},{"line_number":86,"context_line":"                           data, CONF.console_token_ttl):"},{"line_number":87,"context_line":"            LOG.warning(_LW(\"Token: %(token)s failed to save into memcached.\"),"},{"line_number":88,"context_line":"                        {\u0027token\u0027: token})"},{"line_number":89,"context_line":"        tokens \u003d self._get_tokens_for_instance(instance_uuid)"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_e2786a80","line":87,"updated":"2015-09-04 20:45:24.000000000","message":"Don\u0027t we want to mask here too?","commit_id":"497cd76f7eba961e9186cd0c03e0fe9cff2b7423"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"80f43dd84d485d5b6adf945823814c58a964df32","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # instance to not be usable."},{"line_number":85,"context_line":"        if not self.mc.set(token.encode(\u0027UTF-8\u0027),"},{"line_number":86,"context_line":"                           data, CONF.console_token_ttl):"},{"line_number":87,"context_line":"            LOG.warning(_LW(\"Token: %(token)s failed to save into memcached.\"),"},{"line_number":88,"context_line":"                        {\u0027token\u0027: token})"},{"line_number":89,"context_line":"        tokens \u003d self._get_tokens_for_instance(instance_uuid)"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_3eae5a81","line":87,"in_reply_to":"da20952f_e2786a80","updated":"2015-09-07 14:54:06.000000000","message":"Done","commit_id":"497cd76f7eba961e9186cd0c03e0fe9cff2b7423"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4711690fcf9b5d5fcdd85bea1fd40b0558ce91c","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            LOG.warning(_LW(\"Instance: %(instance_uuid)s failed to save \""},{"line_number":98,"context_line":"                            \"into memcached\"),"},{"line_number":99,"context_line":"                        {\u0027instance_uuid\u0027: instance_uuid})"},{"line_number":100,"context_line":"        "},{"line_number":101,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":102,"context_line":"                 {\u0027token\u0027: \u0027***\u0027,"},{"line_number":103,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(token_dict)})"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_ec5a46f2","line":100,"updated":"2015-09-08 14:27:43.000000000","message":"Fix this whitespace issue.","commit_id":"86a4dbad81efdd9fa7648f5efbdd33dba4013672"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"a9232745e403ed3d94188ba61d5e52067f6d9b70","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            LOG.warning(_LW(\"Instance: %(instance_uuid)s failed to save \""},{"line_number":98,"context_line":"                            \"into memcached\"),"},{"line_number":99,"context_line":"                        {\u0027instance_uuid\u0027: instance_uuid})"},{"line_number":100,"context_line":"        "},{"line_number":101,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":102,"context_line":"                 {\u0027token\u0027: \u0027***\u0027,"},{"line_number":103,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(token_dict)})"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_0748b589","line":100,"in_reply_to":"da20952f_ec5a46f2","updated":"2015-09-08 14:55:34.000000000","message":"Done","commit_id":"86a4dbad81efdd9fa7648f5efbdd33dba4013672"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3bb2411ade1f7e2a322c9a58912b82db5e680d9","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        token_str \u003d self.mc.get(token.encode(\u0027UTF-8\u0027))"},{"line_number":126,"context_line":"        token_valid \u003d (token_str is not None)"},{"line_number":127,"context_line":"        LOG.info(_LI(\"Checking Token: %(token)s, %(token_valid)s\"),"},{"line_number":128,"context_line":"                  {\u0027token\u0027: \u0027***\u0027, \u0027token_valid\u0027: token_valid})"},{"line_number":129,"context_line":"        if token_valid:"},{"line_number":130,"context_line":"            token \u003d jsonutils.loads(token_str)"},{"line_number":131,"context_line":"            if self._validate_token(context, token):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_e6e25901","line":128,"updated":"2015-09-08 18:27:45.000000000","message":"Where is this tested?","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"20be8c13a92c343e7b4f22ad468793e9a084cf49","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        token_str \u003d self.mc.get(token.encode(\u0027UTF-8\u0027))"},{"line_number":126,"context_line":"        token_valid \u003d (token_str is not None)"},{"line_number":127,"context_line":"        LOG.info(_LI(\"Checking Token: %(token)s, %(token_valid)s\"),"},{"line_number":128,"context_line":"                  {\u0027token\u0027: \u0027***\u0027, \u0027token_valid\u0027: token_valid})"},{"line_number":129,"context_line":"        if token_valid:"},{"line_number":130,"context_line":"            token \u003d jsonutils.loads(token_str)"},{"line_number":131,"context_line":"            if self._validate_token(context, token):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_04f5e0eb","line":128,"in_reply_to":"da20952f_e6e25901","updated":"2015-09-09 14:34:25.000000000","message":"Done","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef4dce9a8caba0030390927fe1e8d98d76180aa6","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        if not self.mc.set(token.encode(\u0027UTF-8\u0027),"},{"line_number":86,"context_line":"                           data, CONF.console_token_ttl):"},{"line_number":87,"context_line":"            LOG.warning(_LW(\"Token: %(token)s failed to save into memcached.\"),"},{"line_number":88,"context_line":"                        {\u0027token\u0027: \u0027***\u0027})"},{"line_number":89,"context_line":"        tokens \u003d self._get_tokens_for_instance(instance_uuid)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        # Remove the expired tokens from cache."}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_27034678","line":88,"updated":"2015-09-09 15:00:09.000000000","message":"same here. kind of just seems pointless to log ***","commit_id":"fd1cf49f3695a545cc0347fad1f0f9e12e8ff01c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef4dce9a8caba0030390927fe1e8d98d76180aa6","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                        {\u0027instance_uuid\u0027: instance_uuid})"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":102,"context_line":"                 {\u0027token\u0027: \u0027***\u0027,"},{"line_number":103,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(token_dict)})"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _validate_token(self, context, token):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_c7f28a9b","line":102,"updated":"2015-09-09 15:00:09.000000000","message":"ditto","commit_id":"fd1cf49f3695a545cc0347fad1f0f9e12e8ff01c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ef4dce9a8caba0030390927fe1e8d98d76180aa6","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        token_str \u003d self.mc.get(token.encode(\u0027UTF-8\u0027))"},{"line_number":126,"context_line":"        token_valid \u003d (token_str is not None)"},{"line_number":127,"context_line":"        LOG.info(_LI(\"Checking Token: %(token)s, %(token_valid)s\"),"},{"line_number":128,"context_line":"                  {\u0027token\u0027: \u0027***\u0027, \u0027token_valid\u0027: token_valid})"},{"line_number":129,"context_line":"        if token_valid:"},{"line_number":130,"context_line":"            token \u003d jsonutils.loads(token_str)"},{"line_number":131,"context_line":"            if self._validate_token(context, token):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_472d1afc","line":128,"updated":"2015-09-09 15:00:09.000000000","message":"ditto","commit_id":"fd1cf49f3695a545cc0347fad1f0f9e12e8ff01c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3c94e1449531cc772b8f6ec7d44c944b7018c954","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":102,"context_line":"                 {\u0027token\u0027: \u0027***\u0027,"},{"line_number":103,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(token_dict)})"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _validate_token(self, context, token):"},{"line_number":106,"context_line":"        instance_uuid \u003d token[\u0027instance_uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a2fa921_d74865b5","line":103,"updated":"2015-10-09 15:03:54.000000000","message":"Here also, mask_password takes a string, not a dict.","commit_id":"2e3f447f28118e0a3daeef9b7a91018fb1a43ead"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"7f08801b7847afad2a4d160496c46646847144e2","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":102,"context_line":"                 {\u0027token\u0027: \u0027***\u0027,"},{"line_number":103,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(token_dict)})"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _validate_token(self, context, token):"},{"line_number":106,"context_line":"        instance_uuid \u003d token[\u0027instance_uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_695836fb","line":103,"in_reply_to":"7a2fa921_d74865b5","updated":"2015-10-14 11:21:47.000000000","message":"Done","commit_id":"2e3f447f28118e0a3daeef9b7a91018fb1a43ead"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8fe4cd58bc84fc4d08ab29eef543a7c1a9c69816","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        if not self.mc.set(token.encode(\u0027UTF-8\u0027),"},{"line_number":86,"context_line":"                           data, CONF.console_token_ttl):"},{"line_number":87,"context_line":"            LOG.warning(_LW(\"Token: %(token)s failed to save into memcached.\"),"},{"line_number":88,"context_line":"                        {\u0027token\u0027: \u0027***\u0027})"},{"line_number":89,"context_line":"        tokens \u003d self._get_tokens_for_instance(instance_uuid)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        # Remove the expired tokens from cache."}],"source_content_type":"text/x-python","patch_set":7,"id":"5a2ca52d_55ddcd40","line":88,"updated":"2015-10-14 12:03:24.000000000","message":"ditto","commit_id":"e0104999a53a1b2150979fb8a0141ae2c81775c3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8fe4cd58bc84fc4d08ab29eef543a7c1a9c69816","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                        {\u0027instance_uuid\u0027: instance_uuid})"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":102,"context_line":"                 {\u0027token\u0027: \u0027***\u0027,"},{"line_number":103,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(str(token_dict))})"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _validate_token(self, context, token):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a2ca52d_15e8b5e1","line":102,"updated":"2015-10-14 12:03:24.000000000","message":"lets just remove the token","commit_id":"e0104999a53a1b2150979fb8a0141ae2c81775c3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8fe4cd58bc84fc4d08ab29eef543a7c1a9c69816","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        token_str \u003d self.mc.get(token.encode(\u0027UTF-8\u0027))"},{"line_number":126,"context_line":"        token_valid \u003d (token_str is not None)"},{"line_number":127,"context_line":"        LOG.info(_LI(\"Checking Token: %(token)s, %(token_valid)s\"),"},{"line_number":128,"context_line":"                  {\u0027token\u0027: \u0027***\u0027, \u0027token_valid\u0027: token_valid})"},{"line_number":129,"context_line":"        if token_valid:"},{"line_number":130,"context_line":"            token \u003d jsonutils.loads(token_str)"},{"line_number":131,"context_line":"            if self._validate_token(context, token):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a2ca52d_35e5b108","line":128,"updated":"2015-10-14 12:03:24.000000000","message":"ditto","commit_id":"e0104999a53a1b2150979fb8a0141ae2c81775c3"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b62e657e10331f8494b69c00ce55dfad5f2e605","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if not self.mc.set(token.encode(\u0027UTF-8\u0027),"},{"line_number":93,"context_line":"                           data, CONF.console_token_ttl):"},{"line_number":94,"context_line":"            LOG.warning(_LW(\"Token: %(token)s failed to save into memcached.\"),"},{"line_number":95,"context_line":"                        {\u0027token\u0027: secret})"},{"line_number":96,"context_line":"        tokens \u003d self._get_tokens_for_instance(instance_uuid)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        # Remove the expired tokens from cache."}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_0052fa13","line":95,"updated":"2016-01-27 11:24:13.000000000","message":"is it really useful to report the redacted token here?","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"740eaf867db9cf9ae66c978c40547ce364da79d7","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if not self.mc.set(token.encode(\u0027UTF-8\u0027),"},{"line_number":93,"context_line":"                           data, CONF.console_token_ttl):"},{"line_number":94,"context_line":"            LOG.warning(_LW(\"Token: %(token)s failed to save into memcached.\"),"},{"line_number":95,"context_line":"                        {\u0027token\u0027: secret})"},{"line_number":96,"context_line":"        tokens \u003d self._get_tokens_for_instance(instance_uuid)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        # Remove the expired tokens from cache."}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_e049de8f","line":95,"in_reply_to":"7a5de9d1_0052fa13","updated":"2016-01-27 11:56:46.000000000","message":"In a word \u0027Yes\u0027.  The point of redaction rather then removing is to make debugging consoleauth access *possible* from the logs.\n\nI agree that there is an open question as to the method of redaction BUT we need something.","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"95d93f31db1e01654f5c9e044ac83f2011c78522","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if not self.mc.set(token.encode(\u0027UTF-8\u0027),"},{"line_number":93,"context_line":"                           data, CONF.console_token_ttl):"},{"line_number":94,"context_line":"            LOG.warning(_LW(\"Token: %(token)s failed to save into memcached.\"),"},{"line_number":95,"context_line":"                        {\u0027token\u0027: secret})"},{"line_number":96,"context_line":"        tokens \u003d self._get_tokens_for_instance(instance_uuid)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        # Remove the expired tokens from cache."}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_40d8f21d","line":95,"in_reply_to":"7a5de9d1_0052fa13","updated":"2016-01-27 12:07:39.000000000","message":"Token is only partially redacted so the token can be identified without exposing the complete token","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b62e657e10331f8494b69c00ce55dfad5f2e605","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                        {\u0027instance_uuid\u0027: instance_uuid})"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":109,"context_line":"                 {\u0027token\u0027: secret,"},{"line_number":110,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(str(token_dict),"},{"line_number":111,"context_line":"                                                       secret)})"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_204b765b","line":109,"range":{"start_line":109,"start_character":16,"end_line":109,"end_character":34},"updated":"2016-01-27 11:24:13.000000000","message":"same as above","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"95d93f31db1e01654f5c9e044ac83f2011c78522","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                        {\u0027instance_uuid\u0027: instance_uuid})"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":109,"context_line":"                 {\u0027token\u0027: secret,"},{"line_number":110,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(str(token_dict),"},{"line_number":111,"context_line":"                                                       secret)})"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_00099a95","line":109,"range":{"start_line":109,"start_character":16,"end_line":109,"end_character":34},"in_reply_to":"7a5de9d1_204b765b","updated":"2016-01-27 12:07:39.000000000","message":"as above, see earlier review comments, people agreed that with a totally redacted token some of the messages became pointless so we did partial redaction so the messages could be retained and the token be identifiable but not exposed","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"740eaf867db9cf9ae66c978c40547ce364da79d7","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                        {\u0027instance_uuid\u0027: instance_uuid})"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":109,"context_line":"                 {\u0027token\u0027: secret,"},{"line_number":110,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(str(token_dict),"},{"line_number":111,"context_line":"                                                       secret)})"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_20585656","line":109,"range":{"start_line":109,"start_character":16,"end_line":109,"end_character":34},"in_reply_to":"7a5de9d1_204b765b","updated":"2016-01-27 11:56:46.000000000","message":"same as above :)","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"9dae3cf53f9d584af9a17466cef13e736cd95739","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":109,"context_line":"                 {\u0027token\u0027: secret,"},{"line_number":110,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(str(token_dict),"},{"line_number":111,"context_line":"                                                       secret)})"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _validate_token(self, context, token):"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_efd79121","line":110,"range":{"start_line":110,"start_character":55,"end_line":110,"end_character":70},"updated":"2016-01-27 10:52:15.000000000","message":"why not use \u0027data\u0027 here?","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"95d93f31db1e01654f5c9e044ac83f2011c78522","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":109,"context_line":"                 {\u0027token\u0027: secret,"},{"line_number":110,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(str(token_dict),"},{"line_number":111,"context_line":"                                                       secret)})"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _validate_token(self, context, token):"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_a0fd2670","line":110,"range":{"start_line":110,"start_character":55,"end_line":110,"end_character":70},"in_reply_to":"7a5de9d1_efd79121","updated":"2016-01-27 12:07:39.000000000","message":"Done","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"740eaf867db9cf9ae66c978c40547ce364da79d7","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":109,"context_line":"                 {\u0027token\u0027: secret,"},{"line_number":110,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(str(token_dict),"},{"line_number":111,"context_line":"                                                       secret)})"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _validate_token(self, context, token):"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_bbe1db00","line":110,"range":{"start_line":110,"start_character":55,"end_line":110,"end_character":70},"in_reply_to":"7a5de9d1_efd79121","updated":"2016-01-27 11:56:46.000000000","message":"No really good reason.  I guess it was to minimise the diff.  As this keeps the \u0027token_dict\u0027","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b62e657e10331f8494b69c00ce55dfad5f2e605","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        token_valid \u003d (token_str is not None)"},{"line_number":135,"context_line":"        secret \u003d utils.mask_token(token)"},{"line_number":136,"context_line":"        LOG.info(_LI(\"Checking Token: %(token)s, %(token_valid)s\"),"},{"line_number":137,"context_line":"                  {\u0027token\u0027: secret, \u0027token_valid\u0027: token_valid})"},{"line_number":138,"context_line":"        if token_valid:"},{"line_number":139,"context_line":"            token \u003d jsonutils.loads(token_str)"},{"line_number":140,"context_line":"            if self._validate_token(context, token):"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_80658ae2","line":137,"updated":"2016-01-27 11:24:13.000000000","message":"same as above","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"740eaf867db9cf9ae66c978c40547ce364da79d7","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        token_valid \u003d (token_str is not None)"},{"line_number":135,"context_line":"        secret \u003d utils.mask_token(token)"},{"line_number":136,"context_line":"        LOG.info(_LI(\"Checking Token: %(token)s, %(token_valid)s\"),"},{"line_number":137,"context_line":"                  {\u0027token\u0027: secret, \u0027token_valid\u0027: token_valid})"},{"line_number":138,"context_line":"        if token_valid:"},{"line_number":139,"context_line":"            token \u003d jsonutils.loads(token_str)"},{"line_number":140,"context_line":"            if self._validate_token(context, token):"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_1bf10fce","line":137,"in_reply_to":"7a5de9d1_80658ae2","updated":"2016-01-27 11:56:46.000000000","message":"Same as above :)","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"95d93f31db1e01654f5c9e044ac83f2011c78522","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        token_valid \u003d (token_str is not None)"},{"line_number":135,"context_line":"        secret \u003d utils.mask_token(token)"},{"line_number":136,"context_line":"        LOG.info(_LI(\"Checking Token: %(token)s, %(token_valid)s\"),"},{"line_number":137,"context_line":"                  {\u0027token\u0027: secret, \u0027token_valid\u0027: token_valid})"},{"line_number":138,"context_line":"        if token_valid:"},{"line_number":139,"context_line":"            token \u003d jsonutils.loads(token_str)"},{"line_number":140,"context_line":"            if self._validate_token(context, token):"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_1b34afdc","line":137,"in_reply_to":"7a5de9d1_80658ae2","updated":"2016-01-27 12:07:39.000000000","message":"see above","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"7276b9bd2474259087d24ebbdd24c9ed39fa726d","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.mc_instance.set(instance_uuid.encode(\u0027UTF-8\u0027),"},{"line_number":105,"context_line":"                             jsonutils.dumps(tokens))"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":108,"context_line":"                 {\u0027token\u0027: secret,"},{"line_number":109,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(str(data),"},{"line_number":110,"context_line":"                                                       secret)})"}],"source_content_type":"text/x-python","patch_set":20,"id":"dada55a8_5cabaf1d","line":107,"updated":"2016-07-18 19:44:47.000000000","message":"s/info/debug/","commit_id":"881315de58cccb90aa9b40b049575055696be51a"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"7276b9bd2474259087d24ebbdd24c9ed39fa726d","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        token_str \u003d self.mc.get(token.encode(\u0027UTF-8\u0027))"},{"line_number":133,"context_line":"        token_valid \u003d (token_str is not None)"},{"line_number":134,"context_line":"        secret \u003d utils.mask_token(token)"},{"line_number":135,"context_line":"        LOG.info(_LI(\"Checking Token: %(token)s, %(token_valid)s\"),"},{"line_number":136,"context_line":"                  {\u0027token\u0027: secret, \u0027token_valid\u0027: token_valid})"},{"line_number":137,"context_line":"        if token_valid:"},{"line_number":138,"context_line":"            token \u003d jsonutils.loads(token_str)"}],"source_content_type":"text/x-python","patch_set":20,"id":"dada55a8_dc6ddf05","line":135,"updated":"2016-07-18 19:44:47.000000000","message":"s/info/debug/","commit_id":"881315de58cccb90aa9b40b049575055696be51a"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"6f3afa9b28d25943d4c808e9ddbf5d515033bcff","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":108,"context_line":"                 {\u0027token\u0027: secret,"},{"line_number":109,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(str(data),"},{"line_number":110,"context_line":"                                                       secret)})"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _validate_token(self, context, token):"}],"source_content_type":"text/x-python","patch_set":21,"id":"dada55a8_6e3450fb","line":109,"range":{"start_line":109,"start_character":59,"end_line":109,"end_character":63},"updated":"2016-07-21 14:12:40.000000000","message":"data is already a str","commit_id":"ba87fbfeda4ef0d426cf648208a354747e0b0ac8"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"7bb5d8d52a77c23272d595ade236b0e42b1ad7bd","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":108,"context_line":"                 {\u0027token\u0027: secret,"},{"line_number":109,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(str(data),"},{"line_number":110,"context_line":"                                                       secret)})"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _validate_token(self, context, token):"}],"source_content_type":"text/x-python","patch_set":21,"id":"bacf61ea_4493984f","line":109,"range":{"start_line":109,"start_character":59,"end_line":109,"end_character":63},"in_reply_to":"dada55a8_6e3450fb","updated":"2016-07-29 11:17:59.000000000","message":"Done","commit_id":"ba87fbfeda4ef0d426cf648208a354747e0b0ac8"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"18e7d788888d36283edb8e2f17259592941315a5","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.mc_instance.set(instance_uuid.encode(\u0027UTF-8\u0027),"},{"line_number":105,"context_line":"                             jsonutils.dumps(tokens))"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        LOG.info(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":108,"context_line":"                 {\u0027token\u0027: secret,"},{"line_number":109,"context_line":"                  \u0027token_dict\u0027: strutils.mask_password(data,"},{"line_number":110,"context_line":"                                                       secret)})"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_518ce17e","line":107,"range":{"start_line":107,"start_character":12,"end_line":107,"end_character":16},"updated":"2016-12-05 15:39:57.000000000","message":"This should be debug only.","commit_id":"fef1e8fdfb414478f43702e13e8466e8efc97d0d"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"18e7d788888d36283edb8e2f17259592941315a5","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        token_str \u003d self.mc.get(token.encode(\u0027UTF-8\u0027))"},{"line_number":133,"context_line":"        token_valid \u003d (token_str is not None)"},{"line_number":134,"context_line":"        secret \u003d utils.mask_token(token)"},{"line_number":135,"context_line":"        LOG.info(_LI(\"Checking Token: %(token)s, %(token_valid)s\"),"},{"line_number":136,"context_line":"                  {\u0027token\u0027: secret, \u0027token_valid\u0027: token_valid})"},{"line_number":137,"context_line":"        if token_valid:"},{"line_number":138,"context_line":"            token \u003d jsonutils.loads(token_str)"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_b1c8d5a9","line":135,"range":{"start_line":135,"start_character":12,"end_line":135,"end_character":16},"updated":"2016-12-05 15:39:57.000000000","message":"This should be debug only.","commit_id":"fef1e8fdfb414478f43702e13e8466e8efc97d0d"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"fd8ed674f7f06ccbfaa1b53a287e82df08ccc780","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        self.mc_instance.set(instance_uuid.encode(\u0027UTF-8\u0027),"},{"line_number":106,"context_line":"                             jsonutils.dumps(tokens))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        LOG.debug(_LI(\"Received Token: %(token)s, %(token_dict)s\"),"},{"line_number":109,"context_line":"                  {\u0027token\u0027: secret,"},{"line_number":110,"context_line":"                   \u0027token_dict\u0027: strutils.mask_password(data,"},{"line_number":111,"context_line":"                                                        secret)})"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff0f0b1f_31282995","line":108,"range":{"start_line":108,"start_character":18,"end_line":108,"end_character":21},"updated":"2017-05-24 18:56:40.000000000","message":"_LI isn\u0027t applicable to debug logs. In fact, we no longer translate logs at all, so the _LI should simply be removed.","commit_id":"a21cc47f6a58ad89b7ef9979d0c365acf5119ea6"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"fd8ed674f7f06ccbfaa1b53a287e82df08ccc780","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        token_str \u003d self.mc.get(token.encode(\u0027UTF-8\u0027))"},{"line_number":138,"context_line":"        token_valid \u003d (token_str is not None)"},{"line_number":139,"context_line":"        secret \u003d utils.mask_token(token)"},{"line_number":140,"context_line":"        LOG.debug(_LI(\"Checking Token: %(token)s, %(token_valid)s\"),"},{"line_number":141,"context_line":"                  {\u0027token\u0027: secret, \u0027token_valid\u0027: token_valid})"},{"line_number":142,"context_line":"        if token_valid:"},{"line_number":143,"context_line":"            token \u003d jsonutils.loads(token_str)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ff0f0b1f_f11f5169","line":140,"range":{"start_line":140,"start_character":18,"end_line":140,"end_character":21},"updated":"2017-05-24 18:56:40.000000000","message":"another place to remove _LI","commit_id":"a21cc47f6a58ad89b7ef9979d0c365acf5119ea6"}],"nova/tests/unit/console/test_websocketproxy.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3bb2411ade1f7e2a322c9a58912b82db5e680d9","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        msgs \u003d self.wh.msg.call_args_list"},{"line_number":393,"context_line":"        checked \u003d False"},{"line_number":394,"context_line":"        for m in msgs:"},{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertTrue(str(m).find(\u0027123-456-789\u0027) \u003c 0)"},{"line_number":397,"context_line":"                checked \u003d True"},{"line_number":398,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_3015eb48","line":395,"updated":"2015-09-08 18:27:45.000000000","message":"assertNotIn would be cleaner here.","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3bb2411ade1f7e2a322c9a58912b82db5e680d9","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        msgs \u003d self.wh.msg.call_args_list"},{"line_number":393,"context_line":"        checked \u003d False"},{"line_number":394,"context_line":"        for m in msgs:"},{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertTrue(str(m).find(\u0027123-456-789\u0027) \u003c 0)"},{"line_number":397,"context_line":"                checked \u003d True"},{"line_number":398,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_330c153b","line":395,"updated":"2015-09-08 18:27:45.000000000","message":"if \u0027connect info\u0027 in str(m) is probably cleaner here.\n\nAlso, do we need to cast m to str?","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"20be8c13a92c343e7b4f22ad468793e9a084cf49","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        msgs \u003d self.wh.msg.call_args_list"},{"line_number":393,"context_line":"        checked \u003d False"},{"line_number":394,"context_line":"        for m in msgs:"},{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertTrue(str(m).find(\u0027123-456-789\u0027) \u003c 0)"},{"line_number":397,"context_line":"                checked \u003d True"},{"line_number":398,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_fb72d010","line":395,"in_reply_to":"da20952f_3015eb48","updated":"2015-09-09 14:34:25.000000000","message":"Done","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"20be8c13a92c343e7b4f22ad468793e9a084cf49","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        msgs \u003d self.wh.msg.call_args_list"},{"line_number":393,"context_line":"        checked \u003d False"},{"line_number":394,"context_line":"        for m in msgs:"},{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertTrue(str(m).find(\u0027123-456-789\u0027) \u003c 0)"},{"line_number":397,"context_line":"                checked \u003d True"},{"line_number":398,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_9b5e3478","line":395,"in_reply_to":"da20952f_330c153b","updated":"2015-09-09 14:34:25.000000000","message":"Done","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3bb2411ade1f7e2a322c9a58912b82db5e680d9","unresolved":false,"context_lines":[{"line_number":394,"context_line":"        for m in msgs:"},{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertTrue(str(m).find(\u0027123-456-789\u0027) \u003c 0)"},{"line_number":397,"context_line":"                checked \u003d True"},{"line_number":398,"context_line":"                break"},{"line_number":399,"context_line":"        self.assertEquals(True, checked,"},{"line_number":400,"context_line":"                          \"Failed to find connect info message\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_f3353ddb","line":397,"updated":"2015-09-08 18:27:45.000000000","message":"If you break on the first one, how do you know you filtered out both token and access_url?  Seems you should instead keep a counter and that should come out to 2 hits.","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"20be8c13a92c343e7b4f22ad468793e9a084cf49","unresolved":false,"context_lines":[{"line_number":394,"context_line":"        for m in msgs:"},{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertTrue(str(m).find(\u0027123-456-789\u0027) \u003c 0)"},{"line_number":397,"context_line":"                checked \u003d True"},{"line_number":398,"context_line":"                break"},{"line_number":399,"context_line":"        self.assertEquals(True, checked,"},{"line_number":400,"context_line":"                          \"Failed to find connect info message\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_d69d6367","line":397,"in_reply_to":"da20952f_f3353ddb","updated":"2015-09-09 14:34:25.000000000","message":"Done","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3bb2411ade1f7e2a322c9a58912b82db5e680d9","unresolved":false,"context_lines":[{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertTrue(str(m).find(\u0027123-456-789\u0027) \u003c 0)"},{"line_number":397,"context_line":"                checked \u003d True"},{"line_number":398,"context_line":"                break"},{"line_number":399,"context_line":"        self.assertEquals(True, checked,"},{"line_number":400,"context_line":"                          \"Failed to find connect info message\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_f30e9d31","line":398,"updated":"2015-09-08 18:27:45.000000000","message":"Just use assertTrue(checked, msg) here.","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"20be8c13a92c343e7b4f22ad468793e9a084cf49","unresolved":false,"context_lines":[{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertTrue(str(m).find(\u0027123-456-789\u0027) \u003c 0)"},{"line_number":397,"context_line":"                checked \u003d True"},{"line_number":398,"context_line":"                break"},{"line_number":399,"context_line":"        self.assertEquals(True, checked,"},{"line_number":400,"context_line":"                          \"Failed to find connect info message\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_b68b0f1e","line":398,"in_reply_to":"da20952f_f30e9d31","updated":"2015-09-09 14:34:25.000000000","message":"Done","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"9dae3cf53f9d584af9a17466cef13e736cd95739","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        self.wh.headers.getheader \u003d self._fake_getheader"},{"line_number":390,"context_line":"        self.wh.new_websocket_client()"},{"line_number":391,"context_line":"        self.assertTrue(self.wh.msg.called)"},{"line_number":392,"context_line":"        msgs \u003d self.wh.msg.call_args_list"},{"line_number":393,"context_line":"        checked \u003d False"},{"line_number":394,"context_line":"        for m in msgs:"},{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_afebd9af","line":392,"range":{"start_line":392,"start_character":8,"end_line":392,"end_character":13},"updated":"2016-01-27 10:52:15.000000000","message":"nit: These are calls not messages","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"95d93f31db1e01654f5c9e044ac83f2011c78522","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        self.wh.headers.getheader \u003d self._fake_getheader"},{"line_number":390,"context_line":"        self.wh.new_websocket_client()"},{"line_number":391,"context_line":"        self.assertTrue(self.wh.msg.called)"},{"line_number":392,"context_line":"        msgs \u003d self.wh.msg.call_args_list"},{"line_number":393,"context_line":"        checked \u003d False"},{"line_number":394,"context_line":"        for m in msgs:"},{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_fb78b391","line":392,"range":{"start_line":392,"start_character":8,"end_line":392,"end_character":13},"in_reply_to":"7a5de9d1_afebd9af","updated":"2016-01-27 12:07:39.000000000","message":"Done","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"9dae3cf53f9d584af9a17466cef13e736cd95739","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        msgs \u003d self.wh.msg.call_args_list"},{"line_number":393,"context_line":"        checked \u003d False"},{"line_number":394,"context_line":"        for m in msgs:"},{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertNotIn(\u0027123-456-789\u0027, m,"},{"line_number":397,"context_line":"                                 \"Token in connect info log message\")"},{"line_number":398,"context_line":"                checked \u003d True"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_3a5f2910","line":395,"updated":"2016-01-27 10:52:15.000000000","message":"Not keen on str(m) here, m is a call object which can be accessed by index eg m[0].\n\nAlso watch out for i18n, I don\u0027t know if the tests are locked to EN_US so the localised m[0] may not contain \"connect info\"","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"95d93f31db1e01654f5c9e044ac83f2011c78522","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        msgs \u003d self.wh.msg.call_args_list"},{"line_number":393,"context_line":"        checked \u003d False"},{"line_number":394,"context_line":"        for m in msgs:"},{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertNotIn(\u0027123-456-789\u0027, m,"},{"line_number":397,"context_line":"                                 \"Token in connect info log message\")"},{"line_number":398,"context_line":"                checked \u003d True"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_fb30b3a0","line":395,"in_reply_to":"7a5de9d1_3a5f2910","updated":"2016-01-27 12:07:39.000000000","message":"Done","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"9dae3cf53f9d584af9a17466cef13e736cd95739","unresolved":false,"context_lines":[{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertNotIn(\u0027123-456-789\u0027, m,"},{"line_number":397,"context_line":"                                 \"Token in connect info log message\")"},{"line_number":398,"context_line":"                checked \u003d True"},{"line_number":399,"context_line":"        self.assertTrue(checked,"},{"line_number":400,"context_line":"                        \"Failed to find connect info message\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_9af2dd05","line":398,"updated":"2016-01-27 10:52:15.000000000","message":"get rid of checked, put return here and change 399 to self.fail","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"95d93f31db1e01654f5c9e044ac83f2011c78522","unresolved":false,"context_lines":[{"line_number":395,"context_line":"            if str(m).find(\"connect info:\") \u003e\u003d 0:"},{"line_number":396,"context_line":"                self.assertNotIn(\u0027123-456-789\u0027, m,"},{"line_number":397,"context_line":"                                 \"Token in connect info log message\")"},{"line_number":398,"context_line":"                checked \u003d True"},{"line_number":399,"context_line":"        self.assertTrue(checked,"},{"line_number":400,"context_line":"                        \"Failed to find connect info message\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_6daf26e4","line":398,"in_reply_to":"7a5de9d1_9af2dd05","updated":"2016-01-27 12:07:39.000000000","message":"Done","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"6f3afa9b28d25943d4c808e9ddbf5d515033bcff","unresolved":false,"context_lines":[{"line_number":388,"context_line":"        self.assertTrue(self.wh.msg.called)"},{"line_number":389,"context_line":"        for call in self.wh.msg.call_args_list:"},{"line_number":390,"context_line":"            pos_args \u003d call[0]"},{"line_number":391,"context_line":"            if pos_args[0].find(\u0027connect info\u0027) \u003e\u003d 0:"},{"line_number":392,"context_line":"                self.assertNotIn(\u0027123-456-789\u0027, pos_args[1],"},{"line_number":393,"context_line":"                                 \"Token in connect info log message\")"},{"line_number":394,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":21,"id":"dada55a8_ae11285f","line":391,"updated":"2016-07-21 14:12:40.000000000","message":"Use in","commit_id":"ba87fbfeda4ef0d426cf648208a354747e0b0ac8"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"7bb5d8d52a77c23272d595ade236b0e42b1ad7bd","unresolved":false,"context_lines":[{"line_number":388,"context_line":"        self.assertTrue(self.wh.msg.called)"},{"line_number":389,"context_line":"        for call in self.wh.msg.call_args_list:"},{"line_number":390,"context_line":"            pos_args \u003d call[0]"},{"line_number":391,"context_line":"            if pos_args[0].find(\u0027connect info\u0027) \u003e\u003d 0:"},{"line_number":392,"context_line":"                self.assertNotIn(\u0027123-456-789\u0027, pos_args[1],"},{"line_number":393,"context_line":"                                 \"Token in connect info log message\")"},{"line_number":394,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":21,"id":"bacf61ea_a4b1b4e3","line":391,"in_reply_to":"dada55a8_ae11285f","updated":"2016-07-29 11:17:59.000000000","message":"Done","commit_id":"ba87fbfeda4ef0d426cf648208a354747e0b0ac8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"467c1cccd57acb69bcc9c6203076ca7934363fce","unresolved":false,"context_lines":[{"line_number":388,"context_line":"        self.assertTrue(self.wh.msg.called)"},{"line_number":389,"context_line":"        for call in self.wh.msg.call_args_list:"},{"line_number":390,"context_line":"            pos_args \u003d call[0]"},{"line_number":391,"context_line":"#            if pos_args[0].find(\u0027connect info\u0027) \u003e\u003d 0:"},{"line_number":392,"context_line":"            if \u0027connect info\u0027 in pos_args[0]:"},{"line_number":393,"context_line":"                self.assertNotIn(\u0027123-456-789\u0027, pos_args[1],"},{"line_number":394,"context_line":"                                 \"Token in connect info log message\")"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a8ec9b2_6267d225","line":391,"range":{"start_line":391,"start_character":0,"end_line":391,"end_character":54},"updated":"2016-09-19 22:24:51.000000000","message":"Forgot to remove this?","commit_id":"a9d15ee56a21261f1d20d6ec3c97464d106fb9ed"},{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"5f5a87c74f20214ea69e6e7b7a827b16129eb52f","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        }"},{"line_number":407,"context_line":"        self.wh.socket.return_value \u003d \u0027\u003csocket\u003e\u0027"},{"line_number":408,"context_line":"        self.wh.path \u003d \"http://127.0.0.1/?token\u003d123-456-789\""},{"line_number":409,"context_line":"        self.wh.headers \u003d self.fake_getheader"},{"line_number":410,"context_line":"        self.wh.new_websocket_client()"},{"line_number":411,"context_line":"        self.assertTrue(self.wh.msg.called)"},{"line_number":412,"context_line":"        for call in self.wh.msg.call_args_list:"}],"source_content_type":"text/x-python","patch_set":30,"id":"ff346bd7_f61dbfbd","line":409,"range":{"start_line":409,"start_character":26,"end_line":409,"end_character":45},"updated":"2017-07-24 03:35:50.000000000","message":"s/self.fake_getheader/self.fake_header/g","commit_id":"65b561d634cde485095bff36399ea52cf11772db"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"72695306b768523fc6aa8220fa9292f4071b01c0","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        }"},{"line_number":407,"context_line":"        self.wh.socket.return_value \u003d \u0027\u003csocket\u003e\u0027"},{"line_number":408,"context_line":"        self.wh.path \u003d \"http://127.0.0.1/?token\u003d123-456-789\""},{"line_number":409,"context_line":"        self.wh.headers \u003d self.fake_getheader"},{"line_number":410,"context_line":"        self.wh.new_websocket_client()"},{"line_number":411,"context_line":"        self.assertTrue(self.wh.msg.called)"},{"line_number":412,"context_line":"        for call in self.wh.msg.call_args_list:"}],"source_content_type":"text/x-python","patch_set":30,"id":"ff346bd7_965b1386","line":409,"range":{"start_line":409,"start_character":26,"end_line":409,"end_character":45},"in_reply_to":"ff346bd7_f61dbfbd","updated":"2017-07-24 03:41:26.000000000","message":"Thanks, fixed!","commit_id":"65b561d634cde485095bff36399ea52cf11772db"}],"nova/tests/unit/consoleauth/test_consoleauth.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"df4b4e82ec4bba9fc430d84eb530267ad54c8d5d","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        mock_get.return_value \u003d \u0027[\"abc\", \"def\"]\u0027"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        logger_name \u003d manager.__name__"},{"line_number":183,"context_line":"        with self.assertLogs(logger_name, level\u003d\u0027WARNING\u0027) as cm:"},{"line_number":184,"context_line":"            self.manager.authorize_console("},{"line_number":185,"context_line":"                self.context, self.u_token, \u0027novnc\u0027, \u0027127.0.0.1\u0027, \u00278080\u0027,"},{"line_number":186,"context_line":"                \u0027host\u0027, self.u_instance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_861efdb9","line":183,"updated":"2015-09-08 18:34:55.000000000","message":"assertLogs looks nice, we could have used it in other tests that mock out the logger and then check what gets passed to it, but unless I\u0027m missing something assertLogs is not in testtools and it\u0027s only new in python 3.4, so this won\u0027t work with our py27 support.","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e55811e372cbc7f4d22c7c92de34dbc42d68b44","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        mock_get.return_value \u003d \u0027[\"abc\", \"def\"]\u0027"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        logger_name \u003d manager.__name__"},{"line_number":183,"context_line":"        with self.assertLogs(logger_name, level\u003d\u0027WARNING\u0027) as cm:"},{"line_number":184,"context_line":"            self.manager.authorize_console("},{"line_number":185,"context_line":"                self.context, self.u_token, \u0027novnc\u0027, \u0027127.0.0.1\u0027, \u00278080\u0027,"},{"line_number":186,"context_line":"                \u0027host\u0027, self.u_instance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_663409fb","line":183,"in_reply_to":"da20952f_066bcdf2","updated":"2015-09-08 18:43:47.000000000","message":"Ah, it\u0027s in the unittest2 library and testtools uses that.  Cool, we should use this more often. :)","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"20be8c13a92c343e7b4f22ad468793e9a084cf49","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        mock_get.return_value \u003d \u0027[\"abc\", \"def\"]\u0027"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        logger_name \u003d manager.__name__"},{"line_number":183,"context_line":"        with self.assertLogs(logger_name, level\u003d\u0027WARNING\u0027) as cm:"},{"line_number":184,"context_line":"            self.manager.authorize_console("},{"line_number":185,"context_line":"                self.context, self.u_token, \u0027novnc\u0027, \u0027127.0.0.1\u0027, \u00278080\u0027,"},{"line_number":186,"context_line":"                \u0027host\u0027, self.u_instance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_16767bd8","line":183,"in_reply_to":"da20952f_066bcdf2","updated":"2015-09-09 14:34:25.000000000","message":"Done","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"20be8c13a92c343e7b4f22ad468793e9a084cf49","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        mock_get.return_value \u003d \u0027[\"abc\", \"def\"]\u0027"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        logger_name \u003d manager.__name__"},{"line_number":183,"context_line":"        with self.assertLogs(logger_name, level\u003d\u0027WARNING\u0027) as cm:"},{"line_number":184,"context_line":"            self.manager.authorize_console("},{"line_number":185,"context_line":"                self.context, self.u_token, \u0027novnc\u0027, \u0027127.0.0.1\u0027, \u00278080\u0027,"},{"line_number":186,"context_line":"                \u0027host\u0027, self.u_instance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_36737fe9","line":183,"in_reply_to":"da20952f_663409fb","updated":"2015-09-09 14:34:25.000000000","message":"Done","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"20be8c13a92c343e7b4f22ad468793e9a084cf49","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        mock_get.return_value \u003d \u0027[\"abc\", \"def\"]\u0027"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        logger_name \u003d manager.__name__"},{"line_number":183,"context_line":"        with self.assertLogs(logger_name, level\u003d\u0027WARNING\u0027) as cm:"},{"line_number":184,"context_line":"            self.manager.authorize_console("},{"line_number":185,"context_line":"                self.context, self.u_token, \u0027novnc\u0027, \u0027127.0.0.1\u0027, \u00278080\u0027,"},{"line_number":186,"context_line":"                \u0027host\u0027, self.u_instance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_566b93f1","line":183,"in_reply_to":"da20952f_861efdb9","updated":"2015-09-09 14:34:25.000000000","message":"Done","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8129467b7222ca4dbaae6ddf4df23f4e57a1e538","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        mock_get.return_value \u003d \u0027[\"abc\", \"def\"]\u0027"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        logger_name \u003d manager.__name__"},{"line_number":183,"context_line":"        with self.assertLogs(logger_name, level\u003d\u0027WARNING\u0027) as cm:"},{"line_number":184,"context_line":"            self.manager.authorize_console("},{"line_number":185,"context_line":"                self.context, self.u_token, \u0027novnc\u0027, \u0027127.0.0.1\u0027, \u00278080\u0027,"},{"line_number":186,"context_line":"                \u0027host\u0027, self.u_instance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_066bcdf2","line":183,"in_reply_to":"da20952f_861efdb9","updated":"2015-09-08 18:42:17.000000000","message":"Huh, it passes:\n\nhttp://logs.openstack.org/22/220622/4/check/gate-nova-python27/f8e7704/console.html#_2015-09-08_15_28_12_398\n\nI\u0027m surprised.","commit_id":"d275371f7845a429c8244a43ed1c90bebc93a6d6"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"bc179a6652579030fcc606ca5463cb29745ded0a","unresolved":false,"context_lines":[{"line_number":238,"context_line":"            self.assertEqual("},{"line_number":239,"context_line":"                (u\u0027WARNING:%s:Token: to*** failed to save into memcached.\u0027"},{"line_number":240,"context_line":"                 % logger_name),"},{"line_number":241,"context_line":"                cm.output[0])"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"class CellsConsoleauthTestCase(ConsoleauthTestCase):"}],"source_content_type":"text/x-python","patch_set":19,"id":"dab17558_0ece7f62","line":241,"range":{"start_line":241,"start_character":16,"end_line":241,"end_character":28},"updated":"2016-05-11 08:22:10.000000000","message":"IndexError: list index out of range","commit_id":"c957973cb2a1afb37b4aaf4b6c9071a9685fc3cc"}],"nova/tests/unit/test_utils.py":[{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b62e657e10331f8494b69c00ce55dfad5f2e605","unresolved":false,"context_lines":[{"line_number":1366,"context_line":"                  \u0027abcdefghijklmn\u0027: \u0027abcdefg***\u0027,"},{"line_number":1367,"context_line":"                  \u0027abcdefghijklmno\u0027: \u0027abcdefg***\u0027,"},{"line_number":1368,"context_line":"                  \u0027abcdefghijklmnop\u0027: \u0027abcdefgh***\u0027,"},{"line_number":1369,"context_line":"                  \u0027abcdefghijklmnopq\u0027: \u0027abcdefgh***\u0027}"},{"line_number":1370,"context_line":"        for token, secret in tokens.items():"},{"line_number":1371,"context_line":"            self.assertEqual(secret, utils.mask_token(token))"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_75e4d20c","line":1369,"updated":"2016-01-27 11:24:13.000000000","message":"we do not need all these cases, but just:\nNone\nempty\nless than 8\ngreater equal 8","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"95d93f31db1e01654f5c9e044ac83f2011c78522","unresolved":false,"context_lines":[{"line_number":1366,"context_line":"                  \u0027abcdefghijklmn\u0027: \u0027abcdefg***\u0027,"},{"line_number":1367,"context_line":"                  \u0027abcdefghijklmno\u0027: \u0027abcdefg***\u0027,"},{"line_number":1368,"context_line":"                  \u0027abcdefghijklmnop\u0027: \u0027abcdefgh***\u0027,"},{"line_number":1369,"context_line":"                  \u0027abcdefghijklmnopq\u0027: \u0027abcdefgh***\u0027}"},{"line_number":1370,"context_line":"        for token, secret in tokens.items():"},{"line_number":1371,"context_line":"            self.assertEqual(secret, utils.mask_token(token))"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_9baf3f7d","line":1369,"in_reply_to":"7a5de9d1_75e4d20c","updated":"2016-01-27 12:07:39.000000000","message":"Done","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"740eaf867db9cf9ae66c978c40547ce364da79d7","unresolved":false,"context_lines":[{"line_number":1366,"context_line":"                  \u0027abcdefghijklmn\u0027: \u0027abcdefg***\u0027,"},{"line_number":1367,"context_line":"                  \u0027abcdefghijklmno\u0027: \u0027abcdefg***\u0027,"},{"line_number":1368,"context_line":"                  \u0027abcdefghijklmnop\u0027: \u0027abcdefgh***\u0027,"},{"line_number":1369,"context_line":"                  \u0027abcdefghijklmnopq\u0027: \u0027abcdefgh***\u0027}"},{"line_number":1370,"context_line":"        for token, secret in tokens.items():"},{"line_number":1371,"context_line":"            self.assertEqual(secret, utils.mask_token(token))"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_5ba3079f","line":1369,"in_reply_to":"7a5de9d1_75e4d20c","updated":"2016-01-27 11:56:46.000000000","message":"Sure, The idea was to show that the masking worked well with short strings.\n\nbut Meh.","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"6928eb362578b7fb56f61900a758cf15119d2fce","unresolved":false,"context_lines":[{"line_number":1353,"context_line":"                  \u0027\u0027: \u0027***\u0027,"},{"line_number":1354,"context_line":"                  \u0027a\u0027: \u0027***\u0027,"},{"line_number":1355,"context_line":"                  \u0027abcdefgh\u0027: \u0027abcd***\u0027,"},{"line_number":1356,"context_line":"                  \u0027abcdefghijklmnopq\u0027: \u0027abcdefgh***\u0027}"},{"line_number":1357,"context_line":"        for token, secret in tokens.items():"},{"line_number":1358,"context_line":"            self.assertEqual(secret, utils.mask_token(token))"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a5de9d1_3465f244","line":1356,"updated":"2016-01-27 14:35:23.000000000","message":"you should use a 17+ character token for this test; having said that, I don\u0027t care","commit_id":"b33d8daccc8dc6b5f34bf640376390ef082ca8e1"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"068fe6dac88f61c7ad88fb36d115ade6cb7009ed","unresolved":false,"context_lines":[{"line_number":1353,"context_line":"                  \u0027\u0027: \u0027***\u0027,"},{"line_number":1354,"context_line":"                  \u0027a\u0027: \u0027***\u0027,"},{"line_number":1355,"context_line":"                  \u0027abcdefgh\u0027: \u0027abcd***\u0027,"},{"line_number":1356,"context_line":"                  \u0027abcdefghijklmnopq\u0027: \u0027abcdefgh***\u0027}"},{"line_number":1357,"context_line":"        for token, secret in tokens.items():"},{"line_number":1358,"context_line":"            self.assertEqual(secret, utils.mask_token(token))"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a5de9d1_beaf78e2","line":1356,"in_reply_to":"7a5de9d1_3465f244","updated":"2016-01-27 16:40:53.000000000","message":"You are correct there *should* be an 18 char test but it isn\u0027t a big deal.","commit_id":"b33d8daccc8dc6b5f34bf640376390ef082ca8e1"}],"nova/utils.py":[{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"68d41a5fd72a69d9e73ae02fcd797ae01f22b2f4","unresolved":false,"context_lines":[{"line_number":1545,"context_line":"    \"\"\""},{"line_number":1546,"context_line":"    if not token:"},{"line_number":1547,"context_line":"        token \u003d \u0027\u0027"},{"line_number":1548,"context_line":"    return token[:min(len(token) / 2, 8)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_bd8044c0","line":1548,"updated":"2015-12-08 03:35:18.000000000","message":"TypeError: slice indices must be integers or None or have an __index__ method\u0027\n\nso I\u0027ll change this to:\n\n    return token[:min(int(len(token) / 2), 8)] + \u0027***\u0027","commit_id":"9e60e9bcb48f4ddc386732927203f79d622d306c"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"9dae3cf53f9d584af9a17466cef13e736cd95739","unresolved":false,"context_lines":[{"line_number":1526,"context_line":"    :returns: Masked token suitable for reporting"},{"line_number":1527,"context_line":"    \"\"\""},{"line_number":1528,"context_line":"    if not token:"},{"line_number":1529,"context_line":"        token \u003d \u0027\u0027"},{"line_number":1530,"context_line":"    return token[:min(len(token) // 2, 8)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_faa511b5","line":1529,"updated":"2016-01-27 10:52:15.000000000","message":"nit: could just return \u0027***\u0027","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"95d93f31db1e01654f5c9e044ac83f2011c78522","unresolved":false,"context_lines":[{"line_number":1526,"context_line":"    :returns: Masked token suitable for reporting"},{"line_number":1527,"context_line":"    \"\"\""},{"line_number":1528,"context_line":"    if not token:"},{"line_number":1529,"context_line":"        token \u003d \u0027\u0027"},{"line_number":1530,"context_line":"    return token[:min(len(token) // 2, 8)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_3bee4bed","line":1529,"in_reply_to":"7a5de9d1_3555fa1c","updated":"2016-01-27 12:07:39.000000000","message":"Done","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"740eaf867db9cf9ae66c978c40547ce364da79d7","unresolved":false,"context_lines":[{"line_number":1526,"context_line":"    :returns: Masked token suitable for reporting"},{"line_number":1527,"context_line":"    \"\"\""},{"line_number":1528,"context_line":"    if not token:"},{"line_number":1529,"context_line":"        token \u003d \u0027\u0027"},{"line_number":1530,"context_line":"    return token[:min(len(token) // 2, 8)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_3bc16b2f","line":1529,"in_reply_to":"7a5de9d1_3555fa1c","updated":"2016-01-27 11:56:46.000000000","message":"Sure.  it was done this was to avoid open-coding the \u0027***\u0027 twice but you could micro-optimise this","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0b62e657e10331f8494b69c00ce55dfad5f2e605","unresolved":false,"context_lines":[{"line_number":1526,"context_line":"    :returns: Masked token suitable for reporting"},{"line_number":1527,"context_line":"    \"\"\""},{"line_number":1528,"context_line":"    if not token:"},{"line_number":1529,"context_line":"        token \u003d \u0027\u0027"},{"line_number":1530,"context_line":"    return token[:min(len(token) // 2, 8)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_3555fa1c","line":1529,"in_reply_to":"7a5de9d1_faa511b5","updated":"2016-01-27 11:24:13.000000000","message":"+1","commit_id":"f3dd88e0bfd7150a89f38e40b1dd5d6ea9cd198b"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"7276b9bd2474259087d24ebbdd24c9ed39fa726d","unresolved":false,"context_lines":[{"line_number":1450,"context_line":""},{"line_number":1451,"context_line":"    A token is a string that may provide access to a resource, as such"},{"line_number":1452,"context_line":"    reporting the full token in logs/exceptions isn\u0027t helpful.   This"},{"line_number":1453,"context_line":"    simple helper truncates the token to, at most, 8 \u0027real\u0027 chars."},{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"    :param: token: string to mask"},{"line_number":1456,"context_line":"    :returns: Masked token suitable for reporting"}],"source_content_type":"text/x-python","patch_set":20,"id":"dada55a8_3ce35ba5","line":1453,"updated":"2016-07-18 19:44:47.000000000","message":"That\u0027s 8 too many. I understand you were doing this for debug purposes. Instead, take a hash of the real token, and print that. This will a) be more secure and b) not have the possible conflict issue you have here (2 different real tokens that start with same up-to-8 characters)","commit_id":"881315de58cccb90aa9b40b049575055696be51a"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"761b302dc2ca20702e27ad30411510c393838550","unresolved":false,"context_lines":[{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"    A token is a string that may provide access to a resource, as such"},{"line_number":1462,"context_line":"    reporting the full token in logs/exceptions isn\u0027t helpful.   This"},{"line_number":1463,"context_line":"    simple helper truncates the token to, at most, 8 \u0027real\u0027 chars."},{"line_number":1464,"context_line":""},{"line_number":1465,"context_line":"    :param: token: string to mask"},{"line_number":1466,"context_line":"    :returns: Masked token suitable for reporting"}],"source_content_type":"text/x-python","patch_set":21,"id":"dada55a8_d45a61f1","line":1463,"updated":"2016-07-20 17:54:55.000000000","message":"As noted in patch set 20, that\u0027s 8 too many. I understand you were doing this for debug purposes, and agree that we need to do something to make debug possible. But you don\u0027t need any real characters to do that. Take a hash of the real token and print that instead of a truncated token. This will a) be more secure and b) not have the possible conflict issue you have here (2 different real tokens that start with same characters). It\u0027s also consistent with the approach used to protect tokens in other places.","commit_id":"ba87fbfeda4ef0d426cf648208a354747e0b0ac8"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"7bb5d8d52a77c23272d595ade236b0e42b1ad7bd","unresolved":false,"context_lines":[{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"    A token is a string that may provide access to a resource, as such"},{"line_number":1462,"context_line":"    reporting the full token in logs/exceptions isn\u0027t helpful.   This"},{"line_number":1463,"context_line":"    simple helper truncates the token to, at most, 8 \u0027real\u0027 chars."},{"line_number":1464,"context_line":""},{"line_number":1465,"context_line":"    :param: token: string to mask"},{"line_number":1466,"context_line":"    :returns: Masked token suitable for reporting"}],"source_content_type":"text/x-python","patch_set":21,"id":"bacf61ea_44cb981e","line":1463,"in_reply_to":"dada55a8_d45a61f1","updated":"2016-07-29 11:17:59.000000000","message":"I think a hash is used to protect the keystone token but in other place simple replacement of part of the token with * characters is used. If we are unlucky enough to get two token that start with the same characters we will have to live with it. In most use cases re trying will address the issue.","commit_id":"ba87fbfeda4ef0d426cf648208a354747e0b0ac8"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"6f3afa9b28d25943d4c808e9ddbf5d515033bcff","unresolved":false,"context_lines":[{"line_number":1467,"context_line":"    \"\"\""},{"line_number":1468,"context_line":"    if not token:"},{"line_number":1469,"context_line":"        return \u0027***\u0027"},{"line_number":1470,"context_line":"    return token[:min(len(token) // 2, 8)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"dada55a8_5153f116","line":1470,"updated":"2016-07-21 14:12:40.000000000","message":"can we make this // 3, 6 ?","commit_id":"ba87fbfeda4ef0d426cf648208a354747e0b0ac8"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"7bb5d8d52a77c23272d595ade236b0e42b1ad7bd","unresolved":false,"context_lines":[{"line_number":1467,"context_line":"    \"\"\""},{"line_number":1468,"context_line":"    if not token:"},{"line_number":1469,"context_line":"        return \u0027***\u0027"},{"line_number":1470,"context_line":"    return token[:min(len(token) // 2, 8)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"bacf61ea_442f18f6","line":1470,"in_reply_to":"dada55a8_5153f116","updated":"2016-07-29 11:17:59.000000000","message":"Done","commit_id":"ba87fbfeda4ef0d426cf648208a354747e0b0ac8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"467c1cccd57acb69bcc9c6203076ca7934363fce","unresolved":false,"context_lines":[{"line_number":1466,"context_line":"    \"\"\""},{"line_number":1467,"context_line":"    if not token:"},{"line_number":1468,"context_line":"        return \u0027***\u0027"},{"line_number":1469,"context_line":"    return token[:min(len(token) // 3, 6)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a8ec9b2_a58724d6","line":1469,"updated":"2016-09-19 22:24:51.000000000","message":"I have the same comment as Matthew, while this is better than logging a full token, I had more in mind to hash the token as he suggested. That\u0027s how tokens are redacted in novaclient [1] (example: \"{SHA1}%s\" % sha1) and I thought it\u0027s quite nice.\n\n[1] https://github.com/openstack/python-novaclient/blob/744c9b6/novaclient/client.py#L261-L295","commit_id":"a9d15ee56a21261f1d20d6ec3c97464d106fb9ed"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"8c97423b88fdf0616b532bf51b28f5b776511264","unresolved":false,"context_lines":[{"line_number":1466,"context_line":"    \"\"\""},{"line_number":1467,"context_line":"    if not token:"},{"line_number":1468,"context_line":"        return \u0027***\u0027"},{"line_number":1469,"context_line":"    return token[:min(len(token) // 3, 6)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a8ec9b2_d0594290","line":1469,"in_reply_to":"7a8ec9b2_a58724d6","updated":"2016-09-20 07:53:15.000000000","message":"As I said previously, a hash is used to protect the keystone token because that is a long lived token that we don\u0027t want to expose any part of because it allows control of the entire tenant resources. However in other place simple replacement of part of the token with * characters is used so we should be consistent and implement this approach. If we are unlucky enough to get two token that start with the same characters we will have to live with it. In most use cases re trying will address the issue.","commit_id":"a9d15ee56a21261f1d20d6ec3c97464d106fb9ed"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"18e7d788888d36283edb8e2f17259592941315a5","unresolved":false,"context_lines":[{"line_number":1473,"context_line":""},{"line_number":1474,"context_line":"    A token is a string that may provide access to a resource, as such"},{"line_number":1475,"context_line":"    reporting the full token in logs/exceptions isn\u0027t helpful.   This"},{"line_number":1476,"context_line":"    simple helper truncates the token to, at most, 8 \u0027real\u0027 chars."},{"line_number":1477,"context_line":""},{"line_number":1478,"context_line":"    :param: token: string to mask"},{"line_number":1479,"context_line":"    :returns: Masked token suitable for reporting"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_b180d5f8","line":1476,"range":{"start_line":1476,"start_character":51,"end_line":1476,"end_character":52},"updated":"2016-12-05 15:39:57.000000000","message":"this should be \"6\" in the current changeset. I actually recommend not saying how many characters, so the code speaks for itself and you avoid confusion if someone does what you just did here and updates the code without updating the comment.","commit_id":"fef1e8fdfb414478f43702e13e8466e8efc97d0d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a0da1f970fab988ae3c43466ca80574fbf434530","unresolved":false,"context_lines":[{"line_number":1161,"context_line":"    \"\"\""},{"line_number":1162,"context_line":"    if not token:"},{"line_number":1163,"context_line":"        return \u0027***\u0027"},{"line_number":1164,"context_line":"    return token[:min(len(token) // 3, 6)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":38,"id":"3fa7e38b_e4f2769b","line":1164,"updated":"2019-11-14 01:07:10.000000000","message":"Sorry, why would we want to include any part of the real token? AFAIK we should just mask the entire thing and use \u0027***\u0027 everywhere.","commit_id":"d659d3bc94b0e7cbcbb4278b5abf09659a6dd7b2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7ff58ea75801cb85d932d0fd54bb887cc910f0dc","unresolved":false,"context_lines":[{"line_number":1161,"context_line":"    \"\"\""},{"line_number":1162,"context_line":"    if not token:"},{"line_number":1163,"context_line":"        return \u0027***\u0027"},{"line_number":1164,"context_line":"    return token[:min(len(token) // 3, 6)] + \u0027***\u0027"}],"source_content_type":"text/x-python","patch_set":38,"id":"3fa7e38b_0b84cfb1","line":1164,"in_reply_to":"3fa7e38b_e4f2769b","updated":"2019-11-27 13:29:26.000000000","message":"I don\u0027t know why we want parts of the token. I updated the patch to hide the whole token.","commit_id":"d659d3bc94b0e7cbcbb4278b5abf09659a6dd7b2"}]}
