Commit Graph

6102 Commits

Author SHA1 Message Date
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
Alexander Færøy bcb051fea4 Merge branch 'plumb' into 'main'
More plumbing for hs connections

See merge request tpo/core/arti!1098
2023-03-30 16:20:54 +00:00
Ian Jackson 7be791a916 Merge branch 'workflow' into 'main'
Document some workflow practices

See merge request tpo/core/arti!1079
2023-03-30 16:07:48 +00:00
Alexander Færøy c8a8aeae50 Merge branch 'send' into 'main'
tor-circmgr: Make take_or_launch_stub_circuit future Send

See merge request tpo/core/arti!1096
2023-03-30 15:58:32 +00:00
gabi-250 2cd36a4c44 Merge branch 'ring' into 'main'
tor-netdir: Implement `HsDirRing::find_pos`

See merge request tpo/core/arti!1095
2023-03-30 15:37:42 +00:00
Ian Jackson ab7e628555 CONTRIBUTING.md: Explicitly support --document-private-items
We have many internal doc comments with curated links etc., so we
should actually mention that formatting and reading those can be
useful.
2023-03-30 16:34:57 +01:00
Ian Jackson 922df2a10f CONTRIBUTING.md: Recommend --workspace when building docs 2023-03-30 16:34:53 +01:00
Ian Jackson 3746ad8c84 CONTRIBUTING.md: Add some refs for git autosquash
One ref to the official docs, one to a reasonable-looking blog post I
found via DDG.

Suggested in
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1079#note_2889631
2023-03-30 16:32:04 +01:00
Ian Jackson f7f3ad37ff CONTRIBUTING.md: Discourage contributors from rebasing (typo fix) 2023-03-30 16:32:00 +01:00
Nick Mathewson b62c46f0b5 CONTRIBUTING.md: Improve wording re not squashing 2023-03-30 16:31:36 +01:00
Ian Jackson 8882df7c51 CONTRIBUTING.md: Document X X X convention
The placement in the "Where are some good places to start hacking?"
section is rather awkward, but I didn't see where else to put it.
2023-03-30 16:31:36 +01:00
Ian Jackson ee9486f52d CONTRIBUTING.md: Add more notes about TODOs
The placement in the "Where are some good places to start hacking?"
section is rather awkward, but I didn't see where else to put it.
2023-03-30 16:31:36 +01:00
Ian Jackson a55ed63c6c CONTRIBUTING.md: Discourage contributors from rebasing 2023-03-30 16:31:36 +01:00
Ian Jackson 23c7bd9174 Run rustfmt
Apply this churn, which I deferred for ease of review.
2023-03-30 15:58:47 +01:00
Ian Jackson a14d18d295 arti-client: Call HsCircPool::launch_background_tasks
I found that I had the bug where I forgot to call this function, and
reached
   bad_api_usage!("The circuit launcher wasn't initialized")

The possibility of such a bug is a hazard of this API pattern.
2023-03-30 15:58:09 +01:00
Ian Jackson 577940853f tor-netdir: Implmeent HsDirRing::find_pos 2023-03-30 15:53:51 +01:00
Ian Jackson 3ed9dca842 tor-hsconn: Rename ConnError (from HsClientConnError)
The old name was unwieldy and other crates can just as well name it by
the crate scope.
2023-03-30 15:49:07 +01:00
Ian Jackson 255b9cac96 arti-client: When making hs conn, wait for bootstrap
Not doing this was a bug.  The bug was possible because of some code
duplication between the exit and hs paths.  Add a comment about that.
2023-03-30 15:49:07 +01:00
Ian Jackson 926abf3ade tor-client: Pass a netdir for each request
This will be more convenient inside tor-hsclient.  In arti-client,
this mirrors the way TorClient::get_or_launch_exit_circ works.
2023-03-30 15:49:07 +01:00
Ian Jackson dd493307f9 tor-circmgr: Make take_or_launch_stub_circuit future Send
thread_rng() isn't Send.  We can fix this by not holding it over an
await point.
2023-03-30 15:46:15 +01:00
Ian Jackson db968033cf tor-netdir: Make the hsdir ring be a TiVec
This eliminates an untyped `usize` index.
2023-03-30 15:43:48 +01:00
gabi-250 2ec38b4cdf Merge branch 'upgrades-20220330' into 'main'
Upgrade some dependencies in preparation for tomorrow's release

See merge request tpo/core/arti!1093
2023-03-30 13:24:46 +00:00
Nick Mathewson 26ee1feeb1 Upgrade dependency to latest rusqlite. 2023-03-30 08:33:44 -04:00
Nick Mathewson 289c30c5f0 Upgrade dependency to latest async-native-tls. 2023-03-30 08:32:18 -04:00
Nick Mathewson c6cbc2f4d6 Initial changelog draft for 1.1.3 2023-03-30 08:30:15 -04:00
Nick Mathewson 58dfe040f9 Merge branch 'async-utils' into 'main'
Move functionality from tor_basic_utils to tor_async_utils

See merge request tpo/core/arti!1091
2023-03-29 18:28:50 +00:00