Commit Graph

55 Commits

Author SHA1 Message Date
Nick Mathewson a939b19479 rpc: update rpc-meta-draft with new behavior. 2023-05-24 10:15:56 -04:00
Nick Mathewson 9c7680d1f8 rpc: Clarify how authentication works. 2023-05-16 09:08:25 -04:00
Nick Mathewson c89fac9c3c rpc: Clarify some object ID docs and remove impl details. 2023-05-16 09:08:25 -04:00
Nick Mathewson 585554d954 rpc: Revise example in documentation 2023-05-16 09:08:25 -04:00
Nick Mathewson e524f05aa9 rpc spec: define method namespacing.
Closes #822
2023-04-13 10:50:30 -04:00
Nick Mathewson 8dd65dcd5f rpc, spec: Document current ObjectError, RequestError behavior as correct. 2023-04-13 09:03:52 -04:00
Nick Mathewson ea77f959fb rpc: Change `id=<SYNTAX>` to "no id".
Now instead of hoping that buggy clients will detect a magic `id`,
we can simply tell them that they will get no `id` at all.  If they
can't handle that case, no major harm is done: the connection will
get closed anyway.
2023-04-13 09:03:52 -04:00
Nick Mathewson 89568ead54 rpc spec: Allocate a special ID for syntax errors. 2023-04-12 15:17:15 -04:00
Nick Mathewson 873f9285af rpc spec: Change arti_kinds => kinds per discussion. 2023-04-12 12:20:24 -04:00
Nick Mathewson ee5478ed40 rpc: terminology edits around "method" in spec draft
Always "method", never "command".

Always "authentication scheme", never "authentication method".
2023-04-12 11:11:01 -04:00
Nick Mathewson 4c020de38c Add notes on how to test the RPC engine 2023-04-12 07:34:57 -04:00
Nick Mathewson 3648ea08c9 Add notes on how to test the RPC engine 2023-04-12 07:34:57 -04:00
Nick Mathewson b9b5e9940a rpc: Fix typos/grammar errors 2023-04-11 20:02:01 +01:00
Ian Jackson 0be641e49a rpc: Rewrite `data` spec in JSON terms 2023-04-11 20:02:01 +01:00
Ian Jackson 3ac94956ef rpc: Clarify that error formatting display is indicative 2023-04-11 20:02:01 +01:00
Ian Jackson 1268223cff Use non-JSON-RPC-reserved values for our own errors 2023-04-11 20:02:01 +01:00
Ian Jackson 1e2a549960 rpc: Fix mistake in "JSON-RPC compatibility" section for errors 2023-04-11 20:02:01 +01:00
Ian Jackson 3d5ef53596 rpc: Discourage use of `code` 2023-04-11 20:02:01 +01:00
Ian Jackson 9c47558b10 rpc: Warn about relying too much about `data` 2023-04-11 20:02:01 +01:00
Ian Jackson 6c5577ab92 rpc: Provide example of an error response 2023-04-11 20:02:01 +01:00
Ian Jackson ef834a2c0b rpc: Provide a list of ErrorKind strings
Prompted by
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1107#note_2893078
2023-04-11 20:02:01 +01:00
Ian Jackson 9f8ba36814 rpc: Be more explicit about what the string error message is for (typo) 2023-04-11 20:02:01 +01:00
Nick Mathewson 1bc8bb4fb4 rpc: Be more explicit about what the string error message is for 2023-04-11 20:02:01 +01:00
Ian Jackson fca4535066 rpc: Proposed error format 2023-04-11 20:02:01 +01:00
Ian Jackson d4760f6d50 Merge branch 'rpc' into 'main'
Proposed rpc protocol edits and tightenings-up

See merge request tpo/core/arti!1078
2023-04-04 15:15:40 +00:00
Nick Mathewson 371da67641 rpc: Fix typos 2023-04-04 14:43:37 +00:00
Ian Jackson 854508d4ca rpc: Speak of "Arti" rather than "arti"
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1078#note_2889618
2023-04-03 17:59:58 +01:00
Ian Jackson b25cb1479c rpc: State the integer round-trip range limits
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1078#note_2889617
2023-04-03 17:58:06 +01:00
Ian Jackson 22b1c89344 rpc: Don't talk about "properties" of objects: rather, "members"
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1078#note_2889616
2023-04-03 17:55:09 +01:00
Ian Jackson 826b85f873 rpc: Move notes about cancellation to right section
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1078#note_2889614
2023-04-03 17:53:17 +01:00
Ian Jackson 374f76e1df rpc: Be clearer about updates content
You can't parse an update without knowing the request method (this was
already stated elsewhere).

Prompted by
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1078#note_2889613
2023-04-03 17:51:36 +01:00
Ian Jackson 250bb1aac6 rpc: Change how we talk about objects
Use just "object" in the introduction, but be specific that the
abstract data type is I-JSON, even if we later invent other
representations.

Prompted by
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1078#note_2889612
2023-04-03 17:47:09 +01:00
Ian Jackson b0a8b272f5 rpc: Right at top, say I-JSON
Prompted by
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1078#note_2889612
2023-04-03 17:44:40 +01:00
Ian Jackson 6fad573921 rpc: Change wording about responses
Prompted by
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1078#note_2889611
2023-04-03 17:42:56 +01:00
Dimitris Apostolou 94ba102a3b
Fix typo 2023-03-24 21:43:32 +02:00
Ian Jackson fc53f3ce98 rpc: Start on a list of the differences with JSON-RPC 2023-03-24 18:23:55 +00:00
Ian Jackson 53dbe74980 rpc: Discuss ordering and buffering 2023-03-24 18:23:55 +00:00
Ian Jackson ba4e1b0a1e rpc: Define term `field` 2023-03-24 18:23:55 +00:00
Ian Jackson 58fcb77825 rpc: Discuss cancellation request obj 2023-03-24 18:23:55 +00:00
Ian Jackson 2e0cad46bb rpc: Clarify what precisely the responses depend on
The format of an update or result depends on the *method* but not the
parameters or the subject.

Declare that the format of an error is uniform.  (It could have an
enum in it.)
2023-03-24 18:23:55 +00:00
Ian Jackson c4b75d9890 rpc: State that we're using I-JSON 2023-03-24 18:23:55 +00:00
Ian Jackson c64e44516b rpc: Forbid troublesome numbers as ids
This is a bit sad but I think we should have a conservative JSON
profile.
2023-03-24 18:23:55 +00:00
Ian Jackson e52b9ff9b6 rpc: Be more explicit about ignoring JSON fields 2023-03-24 18:23:55 +00:00
Ian Jackson 657c02c1ce rpc: Clarify/restate method definition requirements
In particular, abolish the notion of a "response type".  Since
responses don't come with a discriminant, each method may have only
one success response format (although of course that format might
itself have optional fields or be an enum or something).
2023-03-24 18:23:55 +00:00
Ian Jackson 131446620a rpc: Use Object for method targets and JSON object for document objects 2023-03-24 18:23:55 +00:00
Ian Jackson 094748cc1a rpc: Make `params` in a request non-optional
*If* it is optional that would depend on the request, which is a bit
 complicated to specify precisely.  And making it mandatory is more
 orthogonal.
2023-03-24 18:23:55 +00:00
Nick Mathewson 102a2ab540 rpc-meta-draft: Sketch an even-lower-level API. 2023-03-24 17:28:19 +00:00
Nick Mathewson a3de60bd86 rpc-draft: Sketch out more commands to add, start sketching APIs 2023-03-24 17:28:19 +00:00
Nick Mathewson d67dddcc8d rpc-meta: clarify when "object" means "JSON object". 2023-03-24 17:28:19 +00:00
Nick Mathewson 67ee3b225f rpc-meta: expand on handle/reference semantics. 2023-03-24 17:28:19 +00:00