)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"ef96bc477f201ff59d1fcceea2c647fc58a9e5ef","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-05-28 16:37:00 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Log warning for long Fernet tokens"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I3aa52f7e09c4cf717ddd28d14ee36b80f53b012b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7a016987_b313d4b7","line":8,"updated":"2015-05-29 03:00:38.000000000","message":"\"long\" isn\u0027t defined anywhere, could add a message to explain the intent of this change? like in the suggestion given in the token_formatters.py file.","commit_id":"e066e0fdfb8756f7a9ba85b001b09c1aeca6e230"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2bf8d0fc8f890d10482d1eea00a4634a597e2e49","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-05-28 16:37:00 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Log warning for long Fernet tokens"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I3aa52f7e09c4cf717ddd28d14ee36b80f53b012b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7a016987_d329b09c","line":8,"in_reply_to":"7a016987_b313d4b7","updated":"2015-05-29 03:13:49.000000000","message":"Done","commit_id":"e066e0fdfb8756f7a9ba85b001b09c1aeca6e230"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"425d6e8a30b6e4361d2a7ee098f7285ed94e479c","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-05-29 03:11:22 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Log warning for Fernet tokens over 255 chars"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I3aa52f7e09c4cf717ddd28d14ee36b80f53b012b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a016987_44e02a29","line":8,"updated":"2015-05-30 13:39:36.000000000","message":"Why?","commit_id":"f596bbc5a83ef3653ecbbecb2f93ef4d59cf5fc9"}],"keystone/token/providers/fernet/token_formatters.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5845608b4ab78ee3c6b7a6776c78a18d99ba67a0","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if len(token) \u003e 255:"},{"line_number":155,"context_line":"            LOG.warning(_LW(\u0027Fernet token created exceeding 255 characters in \u0027"},{"line_number":156,"context_line":"                            \u0027length: %s\u0027), token)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        return token"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_b6e2b89e","line":156,"updated":"2015-05-28 16:01:09.000000000","message":"don\u0027t log the token itself, log the length.. and maaaybe a hash of it, if you really want to include it? there\u0027s some code somewhere (maybe in the client?) to do hashes in a consistent way","commit_id":"f2bd584ddf6397e2f293d0d81089b0bafaef07f7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"87fa9428f81b75c8f19e045418f00463eb301a9d","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if len(token) \u003e 255:"},{"line_number":155,"context_line":"            LOG.warning(_LW(\u0027Fernet token created exceeding 255 characters in \u0027"},{"line_number":156,"context_line":"                            \u0027length: %s\u0027), token)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        return token"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_dcad55ea","line":156,"in_reply_to":"7a016987_b6e2b89e","updated":"2015-05-28 16:38:00.000000000","message":"Would this same comment apply here? \n\nhttps://github.com/openstack/keystone/blob/master/keystone/token/provider.py#L284-L285","commit_id":"f2bd584ddf6397e2f293d0d81089b0bafaef07f7"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"113076a39969b68667ed0d4f6888d573d4e53418","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        if len(token) \u003e 255:"},{"line_number":155,"context_line":"            LOG.warning(_LW(\u0027Fernet token created exceeding 255 characters in \u0027"},{"line_number":156,"context_line":"                            \u0027length: %s\u0027), token)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        return token"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def validate_token(self, token):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_f66ef02d","line":157,"updated":"2015-05-28 16:01:13.000000000","message":"Are we supposed to log token values?","commit_id":"f2bd584ddf6397e2f293d0d81089b0bafaef07f7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"87fa9428f81b75c8f19e045418f00463eb301a9d","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        if len(token) \u003e 255:"},{"line_number":155,"context_line":"            LOG.warning(_LW(\u0027Fernet token created exceeding 255 characters in \u0027"},{"line_number":156,"context_line":"                            \u0027length: %s\u0027), token)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        return token"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def validate_token(self, token):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_9c147de9","line":157,"in_reply_to":"7a016987_f66ef02d","updated":"2015-05-28 16:38:00.000000000","message":"Done","commit_id":"f2bd584ddf6397e2f293d0d81089b0bafaef07f7"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"fb2c27f0a8239c3491639c17e83d2723bcf856b2","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        serialized_payload \u003d msgpack.packb(versioned_payload)"},{"line_number":152,"context_line":"        token \u003d self.pack(serialized_payload)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if len(token) \u003e 255:"},{"line_number":155,"context_line":"            LOG.warning(_LW(\u0027Fernet token created with length of %d \u0027"},{"line_number":156,"context_line":"                            \u0027characters, which exceeds 255 characters\u0027),"},{"line_number":157,"context_line":"                        len(token))"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_137bc829","line":154,"updated":"2015-05-29 02:50:51.000000000","message":"Why not 512 ? 1024 ?\n\nI think a comment would help maintainability, and ease the comprehension by people still getting familiar with this code.\n\nDiscussing on IRC with dstanek and ayoung, we agreed that 255 is the max because needs to fit in the index field of a database table. Even if they aren\u0027t persisted in Keystone, they might be elsewhere, and the goal is to make them small enough to fit in those fields.","commit_id":"e066e0fdfb8756f7a9ba85b001b09c1aeca6e230"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2bf8d0fc8f890d10482d1eea00a4634a597e2e49","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        serialized_payload \u003d msgpack.packb(versioned_payload)"},{"line_number":152,"context_line":"        token \u003d self.pack(serialized_payload)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if len(token) \u003e 255:"},{"line_number":155,"context_line":"            LOG.warning(_LW(\u0027Fernet token created with length of %d \u0027"},{"line_number":156,"context_line":"                            \u0027characters, which exceeds 255 characters\u0027),"},{"line_number":157,"context_line":"                        len(token))"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a016987_536f00fc","line":154,"in_reply_to":"7a016987_137bc829","updated":"2015-05-29 03:13:49.000000000","message":"Done","commit_id":"e066e0fdfb8756f7a9ba85b001b09c1aeca6e230"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"474b932c8176f0862b261112a8712c33cabecf79","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        token \u003d self.pack(serialized_payload)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        # NOTE(lbragstad): We should warn against Fernet tokens that are over"},{"line_number":155,"context_line":"        # 255 characters in length. This is mostly due to persisting the tokens"},{"line_number":156,"context_line":"        # in a backend store of some kind that might have a limit of 255"},{"line_number":157,"context_line":"        # characters. Even though Keystone isn\u0027t storing a Fernet token"},{"line_number":158,"context_line":"        # anywhere, we can\u0027t say it isn\u0027t being stored somewhere else with"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_ae6b66b8","line":155,"updated":"2015-05-29 05:58:47.000000000","message":"I am not positive on 255 characters limitation.\n\nmysql has this claim about it\u0027s index size limitation, \u0027By default, an index key for a single-column index can be up to 767 bytes\u0027.\n\nSo, is it appropriate to thrown such a warning when mysql is in use? not object to this change but we may consider how many characters is really safe.","commit_id":"f596bbc5a83ef3653ecbbecb2f93ef4d59cf5fc9"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"c453b45815e6536f97b91645094e30bf873329f6","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        token \u003d self.pack(serialized_payload)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        # NOTE(lbragstad): We should warn against Fernet tokens that are over"},{"line_number":155,"context_line":"        # 255 characters in length. This is mostly due to persisting the tokens"},{"line_number":156,"context_line":"        # in a backend store of some kind that might have a limit of 255"},{"line_number":157,"context_line":"        # characters. Even though Keystone isn\u0027t storing a Fernet token"},{"line_number":158,"context_line":"        # anywhere, we can\u0027t say it isn\u0027t being stored somewhere else with"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_d50bbfd3","line":155,"in_reply_to":"7a016987_a927d510","updated":"2015-05-29 15:46:50.000000000","message":"I think this is a good compromise. The mentioned 767 isn\u0027t entirely correct. \n\n\"Prefix support and lengths of prefixes (where supported) are storage engine dependent. For example, a prefix can be up to 1000 bytes long for MyISAM tables, and 767 bytes for InnoDB tables. The NDBCLUSTER storage engine does not support prefixes (see Section 17.1.5.6, “Unsupported or Missing Features in MySQL Cluster”).\"\n\nAnd that is MySQL...other datastores may be different.","commit_id":"f596bbc5a83ef3653ecbbecb2f93ef4d59cf5fc9"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"f62b865f50910a472de79330d0b2b7c88615f844","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        token \u003d self.pack(serialized_payload)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        # NOTE(lbragstad): We should warn against Fernet tokens that are over"},{"line_number":155,"context_line":"        # 255 characters in length. This is mostly due to persisting the tokens"},{"line_number":156,"context_line":"        # in a backend store of some kind that might have a limit of 255"},{"line_number":157,"context_line":"        # characters. Even though Keystone isn\u0027t storing a Fernet token"},{"line_number":158,"context_line":"        # anywhere, we can\u0027t say it isn\u0027t being stored somewhere else with"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_fa659544","line":155,"in_reply_to":"7a016987_ae6b66b8","updated":"2015-05-29 10:35:09.000000000","message":"We are not limiting token size; but just warning in the case it is longer than 255 chars.\n\nWhy 255 ? 255 is commonly the max that fits in the index field of a database table.\n\nIt can be longer in some cases, but in general they are limited to that value. As example, see:\n\n\"The length of a CHAR column is fixed to the length that you declare when you create the table. The length can be any value from 0 to 255.\"\n\nhttps://dev.mysql.com/doc/refman/5.7/en/char.html","commit_id":"f596bbc5a83ef3653ecbbecb2f93ef4d59cf5fc9"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"aa20911fb0313e5ba5a6d001c3c58fa9bf2f9b1a","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        token \u003d self.pack(serialized_payload)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        # NOTE(lbragstad): We should warn against Fernet tokens that are over"},{"line_number":155,"context_line":"        # 255 characters in length. This is mostly due to persisting the tokens"},{"line_number":156,"context_line":"        # in a backend store of some kind that might have a limit of 255"},{"line_number":157,"context_line":"        # characters. Even though Keystone isn\u0027t storing a Fernet token"},{"line_number":158,"context_line":"        # anywhere, we can\u0027t say it isn\u0027t being stored somewhere else with"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_a927d510","line":155,"in_reply_to":"7a016987_fa659544","updated":"2015-05-29 12:58:08.000000000","message":"++","commit_id":"f596bbc5a83ef3653ecbbecb2f93ef4d59cf5fc9"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"d9faaf1f6dca7a1880ab3ae69c4bc56b12102502","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # in a backend store of some kind that might have a limit of 255"},{"line_number":157,"context_line":"        # characters. Even though Keystone isn\u0027t storing a Fernet token"},{"line_number":158,"context_line":"        # anywhere, we can\u0027t say it isn\u0027t being stored somewhere else with"},{"line_number":159,"context_line":"        # those kind of backend constraints."},{"line_number":160,"context_line":"        if len(token) \u003e 255:"},{"line_number":161,"context_line":"            LOG.warning(_LW(\u0027Fernet token created with length of %d \u0027"},{"line_number":162,"context_line":"                            \u0027characters, which exceeds 255 characters\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_931e986e","line":159,"updated":"2015-05-29 03:15:35.000000000","message":"nice comment!","commit_id":"f596bbc5a83ef3653ecbbecb2f93ef4d59cf5fc9"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"f2593e1037038c60b2c489803e246a902e450370","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        if len(token) \u003e 255:"},{"line_number":161,"context_line":"            LOG.warning(_LW(\u0027Fernet token created with length of %d \u0027"},{"line_number":162,"context_line":"                            \u0027characters, which exceeds 255 characters\u0027),"},{"line_number":163,"context_line":"                        len(token))"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        return token"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_12571f5b","line":163,"updated":"2015-05-29 22:27:45.000000000","message":"I am not convinced this is something the operator can do anything about. This is likely a Log Info. We have long had issues with long tokens, this is nothing new.\n\nWarning seems excessively high here.","commit_id":"f596bbc5a83ef3653ecbbecb2f93ef4d59cf5fc9"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d9fe8f7cc0427ec2882bf08f934fdc36e9088671","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        if len(token) \u003e 255:"},{"line_number":161,"context_line":"            LOG.warning(_LW(\u0027Fernet token created with length of %d \u0027"},{"line_number":162,"context_line":"                            \u0027characters, which exceeds 255 characters\u0027),"},{"line_number":163,"context_line":"                        len(token))"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        return token"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_428d9e2f","line":163,"in_reply_to":"7a016987_12571f5b","updated":"2015-06-01 15:23:35.000000000","message":"Done","commit_id":"f596bbc5a83ef3653ecbbecb2f93ef4d59cf5fc9"}]}
