Commit Graph

180 Commits

Author SHA1 Message Date
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
Gabriela Moldovan 601f307fdd
dev docs: Remove unused arguments.
There are several places where he `KeyType` isn't needed anymore.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-16 11:38:00 +01:00
Gabriela Moldovan 47f15c8df5
dev docs: Clarify how C Tor key store loads keys from multiple different key dirs.
This also moves the `extension` function out of `KeyType` because for
the C Tor key store, a key's file extension depends on the role/user of
the key, which isn't known by `KeyType` (`KeyType` is a tor-agnostic key
type such as `Ed25519Private`).

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-16 11:37:55 +01:00
Gabriela Moldovan 4315d2e106
dev docs: Distinguish between arti_extension and ctor_extension.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-16 11:32:45 +01:00
Gabriela Moldovan 20e1e3004b
dev docs: Clarify that ArtiPath/CTorPath are relative to the key store root.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-16 11:32:42 +01:00
Gabriela Moldovan d518a1c1d8
dev docs: Add note about key store versioning.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-16 11:32:38 +01:00
Gabriela Moldovan 6b417fbbf9
dev docs: Add note about C Tor store configuration.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-16 11:32:31 +01:00
Gabriela Moldovan 6a1427db6f
dev docs: Move the key passphrases subsection to the Arti store section.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-16 10:59:36 +01:00
Gabriela Moldovan 4b95a8ac4e
dev docs: Create a separate section for the C tor key store discussion.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-16 10:59:33 +01:00
Gabriela Moldovan 702dfbddb0
dev docs: Rename {Key, HsClient}Identity.
This renames `KeyIdentity` to `KeySpecifier` so it doesn't get confused
with the concept of an "identity key". `HsClientIdentity` is also
renamed for consistency.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-16 10:59:23 +01:00
Nick Mathewson ca74fb448b Merge branch 'api-sketch' into 'main'
Add a sketch for our FFI/RPC architecture

See merge request tpo/core/arti!1005
2023-05-03 14:05:29 +00:00
Gabriela Moldovan 17ff3a6f6a
dev docs: Add a few lines about handling concurrent access.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:25 +01:00
Gabriela Moldovan 5407e599ab
dev docs: Fill out insert/remove APIs.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:20 +01:00
Gabriela Moldovan 67061688a6
dev docs: Remove incoherent waffle.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:16 +01:00
Gabriela Moldovan a5ff3191e9
dev docs: Update KeyMgr implementation based on latest discussions.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:11 +01:00
Gabriela Moldovan 3202aa33c5
dev docs: Remove unnecessary trait bounds.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:05 +01:00
Gabriela Moldovan 6c6e03ec4a
dev docs: Remove outdated reference to the comment field.
We decided against using it.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:54:00 +01:00
Gabriela Moldovan 37493b6bd3
dev docs: Add namespacing for client/hs/relay/.. keys.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:56 +01:00
Gabriela Moldovan 0be6e0a4ca
dev docs: Remove KeyIdentityResult.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:47 +01:00
Gabriela Moldovan 9af07e91a2
dev docs: Remove HSM APIs.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:42 +01:00
Gabriela Moldovan 49ff17901b
dev docs: clarify what a "key identity" is.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:38 +01:00
Gabriela Moldovan 28bac87d96
dev docs: Allow multiple key stores to be in use at the same time.
The key manager needs to be flexible enough to support loading keys from
one of several key stores. This is because when we add support for smart
cards, users will want to be able to store some keys on the smart card,
and others in one of the disk key stores (for example).

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:31 +01:00
Gabriela Moldovan fb6d5dc0d9
dev docs: Add some impls for `LocalUserIdentity`.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:22 +01:00
Gabriela Moldovan dc616d9e07
dev docs: Add key manager API sketch.
This is the first draft of the key manager API.

I don't expect this to be the final version of the API, and I'm sure
there are plenty of improvements to be made. This is mostly a request
for comments.

Closes #834

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-25 18:53:05 +01:00
Nick Mathewson e524f05aa9 rpc spec: define method namespacing.
Closes #822
2023-04-13 10:50:30 -04:00
Nick Mathewson cf00fd8e8a Merge branch 'rpc_conformance' into 'main'
RPC: Terminology and error-handling conformance

Closes #826 and #825

See merge request tpo/core/arti!1136
2023-04-13 13:45:40 +00: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 99c64abb6a Merge branch 'devdoc' into 'main'
Document some properties of semver

See merge request tpo/core/arti!1129
2023-04-12 20:37:25 +00:00
Nick Mathewson 89568ead54 rpc spec: Allocate a special ID for syntax errors. 2023-04-12 15:17:15 -04:00
Ian Jackson 1d0fae5467 dev docs: Reference semver trick
Discussion
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1129#note_2895839
2023-04-12 18:06:30 +01:00
Ian Jackson 5ae7e3c3f8 dev docs: Adding missing footnote
Discussion
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1129#note_2895837
2023-04-12 18:06:30 +01:00
Ian Jackson 09c7efe4a4 dev docs: Avoid main-verb-less sentence
Discussion
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1129#note_2895835
2023-04-12 18:06:30 +01:00
Ian Jackson 25b89af11c dev docs: Add missing word
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1129#note_2895834
2023-04-12 18:06:30 +01:00
Nick Mathewson 81368f2b5b dev docs: Clarify that it's two instances of the crate 2023-04-12 17:04:59 +00:00
Nick Mathewson 72277b902e dev docs: Clarify wording re who is exporting what 2023-04-12 17:03:46 +00: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 d492e644ab Merge branch 's101-q1' into 'main'
Update s101 values.

See merge request tpo/core/arti!1128
2023-04-12 14:53:36 +00: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 19799ceea4 dev docs: Make some explanation about semver 2023-04-11 19:41:28 +01:00
Ian Jackson 1c2bc8e92f dev docs: Make a heading a subheading 2023-04-11 19:33:14 +01:00
Ian Jackson ed46998f4a dev docs: Remove an obsolete comment.
I think we've bedded in the new process.
2023-04-11 19:33:07 +01:00
Alexander Færøy 1ff417c020 Update s101 values. 2023-04-11 18:35:56 +02:00
Nick Mathewson df0d5054a2 Merge branch 'release' into 'main'
doc/dev/Release.md: patch release workflow

See merge request tpo/core/arti!1111
2023-04-05 14:42:03 +00: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 599e2ffb7d doc/dev/Release.md: patch release workflow
We did roughly this today.  We put the CHANGELOG.md change in its own
MR, so it didn't end up in the tor-llcrypto-v0.4.4 tag.  It would have
been better to do it the other way so that's what I've documented.

I couldn't test-format this with pandoc because it got tricked by some
of the `$` into trying to run TeX.
2023-04-04 15:41:00 +01: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
Nick Mathewson 273b565b32 rpc-meta: Use "will" for what Arti does, "must" for what client does. 2023-03-24 17:28:19 +00:00
Nick Mathewson b06d853e12 rpc-meta: Rename intermediate response to "update". 2023-03-24 17:28:19 +00:00
Nick Mathewson eee5d847be rpc-meta-draft: consistently say "request" or "method", not "command". 2023-03-24 17:28:19 +00:00
Nick Mathewson 5f9a28d227 rpc-meta-draft: make a number of localized changes from the review. 2023-03-24 17:28:19 +00:00
Nick Mathewson 906b4bb631 Start drafting a dev note about a JSON-based OO RPC design. 2023-03-24 17:28:19 +00:00
Nick Mathewson 18e8ac7cb6 Rename key identifiers that have changed in the spec
Generated with perl:

s/K([PS])_hs_intro_tid/K$1_hs_ipt_sid/g;
s/K([PS])_onion_ntor/K$1_ntor/g;
s/K([PS])_hs_intro_ntor/K$1_hss_ntor/g;
s/K([PS])_hs_desc_ephem/K$1_hss_desc_enc/g;
2023-02-08 11:57:51 -05:00
Nick Mathewson d790ba2776 ffi_rpc_sketch: rearrange. 2023-02-03 08:55:21 -05:00
Nick Mathewson 19346ee891 ffi_rpc_sketch: tweak colors. 2023-02-03 08:54:02 -05:00
Nick Mathewson 49b217486a Add a sketch for our FFI/RPC architecture
I think that this might be the way forward, depending on our current
requirements and our users' current needs.  I've traced out some
challenges that would imply.
2023-02-03 08:48:33 -05:00
Alexander Færøy d41dbc2a46 Update Tor number for s101 o3 (Tor: 2033cc7b5e). 2023-01-27 12:50:06 +01:00
Alexander Færøy e30ece3532 Fix typo. 2023-01-27 12:46:14 +01:00
Nick Mathewson 79c6881366 exportedapisketc: note that HTTP can be tricky. 2023-01-26 08:29:46 -05:00
eta 51741398b2 Merge branch 'netdoc-builder' into 'main'
tor-netdoc: Provide NetdocEncoder (internal)

See merge request tpo/core/arti!984
2023-01-26 11:40:50 +00:00
Nick Mathewson 422e3382aa New results for heap_and_download_size.md 2023-01-25 14:59:46 -05:00