)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"e19d9fec662da0a01710963d0922019fc6bb2ea3","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2018-02-26 12:16:14 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using oslo.policy for monasca-api"},{"line_number":8,"context_line":"Added policies and used policy enforcement engine"},{"line_number":9,"context_line":"from monasca-common."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- Replaced security with oslo.policy"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ff6b8bd7_14c61369","line":8,"updated":"2018-03-06 15:15:52.000000000","message":"Please add empty line.","commit_id":"f7f0a08764008eaacb39a13024e2fcb7fb6ecc14"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"445179a4548268b3dd8b492a96785a50046c8614","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2018-02-26 12:16:14 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using oslo.policy for monasca-api"},{"line_number":8,"context_line":"Added policies and used policy enforcement engine"},{"line_number":9,"context_line":"from monasca-common."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- Replaced security with oslo.policy"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"df7087c5_6c455617","line":8,"in_reply_to":"ff6b8bd7_14c61369","updated":"2018-03-07 12:18:04.000000000","message":"Done","commit_id":"f7f0a08764008eaacb39a13024e2fcb7fb6ecc14"}],"config-generator/README.rst":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"46fe680ad965ecc0fe6b7aa864746771ba0c16e7","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To generate the sample policies execute::"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    tox -e genpolicy"}],"source_content_type":"text/x-rst","patch_set":12,"id":"9f6a8fd7_4a849f5e","line":11,"range":{"start_line":11,"start_character":2,"end_line":11,"end_character":4},"updated":"2018-05-02 09:26:09.000000000","message":"nit: use consistent indentation","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"eddafe87a9afae24966be82b0af954e40af5abb4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To generate the sample policies execute::"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    tox -e genpolicy"}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_23d8c97d","line":11,"range":{"start_line":11,"start_character":2,"end_line":11,"end_character":4},"in_reply_to":"9f6a8fd7_4a849f5e","updated":"2018-05-17 10:17:36.000000000","message":"Done","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"}],"monasca_api/conf/security.py":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"b3555f86471d9d0b5ebea5709a57718d751b97bb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"bf659307_c940f338","updated":"2018-03-26 15:10:24.000000000","message":"The spec assumes leaving these configuration options and using them to generate default policy rules.","commit_id":"527f01d7693a1eb18793bb574a08345d7c960c44"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"56ecc6c8d5277d1a1f72ba700b849467a10ba050","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"9f6a8fd7_37f3e60c","in_reply_to":"bf659307_156315b3","updated":"2018-04-18 13:53:33.000000000","message":"Done","commit_id":"527f01d7693a1eb18793bb574a08345d7c960c44"},{"author":{"_account_id":12542,"name":"Johannes Grassler","email":"jgr-launchpad@btw23.de","username":"jgrassler"},"change_message_id":"050033e42c87552bf43fc58a73956d12f35193da","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"bf659307_156315b3","in_reply_to":"bf659307_c940f338","updated":"2018-04-10 16:35:51.000000000","message":"That was the idea, yes. I\u0027d expect to see these used in `openstack/monasca-api / monasca_api/policies/__init__.py` to set sensible values for READONLY_RULES, AGENT_ROLES, DELEGATE_ROLES, etc. - right now these are static...\n\nWhile there is a case to be made for configuring these through a proper policy.json override, I\u0027d rather not break this for people who used to configure a non-standard role name through monasca-api configuration. For they will get sudden, unexpected 401s that way (if we really must we can fade these settings out through the usual two release deprecate-then-remove cycle at some stage, but let\u0027s not be sudden about it). Can you  retain these settings and use them to populate READONLY_RULES and the like?","commit_id":"527f01d7693a1eb18793bb574a08345d7c960c44"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"db94a797c8c83870585f1259c81977a08bea30d5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"security_opts \u003d ["},{"line_number":20,"context_line":"    cfg.ListOpt(\u0027healthcheck_roles\u0027, default\u003d[\u0027good\u0027], help\u003d\u0027test healthcheck\u0027),"},{"line_number":21,"context_line":"    cfg.ListOpt(\u0027default_authorized_roles\u0027, default\u003d[\u0027monasca-user\u0027],"},{"line_number":22,"context_line":"                help\u003d\u0027\u0027\u0027"},{"line_number":23,"context_line":"Roles that are allowed full access to the API"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_933c78c0","line":20,"range":{"start_line":20,"start_character":47,"end_line":20,"end_character":51},"updated":"2018-04-27 14:58:18.000000000","message":"Is it correct?","commit_id":"7456faa8d4a20f130aec9a8ec933574bd085765d"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"46fe680ad965ecc0fe6b7aa864746771ba0c16e7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"security_opts \u003d ["},{"line_number":20,"context_line":"    cfg.ListOpt(\u0027healthcheck_roles\u0027, default\u003d[\u0027good\u0027], help\u003d\u0027test healthcheck\u0027),"},{"line_number":21,"context_line":"    cfg.ListOpt(\u0027default_authorized_roles\u0027, default\u003d[\u0027monasca-user\u0027],"},{"line_number":22,"context_line":"                help\u003d\u0027\u0027\u0027"},{"line_number":23,"context_line":"Roles that are allowed full access to the API"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f6a8fd7_6a3163a2","line":20,"range":{"start_line":20,"start_character":47,"end_line":20,"end_character":51},"updated":"2018-05-02 09:26:09.000000000","message":"Should be \u0027@\u0027.","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"46fe680ad965ecc0fe6b7aa864746771ba0c16e7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"security_opts \u003d ["},{"line_number":20,"context_line":"    cfg.ListOpt(\u0027healthcheck_roles\u0027, default\u003d[\u0027good\u0027], help\u003d\u0027test healthcheck\u0027),"},{"line_number":21,"context_line":"    cfg.ListOpt(\u0027default_authorized_roles\u0027, default\u003d[\u0027monasca-user\u0027],"},{"line_number":22,"context_line":"                help\u003d\u0027\u0027\u0027"},{"line_number":23,"context_line":"Roles that are allowed full access to the API"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f6a8fd7_6abba3c3","line":20,"range":{"start_line":20,"start_character":53,"end_line":20,"end_character":78},"updated":"2018-05-02 09:26:09.000000000","message":"help text should be updated or removed","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"eddafe87a9afae24966be82b0af954e40af5abb4","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"security_opts \u003d ["},{"line_number":20,"context_line":"    cfg.ListOpt(\u0027healthcheck_roles\u0027, default\u003d[\u0027good\u0027], help\u003d\u0027test healthcheck\u0027),"},{"line_number":21,"context_line":"    cfg.ListOpt(\u0027default_authorized_roles\u0027, default\u003d[\u0027monasca-user\u0027],"},{"line_number":22,"context_line":"                help\u003d\u0027\u0027\u0027"},{"line_number":23,"context_line":"Roles that are allowed full access to the API"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_63cfa1b0","line":20,"range":{"start_line":20,"start_character":47,"end_line":20,"end_character":51},"in_reply_to":"9f6a8fd7_6a3163a2","updated":"2018-05-17 10:17:36.000000000","message":"Done","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"eddafe87a9afae24966be82b0af954e40af5abb4","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"security_opts \u003d ["},{"line_number":20,"context_line":"    cfg.ListOpt(\u0027healthcheck_roles\u0027, default\u003d[\u0027good\u0027], help\u003d\u0027test healthcheck\u0027),"},{"line_number":21,"context_line":"    cfg.ListOpt(\u0027default_authorized_roles\u0027, default\u003d[\u0027monasca-user\u0027],"},{"line_number":22,"context_line":"                help\u003d\u0027\u0027\u0027"},{"line_number":23,"context_line":"Roles that are allowed full access to the API"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_c3bd5503","line":20,"range":{"start_line":20,"start_character":53,"end_line":20,"end_character":78},"in_reply_to":"9f6a8fd7_6abba3c3","updated":"2018-05-17 10:17:36.000000000","message":"Done","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"}],"monasca_api/policies/healthcheck.py":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"46fe680ad965ecc0fe6b7aa864746771ba0c16e7","unresolved":false,"context_lines":[{"line_number":18,"context_line":"rules \u003d ["},{"line_number":19,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":20,"context_line":"        name\u003d\u0027api:healthcheck\u0027,"},{"line_number":21,"context_line":"        check_str\u003d\u0027@\u0027,"},{"line_number":22,"context_line":"        description\u003d\u0027Healthcheck role\u0027,"},{"line_number":23,"context_line":"        operations\u003d["},{"line_number":24,"context_line":"            {\u0027path\u0027: \u0027/healthcheck\u0027, \u0027method\u0027: \u0027GET\u0027}"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f6a8fd7_aaebfbd9","line":21,"range":{"start_line":21,"start_character":18,"end_line":21,"end_character":21},"updated":"2018-05-02 09:26:09.000000000","message":"Should use monasca_api.policies.HEALTHCHECK_ROLES","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"eddafe87a9afae24966be82b0af954e40af5abb4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"rules \u003d ["},{"line_number":19,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":20,"context_line":"        name\u003d\u0027api:healthcheck\u0027,"},{"line_number":21,"context_line":"        check_str\u003d\u0027@\u0027,"},{"line_number":22,"context_line":"        description\u003d\u0027Healthcheck role\u0027,"},{"line_number":23,"context_line":"        operations\u003d["},{"line_number":24,"context_line":"            {\u0027path\u0027: \u0027/healthcheck\u0027, \u0027method\u0027: \u0027GET\u0027}"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_a33a9995","line":21,"range":{"start_line":21,"start_character":18,"end_line":21,"end_character":21},"in_reply_to":"9f6a8fd7_aaebfbd9","updated":"2018-05-17 10:17:36.000000000","message":"Done","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"}],"monasca_api/policies/notifications.py":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"46fe680ad965ecc0fe6b7aa864746771ba0c16e7","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    ),"},{"line_number":81,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":82,"context_line":"        name\u003d\u0027api:notifications:type\u0027,"},{"line_number":83,"context_line":"        check_str\u003d\u0027@\u0027,"},{"line_number":84,"context_line":"        description\u003d\u0027Get notifications type role\u0027,"},{"line_number":85,"context_line":"        operations\u003d["},{"line_number":86,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f6a8fd7_2acfebb0","line":83,"range":{"start_line":83,"start_character":18,"end_line":83,"end_character":21},"updated":"2018-05-02 09:26:09.000000000","message":"Should be `DEFAULT_AUTHORIZED_ROLES or READ_ONLY_AUTHORIZED_ROLES` I guess.","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"eddafe87a9afae24966be82b0af954e40af5abb4","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    ),"},{"line_number":81,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":82,"context_line":"        name\u003d\u0027api:notifications:type\u0027,"},{"line_number":83,"context_line":"        check_str\u003d\u0027@\u0027,"},{"line_number":84,"context_line":"        description\u003d\u0027Get notifications type role\u0027,"},{"line_number":85,"context_line":"        operations\u003d["},{"line_number":86,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_433f0587","line":83,"range":{"start_line":83,"start_character":18,"end_line":83,"end_character":21},"in_reply_to":"9f6a8fd7_2acfebb0","updated":"2018-05-17 10:17:36.000000000","message":"Done","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"}],"monasca_api/tests/test_alarms.py":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"46fe680ad965ecc0fe6b7aa864746771ba0c16e7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"9f6a8fd7_aad53be7","updated":"2018-05-02 09:26:09.000000000","message":"Changes in this file unnecessary.","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"eddafe87a9afae24966be82b0af954e40af5abb4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5f7c97a3_23468923","in_reply_to":"9f6a8fd7_aad53be7","updated":"2018-05-17 10:17:36.000000000","message":"Done","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"}],"monasca_api/v2/reference/helpers.py":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"46fe680ad965ecc0fe6b7aa864746771ba0c16e7","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def validate_authorization(http_request, authorized_rules_list):"},{"line_number":73,"context_line":"    \"\"\"Validates whether one or more X-ROLES in the HTTP header is authorized."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    If authorization fails, 401 is thrown with appropriate description."},{"line_number":76,"context_line":"    Additionally response specifies \u0027WWW-Authenticate\u0027 header with \u0027Token\u0027"},{"line_number":77,"context_line":"    value challenging the client to use different token (the one with"},{"line_number":78,"context_line":"    different set of roles)."},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":"    challenge \u003d \u0027Token\u0027"},{"line_number":81,"context_line":"    for rule in authorized_rules_list:"},{"line_number":82,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f6a8fd7_8afdd73b","line":79,"range":{"start_line":73,"start_character":4,"end_line":79,"end_character":7},"updated":"2018-05-02 09:26:09.000000000","message":"Please update the documentation string accordingly to implementation.","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"eddafe87a9afae24966be82b0af954e40af5abb4","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def validate_authorization(http_request, authorized_rules_list):"},{"line_number":73,"context_line":"    \"\"\"Validates whether one or more X-ROLES in the HTTP header is authorized."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    If authorization fails, 401 is thrown with appropriate description."},{"line_number":76,"context_line":"    Additionally response specifies \u0027WWW-Authenticate\u0027 header with \u0027Token\u0027"},{"line_number":77,"context_line":"    value challenging the client to use different token (the one with"},{"line_number":78,"context_line":"    different set of roles)."},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":"    challenge \u003d \u0027Token\u0027"},{"line_number":81,"context_line":"    for rule in authorized_rules_list:"},{"line_number":82,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_835e7de7","line":79,"range":{"start_line":73,"start_character":4,"end_line":79,"end_character":7},"in_reply_to":"9f6a8fd7_8afdd73b","updated":"2018-05-17 10:17:36.000000000","message":"Done","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"46fe680ad965ecc0fe6b7aa864746771ba0c16e7","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            LOG.debug(ex)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    raise falcon.HTTPUnauthorized(\u0027Forbidden\u0027,"},{"line_number":89,"context_line":"                                  \u0027Tenant ID is missing a required role to \u0027"},{"line_number":90,"context_line":"                                  \u0027access this service\u0027,"},{"line_number":91,"context_line":"                                  challenge)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9f6a8fd7_8a92b7f5","line":90,"range":{"start_line":89,"start_character":34,"end_line":90,"end_character":55},"updated":"2018-05-02 09:26:09.000000000","message":"The exception description should be more generic to reflect new implementation. The rules do not necessarily apply to roles only.","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"eddafe87a9afae24966be82b0af954e40af5abb4","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            LOG.debug(ex)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    raise falcon.HTTPUnauthorized(\u0027Forbidden\u0027,"},{"line_number":89,"context_line":"                                  \u0027Tenant ID is missing a required role to \u0027"},{"line_number":90,"context_line":"                                  \u0027access this service\u0027,"},{"line_number":91,"context_line":"                                  challenge)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_635d61e8","line":90,"range":{"start_line":89,"start_character":34,"end_line":90,"end_character":55},"in_reply_to":"9f6a8fd7_8a92b7f5","updated":"2018-05-17 10:17:36.000000000","message":"Done","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"46fe680ad965ecc0fe6b7aa864746771ba0c16e7","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    if \u0027tenant_id\u0027 in params:"},{"line_number":97,"context_line":"        tenant_id \u003d params[\u0027tenant_id\u0027]"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    for rule in delegate_authorized_rules_list:"},{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            http_request.can(rule)"},{"line_number":102,"context_line":"            return tenant_id"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f6a8fd7_aa29bb9b","line":99,"updated":"2018-05-02 09:26:09.000000000","message":"This for-loop only makes sense when `tenant_id` is defined. We could move it into the if block.","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":26733,"name":"Amir Mofakhar","email":"amir@mofakhar.info","username":"amofakhar"},"change_message_id":"eddafe87a9afae24966be82b0af954e40af5abb4","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    if \u0027tenant_id\u0027 in params:"},{"line_number":97,"context_line":"        tenant_id \u003d params[\u0027tenant_id\u0027]"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    for rule in delegate_authorized_rules_list:"},{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            http_request.can(rule)"},{"line_number":102,"context_line":"            return tenant_id"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_03726d7d","line":99,"in_reply_to":"9f6a8fd7_aa29bb9b","updated":"2018-05-17 10:17:36.000000000","message":"Done","commit_id":"8a295b3dcc51b29f487cfbdb3a9d7f5b744a8afc"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"3b6a0b7f977bf7df3de90811b8ebbb90142bb0e4","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                                                   \u0027application/json\u0027)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def validate_authorization(http_request, authorized_rules_list):"},{"line_number":73,"context_line":"    \"\"\"Validates whether the request can access the service with any X-ROLES in the HTTP header."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    If authorization fails, 401 is thrown with appropriate description."}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_67ad4de9","line":72,"range":{"start_line":72,"start_character":4,"end_line":72,"end_character":26},"updated":"2018-05-18 15:56:55.000000000","message":"Please could we move this method to monasca_common, as it can also be used in the monasca-log-api?","commit_id":"52bc81fef5d1913d8b5e53407fc9751c9f4c10cc"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"fa66b02d001356d9f0420dcef31f6ea74791355a","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def validate_authorization(http_request, authorized_rules_list):"},{"line_number":73,"context_line":"    \"\"\"Validates whether the request can access the service with any X-ROLES in the HTTP header."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    If authorization fails, 401 is thrown with appropriate description."},{"line_number":76,"context_line":"    Additionally response specifies \u0027WWW-Authenticate\u0027 header with \u0027Token\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_d36d10cd","line":73,"range":{"start_line":73,"start_character":37,"end_line":73,"end_character":95},"updated":"2018-06-05 11:41:37.000000000","message":"I would suggest something like:\n\n\"is authorized according to provided policy rules list.\"","commit_id":"52bc81fef5d1913d8b5e53407fc9751c9f4c10cc"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"3b6a0b7f977bf7df3de90811b8ebbb90142bb0e4","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                                  challenge)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"def get_x_tenant_or_tenant_id(http_request, delegate_authorized_rules_list):"},{"line_number":95,"context_line":"    params \u003d falcon.uri.parse_query_string(http_request.query_string)"},{"line_number":96,"context_line":"    if \u0027tenant_id\u0027 in params:"},{"line_number":97,"context_line":"        tenant_id \u003d params[\u0027tenant_id\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_27b7553d","line":94,"range":{"start_line":94,"start_character":4,"end_line":94,"end_character":29},"updated":"2018-05-18 15:56:55.000000000","message":"Please could we move this method to monasca_common, as it can also be used in the monasca-log-api?","commit_id":"52bc81fef5d1913d8b5e53407fc9751c9f4c10cc"}]}
