ores.iam.authorization_messages
Table of Contents
- 1. Includes
- 2. Messages
- 2.1. assign_role_request
- 2.2. assign_role_response
- 2.3. assign_role_by_name_response
- 2.4. assign_role_by_name_request
- 2.5. revoke_role_request
- 2.6. revoke_role_response
- 2.7. revoke_role_by_name_response
- 2.8. revoke_role_by_name_request
- 2.9. get_account_roles_request
- 2.10. get_my_roles_request
- 2.11. permission_resource_row
- 2.12. permission_area_count
- 2.13. list_account_permissions_request
- 2.14. list_my_permissions_request
- 2.15. permission_page_response
- 2.16. list_role_permissions_page_request
- 2.17. role_page_row
- 2.18. list_roles_page_request
- 2.19. role_page_response
- 2.20. role_holder
- 2.21. list_role_holders_request
- 2.22. role_holders_response
- 2.23. account_role_access
- 2.24. get_account_roles_response
- 2.25. get_role_permissions_request
- 2.26. get_role_permissions_response
- 2.27. put_role_permissions_request
- 2.28. suggest_role_commands_request
- 2.29. suggest_role_commands_response
The authorization protocol messages.
1. Includes
#include "ores.iam.api/domain/role.hpp" #include "ores.utility/domain/protocol.hpp" #include <chrono> #include <string> #include <string_view> #include <vector>
2. Messages
2.1. assign_role_request
2.1.1. account_id
2.1.2. role_id
2.1.3. change_reason_code
Why the role is given: a change reason that applies to a new record, such as
access.new_joiner. Empty means the service records system.new_record, for
callers that act on the platform's behalf.
2.1.4. change_commentary
A note the administrator adds to the reason. It is stored on the grant.
2.2. assign_role_response
2.2.1. success
2.2.2. error_message
2.3. assign_role_by_name_response
2.3.1. success
2.3.2. error_message
2.4. assign_role_by_name_request
2.4.1. principal
2.4.2. role_name
2.5. revoke_role_request
2.5.1. account_id
2.5.2. role_id
2.6. revoke_role_response
2.6.1. success
2.6.2. error_message
2.7. revoke_role_by_name_response
2.7.1. success
2.7.2. error_message
2.8. revoke_role_by_name_request
2.8.1. principal
2.8.2. role_name
2.9. get_account_roles_request
2.9.1. account_id
2.10. get_my_roles_request
2.11. permission_resource_row
/** * @brief One resource of the permission catalogue and what an account holds of it. * * The unit of a page. A screen draws a resource as a row with its actions as * columns, so a page holds whole rows and never half of one. =actions= are the * actions the catalogue defines for the resource, =held= the ones the account's * roles grant, and =roles= the roles that grant any of them, so a screen can * say why without reading the roles again. */
2.11.1. component
2.11.2. resource
2.11.3. actions
2.11.4. held
2.11.5. roles
2.12. permission_area_count
/** * @brief One area (a component) in which an account holds something, and how * many of its resources they hold. * * The areas a screen offers to choose from. An area the account holds nothing * in is not listed, so there is nothing to choose that would show an empty page. */
2.12.1. component
2.12.2. resources
2.13. list_account_permissions_request
/** * @brief One page of what an account's roles let it do, by resource. * * The caller needs iam::roles:read, as reading the account's roles does. The * page is the server's: =offset= and =limit= bound the rows, =area= narrows * them to one component, and =search= to a resource or component name. An empty * =area= means the first area the account holds something in, so a page is * always of one area. */
2.13.1. account_id
2.13.2. area
2.13.3. search
2.13.4. offset
2.13.5. limit
2.14. list_my_permissions_request
/** * @brief One page of what the caller's own roles let them do, by resource. * * The session names the account, so the request names none and the read needs * no permission: it is a self read on the allow-list of Authorised reads. The * paging fields are those of iam.v1.ops.list_account_permissions. */
2.14.1. area
2.14.2. search
2.14.3. offset
2.14.4. limit
2.15. permission_page_response
2.15.1. result
2.15.2. area
/** * @brief The area the rows belong to: the one asked for, or the first the * account holds something in when none was. */
2.15.3. rows
2.15.4. total_count
/** * @brief How many rows match the area and the search, not how many this page * holds. */
2.15.5. areas
2.15.6. area_whole
/** * @brief Whether the chosen area is granted whole, by =component::*= or by * everything, so a screen can say so and not tick every row. */
2.15.7. everything
/** * @brief Whether the roles grant everything (=*=). */
2.16. list_role_permissions_page_request
/** * @brief One page of the permission catalogue against what one role grants. * * It serves the role editor, which must offer every permission to tick, not * only the ones the role holds, so =include_unheld= asks for the rows the role * does not grant too. The paging fields are those of * iam.v1.ops.list_account_permissions. The caller needs iam::roles:read. */
2.16.1. role_id
2.16.2. area
2.16.3. search
2.16.4. include_unheld
2.16.5. offset
2.16.6. limit
2.17. role_page_row
/** * @brief One role as the roles list draws it. * * The permissions are counted, not listed: the list says how much a role lets * people do, and the role's own page pages what it lets them do. A service * role's count is zero, because it is not given to people and is not changed * from a screen. */
2.17.1. id
2.17.2. version
2.17.3. name
2.17.4. description
2.17.5. service
2.17.6. registration_default
2.17.7. requestable
2.17.8. permission_count
2.17.9. everything
2.18. list_roles_page_request
/** * @brief One page of the tenant's roles. * * =search= matches a role's name or description, =area= keeps the roles that * grant something in that area, and =include_service= brings in the platform's * own service roles, which are left out otherwise. A =role_id= names one role * and ignores the rest, so the role's own page reads its header the same way. * The caller needs iam::roles:read. */
2.18.1. role_id
2.18.2. search
2.18.3. area
2.18.4. include_service
2.18.5. offset
2.18.6. limit
2.19. role_page_response
2.19.1. result
2.19.2. roles
2.19.3. total_count
2.19.4. service_hidden
/** * @brief How many service roles were left out, so the list can say so. */
2.19.5. areas
/** * @brief The areas some listed role grants something in, with how many roles do. * An area no role grants is not offered, so choosing one never shows an empty list. */
2.20. role_holder
/** * @brief One person who holds a role, as the role's page draws them. * * Carries what a screen needs to name and show the person and say who gave the * role, so the page makes no second read per person. The picture is the * identifier of the account's image, empty when it has none. */
2.20.1. account_id
2.20.2. username
2.20.3. full_name
2.20.4. image_id
2.20.5. assigned_by
2.21. list_role_holders_request
/** * @brief One page of the people who hold a role, by name. * * The caller needs iam::roles:read, as reading who holds a role does. The page * is the server's: =offset= and =limit= bound the rows and =total_count= says * how many people hold the role. */
2.21.1. role_id
2.21.2. offset
2.21.3. limit
2.22. role_holders_response
2.22.1. result
2.22.2. holders
2.22.3. total_count
2.23. account_role_access
/** * @brief One role an account holds, with the permissions it grants and the * record of its assignment. * * The element both access reads answer with, so the member's screen and the * administrator's render one type. The permissions are attributed to the * role rather than flattened into one list, and the tail is the junction * row's own record of who granted the role, when and why. */
2.23.1. role
2.23.2. permission_codes
2.23.3. assigned_by
2.23.4. assigned_at
2.23.5. change_reason_code
2.23.6. change_commentary
2.24. get_account_roles_response
2.24.1. result
2.24.2. roles
2.25. get_role_permissions_request
2.25.1. role_id
2.26. get_role_permissions_response
2.26.1. result
2.26.2. permission_codes
2.27. put_role_permissions_request
/** * @brief Replaces the permissions a role bundles. * * The codes are the whole bundle the role should carry, not an increment: a * code the role bundles and this request omits is removed, and a code both * name stays. The write answers with the bundle as stored, so the caller * reads back what it wrote rather than assuming the two agree. * * The change reason and commentary are the junction row's own record of who * changed the bundle, when and why; the actor is stamped from the request. */