Commit Graph

6199 Commits

Author SHA1 Message Date
gabi-250 d1553e884b Merge branch 'timerange' into 'main'
Ergonomic improvements to TimerangeBound

See merge request tpo/core/arti!1105
2023-04-03 17:35:42 +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
gabi-250 fd13a26a00 tor-dirclient: Add a comment about 50 x 1024 2023-04-03 17:32:48 +01:00
Ian Jackson 91b3b79fed tor-dirclient: Add test case for HsDescDownloadRequest
I couldn't find a test vector in C Tor.  This test case was generated
from the code here.

I'm fairly sure it's right since I managed to get my descriptor
downloader to work.  (That's not an MR yet, but uses this code.)
2023-04-03 17:32:48 +01:00
Ian Jackson 4a754ae76a tor-dirclient: Provide HsDescDownloadRequest
In my tests this seems to do the right thing, but I'm getting 404s.
I'm not sure if actually this URL is wrong.
2023-04-03 17:32:48 +01:00
Ian Jackson e85f974934 TimerangeBound: Provide .as_ref() and .as_deref() 2023-04-03 15:54:13 +01:00
Ian Jackson 456eb2f3df TimerangeBound: derive Debug and Clone, and Eq/PartialEq in tests 2023-04-03 15:50:32 +01:00
Nick Mathewson 289007ef96 Merge branch 'debug-hex' into 'main'
Debug two types as compact hex strings

See merge request tpo/core/arti!1104
2023-04-03 12:31:27 +00:00
Ian Jackson 14cc805929 Merge branch 'hserror' into 'main'
tor-error: Errors for hidden services

See merge request tpo/core/arti!1099
2023-03-31 18:16:45 +00:00
Ian Jackson aafdf755c0 Debug as hex strings for HsBlindId and HsDirIndex 2023-03-31 19:10:17 +01:00
Ian Jackson 9de3c1e307 tor-basic-utils: Provide impl_debug_hex 2023-03-31 19:10:06 +01:00
Ian Jackson c5f6b2e3a5 tor-error: Add missing footnote
I C&P this from tor-dirmgr, and missed this part.
2023-03-31 18:45:40 +01:00
gabi-250 11a70925fd Fix duplicated licence in Cargo.toml 2023-03-31 17:44:30 +00:00
Ian Jackson 8a045af479 Merge branch 'netdir' into 'main'
tor-netdir: API changes to support hsconn hsdir fetch

See merge request tpo/core/arti!1094
2023-03-31 17:12:42 +00:00
Ian Jackson 3e22e881f3 tor-error: Add OnionServiceNotRunning error
We'll want this later.  Define it now, though, since we've discussed
it here
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1099#note_2892020
2023-03-31 18:01:36 +01:00
Ian Jackson 68e5711684 tor-error: Put OnionService errors behind a new experimental-api feature 2023-03-31 17:57:24 +01:00
Ian Jackson 307af3714f tor-error: Document cargo feature 2023-03-31 17:56:32 +01:00
Ian Jackson c6a10387e3 tor-error: Errors for hidden services
So far these are just the errors that occur during descriptor
fetch. There will be more later as we have more code in tor-hsconn.

This is very user-facing; use the "onion service" terminology.
2023-03-31 17:53:40 +01:00
Ian Jackson c8973ae248 Merge branch 'docs-runes' into 'main'
CONTRIBUTING.md: Improve wording about docs builds recommendations

See merge request tpo/core/arti!1090
2023-03-31 16:52:31 +00:00
gabi-250 c21b1d5dc1 Merge branch 'hsdesc-encoder-client-auth' into 'main'
Stop requiring the caller to supply `AuthClient`s.

See merge request tpo/core/arti!1087
2023-03-31 14:46:35 +00:00
Gabriela Moldovan 3d0bf0d6ab
Generate a new KP_hss_desc_enc keypair for each new descriptor.
Previously, to build descriptors for hidden services with client auth
enabled, in addition to the list of authorized clients, users of
`HsDescBuilder` were required to also provide a descriptor encryption
keypair and a descriptor cookie. This was potentially dangerous and/or
error-prone, because the ephemeral encryption key and the descriptor
cookie are expected to be randomly generated and unique for each
descriptor.

This change makes `ClientAuth` private to the `hsdesc::build` module and
updates `HsDescBuilder` to build `ClientAuth`s internally. Users now
only need to provide the list of authorized client public keys.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-03-31 15:04:30 +01:00
Gabriela Moldovan 94a4d2ea43
Remove unnecessary test constant.
It's not really needed, it can just be generated at (test) runtime.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-03-31 15:04:26 +01:00
Gabriela Moldovan cd66781577
Add an encode-decode test for descriptors with client auth.
This adds a test for an `encode -> decode -> encode` flow for a hidden
service descriptor with client authorization enabled.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-03-31 15:04:23 +01:00
Gabriela Moldovan 8aa930a645
Use constants instead of magic numbers.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-03-31 15:04:19 +01:00
Gabriela Moldovan 2d9d16aabc
Stop requiring the caller to supply `AuthClient`s.
`AuthClient`s were originally meant to represent parsed `auth-client`
lines. In !1070, this struct was repurposed for representing individual
authorized clients in the HS descriptor encoder. However, hidden
services will likely use a list of public keys to represent the
authorized clients rather than a list of `AuthClient`s, as the
information from an `AuthClient` (`client_id`, `iv`, `encrypted_cookie`)
likely won't be immediately available to the hidden service.

This change updates the HS descriptor encoder to represent authorized
clients as a list of `curve25519::PublicKey`s. As such, it is now the
responsibility of the encoder to create the `client_id`, `iv`, and
`encrypted_cookie` using the available keys, the unencrypted descriptor
cookie, and HS subcredential.

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-03-31 15:04:15 +01:00
gabi-250 6f50628c78 Merge branch 'update_once_more' into 'main'
Run cargo-update to move away from yanked versions of "windows"

See merge request tpo/core/arti!1103
2023-03-31 14:03:14 +00:00
Nick Mathewson b62ca56805 Run cargo-update to move away from yanked versions of "windows"
(cargo-audit is complaining about these and breaking CI)
2023-03-31 09:40:12 -04:00
Nick Mathewson 2ab5348ab2 Remove semver.md files. 2023-03-31 09:24:41 -04:00
Nick Mathewson d3a727a5a1 Remove "publish = false" from tor-hsclient.
It is now a (conditional, experimental) dependency of arti-client.
2023-03-31 09:14:35 -04:00
gabi-250 9834ad2cce Merge branch 'version_bump' into 'main'
Bump versions for today's release of arti 1.1.3

See merge request tpo/core/arti!1102
2023-03-31 13:00:06 +00:00
Nick Mathewson 9ef115a7fb Patchlevel bumps for crates whose dependencies just changed.
These crates had no changes until just a moment ago. But since
we updated the versions on some of their dependents, they have now
changed themselves.  Thus they get patchlevel bumps.

```
tor-rtmock
tor-protover
tor-socksproto
tor-consdiff
tor-chanmgr
tor-dirclient
tor-hsservice
```
2023-03-31 08:30:14 -04:00
Nick Mathewson e208fb15ad Bump crate versions that have breaking changes
These crates have had breaking changes.  They are pre-1.0, so they get
a minor bump.

```
tor-basic-utils
tor-config
```
2023-03-31 08:28:06 -04:00
Nick Mathewson a81ab391ae Bump patchlevel on crates with non-breaking changes
For these crates, the changes are nontrivial, so we
_do_ bump the versions on which their dependent crates depend.

Fortunately, since they are all pre-1.0, we don't need to
distinguish semver-additions from other changes.  (Except for arti,
which _is_ post-1.0, but gets a patchlevel bump anyway.)

These are unstable crates with breaking changes:

```
tor-hscrypto
tor-hsclient
```

These have new or extended APIs:

```
safelog
tor-bytes
tor-cell
tor-linkspec
tor-llcrypto
tor-proto
tor-cert
arti-client
```

These have new unstable APIs or features:
```
tor-netdoc
tor-circmgr (also broke some unstable APIs)
arti (is post-1.0)
```

These have bugfixes only:
```
caret
tor-dirmgr
```
2023-03-31 08:24:39 -04:00
Nick Mathewson 622c79aaa6 Bump patchlevel on crates with semver-irrelevant changes.
Their dependents are _not_ updated to a more recent version.

These bumped the version of a dependency that they don't expose
```
tor-rtcompat
fs-mistrust
```

This one had internal refactoring:
```
tor-netdir
```

These had trivial changes only:
```
tor-checkable
tor-ptmgr
tor-guardmgr
arti-hyper
arti-bench
arti-testing
```
2023-03-31 08:20:58 -04:00
Nick Mathewson 89cfc629d3 Changelog: Move "Major bugfixes" to the top. 2023-03-31 07:51:09 -04:00
Nick Mathewson 538789b4ef Finish (?) CHANGELOG.md for 1.1.3 2023-03-31 07:39:59 -04:00
Nick Mathewson 69ebbedc3c Add Gabi to exclude_contributors.
(We don't include Tor employees in our "thanks" section.)
2023-03-31 07:30:09 -04:00
Nick Mathewson 778d9c6e8f Update CHANGELOG for last few commits. 2023-03-31 07:24:56 -04:00
Nick Mathewson e5369fc492 Merge branch 'doc_fixes' into 'main'
tor-hsclient: Fix a doc link.

See merge request tpo/core/arti!1101
2023-03-30 19:47:57 +00:00
Nick Mathewson e5f73ec8ab Merge branch 'update-20220330' into 'main'
Run cargo update in preparation for release tomorrow.

See merge request tpo/core/arti!1100
2023-03-30 19:14:37 +00:00
Nick Mathewson f245fc12bb tor-hsclient: Fix a doc link. 2023-03-30 15:12:57 -04:00
Nick Mathewson 626f47a5cc Merge branch 'fix-broken-doc-links' into 'main'
Fix broken doc link.

See merge request tpo/core/arti!1082
2023-03-30 19:12:01 +00:00
Nick Mathewson 0158f60506 Run cargo update in preparation for release tomorrow. 2023-03-30 14:49:23 -04:00