)]}'
{"oslo_middleware/basic_auth.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a0954ae0db944f8df91527f9d87c7c1073f22d54","unresolved":true,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class ConfigInvalid(Exception):"},{"line_number":38,"context_line":"    def __init__(self, error_msg):"},{"line_number":39,"context_line":"        super(ConfigInvalid, self).__init__("},{"line_number":40,"context_line":"            \u0027Invalid configuration file. %(error_msg)s\u0027)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"11ac46f8_5ec4f750","line":39,"range":{"start_line":39,"start_character":14,"end_line":39,"end_character":33},"updated":"2021-08-03 10:15:26.000000000","message":"nit: drop","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"61383e1474a505ff16cd736717ba7841459d4e29","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class ConfigInvalid(Exception):"},{"line_number":38,"context_line":"    def __init__(self, error_msg):"},{"line_number":39,"context_line":"        super(ConfigInvalid, self).__init__("},{"line_number":40,"context_line":"            \u0027Invalid configuration file. %(error_msg)s\u0027)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"022f98d4_bc4da636","line":39,"range":{"start_line":39,"start_character":14,"end_line":39,"end_character":33},"in_reply_to":"11ac46f8_5ec4f750","updated":"2021-08-03 11:00:25.000000000","message":"Done","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a0954ae0db944f8df91527f9d87c7c1073f22d54","unresolved":true,"context_lines":[{"line_number":75,"context_line":"    The user auth file format is expected to comply with Apache"},{"line_number":76,"context_line":"    documentation[1] however the bcrypt password digest is the *only*"},{"line_number":77,"context_line":"    digest format supported."},{"line_number":78,"context_line":"    [1] https://httpd.apache.org/docs/current/misc/password_encryptions.html"},{"line_number":79,"context_line":"    :param: auth_file: Path to user auth file"},{"line_number":80,"context_line":"    :param: username: Username to authenticate"},{"line_number":81,"context_line":"    :param: password: Password encoded as bytes"}],"source_content_type":"text/x-python","patch_set":1,"id":"a73f9ef5_66abc54e","line":78,"updated":"2021-08-03 10:15:26.000000000","message":"nit: can we get a newline before and after this just so it\u0027ll render properly?","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"61383e1474a505ff16cd736717ba7841459d4e29","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    The user auth file format is expected to comply with Apache"},{"line_number":76,"context_line":"    documentation[1] however the bcrypt password digest is the *only*"},{"line_number":77,"context_line":"    digest format supported."},{"line_number":78,"context_line":"    [1] https://httpd.apache.org/docs/current/misc/password_encryptions.html"},{"line_number":79,"context_line":"    :param: auth_file: Path to user auth file"},{"line_number":80,"context_line":"    :param: username: Username to authenticate"},{"line_number":81,"context_line":"    :param: password: Password encoded as bytes"}],"source_content_type":"text/x-python","patch_set":1,"id":"939937ae_d63aac03","line":78,"in_reply_to":"a73f9ef5_66abc54e","updated":"2021-08-03 11:00:25.000000000","message":"Done","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a0954ae0db944f8df91527f9d87c7c1073f22d54","unresolved":true,"context_lines":[{"line_number":91,"context_line":"                if entry and entry.startswith(line_prefix):"},{"line_number":92,"context_line":"                    return auth_entry(entry, password)"},{"line_number":93,"context_line":"    except OSError as exc:"},{"line_number":94,"context_line":"        LOG.error(\u0027Problem reading auth user file: %s\u0027, exc)"},{"line_number":95,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":96,"context_line":"            detail\u003d\u0027Problem reading auth user file\u0027)"},{"line_number":97,"context_line":"    # reached end of file with no matches"}],"source_content_type":"text/x-python","patch_set":1,"id":"1304c8bf_76b18516","line":94,"range":{"start_line":94,"start_character":35,"end_line":94,"end_character":44},"updated":"2021-08-03 10:15:26.000000000","message":"user auth?","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"61383e1474a505ff16cd736717ba7841459d4e29","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                if entry and entry.startswith(line_prefix):"},{"line_number":92,"context_line":"                    return auth_entry(entry, password)"},{"line_number":93,"context_line":"    except OSError as exc:"},{"line_number":94,"context_line":"        LOG.error(\u0027Problem reading auth user file: %s\u0027, exc)"},{"line_number":95,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":96,"context_line":"            detail\u003d\u0027Problem reading auth user file\u0027)"},{"line_number":97,"context_line":"    # reached end of file with no matches"}],"source_content_type":"text/x-python","patch_set":1,"id":"a45b75f2_58394299","line":94,"range":{"start_line":94,"start_character":35,"end_line":94,"end_character":44},"in_reply_to":"1304c8bf_76b18516","updated":"2021-08-03 11:00:25.000000000","message":"Done","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a0954ae0db944f8df91527f9d87c7c1073f22d54","unresolved":true,"context_lines":[{"line_number":93,"context_line":"    except OSError as exc:"},{"line_number":94,"context_line":"        LOG.error(\u0027Problem reading auth user file: %s\u0027, exc)"},{"line_number":95,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":96,"context_line":"            detail\u003d\u0027Problem reading auth user file\u0027)"},{"line_number":97,"context_line":"    # reached end of file with no matches"},{"line_number":98,"context_line":"    LOG.info(\u0027User %s not found\u0027, username)"},{"line_number":99,"context_line":"    raise webob.exc.HTTPUnauthorized()"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf391a0d_2d71a8b8","line":96,"range":{"start_line":96,"start_character":36,"end_line":96,"end_character":45},"updated":"2021-08-03 10:15:26.000000000","message":"user auth?","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"61383e1474a505ff16cd736717ba7841459d4e29","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    except OSError as exc:"},{"line_number":94,"context_line":"        LOG.error(\u0027Problem reading auth user file: %s\u0027, exc)"},{"line_number":95,"context_line":"        raise webob.exc.HTTPBadRequest("},{"line_number":96,"context_line":"            detail\u003d\u0027Problem reading auth user file\u0027)"},{"line_number":97,"context_line":"    # reached end of file with no matches"},{"line_number":98,"context_line":"    LOG.info(\u0027User %s not found\u0027, username)"},{"line_number":99,"context_line":"    raise webob.exc.HTTPUnauthorized()"}],"source_content_type":"text/x-python","patch_set":1,"id":"46781a14_bbdceb1b","line":96,"range":{"start_line":96,"start_character":36,"end_line":96,"end_character":45},"in_reply_to":"bf391a0d_2d71a8b8","updated":"2021-08-03 11:00:25.000000000","message":"Done","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a0954ae0db944f8df91527f9d87c7c1073f22d54","unresolved":true,"context_lines":[{"line_number":142,"context_line":"    :param: entry: Line from auth user file to use for authentication"},{"line_number":143,"context_line":"    :returns: a tuple of username and crypted password"},{"line_number":144,"context_line":"    :raises: ConfigInvalid if the password is not in the supported bcrypt"},{"line_number":145,"context_line":"             format"},{"line_number":146,"context_line":"    \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    username, crypted_str \u003d entry.split(\u0027:\u0027, maxsplit\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"24309e55_0efa6b18","line":145,"range":{"start_line":145,"start_character":8,"end_line":145,"end_character":13},"updated":"2021-08-03 10:15:26.000000000","message":"nit","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"61383e1474a505ff16cd736717ba7841459d4e29","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    :param: entry: Line from auth user file to use for authentication"},{"line_number":143,"context_line":"    :returns: a tuple of username and crypted password"},{"line_number":144,"context_line":"    :raises: ConfigInvalid if the password is not in the supported bcrypt"},{"line_number":145,"context_line":"             format"},{"line_number":146,"context_line":"    \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    username, crypted_str \u003d entry.split(\u0027:\u0027, maxsplit\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"2fb45f05_b0606866","line":145,"range":{"start_line":145,"start_character":8,"end_line":145,"end_character":13},"in_reply_to":"24309e55_0efa6b18","updated":"2021-08-03 11:00:25.000000000","message":"Done","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"6b91283279868288a9db1cbfefab0ec71392b7ef","unresolved":true,"context_lines":[{"line_number":189,"context_line":"        LOG.info(\u0027No authorization token received\u0027)"},{"line_number":190,"context_line":"        raise webob.exc.HTTPUnauthorized()"},{"line_number":191,"context_line":"    try:"},{"line_number":192,"context_line":"        auth_type, token \u003d auth_header.strip().split(maxsplit\u003d1)"},{"line_number":193,"context_line":"    except (ValueError, AttributeError) as exc:"},{"line_number":194,"context_line":"        LOG.info(\u0027Could not parse Authorization header: %s\u0027, exc)"},{"line_number":195,"context_line":"        raise webob.exc.HTTPBadRequest(detail\u003d("}],"source_content_type":"text/x-python","patch_set":1,"id":"8a2ac9a2_d5bd03d8","line":192,"range":{"start_line":192,"start_character":19,"end_line":192,"end_character":24},"updated":"2021-08-03 11:42:55.000000000","message":"Also it could be named `credentials` to match the directives, but the current name LGTM too.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"6b91283279868288a9db1cbfefab0ec71392b7ef","unresolved":true,"context_lines":[{"line_number":91,"context_line":"            for line in f:"},{"line_number":92,"context_line":"                entry \u003d line.strip()"},{"line_number":93,"context_line":"                if entry and entry.startswith(line_prefix):"},{"line_number":94,"context_line":"                    return auth_entry(entry, password)"},{"line_number":95,"context_line":"    except OSError as exc:"},{"line_number":96,"context_line":"        LOG.error(\u0027Problem reading auth file: %s\u0027, exc)"},{"line_number":97,"context_line":"        raise webob.exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":2,"id":"90253ab4_c68a8a95","line":94,"range":{"start_line":94,"start_character":20,"end_line":94,"end_character":54},"updated":"2021-08-03 11:42:55.000000000","message":"If I correctly understand your code the `auth_file` can have many lines and so many entries, isn\u0027t? That\u0027s what I understand by reading the function `validate_auth_file`.\n\nIn this case here we only check the first entry and we never check the next ones, isn\u0027t?\n\nDon\u0027t we need to check the next occurences?","commit_id":"da7987ca926e9bd82ff2989a920ea9740da24f95"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"dde8d9e8e8113224468c6555c2c1ec8802a4fafc","unresolved":true,"context_lines":[{"line_number":91,"context_line":"            for line in f:"},{"line_number":92,"context_line":"                entry \u003d line.strip()"},{"line_number":93,"context_line":"                if entry and entry.startswith(line_prefix):"},{"line_number":94,"context_line":"                    return auth_entry(entry, password)"},{"line_number":95,"context_line":"    except OSError as exc:"},{"line_number":96,"context_line":"        LOG.error(\u0027Problem reading auth file: %s\u0027, exc)"},{"line_number":97,"context_line":"        raise webob.exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":2,"id":"4edb1f33_2859684f","line":94,"range":{"start_line":94,"start_character":20,"end_line":94,"end_character":54},"in_reply_to":"9016c826_8dc1fb5b","updated":"2021-08-03 11:58:11.000000000","message":"Ah yes exact, I missed that point. Thanks for your reply.","commit_id":"da7987ca926e9bd82ff2989a920ea9740da24f95"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"a59e8d1037d82aade872e2b0e2df3e71becc269e","unresolved":true,"context_lines":[{"line_number":91,"context_line":"            for line in f:"},{"line_number":92,"context_line":"                entry \u003d line.strip()"},{"line_number":93,"context_line":"                if entry and entry.startswith(line_prefix):"},{"line_number":94,"context_line":"                    return auth_entry(entry, password)"},{"line_number":95,"context_line":"    except OSError as exc:"},{"line_number":96,"context_line":"        LOG.error(\u0027Problem reading auth file: %s\u0027, exc)"},{"line_number":97,"context_line":"        raise webob.exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":2,"id":"9016c826_8dc1fb5b","line":94,"range":{"start_line":94,"start_character":20,"end_line":94,"end_character":54},"in_reply_to":"90253ab4_c68a8a95","updated":"2021-08-03 11:52:13.000000000","message":"L93 checks line_prefix which has the username. We loop through all the entries in the file(L91), if no matching entries are there we raise HTTPUnauthorized (L100/L101).","commit_id":"da7987ca926e9bd82ff2989a920ea9740da24f95"}],"oslo_middleware/tests/test_auth_basic.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a0954ae0db944f8df91527f9d87c7c1073f22d54","unresolved":true,"context_lines":[{"line_number":97,"context_line":"        # success"},{"line_number":98,"context_line":"        self.assertEqual("},{"line_number":99,"context_line":"            {\u0027HTTP_X_USER\u0027: \u0027myName\u0027, \u0027HTTP_X_USER_NAME\u0027: \u0027myName\u0027},"},{"line_number":100,"context_line":"            auth.auth_entry("},{"line_number":101,"context_line":"                entry_pass, b\u0027myPassword\u0027)"},{"line_number":102,"context_line":"        )"},{"line_number":103,"context_line":"        # failed, unknown digest format"},{"line_number":104,"context_line":"        ex \u003d self.assertRaises(webob.exc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":1,"id":"b4df46ec_61d655bf","line":101,"range":{"start_line":100,"start_character":0,"end_line":101,"end_character":42},"updated":"2021-08-03 10:15:26.000000000","message":"nit: one line?","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"}],"releasenotes/notes/basic-auth-middleware-5f812399e325425f.yaml":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a0954ae0db944f8df91527f9d87c7c1073f22d54","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add basic http authentication support for neutron."},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"    Adds a middleware as an alternative to noauth in standalone"},{"line_number":7,"context_line":"    environments. This middleware uses a password file which supports the"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"d3f2fd25_5224835b","line":4,"range":{"start_line":4,"start_character":41,"end_line":4,"end_character":53},"updated":"2021-08-03 10:15:26.000000000","message":"Is this specific to neutron, or is this a hangover from the original change?","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bd4f884f91ae0189d4be2830499c26c31eb80516","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add basic http authentication support for neutron."},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"    Adds a middleware as an alternative to noauth in standalone"},{"line_number":7,"context_line":"    environments. This middleware uses a password file which supports the"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7e60f18d_e122acb5","line":4,"range":{"start_line":4,"start_character":41,"end_line":4,"end_character":53},"in_reply_to":"a2097411_87005e9e","updated":"2021-08-03 11:09:12.000000000","message":"Ack","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"61383e1474a505ff16cd736717ba7841459d4e29","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add basic http authentication support for neutron."},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"    Adds a middleware as an alternative to noauth in standalone"},{"line_number":7,"context_line":"    environments. This middleware uses a password file which supports the"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"a2097411_87005e9e","line":4,"range":{"start_line":4,"start_character":41,"end_line":4,"end_character":53},"in_reply_to":"d3f2fd25_5224835b","updated":"2021-08-03 11:00:25.000000000","message":"sorry, it\u0027s leftover from old neutron change.","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a0954ae0db944f8df91527f9d87c7c1073f22d54","unresolved":true,"context_lines":[{"line_number":5,"context_line":""},{"line_number":6,"context_line":"    Adds a middleware as an alternative to noauth in standalone"},{"line_number":7,"context_line":"    environments. This middleware uses a password file which supports the"},{"line_number":8,"context_line":"    Apache htpasswd syntax[1]. This file is read for every request, so no"},{"line_number":9,"context_line":"    service restart is required when changes are made."},{"line_number":10,"context_line":"    The only password digest supported is bcrypt, and the ``bcrypt``"},{"line_number":11,"context_line":"    python library is used for password checks since it supports ``$2y$``"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"6802fdb1_e4514069","line":8,"range":{"start_line":8,"start_character":4,"end_line":8,"end_character":29},"updated":"2021-08-03 10:15:26.000000000","message":"nit: This is rST so we can make this a proper link\n\n  `Apache htpasswd syntax`__. This file ...\n\n  .. __: https://httpd.apache.org/docs/current/misc/password_encryptions.html","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"61383e1474a505ff16cd736717ba7841459d4e29","unresolved":false,"context_lines":[{"line_number":5,"context_line":""},{"line_number":6,"context_line":"    Adds a middleware as an alternative to noauth in standalone"},{"line_number":7,"context_line":"    environments. This middleware uses a password file which supports the"},{"line_number":8,"context_line":"    Apache htpasswd syntax[1]. This file is read for every request, so no"},{"line_number":9,"context_line":"    service restart is required when changes are made."},{"line_number":10,"context_line":"    The only password digest supported is bcrypt, and the ``bcrypt``"},{"line_number":11,"context_line":"    python library is used for password checks since it supports ``$2y$``"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"8f73965f_2d3c6588","line":8,"range":{"start_line":8,"start_character":4,"end_line":8,"end_character":29},"in_reply_to":"6802fdb1_e4514069","updated":"2021-08-03 11:00:25.000000000","message":"Done","commit_id":"f5a77b4dcc56481a98fcd15ac62cb84acafc1f82"}]}
