)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e860ddb84d4683210a0ac0d664373f504fcc0d15","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"We want the file to contain a string that the admin can look at"},{"line_number":20,"context_line":"rather than bytes so decode bytes to string."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I53057a31e3d753bfdae107c0d99bb2fb011741e6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7a2fa921_2fc1f580","line":21,"updated":"2015-10-12 20:20:41.000000000","message":"no bug report? or not tracking it because its python 3?","commit_id":"7521f53007896f033a616e48581db9f10238788b"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d17a8d926fc5b2737f16e019c8247ef936a221d7","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"We want the file to contain a string that the admin can look at"},{"line_number":20,"context_line":"rather than bytes so decode bytes to string."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I53057a31e3d753bfdae107c0d99bb2fb011741e6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a2ca52d_4e73e915","line":21,"in_reply_to":"7a2fa921_2fc1f580","updated":"2015-10-14 18:12:21.000000000","message":"Done","commit_id":"7521f53007896f033a616e48581db9f10238788b"}],"keystone/token/providers/fernet/utils.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8b7a862172e92a52c6caffa12612cd874a97b4de","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    key_file \u003d os.path.join(CONF.fernet_tokens.key_repository, \u00270\u0027)"},{"line_number":118,"context_line":"    try:"},{"line_number":119,"context_line":"        with open(key_file, \u0027w\u0027) as f:"},{"line_number":120,"context_line":"            f.write(key)"},{"line_number":121,"context_line":"    finally:"},{"line_number":122,"context_line":"        # After writing the key, set the umask back to it\u0027s original value. Do"},{"line_number":123,"context_line":"        # the same with group and user identifiers if a Keystone group or user"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_7c376de3","side":"PARENT","line":120,"updated":"2015-10-07 13:38:42.000000000","message":"If the data type is correct for cryptography\u0027s use up until it gets written to a file, then the .decode() should happen here.","commit_id":"18ccadf8e199e92d37536f0812590198709aff43"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"903e8b771a0cd334ccdef8be03ef56581fa0df86","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    key_file \u003d os.path.join(CONF.fernet_tokens.key_repository, \u00270\u0027)"},{"line_number":118,"context_line":"    try:"},{"line_number":119,"context_line":"        with open(key_file, \u0027w\u0027) as f:"},{"line_number":120,"context_line":"            f.write(key)"},{"line_number":121,"context_line":"    finally:"},{"line_number":122,"context_line":"        # After writing the key, set the umask back to it\u0027s original value. Do"},{"line_number":123,"context_line":"        # the same with group and user identifiers if a Keystone group or user"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_0952b6dd","side":"PARENT","line":120,"in_reply_to":"7a2fa921_7c376de3","updated":"2015-10-07 21:58:08.000000000","message":"Done","commit_id":"18ccadf8e199e92d37536f0812590198709aff43"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e860ddb84d4683210a0ac0d664373f504fcc0d15","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    try:"},{"line_number":118,"context_line":"        with open(key_file, \u0027w\u0027) as f:"},{"line_number":119,"context_line":"            # generate_key() returns bytes, convert to string for the file."},{"line_number":120,"context_line":"            key \u003d fernet.Fernet.generate_key().decode(\u0027utf-8\u0027)"},{"line_number":121,"context_line":"            f.write(key)"},{"line_number":122,"context_line":"    finally:"},{"line_number":123,"context_line":"        # After writing the key, set the umask back to it\u0027s original value. Do"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_2ff6d5d7","line":120,"updated":"2015-10-12 20:20:41.000000000","message":"I\u0027m sure this will fail in places if it\u0027s ever reverted back to it\u0027s original from once we are on python3 but can we add a test?","commit_id":"7521f53007896f033a616e48581db9f10238788b"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d17a8d926fc5b2737f16e019c8247ef936a221d7","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    try:"},{"line_number":118,"context_line":"        with open(key_file, \u0027w\u0027) as f:"},{"line_number":119,"context_line":"            # generate_key() returns bytes, convert to string for the file."},{"line_number":120,"context_line":"            key \u003d fernet.Fernet.generate_key().decode(\u0027utf-8\u0027)"},{"line_number":121,"context_line":"            f.write(key)"},{"line_number":122,"context_line":"    finally:"},{"line_number":123,"context_line":"        # After writing the key, set the umask back to it\u0027s original value. Do"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_4e4a09ae","line":120,"in_reply_to":"5a2ca52d_0eedf124","updated":"2015-10-14 18:12:21.000000000","message":"Done","commit_id":"7521f53007896f033a616e48581db9f10238788b"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"d17a8d926fc5b2737f16e019c8247ef936a221d7","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    try:"},{"line_number":118,"context_line":"        with open(key_file, \u0027w\u0027) as f:"},{"line_number":119,"context_line":"            # generate_key() returns bytes, convert to string for the file."},{"line_number":120,"context_line":"            key \u003d fernet.Fernet.generate_key().decode(\u0027utf-8\u0027)"},{"line_number":121,"context_line":"            f.write(key)"},{"line_number":122,"context_line":"    finally:"},{"line_number":123,"context_line":"        # After writing the key, set the umask back to it\u0027s original value. Do"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_ae9f1d02","line":120,"in_reply_to":"7a2fa921_2ff6d5d7","updated":"2015-10-14 18:12:21.000000000","message":"Lance - The tests already exist, all it takes to test this is to call the function since there\u0027s no parameter to skip it. The tests aren\u0027t enabled but that\u0027s because there are other issues with python 3.4 in this module.","commit_id":"7521f53007896f033a616e48581db9f10238788b"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f247caf0a471f43f207a3a9d63f3e50ca126bf4b","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    try:"},{"line_number":118,"context_line":"        with open(key_file, \u0027w\u0027) as f:"},{"line_number":119,"context_line":"            # generate_key() returns bytes, convert to string for the file."},{"line_number":120,"context_line":"            key \u003d fernet.Fernet.generate_key().decode(\u0027utf-8\u0027)"},{"line_number":121,"context_line":"            f.write(key)"},{"line_number":122,"context_line":"    finally:"},{"line_number":123,"context_line":"        # After writing the key, set the umask back to it\u0027s original value. Do"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_0eedf124","line":120,"in_reply_to":"7a2fa921_2ff6d5d7","updated":"2015-10-14 17:57:15.000000000","message":"generate_key() doesn\u0027t belong in either the try or with block, but i think the decode() does","commit_id":"7521f53007896f033a616e48581db9f10238788b"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"d77cdf813d2f6a700feadd60b8d7d1d8bb2d4910","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    Create a new key that is readable by the Keystone group and Keystone user."},{"line_number":101,"context_line":"    \"\"\""},{"line_number":102,"context_line":"    key \u003d fernet.Fernet.generate_key()  # key is bytes"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # This ensures the key created is not world-readable"},{"line_number":105,"context_line":"    old_umask \u003d os.umask(0o177)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a2ca52d_943d94bd","line":102,"updated":"2015-10-14 18:49:38.000000000","message":"Should we mention this just happens in python 3?","commit_id":"0e4cc18bcd33c9301c488302a35c6407133ab929"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"154a74f70324d443790000878664c7ce446698df","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    Create a new key that is readable by the Keystone group and Keystone user."},{"line_number":101,"context_line":"    \"\"\""},{"line_number":102,"context_line":"    key \u003d fernet.Fernet.generate_key()  # key is bytes"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # This ensures the key created is not world-readable"},{"line_number":105,"context_line":"    old_umask \u003d os.umask(0o177)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a2ca52d_d4154c49","line":102,"in_reply_to":"5a2ca52d_144e6496","updated":"2015-10-14 19:10:27.000000000","message":"Wow that seems like a bug in python2.7","commit_id":"0e4cc18bcd33c9301c488302a35c6407133ab929"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1ac7d1ea42cf4ce3090a022ce9a35d2ed4f45435","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    Create a new key that is readable by the Keystone group and Keystone user."},{"line_number":101,"context_line":"    \"\"\""},{"line_number":102,"context_line":"    key \u003d fernet.Fernet.generate_key()  # key is bytes"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # This ensures the key created is not world-readable"},{"line_number":105,"context_line":"    old_umask \u003d os.umask(0o177)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a2ca52d_144e6496","line":102,"in_reply_to":"5a2ca52d_943d94bd","updated":"2015-10-14 19:06:51.000000000","message":"This doesn\u0027t only happen on python3, on python2.7 key is also bytes. It just turns out that on python 2.7 str and bytes are the same.\n\n $ .tox/py27/bin/python\n Python 2.7.6 (default, Jun 22 2015, 17:58:13)\n [GCC 4.8.2] on linux2\n Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n \u003e\u003e\u003e isinstance(\u0027abc\u0027, bytes)\n True\n \u003e\u003e\u003e isinstance(\u0027abc\u0027, str)\n True\n \u003e\u003e\u003e isinstance(b\u0027abc\u0027, str)\n True\n \u003e\u003e\u003e isinstance(b\u0027abc\u0027, bytes)\n True\n \u003e\u003e\u003e\n\n $ .tox/py34/bin/python\n Python 3.4.3 (default, Jul 28 2015, 18:20:59)\n [GCC 4.8.4] on linux\n Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n \u003e\u003e\u003e isinstance(\u0027abc\u0027, bytes)\n False\n \u003e\u003e\u003e isinstance(\u0027abc\u0027, str)\n True\n \u003e\u003e\u003e isinstance(b\u0027abc\u0027, str)\n False\n \u003e\u003e\u003e isinstance(b\u0027abc\u0027, bytes)\n True\n \u003e\u003e\u003e","commit_id":"0e4cc18bcd33c9301c488302a35c6407133ab929"}]}
