Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
whitelist node paths in read_state requests
Browse files Browse the repository at this point in the history
  • Loading branch information
mraszyk committed Aug 22, 2023
1 parent 6ac4e03 commit 5e673b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ All requested paths must have the following form:

- `/time`. Can always be requested.

- `/subnet`, `/subnet/<subnet_id>`, `/subnet/<subnet_id>/public_key`, `/subnet/<subnet_id>/canister_ranges`. Can always be requested.
- `/subnet`, `/subnet/<subnet_id>`, `/subnet/<subnet_id>/public_key`, `/subnet/<subnet_id>/canister_ranges`, `/subnet/<subnet_id>/node`, `/subnet/<subnet_id>/node/<node_id>`, `/subnet/<subnet_id>/node/<node_id>/public_key`. Can always be requested.

- `/request_status/<request_id>`, `/request_status/<request_id>/status`, `/request_status/<request_id>/reply`, `/request_status/<request_id>/reject_code`, `/request_status/<request_id>/reject_message`, `/request_status/<request_id>/error_code`. Can be requested if no path with such a prefix exists in the state tree or

Expand Down Expand Up @@ -4740,6 +4740,9 @@ The predicate `may_read_path` is defined as follows, implementing the access con
may_read_path(S, _, ["subnet", sid]) = True
may_read_path(S, _, ["subnet", sid, "public_key"]) = True
may_read_path(S, _, ["subnet", sid, "canister_ranges"]) = True
may_read_path(S, _, ["subnet", sid, "node"]) = True
may_read_path(S, _, ["subnet", sid, "node", nid]) = True
may_read_path(S, _, ["subnet", sid, "node", nid, "public_key"]) = True
may_read_path(S, _, ["request_status", Rid]) =
may_read_path(S, _, ["request_status", Rid, "status"]) =
may_read_path(S, _, ["request_status", Rid, "reply"]) =
Expand Down

0 comments on commit 5e673b8

Please sign in to comment.