)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"5716a37951acbd5e2de10271aff92a4d2f12cd53","unresolved":true,"context_lines":[{"line_number":13,"context_line":"Now, instead, we pare down the context object to the bare minimum before"},{"line_number":14,"context_line":"passing it for serialization in notification workflows."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Related-bug: https://bugs.launchpad.net/oslo.messaging/+bug/2030976"},{"line_number":17,"context_line":"Change-Id: Ic94323658c89df1c1ff32f511ca23502317d0f00"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"c476dcf4_2a7d6e9d","line":16,"range":{"start_line":16,"start_character":13,"end_line":16,"end_character":67},"updated":"2023-08-10 22:28:20.000000000","message":"This should just be the bug number (without or without a leading # sign). The bug updating hook script doesn\u0027t match on URL patterns in these footers.","commit_id":"385ad14214342219d4a236173b209d8c599ea50b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"5f97d7a6e99fb88b0b5f03b645aa735842c3e633","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Now, instead, we pare down the context object to the bare minimum before"},{"line_number":14,"context_line":"passing it for serialization in notification workflows."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Related-bug: https://bugs.launchpad.net/oslo.messaging/+bug/2030976"},{"line_number":17,"context_line":"Change-Id: Ic94323658c89df1c1ff32f511ca23502317d0f00"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"056fdd07_94ca8bcc","line":16,"range":{"start_line":16,"start_character":13,"end_line":16,"end_character":67},"in_reply_to":"c476dcf4_2a7d6e9d","updated":"2023-08-11 18:53:47.000000000","message":"Done","commit_id":"385ad14214342219d4a236173b209d8c599ea50b"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"3423f155da94428a22df1c023836ca217ba2d28c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"c2f421ce_580f0b67","updated":"2023-08-10 21:29:45.000000000","message":"Remaining TODO:\n- Ensure everyone is happy with the proposed allowlist\n- Test throughly in devstack","commit_id":"fe3e6c84ea5a26ff31f0fc8ddcf26396162253fc"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"9c7d33874b60425b5384033cd2bc903330e3e3ae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"df513b11_7f8a7d12","updated":"2023-08-10 21:36:21.000000000","message":"We should probably make sure that other projects are not putting secrets in user_* project_* or service_* namespaces, or be even more specific.","commit_id":"fe3e6c84ea5a26ff31f0fc8ddcf26396162253fc"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"e0909b6c14de51ee4f06e8d5da7d5c7e05c142c8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"a5396114_71b34fcf","updated":"2023-08-10 23:48:44.000000000","message":"\u003e Aug 10 23:08:13.448669 np0034919956 neutron-server[79480]: ERROR neutron.pecan_wsgi.hooks.translation AttributeError: \u0027Context\u0027 object has no attribute \u0027items\u0027\n\nSo despite the unit tests treating it as a dict, it is actually an object when it comes in there. I\u0027ll fix this up later tonight or in the morning.","commit_id":"cb9d5211f0ea53d4738b770ae870d3155fb8b77f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"5f97d7a6e99fb88b0b5f03b645aa735842c3e633","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"fcc68871_124c86ab","updated":"2023-08-11 18:53:47.000000000","message":"Thanks for the questions Sven, Dan answered them in the same way I would have.\n\nGoing to validate this resolves the issue in devstack for Ironic now.","commit_id":"b87f4110386e6e664cc0a7fffa23316e6664ff07"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"81c3e05bee83cca73a88761561e8adae5cd32e90","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"fb06bc82_7fbd459d","updated":"2023-08-14 17:27:23.000000000","message":"I\u0027d like to see a follow-up but I won\u0027t block anything over that","commit_id":"1b315615e7dc61dbf845bd663560fc8d5a18fa09"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"8413754aa98f4537b1b1e6067c7aa17c41073d3a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"5e974908_bb5b36a0","updated":"2023-08-16 15:07:22.000000000","message":"LGTM, follow-up cleanup would be cool tho","commit_id":"1b315615e7dc61dbf845bd663560fc8d5a18fa09"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"d18c50a274a4aff63045a15517230b4509633296","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"4c8f2b2d_4b6e36f2","updated":"2023-08-12 00:44:20.000000000","message":"Pushed changes to Ironic, Nova, and Neutron to verify against their larger set of jobs:\n- https://review.opendev.org/c/openstack/neutron/+/891246\n- https://review.opendev.org/c/openstack/nova/+/891245\n- https://review.opendev.org/c/openstack/ironic/+/891243","commit_id":"1b315615e7dc61dbf845bd663560fc8d5a18fa09"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"59d4f664eedc70b273858c5b7cfff6b87c787f6d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"8da2811e_ce3c821e","updated":"2023-08-11 21:23:32.000000000","message":"full output from a fixed ironic notification in devstack: https://gist.github.com/jayofdoom/876ffcb7e22e3d1f4641ca656eff08f6\n\nAppears to work. Below are all context related items from the above notification.\n\nRelevant parts, edited:\n\"_context_user\\\": \\\"841175731a4641629458070d24341a8d\\\",\n\\\"_context_project_id\\\": \\\"defdcc6ad78e4197a7e4416ed3277ab2\\\", \n\\\"_context_system_scope\\\": null,\n\\\"_context_project\\\": \\\"defdcc6ad78e4197a7e4416ed3277ab2\\\",\n\\\"_context_domain\\\": null, \n\\\"_context_user_domain\\\": \\\"default\\\", \n\\\"_context_project_domain\\\": \\\"default\\\", \n\\\"_context_is_admin\\\": false, \n\\\"_context_read_only\\\": false, \n\\\"_context_show_deleted\\\": false, \n\\\"_context_auth_token\\\": null, \n\\\"_context_request_id\\\": \\\"req-05cedd66-84ad-4c17-849f-8675d40bb9f1\\\", \\\"_context_global_request_id\\\": null, \n\\\"_context_resource_uuid\\\": null, \n\\\"_context_roles\\\": [\\\"admin\\\", \\\"reader\\\", \\\"member\\\"], \n\\\"_context_user_identity\\\": \\\"841175731a4641629458070d24341a8d defdcc6ad78e4197a7e4416ed3277ab2 - default default\\\", \n\\\"_context_is_admin_project\\\": true, \n\\\"_context_auth_token_info\\\": null","commit_id":"1b315615e7dc61dbf845bd663560fc8d5a18fa09"}],"oslo_messaging/notify/notifier.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4ea4875751e22a92118c96f06720a3e84fde7764","unresolved":true,"context_lines":[{"line_number":301,"context_line":"        #             payloads, otherwise we risk sending sensitive creds"},{"line_number":302,"context_line":"        #             to a notification bus."},{"line_number":303,"context_line":"        safe_values \u003d (\u0027domain\u0027, \u0027roles\u0027, \u0027global_request_id\u0027, \u0027request_id\u0027)"},{"line_number":304,"context_line":"        safe_prefixes \u003d (\u0027project_\u0027, \u0027user_\u0027, \u0027service_\u0027)"},{"line_number":305,"context_line":"        safe_ctxt \u003d {}"},{"line_number":306,"context_line":"        for k, v in ctxt.items():"},{"line_number":307,"context_line":"            if k in safe_values or k.startswith(safe_prefixes):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f069b11_9d137c1b","line":304,"updated":"2023-08-10 21:40:25.000000000","message":"I think this is probably okay, but since if it goes wrong, it gets real bad, I\u0027d keep the list to actual keys. Imagine if I started putting `user_auth_token` in there without any idea that it would end up in the notifications.\n\nJust MHO.","commit_id":"2153f9a2da707af54118fb782d62d006b7f4defd"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"5f97d7a6e99fb88b0b5f03b645aa735842c3e633","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        #             payloads, otherwise we risk sending sensitive creds"},{"line_number":302,"context_line":"        #             to a notification bus."},{"line_number":303,"context_line":"        safe_values \u003d (\u0027domain\u0027, \u0027roles\u0027, \u0027global_request_id\u0027, \u0027request_id\u0027)"},{"line_number":304,"context_line":"        safe_prefixes \u003d (\u0027project_\u0027, \u0027user_\u0027, \u0027service_\u0027)"},{"line_number":305,"context_line":"        safe_ctxt \u003d {}"},{"line_number":306,"context_line":"        for k, v in ctxt.items():"},{"line_number":307,"context_line":"            if k in safe_values or k.startswith(safe_prefixes):"}],"source_content_type":"text/x-python","patch_set":4,"id":"8e30524e_87ff3b62","line":304,"in_reply_to":"5ca3af23_e11a33b0","updated":"2023-08-11 18:53:47.000000000","message":"Done","commit_id":"2153f9a2da707af54118fb782d62d006b7f4defd"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c274d448d0aad26a1f89a8d23fd10e485efb548a","unresolved":true,"context_lines":[{"line_number":301,"context_line":"        #             payloads, otherwise we risk sending sensitive creds"},{"line_number":302,"context_line":"        #             to a notification bus."},{"line_number":303,"context_line":"        safe_values \u003d (\u0027domain\u0027, \u0027roles\u0027, \u0027global_request_id\u0027, \u0027request_id\u0027)"},{"line_number":304,"context_line":"        safe_prefixes \u003d (\u0027project_\u0027, \u0027user_\u0027, \u0027service_\u0027)"},{"line_number":305,"context_line":"        safe_ctxt \u003d {}"},{"line_number":306,"context_line":"        for k, v in ctxt.items():"},{"line_number":307,"context_line":"            if k in safe_values or k.startswith(safe_prefixes):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ca3af23_e11a33b0","line":304,"in_reply_to":"9f069b11_9d137c1b","updated":"2023-08-10 21:49:49.000000000","message":"I kind of concur, and also think the specific keys may be better than just \"does the name start with\" checking.\n\nThe defaults are all rooted in oslo.context, the projects where it is extended is more to enable specific tests/checks in their access models, afaik.","commit_id":"2153f9a2da707af54118fb782d62d006b7f4defd"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"c21e1aa973eb3254bf9049de03f0a144c1dd202f","unresolved":true,"context_lines":[{"line_number":175,"context_line":"    # NOTE(JayF): The below values are in the same order they are in"},{"line_number":176,"context_line":"    #             oslo_context.context.RequestContext.__init__()"},{"line_number":177,"context_line":"    safe_values \u003d ("},{"line_number":178,"context_line":"        \u0027user_id\u0027,"},{"line_number":179,"context_line":"        \u0027project_id\u0027,"},{"line_number":180,"context_line":"        \u0027domain_id\u0027,"},{"line_number":181,"context_line":"        \u0027user_domain_id\u0027,"},{"line_number":182,"context_line":"        \u0027project_domain_id\u0027,"},{"line_number":183,"context_line":"        \u0027request_id\u0027,"},{"line_number":184,"context_line":"        \u0027roles\u0027,"},{"line_number":185,"context_line":"        \u0027user_name\u0027,"},{"line_number":186,"context_line":"        \u0027project_name\u0027,"},{"line_number":187,"context_line":"        \u0027domain_name\u0027,"},{"line_number":188,"context_line":"        \u0027user_domain_name\u0027,"},{"line_number":189,"context_line":"        \u0027project_domain_name\u0027,"},{"line_number":190,"context_line":"        \u0027service_user_id\u0027,"},{"line_number":191,"context_line":"        \u0027service_user_domain_id\u0027,"},{"line_number":192,"context_line":"        \u0027service_user_domain_name\u0027,"},{"line_number":193,"context_line":"        \u0027service_project_id\u0027,"},{"line_number":194,"context_line":"        \u0027service_project_name\u0027,"},{"line_number":195,"context_line":"        \u0027service_project_domain_id\u0027,"},{"line_number":196,"context_line":"        \u0027service_project_domain_name\u0027,"},{"line_number":197,"context_line":"        \u0027service_roles\u0027,"},{"line_number":198,"context_line":"        \u0027global_request_id\u0027,"},{"line_number":199,"context_line":"        \u0027system_scope\u0027,"},{"line_number":200,"context_line":"        # NOTE(JayF) These have been renamed but may show up in notifications"},{"line_number":201,"context_line":"        \u0027user\u0027,"},{"line_number":202,"context_line":"        \u0027domain\u0027,"},{"line_number":203,"context_line":"        \u0027user_domain\u0027,"},{"line_number":204,"context_line":"        \u0027project_domain\u0027,"},{"line_number":205,"context_line":"    )"},{"line_number":206,"context_line":"    safe_ctxt \u003d {}"},{"line_number":207,"context_line":"    for k, v in ctxt.items():"}],"source_content_type":"text/x-python","patch_set":7,"id":"16e1d8d3_50013205","line":204,"range":{"start_line":178,"start_character":9,"end_line":204,"end_character":25},"updated":"2023-08-11 08:24:38.000000000","message":"these are basically all also part of auth workflows, no?\n\nI need a user and some credentials to auth.\n\nso sending the auth token is bad, but sending user_id user_name etc is fine?\n\nWhat is the threat model here?","commit_id":"cb9d5211f0ea53d4738b770ae870d3155fb8b77f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"27fee1055867f351d41f9c1b7b25cea262d195fc","unresolved":true,"context_lines":[{"line_number":175,"context_line":"    # NOTE(JayF): The below values are in the same order they are in"},{"line_number":176,"context_line":"    #             oslo_context.context.RequestContext.__init__()"},{"line_number":177,"context_line":"    safe_values \u003d ("},{"line_number":178,"context_line":"        \u0027user_id\u0027,"},{"line_number":179,"context_line":"        \u0027project_id\u0027,"},{"line_number":180,"context_line":"        \u0027domain_id\u0027,"},{"line_number":181,"context_line":"        \u0027user_domain_id\u0027,"},{"line_number":182,"context_line":"        \u0027project_domain_id\u0027,"},{"line_number":183,"context_line":"        \u0027request_id\u0027,"},{"line_number":184,"context_line":"        \u0027roles\u0027,"},{"line_number":185,"context_line":"        \u0027user_name\u0027,"},{"line_number":186,"context_line":"        \u0027project_name\u0027,"},{"line_number":187,"context_line":"        \u0027domain_name\u0027,"},{"line_number":188,"context_line":"        \u0027user_domain_name\u0027,"},{"line_number":189,"context_line":"        \u0027project_domain_name\u0027,"},{"line_number":190,"context_line":"        \u0027service_user_id\u0027,"},{"line_number":191,"context_line":"        \u0027service_user_domain_id\u0027,"},{"line_number":192,"context_line":"        \u0027service_user_domain_name\u0027,"},{"line_number":193,"context_line":"        \u0027service_project_id\u0027,"},{"line_number":194,"context_line":"        \u0027service_project_name\u0027,"},{"line_number":195,"context_line":"        \u0027service_project_domain_id\u0027,"},{"line_number":196,"context_line":"        \u0027service_project_domain_name\u0027,"},{"line_number":197,"context_line":"        \u0027service_roles\u0027,"},{"line_number":198,"context_line":"        \u0027global_request_id\u0027,"},{"line_number":199,"context_line":"        \u0027system_scope\u0027,"},{"line_number":200,"context_line":"        # NOTE(JayF) These have been renamed but may show up in notifications"},{"line_number":201,"context_line":"        \u0027user\u0027,"},{"line_number":202,"context_line":"        \u0027domain\u0027,"},{"line_number":203,"context_line":"        \u0027user_domain\u0027,"},{"line_number":204,"context_line":"        \u0027project_domain\u0027,"},{"line_number":205,"context_line":"    )"},{"line_number":206,"context_line":"    safe_ctxt \u003d {}"},{"line_number":207,"context_line":"    for k, v in ctxt.items():"}],"source_content_type":"text/x-python","patch_set":7,"id":"c61ad9a9_2c4dd2d3","line":204,"range":{"start_line":178,"start_character":9,"end_line":204,"end_character":25},"in_reply_to":"16e1d8d3_50013205","updated":"2023-08-11 13:29:39.000000000","message":"The threat is that currently this includes `context_auth_token`, which is the user\u0027s keytone token. Creating an allowlist without that in it is the primary gain here.","commit_id":"cb9d5211f0ea53d4738b770ae870d3155fb8b77f"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"4aac0529f7a908d03c582ff61db3c25439a5a470","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    # NOTE(JayF): The below values are in the same order they are in"},{"line_number":176,"context_line":"    #             oslo_context.context.RequestContext.__init__()"},{"line_number":177,"context_line":"    safe_values \u003d ("},{"line_number":178,"context_line":"        \u0027user_id\u0027,"},{"line_number":179,"context_line":"        \u0027project_id\u0027,"},{"line_number":180,"context_line":"        \u0027domain_id\u0027,"},{"line_number":181,"context_line":"        \u0027user_domain_id\u0027,"},{"line_number":182,"context_line":"        \u0027project_domain_id\u0027,"},{"line_number":183,"context_line":"        \u0027request_id\u0027,"},{"line_number":184,"context_line":"        \u0027roles\u0027,"},{"line_number":185,"context_line":"        \u0027user_name\u0027,"},{"line_number":186,"context_line":"        \u0027project_name\u0027,"},{"line_number":187,"context_line":"        \u0027domain_name\u0027,"},{"line_number":188,"context_line":"        \u0027user_domain_name\u0027,"},{"line_number":189,"context_line":"        \u0027project_domain_name\u0027,"},{"line_number":190,"context_line":"        \u0027service_user_id\u0027,"},{"line_number":191,"context_line":"        \u0027service_user_domain_id\u0027,"},{"line_number":192,"context_line":"        \u0027service_user_domain_name\u0027,"},{"line_number":193,"context_line":"        \u0027service_project_id\u0027,"},{"line_number":194,"context_line":"        \u0027service_project_name\u0027,"},{"line_number":195,"context_line":"        \u0027service_project_domain_id\u0027,"},{"line_number":196,"context_line":"        \u0027service_project_domain_name\u0027,"},{"line_number":197,"context_line":"        \u0027service_roles\u0027,"},{"line_number":198,"context_line":"        \u0027global_request_id\u0027,"},{"line_number":199,"context_line":"        \u0027system_scope\u0027,"},{"line_number":200,"context_line":"        # NOTE(JayF) These have been renamed but may show up in notifications"},{"line_number":201,"context_line":"        \u0027user\u0027,"},{"line_number":202,"context_line":"        \u0027domain\u0027,"},{"line_number":203,"context_line":"        \u0027user_domain\u0027,"},{"line_number":204,"context_line":"        \u0027project_domain\u0027,"},{"line_number":205,"context_line":"    )"},{"line_number":206,"context_line":"    safe_ctxt \u003d {}"},{"line_number":207,"context_line":"    for k, v in ctxt.items():"}],"source_content_type":"text/x-python","patch_set":7,"id":"ea94f1ec_f522f88b","line":204,"range":{"start_line":178,"start_character":9,"end_line":204,"end_character":25},"in_reply_to":"c61ad9a9_2c4dd2d3","updated":"2023-08-11 13:45:49.000000000","message":"Ack","commit_id":"cb9d5211f0ea53d4738b770ae870d3155fb8b77f"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"c21e1aa973eb3254bf9049de03f0a144c1dd202f","unresolved":true,"context_lines":[{"line_number":336,"context_line":"                retry\u003dNone):"},{"line_number":337,"context_line":"        payload \u003d self._serializer.serialize_entity(ctxt, payload)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        # NOTE(JayF): We must remove secure information from notification"},{"line_number":340,"context_line":"        #             payloads, otherwise we risk sending sensitive creds"},{"line_number":341,"context_line":"        #             to a notification bus. "},{"line_number":342,"context_line":"        safe_ctxt \u003d _sanitize_context(ctxt)"},{"line_number":343,"context_line":"        ctxt \u003d self._serializer.serialize_context(safe_ctxt)"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3ed2f90a_12e60d16","line":341,"range":{"start_line":339,"start_character":8,"end_line":341,"end_character":45},"updated":"2023-08-11 08:24:38.000000000","message":"see comment above:\n\na user name is also part of \"sensitive credentials\" imho.\n\nWhat is the threat model here?\n\nI\u0027d argue if an adversary get\u0027s hold of a users name that might already be bad, no?","commit_id":"cb9d5211f0ea53d4738b770ae870d3155fb8b77f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"27fee1055867f351d41f9c1b7b25cea262d195fc","unresolved":true,"context_lines":[{"line_number":336,"context_line":"                retry\u003dNone):"},{"line_number":337,"context_line":"        payload \u003d self._serializer.serialize_entity(ctxt, payload)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        # NOTE(JayF): We must remove secure information from notification"},{"line_number":340,"context_line":"        #             payloads, otherwise we risk sending sensitive creds"},{"line_number":341,"context_line":"        #             to a notification bus. "},{"line_number":342,"context_line":"        safe_ctxt \u003d _sanitize_context(ctxt)"},{"line_number":343,"context_line":"        ctxt \u003d self._serializer.serialize_context(safe_ctxt)"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"855235e5_c8238565","line":341,"range":{"start_line":339,"start_character":8,"end_line":341,"end_character":45},"in_reply_to":"3ed2f90a_12e60d16","updated":"2023-08-11 13:29:39.000000000","message":"Nova includes `user_id` and `project_id` in the *payload* for almost everything already, because it\u0027s important for auditing. The argument for keeping the context values in the message is so that other services don\u0027t explicitly *have* to include those things in the payload to enable that workflow.\n\nI think it\u0027s well-understood that anyone given access to the notification stream needs to be at *least* trusted enough to see `user_id`, as the stream is not separated by tenant, and includes low-level information about the deployment. However, including `auth_token` is a clear need-to-know violation, and a liability.\n\nOne argument for *not* including these things is that they\u0027re only present for the `messagingv2` driver and not something like `log`. So just saying \"put it in the payload\" would also be fine for me, but I think JayF is going for minimal breakage and maximum compatibility with what is already here and may already be in use, but while eliminating the `auth_token` exposure.","commit_id":"cb9d5211f0ea53d4738b770ae870d3155fb8b77f"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"4aac0529f7a908d03c582ff61db3c25439a5a470","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                retry\u003dNone):"},{"line_number":337,"context_line":"        payload \u003d self._serializer.serialize_entity(ctxt, payload)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        # NOTE(JayF): We must remove secure information from notification"},{"line_number":340,"context_line":"        #             payloads, otherwise we risk sending sensitive creds"},{"line_number":341,"context_line":"        #             to a notification bus. "},{"line_number":342,"context_line":"        safe_ctxt \u003d _sanitize_context(ctxt)"},{"line_number":343,"context_line":"        ctxt \u003d self._serializer.serialize_context(safe_ctxt)"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"80ad40ae_4da5d169","line":341,"range":{"start_line":339,"start_character":8,"end_line":341,"end_character":45},"in_reply_to":"855235e5_c8238565","updated":"2023-08-11 13:45:49.000000000","message":"Ack","commit_id":"cb9d5211f0ea53d4738b770ae870d3155fb8b77f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c35e1e501a5c45431be331240d2a37946de2e40d","unresolved":true,"context_lines":[{"line_number":171,"context_line":"        transport_cls\u003dmsg_transport.NotificationTransport)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"def _sanitize_context(ctxt):"},{"line_number":175,"context_line":"    # NOTE(JayF): The below values are in the same order they are in"},{"line_number":176,"context_line":"    #             oslo_context.context.RequestContext.__init__()"},{"line_number":177,"context_line":"    safe_keys \u003d ("}],"source_content_type":"text/x-python","patch_set":10,"id":"c20e6cba_9e4fa5f7","line":174,"updated":"2023-08-11 19:46:59.000000000","message":"This is better as a helper function, ++","commit_id":"576cfce7e04f01cd5001aff43c9ba7f22b3c471c"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"d495f707ce50cce3992bba9548da05ea7597f392","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        transport_cls\u003dmsg_transport.NotificationTransport)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"def _sanitize_context(ctxt):"},{"line_number":175,"context_line":"    # NOTE(JayF): The below values are in the same order they are in"},{"line_number":176,"context_line":"    #             oslo_context.context.RequestContext.__init__()"},{"line_number":177,"context_line":"    safe_keys \u003d ("}],"source_content_type":"text/x-python","patch_set":10,"id":"e40fb471_c59e3878","line":174,"in_reply_to":"c20e6cba_9e4fa5f7","updated":"2023-08-11 20:19:29.000000000","message":"Ack","commit_id":"576cfce7e04f01cd5001aff43c9ba7f22b3c471c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c35e1e501a5c45431be331240d2a37946de2e40d","unresolved":true,"context_lines":[{"line_number":205,"context_line":"    )"},{"line_number":206,"context_line":"    if type(ctxt) is dict:"},{"line_number":207,"context_line":"        # NOTE(JayF): Dictionaries are used extensively in unit tests to"},{"line_number":208,"context_line":"        #             represent a context; so support filtering them here."},{"line_number":209,"context_line":"        safe_ctxt \u003d {}"},{"line_number":210,"context_line":"        for key in safe_keys:"},{"line_number":211,"context_line":"            if ctxt.get(key, None) is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"17743c78_c4e067a7","line":208,"updated":"2023-08-11 19:46:59.000000000","message":"I think we should either:\n\n1. Fix the unit tests to use a proper fake object. It\u0027s already wrong that they\u0027re not, IMHO.\n2. Keep the same filter logic regardless of which is provided\n\nI dunno if it\u0027s allowed/expected that ctxt could be a dict at runtime, so to make this very defensive, I\u0027d do something like:\n\n```\nctxt_dict \u003d ctxt if isinstance(ctxt, dict) else ctxt.to_dict()\nsafe_dict \u003d {k: v for k, v in ctxt_dict.items()\n             if k in safe_keys}\nreturn (ctxt.__class__.from_dict(safe_dict)\n        if ctxt_dict is ctxt else safe_dict)\n```\n\nThat way we\u0027re taking all the same code paths regardless of which is provided, especially the filtering behavior, but we work with both. A unit test in this repo can ensure it works for both.","commit_id":"576cfce7e04f01cd5001aff43c9ba7f22b3c471c"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"70428f0f1599636b957f09b90f9aeaae3e11b977","unresolved":true,"context_lines":[{"line_number":205,"context_line":"    )"},{"line_number":206,"context_line":"    if type(ctxt) is dict:"},{"line_number":207,"context_line":"        # NOTE(JayF): Dictionaries are used extensively in unit tests to"},{"line_number":208,"context_line":"        #             represent a context; so support filtering them here."},{"line_number":209,"context_line":"        safe_ctxt \u003d {}"},{"line_number":210,"context_line":"        for key in safe_keys:"},{"line_number":211,"context_line":"            if ctxt.get(key, None) is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f83d894_27b3a06a","line":208,"in_reply_to":"17743c78_c4e067a7","updated":"2023-08-11 19:54:14.000000000","message":"Great suggestion; I don\u0027t want to stop the tempest run in progress but once I see results there I\u0027ll refactor to match your #2 suggestion.","commit_id":"576cfce7e04f01cd5001aff43c9ba7f22b3c471c"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"d495f707ce50cce3992bba9548da05ea7597f392","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    )"},{"line_number":206,"context_line":"    if type(ctxt) is dict:"},{"line_number":207,"context_line":"        # NOTE(JayF): Dictionaries are used extensively in unit tests to"},{"line_number":208,"context_line":"        #             represent a context; so support filtering them here."},{"line_number":209,"context_line":"        safe_ctxt \u003d {}"},{"line_number":210,"context_line":"        for key in safe_keys:"},{"line_number":211,"context_line":"            if ctxt.get(key, None) is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"a08d09fd_7df7ae43","line":208,"in_reply_to":"7f83d894_27b3a06a","updated":"2023-08-11 20:19:29.000000000","message":"Done","commit_id":"576cfce7e04f01cd5001aff43c9ba7f22b3c471c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"81c3e05bee83cca73a88761561e8adae5cd32e90","unresolved":true,"context_lines":[{"line_number":209,"context_line":"    if ctxt_dict is ctxt:"},{"line_number":210,"context_line":"        return safe_dict"},{"line_number":211,"context_line":"    else:"},{"line_number":212,"context_line":"        return ctxt.__class__.from_dict(safe_dict)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"class Notifier(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"8cdfebca_3e27696f","line":212,"updated":"2023-08-14 17:27:23.000000000","message":"This is reasonable as a backportable, but can you please mark this as to be removed and add this definition to `RequestContext` (via an attribute or property) so that these live in the same place and can be overridden by applications that override `RequestContext`?","commit_id":"1b315615e7dc61dbf845bd663560fc8d5a18fa09"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"03e0c30be9ea825d5cb6d283251b4dd3bf464513","unresolved":true,"context_lines":[{"line_number":209,"context_line":"    if ctxt_dict is ctxt:"},{"line_number":210,"context_line":"        return safe_dict"},{"line_number":211,"context_line":"    else:"},{"line_number":212,"context_line":"        return ctxt.__class__.from_dict(safe_dict)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"class Notifier(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"c901751b_c5a10589","line":212,"in_reply_to":"8cdfebca_3e27696f","updated":"2023-08-14 18:37:37.000000000","message":"So to make sure I understand; this can land as it sits. You\u0027d like to see:\n\n1) oslo.context\u0027s RequestContext updated to contain some sort of method to get a safe version of it (ctxt.redacted_copy() or something else with a more thoughtful name)\n2) Once that is released, update this code to call that method if it exists, otherwise fall back to this behavior.\n\nIs my understanding correct? If so I\u0027m happy to file a bug + start on that follow up, the code itself should be trivial.","commit_id":"1b315615e7dc61dbf845bd663560fc8d5a18fa09"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7351c44e13a73f3acb40ce06293a7b27615f081b","unresolved":true,"context_lines":[{"line_number":209,"context_line":"    if ctxt_dict is ctxt:"},{"line_number":210,"context_line":"        return safe_dict"},{"line_number":211,"context_line":"    else:"},{"line_number":212,"context_line":"        return ctxt.__class__.from_dict(safe_dict)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"class Notifier(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"47eeeb9d_6dfd2e67","line":212,"in_reply_to":"c901751b_c5a10589","updated":"2023-08-15 07:58:56.000000000","message":"Exactly, yes.","commit_id":"1b315615e7dc61dbf845bd663560fc8d5a18fa09"}]}
