)]}'
{"tempest_lib/auth.py":[{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"62064d76ae642d53992fb21145aec69411325747","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            username \u003d credentials.get(\"username\")"},{"line_number":47,"context_line":"            password \u003d credentials.get(\"password\")"},{"line_number":48,"context_line":"            tenant_name \u003d credentials.get(\"tenant_name\")"},{"line_number":49,"context_line":"            raise TypeError(\"Invalid credentials. Credentials are username: "},{"line_number":50,"context_line":"                            %s, password: %s, tenant_name: %s\" % \\"},{"line_number":51,"context_line":"                            (username, password, tenant_name)"},{"line_number":52,"context_line":"        self.cache \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_e62019b3","line":49,"updated":"2015-09-08 18:46:46.000000000","message":"whitespace...","commit_id":"31719c5992bce9a113a4bf2c0d549803ce310c13"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"62064d76ae642d53992fb21145aec69411325747","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            password \u003d credentials.get(\"password\")"},{"line_number":48,"context_line":"            tenant_name \u003d credentials.get(\"tenant_name\")"},{"line_number":49,"context_line":"            raise TypeError(\"Invalid credentials. Credentials are username: "},{"line_number":50,"context_line":"                            %s, password: %s, tenant_name: %s\" % \\"},{"line_number":51,"context_line":"                            (username, password, tenant_name)"},{"line_number":52,"context_line":"        self.cache \u003d None"},{"line_number":53,"context_line":"        self.alt_auth_data \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_06398df2","line":50,"updated":"2015-09-08 18:46:46.000000000","message":"We probably shouldn\u0027t log the password, maybe just check it\u0027s a thing and if it\u0027s not add something to the message that it\u0027s not defined.","commit_id":"31719c5992bce9a113a4bf2c0d549803ce310c13"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"a8dc95c97843666cc5bc75a2b9fb781fbb1ede94","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    ex_str +\u003d \"Password is not defined!\""},{"line_number":54,"context_line":"                else:"},{"line_number":55,"context_line":"                    ex_str +\u003d \"Password is defined.\""},{"line_number":56,"context_line":"                raise TypeError(\"Invalid credentials. %s\" % ex_str)"},{"line_number":57,"context_line":"            else:"},{"line_number":58,"context_line":"                raise TypeError(\"credentials object is of type %s, which is\" \\"},{"line_number":59,"context_line":"                                \"not a valid Credentials object type.\" % \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_e4ab311d","line":56,"updated":"2015-09-08 19:34:58.000000000","message":"I think we should change the exception type here to be exceptions.InvalidCredentials just to be a bit more clear.","commit_id":"fa6cc8005014a7b10fcb23cdf87314bb30360019"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"c43ca4b3093bdf99e232848b57722091d80fb95f","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                username \u003d credentials.get(\"username\")"},{"line_number":48,"context_line":"                password \u003d credentials.get(\"password\")"},{"line_number":49,"context_line":"                tenant_name \u003d credentials.get(\"tenant_name\")"},{"line_number":50,"context_line":"                message \u003d (\"Credentials are username: %s, tenant_name: %s. \" %"},{"line_number":51,"context_line":"                           (username, tenant_name))"},{"line_number":52,"context_line":"                if password is None:"},{"line_number":53,"context_line":"                    message +\u003d \"Password is not defined!\""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_0a6c0207","line":50,"updated":"2015-09-09 17:14:14.000000000","message":"So I\u0027ve been thinking about this some more, and I realized that doing this isn\u0027t actually complete. When using V3 credentials there are more fields. You can see what is being checked in the is_valid() method on L637. So while this is a start it\u0027s not complete and could be misleading.\n\nI\u0027m thinking we should just print the str(credentials) since Credentials objects have a __str__ method. My only concern with doing this is if that also prints the password field we don\u0027t want to do that.","commit_id":"97884f1580ed621e66e30ea937522f3861d6e338"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"7e5fe53c23fb3a2f3a1ff5b39ad0b156a7ec155f","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                username \u003d credentials.get(\"username\")"},{"line_number":48,"context_line":"                password \u003d credentials.get(\"password\")"},{"line_number":49,"context_line":"                tenant_name \u003d credentials.get(\"tenant_name\")"},{"line_number":50,"context_line":"                message \u003d (\"Credentials are username: %s, tenant_name: %s. \" %"},{"line_number":51,"context_line":"                           (username, tenant_name))"},{"line_number":52,"context_line":"                if password is None:"},{"line_number":53,"context_line":"                    message +\u003d \"Password is not defined!\""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_9ef054cb","line":50,"in_reply_to":"da20952f_0a6c0207","updated":"2015-09-09 18:31:47.000000000","message":"Yes I think using str(credentials) is the right approach here.\n\nWe can change the implementation of __str__ to not print the pwd in clear.","commit_id":"97884f1580ed621e66e30ea937522f3861d6e338"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"304b8f11f310acd72458a2aa99471bed87745e75","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            if isinstance(credentials, Credentials):"},{"line_number":47,"context_line":"                password \u003d credentials.get(\u0027password\u0027)"},{"line_number":48,"context_line":"                message \u003d \"Credentials are: \" + str(credentials)"},{"line_number":49,"context_line":"                if password is None:"},{"line_number":50,"context_line":"                    message +\u003d \" Password is not defined.\""},{"line_number":51,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_5c1fbf6b","line":48,"range":{"start_line":48,"start_character":16,"end_line":48,"end_character":23},"updated":"2015-09-17 09:41:36.000000000","message":"Well, this will include the password already, so if you want to avoid displaying the password in log files, you\u0027ll have to modify the implementation of __str__ in Credentials to skip the password.","commit_id":"730a8484b2d991884f61bfac6d55cbe9c70e72a4"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"5f52104ae8bd021cd54696937f9192cdb6323ce5","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        else:"},{"line_number":46,"context_line":"            if isinstance(credentials, Credentials):"},{"line_number":47,"context_line":"                password \u003d credentials.get(\u0027password\u0027)"},{"line_number":48,"context_line":"                message \u003d \"Credentials are: \" + str(credentials)"},{"line_number":49,"context_line":"                if password is None:"},{"line_number":50,"context_line":"                    message +\u003d \" Password is not defined.\""},{"line_number":51,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_7486f366","line":48,"in_reply_to":"ba15a1d1_5c1fbf6b","updated":"2015-09-21 03:41:19.000000000","message":"Done","commit_id":"730a8484b2d991884f61bfac6d55cbe9c70e72a4"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"918d8ee0f446511eab0e054330e754aef9e6046c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                if password is None:"},{"line_number":50,"context_line":"                    message +\u003d \" Password is not defined.\""},{"line_number":51,"context_line":"                else:"},{"line_number":52,"context_line":"                    message +\u003d \" Password is defined\""},{"line_number":53,"context_line":"                raise exceptions.InvalidCredentials(message)"},{"line_number":54,"context_line":"            else:"},{"line_number":55,"context_line":"                raise TypeError(\"credentials object is of type %s, which is\""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_67fb20c2","line":52,"updated":"2015-09-16 23:15:27.000000000","message":"nit: better to add \".\" after \"defined\" for consistent msg with line50, but current patch is already nice for me.","commit_id":"730a8484b2d991884f61bfac6d55cbe9c70e72a4"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"5f52104ae8bd021cd54696937f9192cdb6323ce5","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                if password is None:"},{"line_number":50,"context_line":"                    message +\u003d \" Password is not defined.\""},{"line_number":51,"context_line":"                else:"},{"line_number":52,"context_line":"                    message +\u003d \" Password is defined\""},{"line_number":53,"context_line":"                raise exceptions.InvalidCredentials(message)"},{"line_number":54,"context_line":"            else:"},{"line_number":55,"context_line":"                raise TypeError(\"credentials object is of type %s, which is\""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_147bf77c","line":52,"in_reply_to":"ba15a1d1_67fb20c2","updated":"2015-09-21 03:41:19.000000000","message":"Done","commit_id":"730a8484b2d991884f61bfac6d55cbe9c70e72a4"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"35b6a2d6a37dfad2f0be4a54cecd9049fef5ecbf","unresolved":false,"context_lines":[{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    def __str__(self):"},{"line_number":534,"context_line":"        \"\"\"Represent only attributes included in self.ATTRIBUTES\"\"\""},{"line_number":535,"context_line":"        attrs \u003d [attr for attr in self.ATTRIBUTES if attr is not \u0027password\u0027]"},{"line_number":536,"context_line":"        _repr \u003d dict((k, getattr(self, k)) for k in attrs)"},{"line_number":537,"context_line":"        return str(_repr)"},{"line_number":538,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_307ec319","line":535,"range":{"start_line":535,"start_character":56,"end_line":535,"end_character":64},"updated":"2015-09-23 15:05:17.000000000","message":"We should not use \u0027is\u0027 for string comparison:\n\n  a \u003d \"a\" * 32\n  a is \u0027aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\u0027\n\nreturns False\n\nIn that case it works because \"password\" is a short string. But in general it\u0027s bad practice.","commit_id":"d51fa191b23b14d6a14e981bf641ff0314bc4593"}],"tempest_lib/exceptions.py":[{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"817df35a19426ee0643a4f160f599628452dac0e","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"class InvalidCredentials(TempestException):"},{"line_number":178,"context_line":"    message \u003d (\"Invalid Credentials. Credentials are username: %(username)s \""},{"line_number":179,"context_line":"               \"tenant_name: %(tenant_name)s. Password %(pass_def)s defined.\")"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"class SSHTimeout(TempestException):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_a440b436","line":179,"updated":"2015-09-09 14:29:21.000000000","message":"So I\u0027m fine with doing this here, but I\u0027m worried about the backwards compat aspect of changing the default message here. What happens to other users of InvalidCredentials if they\u0027re not passing in those kwargs to the init? That\u0027ll start raising a keyerror on all the consumers of the lib. \n\nIf we want to change this in I feel like we need to do it gracefully so that if you don\u0027t pass in kwargs things don\u0027t blow up. That\u0027s why probably doing it on the caller side as a specific message makes more sense.","commit_id":"4fc47ae2e35c1b1ebc054e50256109a6b03f3f97"}]}
