)]}'
{"etc/monasca/log-api-config.conf":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"2b148ab7bc8128bccffe239c282ec61a41b43320","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"[roles_middleware]"},{"line_number":33,"context_line":"path \u003d /v2.0/log"},{"line_number":34,"context_line":"default_roles \u003d cmm-user"},{"line_number":35,"context_line":"agent_roles \u003d cmm-log-agent"}],"source_content_type":"text/plain","patch_set":4,"id":"5a710552_153c13c7","line":34,"updated":"2015-12-16 15:11:52.000000000","message":"monasca-user","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c4acd072e9f5884d38340fc0cdc69e6fef0a1e53","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"[roles_middleware]"},{"line_number":33,"context_line":"path \u003d /v2.0/log"},{"line_number":34,"context_line":"default_roles \u003d cmm-user"},{"line_number":35,"context_line":"agent_roles \u003d cmm-log-agent"}],"source_content_type":"text/plain","patch_set":4,"id":"3a7e1126_30b5d9cc","line":34,"in_reply_to":"5a710552_153c13c7","updated":"2015-12-17 10:21:43.000000000","message":"Done","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"2b148ab7bc8128bccffe239c282ec61a41b43320","unresolved":false,"context_lines":[{"line_number":32,"context_line":"[roles_middleware]"},{"line_number":33,"context_line":"path \u003d /v2.0/log"},{"line_number":34,"context_line":"default_roles \u003d cmm-user"},{"line_number":35,"context_line":"agent_roles \u003d cmm-log-agent"}],"source_content_type":"text/plain","patch_set":4,"id":"5a710552_b5517f10","line":35,"updated":"2015-12-16 15:11:52.000000000","message":"monasca-agent","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c4acd072e9f5884d38340fc0cdc69e6fef0a1e53","unresolved":false,"context_lines":[{"line_number":32,"context_line":"[roles_middleware]"},{"line_number":33,"context_line":"path \u003d /v2.0/log"},{"line_number":34,"context_line":"default_roles \u003d cmm-user"},{"line_number":35,"context_line":"agent_roles \u003d cmm-log-agent"}],"source_content_type":"text/plain","patch_set":4,"id":"3a7e1126_f0c75143","line":35,"in_reply_to":"5a710552_b5517f10","updated":"2015-12-17 10:21:43.000000000","message":"Done","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"}],"java/src/main/java/monasca/log/api/infrastructure/servlet/PostAuthenticationFilter.java":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"2b148ab7bc8128bccffe239c282ec61a41b43320","unresolved":false,"context_lines":[{"line_number":41,"context_line":"public class PostAuthenticationFilter implements Filter {"},{"line_number":42,"context_line":"  static final String CONFIRMED_STATUS \u003d \"CONFIRMED\";"},{"line_number":43,"context_line":"  static final String X_ROLES_ATTRIBUTE \u003d \"X-ROLES\";"},{"line_number":44,"context_line":"  static final String X_MONASCA_AGENT \u003d \"X-MONASCA-LOG-AGENT\";"},{"line_number":45,"context_line":"  static final String X_IDENTITY_STATUS_ATTRIBUTE \u003d \"X-IDENTITY-STATUS\";"},{"line_number":46,"context_line":"  private static final String X_TENANT_ID_ATTRIBUTE \u003d \"X-PROJECT-ID\";"},{"line_number":47,"context_line":"  static final String X_TENANT_ID_HEADER \u003d \"X-Tenant-Id\";"}],"source_content_type":"text/x-java","patch_set":4,"id":"5a710552_b57dffe8","line":44,"updated":"2015-12-16 15:11:52.000000000","message":"I would rename the constant as well.","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c4acd072e9f5884d38340fc0cdc69e6fef0a1e53","unresolved":false,"context_lines":[{"line_number":41,"context_line":"public class PostAuthenticationFilter implements Filter {"},{"line_number":42,"context_line":"  static final String CONFIRMED_STATUS \u003d \"CONFIRMED\";"},{"line_number":43,"context_line":"  static final String X_ROLES_ATTRIBUTE \u003d \"X-ROLES\";"},{"line_number":44,"context_line":"  static final String X_MONASCA_AGENT \u003d \"X-MONASCA-LOG-AGENT\";"},{"line_number":45,"context_line":"  static final String X_IDENTITY_STATUS_ATTRIBUTE \u003d \"X-IDENTITY-STATUS\";"},{"line_number":46,"context_line":"  private static final String X_TENANT_ID_ATTRIBUTE \u003d \"X-PROJECT-ID\";"},{"line_number":47,"context_line":"  static final String X_TENANT_ID_HEADER \u003d \"X-Tenant-Id\";"}],"source_content_type":"text/x-java","patch_set":4,"id":"3a7e1126_6bd37639","line":44,"in_reply_to":"5a710552_b57dffe8","updated":"2015-12-17 10:21:43.000000000","message":"Done","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"820b1e639eb88d3e1cb4e6f731574f9b02012a4a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"import javax.servlet.http.HttpServletResponse;"},{"line_number":32,"context_line":"import javax.ws.rs.core.MediaType;"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"import monasca.log.api.infrastructure.servlet.PreAuthenticationFilter.ErrorCapturingServletResponseWrapper;"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"/**"},{"line_number":37,"context_line":" * Authenticates requests using header information from the CsMiddleware. Provides the X-TENANT-ID"}],"source_content_type":"text/x-java","patch_set":5,"id":"da6ed579_254b4e89","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":6},"updated":"2016-01-13 00:29:45.000000000","message":"Was just wondering if we should move this Java class and the related class to monasca-common seeing as the only difference is the X_MONASCA_LOG_AGENT and variable and string.\n\nIt isn\u0027t a real heavyweight class, but avoiding some code duplication might be worthwhile in this case.","commit_id":"33e9d7aaa3f2c668a7cde70d26b177e102675f9b"}],"java/src/main/java/monasca/log/api/infrastructure/servlet/RoleAuthorizationFilter.java":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"820b1e639eb88d3e1cb4e6f731574f9b02012a4a","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import javax.servlet.http.HttpServletRequest;"},{"line_number":27,"context_line":"import javax.ws.rs.core.Context;"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"import static monasca.log.api.infrastructure.servlet.PostAuthenticationFilter.X_MONASCA_LOG_AGENT;"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"public class RoleAuthorizationFilter implements ContainerRequestFilter {"},{"line_number":32,"context_line":"  private static final Logger logger \u003d LoggerFactory.getLogger"}],"source_content_type":"text/x-java","patch_set":5,"id":"da6ed579_6559465a","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":6},"updated":"2016-01-13 00:29:45.000000000","message":"This was the other class that I was referring too in my previous comment.","commit_id":"33e9d7aaa3f2c668a7cde70d26b177e102675f9b"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c0f3e8048cae0dbefb21422ee101c44561248ff7","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import javax.servlet.http.HttpServletRequest;"},{"line_number":27,"context_line":"import javax.ws.rs.core.Context;"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"import static monasca.log.api.infrastructure.servlet.PostAuthenticationFilter.X_MONASCA_LOG_AGENT;"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"public class RoleAuthorizationFilter implements ContainerRequestFilter {"},{"line_number":32,"context_line":"  private static final Logger logger \u003d LoggerFactory.getLogger"}],"source_content_type":"text/x-java","patch_set":5,"id":"ba63e191_19aed32e","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":6},"in_reply_to":"da6ed579_6559465a","updated":"2016-01-19 10:41:06.000000000","message":"When, it is quite simple to move the first class, the second one relies heavily on classes that are not available in monasca-common (jersey). I could add them, but wouldn\u0027t really want to add such dependency into common part. The question is, is it worth it ?","commit_id":"33e9d7aaa3f2c668a7cde70d26b177e102675f9b"}],"monasca_log_api/api/logs_api.py":[{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"2b148ab7bc8128bccffe239c282ec61a41b43320","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        :param res: current response"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        res.status \u003d falcon.HTTP_501  # pragma: no cover"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_f502a70a","line":46,"updated":"2015-12-16 15:11:52.000000000","message":"Why do you exclude this from coverage?","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c4acd072e9f5884d38340fc0cdc69e6fef0a1e53","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        :param res: current response"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        res.status \u003d falcon.HTTP_501  # pragma: no cover"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_4bb0faf4","line":46,"in_reply_to":"5a710552_f502a70a","updated":"2015-12-17 10:21:43.000000000","message":"This script is an abstraction for the actual API defined elsewhere. No need to test it, so no need to have a coverage here.","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"}],"monasca_log_api/middleware/role_middleware.py":[{"author":{"_account_id":16172,"name":"Maciej Maciaszek","email":"maciej.maciaszek@ts.fujitsu.com","username":"macio"},"change_message_id":"254164f930f9269d5b5db42cff64775a85f73e6e","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        return is_authorized, is_agent"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    @staticmethod"},{"line_number":160,"context_line":"    def _is_authenticated(req):"},{"line_number":161,"context_line":"        headers \u003d req.headers"},{"line_number":162,"context_line":"        if _X_IDENTITY_STATUS in headers:"},{"line_number":163,"context_line":"            status \u003d req.headers.get(_X_IDENTITY_STATUS)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_9b501434","line":160,"range":{"start_line":159,"start_character":4,"end_line":160,"end_character":31},"updated":"2015-12-11 13:56:31.000000000","message":"You\u0027re invoking it on self like in #116. I would remove @staticmethod","commit_id":"0300574e7bcd76e793fcc587095fb22eda3c543b"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"2b148ab7bc8128bccffe239c282ec61a41b43320","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        [roles_middleware]"},{"line_number":81,"context_line":"        path \u003d /v2.0/log"},{"line_number":82,"context_line":"        default_roles \u003d cmm-user"},{"line_number":83,"context_line":"        agent_roles \u003d cmm-log-agent"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    Configuration explained:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_08ddd6df","line":82,"updated":"2015-12-16 15:11:52.000000000","message":"monasca-user","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c4acd072e9f5884d38340fc0cdc69e6fef0a1e53","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        [roles_middleware]"},{"line_number":81,"context_line":"        path \u003d /v2.0/log"},{"line_number":82,"context_line":"        default_roles \u003d cmm-user"},{"line_number":83,"context_line":"        agent_roles \u003d cmm-log-agent"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    Configuration explained:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_cb4b8aaf","line":82,"in_reply_to":"5a710552_08ddd6df","updated":"2015-12-17 10:21:43.000000000","message":"Done","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"},{"author":{"_account_id":16222,"name":"witek","email":"witold.bedyk@suse.com","username":"witek"},"change_message_id":"2b148ab7bc8128bccffe239c282ec61a41b43320","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        [roles_middleware]"},{"line_number":81,"context_line":"        path \u003d /v2.0/log"},{"line_number":82,"context_line":"        default_roles \u003d cmm-user"},{"line_number":83,"context_line":"        agent_roles \u003d cmm-log-agent"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    Configuration explained:"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_c8e6eeb3","line":83,"updated":"2015-12-16 15:11:52.000000000","message":"monasca-agent","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c4acd072e9f5884d38340fc0cdc69e6fef0a1e53","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        [roles_middleware]"},{"line_number":81,"context_line":"        path \u003d /v2.0/log"},{"line_number":82,"context_line":"        default_roles \u003d cmm-user"},{"line_number":83,"context_line":"        agent_roles \u003d cmm-log-agent"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    Configuration explained:"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_6bc7f612","line":83,"in_reply_to":"5a710552_c8e6eeb3","updated":"2015-12-17 10:21:43.000000000","message":"Done","commit_id":"579b86f857c57012fdba08c6973ec6c6a3736a85"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"820b1e639eb88d3e1cb4e6f731574f9b02012a4a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 FUJITSU LIMITED"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_a0216c4f","line":1,"range":{"start_line":1,"start_character":2,"end_line":1,"end_character":11},"updated":"2016-01-13 00:29:45.000000000","message":"Similar comment on this Python file as to the Java file. Wondering if this should move to monasca-common.\n\nIf possible, I would like the Python monasca-api and the monasca-log-api to use the same middleware.\n\nCurrently, the Python monasca-api has the files, https://github.com/openstack/monasca-api/blob/master/monasca_api/middleware/keystone_context_filter.py and https://github.com/openstack/monasca-api/blob/master/monasca_api/middleware/context.py.\n\nI\u0027m not completely up to speed on how all the authentication works. But, I\u0027m wondering why our implementation is so different than your implementation here and how to resolve that so we have common code. \n\nSo, I guess the first question is should we have common middleware in monasca-common for both the monasca-api and monasca-log-api. The second question is which implementation would we use.\n\nI\u0027m fine moving to your implementation here if that makes sense and is the right answer.\n\nIs there is something that I need to read up on that would be fine. This class is inheriting from oslo_middleware which is leading me to think we should be adopting what you\u0027ve done here.","commit_id":"33e9d7aaa3f2c668a7cde70d26b177e102675f9b"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c0f3e8048cae0dbefb21422ee101c44561248ff7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 FUJITSU LIMITED"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba63e191_ae317cee","line":1,"range":{"start_line":1,"start_character":2,"end_line":1,"end_character":11},"in_reply_to":"da6ed579_a0216c4f","updated":"2016-01-19 10:41:06.000000000","message":"After looking and keystone_context_filter, I found that logic there does not suit the needs of python monasca-log-api. Basically all I was concerned were tenantId and roles and the fact that authentication was successful. That was achieved with keystonemiddleware and it was fine for me. Next step was to add RBAC here and I just, somehow, end up with class below which in lean way authorizes the request if it was previously authenticated. \n\nApart from all that oslo_middleware has some WSGI job already done, so I could focus on actual logic. I don\u0027t mind the idea of moving it common if you\u0027d find it suitable and fitting, however I think that the same well may be hit as it was in Java. I mean, if it supposed to be an oslo middleware implementation (strictly speaking), appropriate entry in requirements.txt should be added. Otherwise, only logic should be moved and in actual api, that logic should be wrapped (decorated).\n\nMain question is, should oslo_middleware be specified in monasca_common. Personally I\u0027d like to avoid that, so as to allow concrete implementation to rely on what they need. Same thing as I\u0027d personally prefer for other libraries.","commit_id":"33e9d7aaa3f2c668a7cde70d26b177e102675f9b"}],"requirements.txt":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"820b1e639eb88d3e1cb4e6f731574f9b02012a4a","unresolved":false,"context_lines":[{"line_number":3,"context_line":"gunicorn\u003e\u003d19.2.0"},{"line_number":4,"context_line":"keystonemiddleware"},{"line_number":5,"context_line":"oslo.config\u003e\u003d1.2.1"},{"line_number":6,"context_line":"oslo.middleware\u003c\u003d1.0.0"},{"line_number":7,"context_line":"oslo.log\u003c\u003d1.0.0"},{"line_number":8,"context_line":"oslo.serialization\u003c\u003d1.6.0"},{"line_number":9,"context_line":"oslo.utils\u003c\u003d1.6.0"}],"source_content_type":"text/plain","patch_set":5,"id":"da6ed579_20901c43","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":4},"updated":"2016-01-13 00:29:45.000000000","message":"Please see what we are using in the monasca-api at https://github.com/openstack/monasca-api/blob/master/requirements.txt. Joe Keen just went through this in mid December to try and get Monasca completely compatible with Liberty. I think you need to bump some verion numbers to make get to the same level of libraries that Liberty us using.","commit_id":"33e9d7aaa3f2c668a7cde70d26b177e102675f9b"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c0f3e8048cae0dbefb21422ee101c44561248ff7","unresolved":false,"context_lines":[{"line_number":3,"context_line":"gunicorn\u003e\u003d19.2.0"},{"line_number":4,"context_line":"keystonemiddleware"},{"line_number":5,"context_line":"oslo.config\u003e\u003d1.2.1"},{"line_number":6,"context_line":"oslo.middleware\u003c\u003d1.0.0"},{"line_number":7,"context_line":"oslo.log\u003c\u003d1.0.0"},{"line_number":8,"context_line":"oslo.serialization\u003c\u003d1.6.0"},{"line_number":9,"context_line":"oslo.utils\u003c\u003d1.6.0"}],"source_content_type":"text/plain","patch_set":5,"id":"ba63e191_2e034c75","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":4},"in_reply_to":"da6ed579_20901c43","updated":"2016-01-19 10:41:06.000000000","message":"Guess so, but I will take care of it in next change.\nI want to get this topic closed and after it is done, I will start working on bumping version.","commit_id":"33e9d7aaa3f2c668a7cde70d26b177e102675f9b"}]}
