)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64498f731b80d21b92e7223fd005591b49b897df","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add examples and clarification around scope_types"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When we initially implemented the scope_types attribute, we included"},{"line_number":10,"context_line":"some documentation but we were never explicit describing how to use"},{"line_number":11,"context_line":"scope_types, what was officially supported, or why the attribute is"},{"line_number":12,"context_line":"important."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_952c84ad","line":10,"range":{"start_line":10,"start_character":37,"end_line":10,"end_character":45},"updated":"2018-05-16 18:45:04.000000000","message":"explicitly","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"06b07d62468c8998805873035fe8db7ddc48265e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add examples and clarification around scope_types"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When we initially implemented the scope_types attribute, we included"},{"line_number":10,"context_line":"some documentation but we were never explicit describing how to use"},{"line_number":11,"context_line":"scope_types, what was officially supported, or why the attribute is"},{"line_number":12,"context_line":"important."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_9b5273de","line":10,"range":{"start_line":10,"start_character":37,"end_line":10,"end_character":45},"in_reply_to":"5f7c97a3_952c84ad","updated":"2018-05-16 19:54:09.000000000","message":"Done","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"}],"doc/source/user/usage.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64498f731b80d21b92e7223fd005591b49b897df","unresolved":false,"context_lines":[{"line_number":191,"context_line":"the scope of the token used in the request. It is designed to match the"},{"line_number":192,"context_line":"available token scopes available from keystone, which are `system`, `domain`,"},{"line_number":193,"context_line":"and `project`. The examples highlighted here will show the usage with system"},{"line_number":194,"context_line":"and project APIs. Setting `scope_types` to anything but these three values is"},{"line_number":195,"context_line":"unsupported."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"For example, a policy that is used to protect a resource tracked in a project"},{"line_number":198,"context_line":"should require a project-scoped token. This can be expressed with `scope_types`"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_981a796d","line":195,"range":{"start_line":194,"start_character":18,"end_line":195,"end_character":12},"updated":"2018-05-16 18:45:04.000000000","message":"\u0027trust\u0027 is also a valid scope type isn\u0027t it? Or should no one ever use scope_types\u003d[\u0027trust\u0027]? Or if they do, do they also have to include \u0027project\u0027 in the list?","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"06b07d62468c8998805873035fe8db7ddc48265e","unresolved":false,"context_lines":[{"line_number":191,"context_line":"the scope of the token used in the request. It is designed to match the"},{"line_number":192,"context_line":"available token scopes available from keystone, which are `system`, `domain`,"},{"line_number":193,"context_line":"and `project`. The examples highlighted here will show the usage with system"},{"line_number":194,"context_line":"and project APIs. Setting `scope_types` to anything but these three values is"},{"line_number":195,"context_line":"unsupported."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"For example, a policy that is used to protect a resource tracked in a project"},{"line_number":198,"context_line":"should require a project-scoped token. This can be expressed with `scope_types`"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_fb6e0795","line":195,"range":{"start_line":194,"start_character":18,"end_line":195,"end_character":12},"in_reply_to":"5f7c97a3_981a796d","updated":"2018-05-16 19:54:09.000000000","message":"I wouldn\u0027t really think that is useful from a service perspective. Just because creating a trust requires a project, thus tokens generated from trusts are scoped to a project.","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64498f731b80d21b92e7223fd005591b49b897df","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":202,"context_line":"        name\u003d\u0027service:create_foo\u0027,"},{"line_number":203,"context_line":"        check_str\u003d\u0027role:admin\u0027,"},{"line_number":204,"context_line":"        scope_types\u003d[\u0027project\u0027],"},{"line_number":205,"context_line":"        description\u003d\u0027Creates a foo resource\u0027,"},{"line_number":206,"context_line":"        operations\u003d["}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_584b815e","line":203,"updated":"2018-05-16 18:45:04.000000000","message":"This seems kind of weird - you must have the admin role but it\u0027s a project-scoped resource? I was thinking something like:\n\nrole:admin or project_id:%(project_id)s\n\nOr something with role:member, idk.\n\n\u003clater\u003e\n\nOK after reading L233 I see this is intentional, but I still don\u0027t really have my head wrapped around this stuff yet.","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"06b07d62468c8998805873035fe8db7ddc48265e","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":202,"context_line":"        name\u003d\u0027service:create_foo\u0027,"},{"line_number":203,"context_line":"        check_str\u003d\u0027role:admin\u0027,"},{"line_number":204,"context_line":"        scope_types\u003d[\u0027project\u0027],"},{"line_number":205,"context_line":"        description\u003d\u0027Creates a foo resource\u0027,"},{"line_number":206,"context_line":"        operations\u003d["}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_dbcd4b87","line":203,"in_reply_to":"5f7c97a3_584b815e","updated":"2018-05-16 19:54:09.000000000","message":"No worries - it\u0027s kind of mind bending when you think about it, just because I don\u0027t think we\u0027ve actually forced ourselves to deal with sorting our APIs in this way. We just punt it to operators, which forces them to create a bunch of specific roles with weird conventions (e.g. foo_admin or bar_admin) and roll custom policies to protect system-level resources. So, if you had role bar_admin on some random project you\u0027d have the authorization to modify system-level APIs, which is the workaround of bug 968696 :(\n\nThis stuff is confusing...","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64498f731b80d21b92e7223fd005591b49b897df","unresolved":false,"context_lines":[{"line_number":215,"context_line":"pattern::"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":218,"context_line":"        name\u003d\u0027service:create_bar\u0027,"},{"line_number":219,"context_line":"        check_str\u003d\u0027role:admin\u0027,"},{"line_number":220,"context_line":"        scope_types\u003d[\u0027system\u0027],"},{"line_number":221,"context_line":"        description\u003d\u0027Updates a bar resource\u0027,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_d83eb1b8","line":218,"range":{"start_line":218,"start_character":22,"end_line":218,"end_character":28},"updated":"2018-05-16 18:45:04.000000000","message":"nit: update_bar? Since you\u0027re using PATCH.","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"06b07d62468c8998805873035fe8db7ddc48265e","unresolved":false,"context_lines":[{"line_number":215,"context_line":"pattern::"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":218,"context_line":"        name\u003d\u0027service:create_bar\u0027,"},{"line_number":219,"context_line":"        check_str\u003d\u0027role:admin\u0027,"},{"line_number":220,"context_line":"        scope_types\u003d[\u0027system\u0027],"},{"line_number":221,"context_line":"        description\u003d\u0027Updates a bar resource\u0027,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_9b0033ae","line":218,"range":{"start_line":218,"start_character":22,"end_line":218,"end_character":28},"in_reply_to":"5f7c97a3_d83eb1b8","updated":"2018-05-16 19:54:09.000000000","message":"Yes, good catch. Bad copy/paste.","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64498f731b80d21b92e7223fd005591b49b897df","unresolved":false,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":218,"context_line":"        name\u003d\u0027service:create_bar\u0027,"},{"line_number":219,"context_line":"        check_str\u003d\u0027role:admin\u0027,"},{"line_number":220,"context_line":"        scope_types\u003d[\u0027system\u0027],"},{"line_number":221,"context_line":"        description\u003d\u0027Updates a bar resource\u0027,"},{"line_number":222,"context_line":"        operations\u003d["}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_7850bd0b","line":219,"updated":"2018-05-16 18:45:04.000000000","message":"This makes more sense for the admin role.","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"54165fcd3f1ae3afdf04e23b95f578054881fbd0","unresolved":false,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":218,"context_line":"        name\u003d\u0027service:create_bar\u0027,"},{"line_number":219,"context_line":"        check_str\u003d\u0027role:admin\u0027,"},{"line_number":220,"context_line":"        scope_types\u003d[\u0027system\u0027],"},{"line_number":221,"context_line":"        description\u003d\u0027Updates a bar resource\u0027,"},{"line_number":222,"context_line":"        operations\u003d["}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_3b879f12","line":219,"in_reply_to":"5f7c97a3_7850bd0b","updated":"2018-05-16 19:59:04.000000000","message":"Technically - you could apply this to any role, like auditor (which is read-only). For lack of having a whiteboard [0].\n\nI guess the important/powerful part is that scope_types makes the role reusable (helping interop and maintainability for deployers) across the system and it\u0027s projects.\n\n[0] https://imgur.com/a/XGMnW","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64498f731b80d21b92e7223fd005591b49b897df","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"The `scope_types` attribute makes sure the token used to make the request is"},{"line_number":231,"context_line":"scoped properly and passes the `check_str`. This is powerful because it allows"},{"line_number":232,"context_line":"roles to be reused across different authorization levels without comprosing"},{"line_number":233,"context_line":"APIs. For example, the `admin` role in the above example is used at the"},{"line_number":234,"context_line":"project-level and the system-level to protect two different resources. If we"},{"line_number":235,"context_line":"only checked that the token contained the `admin` role, it would be possible"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_5874e19c","line":232,"range":{"start_line":232,"start_character":65,"end_line":232,"end_character":75},"updated":"2018-05-16 18:45:04.000000000","message":"spelling - not sure what you\u0027re going for here, compromising? composing?","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"06b07d62468c8998805873035fe8db7ddc48265e","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"The `scope_types` attribute makes sure the token used to make the request is"},{"line_number":231,"context_line":"scoped properly and passes the `check_str`. This is powerful because it allows"},{"line_number":232,"context_line":"roles to be reused across different authorization levels without comprosing"},{"line_number":233,"context_line":"APIs. For example, the `admin` role in the above example is used at the"},{"line_number":234,"context_line":"project-level and the system-level to protect two different resources. If we"},{"line_number":235,"context_line":"only checked that the token contained the `admin` role, it would be possible"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_fb1cc714","line":232,"range":{"start_line":232,"start_character":65,"end_line":232,"end_character":75},"in_reply_to":"5f7c97a3_5874e19c","updated":"2018-05-16 19:54:09.000000000","message":"Done","commit_id":"20b29be715bf469e54d9f6dfb568b5ae0c7bc523"}]}
