Porter implementation of /exec_work_order (associated with TMapConKFrags for /reencrypt endpoint)#2729
Conversation
d4f3a82 to
220bbba
Compare
KPrasch
left a comment
There was a problem hiding this comment.
General high-level question: What made you decide to go with exec_work_order instead of retrieve?
Traditionally "retrieve" was defined by
I viewed this as a single step in that process and did not want to confuse it with being the entire "retrieve" process. One additional thought I had with this endpoint was the ability for
(See #2667 (comment)) wdyt? |
0f1206e to
f24b3e1
Compare
f24b3e1 to
5ace902
Compare
c09355f to
087c800
Compare
/exec_work_order (affected by TMapConKFrags)/exec_work_order (affected by TMapConKFrags)
|
Unsure why |
087c800 to
5d20446
Compare
/exec_work_order (affected by TMapConKFrags)/exec_work_order (associated with TMapConKFrags for /reencrypt endpoint)
/exec_work_order (associated with TMapConKFrags for /reencrypt endpoint)/exec_work_order (associated with TMapConKFrags for /reencrypt endpoint)
…roup ursula schemas together.
… tests. Some code refactoring.
…eated and used for tests. exec_work_order tests now actually use /reencrypt ursulas endpoints.
…r /exec_work_order. Documentation cleanup: use version 6.0.0 in output, 401 error status code.
|
|
||
|
|
||
| class WorkOrder(BaseField, fields.Field): | ||
| class WorkOrder(Base64BytesRepresentation): |
… about url encoding in docs. Add unit test for Base64BytesRepresentation field. Cleanup imports.
6494ba1 to
f73e028
Compare
| If URL parameters are used for the ``/publish_treasure_map`` endpoint instead of JSON data, the request will fail because the URL becomes too long. | ||
| .. code:: bash | ||
|
|
||
| curl -X POST "<PORTER URI>/publish_treasure_map?treasure_map=Qld7S8sbKFCv2B8KxfJo4oxiTOjZ4VPyqTK5K1xK6DND6TbLg2hvlGaMV69aiiC5QfadB82w%2F5q1Sw%2BSNFHN2e ...&bob_encrypting_key=026d1f4ce5b2474e0dae499d6737a8d987ed3c9ab1a55e00f57ad2d8e81fe9e9ac" |
There was a problem hiding this comment.
@piotr-roslaniec / @vepkenez - it turns out that I am able to execute /publish_treasure_map with URL parameters using the python requests library even though the URL is long (~3000 characters) - the problem was the treasure_map value not being URL encoded 🤦 . Made a note about URL encoding in the docs, and that it is tool dependent.
Porter implementation of `/exec_work_order` (associated with TMapConKFrags for `/reencrypt` endpoint)
Type of PR:
Required reviews:
What this does:
POC implementation of
/exec_work_orderfor Bob. The actual mechanics of the reencrypt operation is modified by TMapConKFrags since kFrags would not be stored by Ursula.Slight modification to original design of function - #2667 (comment) ('work_order' -> 'work_order_payload')
Request
{ "ursula": <checksum_address>, "work_order_payload": <bytes encoded as base64> }Response
{ "result": { "work_order_result": <bytes encoded as base64> } }Issues fixed/closed:
Related to #2704
Closes #2667
Notes for reviewers:
Based over #2733 .
RestMiddleware.send_work_order_payload_to_ursula()will be changed by TMapConKfrags to not require an associated arrangement id, so there is currently a stub for that function until TMapConKFrags gets merged. Therefore, actually trying to use the endpoint at the moment will not work properly.