| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Previously, arti's primary keystore was referred to as its "default"
keystore. However, "default" is inaccurate here: there is no way to
meaningfully override this "default" (the "default" store acts as the
main keystore). Throughout the codebase, we query all keystores for keys
(including the secondary ones), but only ever write to the
default/primary keystore. This is OK for now, because it enables us to
have one mutable keystore, and multiple secondary, read-only stores.
|
| | |
|
| |
|
|
| |
This also reexports `HsId` from the `tor-hsservice` crate.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
We will soon add a new `OnionService` function for generating an HsId
for the service without launching it (#1621).
This new API will be implemented using `maybe_generate_hsid`, which will
need to take the user-provided keystore selector as an argument.
(the selector exists for future-proofing reasons; we're not yet exposing
it in the CLI, but it will be part of the new `OnionService` API)
|
| |
|
|
|
|
|
| |
This defers generating an HsId until `OnionService::launch`, enabling us
to use APIs like `OnionService::onion_name` to e.g. check for the
existence of an HsId (previously, you couldn't do that because creating
an `OnionService` would auto-generate the `HsId`).
|
| |
|
|
|
|
| |
As per #1247, we decided to stick with the current name.
As for the docs, they were added in !1946
|
| |
|
|
| |
This has been deprecated since 1.2.6, so let's remove it.
|
| | |
|
| |
|
|
| |
As mentioned in #727, this is not supported yet.
|
| |\
| |
| |
| |
| |
| |
| | |
Bug 1613: Add support for inserting externally generated and removing arbitrary service discovery keys
Closes #1613
See merge request tpo/core/arti!2396
|
| | | |
|
| |\ \
| |/
|/|
| |
| |
| |
| | |
tor-hsservice: Improve descriptor publisher status reporting
Closes #1216 and #1572
See merge request tpo/core/arti!2397
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
We will need to return a list of descriptor upload errors.
We can't return a `Vec<RetryError<DescUploadError>>` here because
`DescUploadError` is a lower-level error type that can't express that
e.g. the upload timed out.
|
| | | |
|
| | |
| |
| |
| |
| | |
We never return `UploadError::Timeout` (timeouts are represented as
`BackoffError::Timeout`).
|
| | |
| |
| |
| | |
This type is a `Result`, renaming for clarity.
|
| | |
| |
| |
| | |
The descriptor publisher docs live in the `publisher` module.
|
| | |
| |
| |
| | |
Closes #1216
|
| | |
| |
| |
| |
| | |
This makes it clearer that some of these functions are essentially
infallible.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
This enables us to report a "broken" service status if restricted
discovery is enabled but the authorized_clients list is empty.
|
| | |
| |
| |
| | |
Closes #1572
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, the `DegradedReachable` status is only reported by the the IPT
manager and `DegradedUnreachable` is unused.
Soon we'll the publisher reporting `DegradedReachable` or
`DegradedUnreachable` or `Running`, depending on how the descriptor
uploads went.
|
| | |
| |
| |
| |
| |
| | |
This will allows us determine the ComponentStatus of the publisher
(it'll be either `Running` or `Degraded`, depending on whether the
upload failed).
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After uploading the descriptor, the publisher transitions into the
`Idle` state. This transition happens even if the upload was
unsuccessful, so it shouldn't cause the onion service status to become
`Running` (because `Running` implies the service is fully reachable, and
if the publisher failed to upload the descriptor to some or all HsDirs,
that won't necessarily be the case).
A future commit will set the publisher's onion svc `State` to
`Running`/`Recovering`/`Broken` according to the upload status.
|
| | | |
|
| | |
| |
| |
| | |
This resolves a TODO.
|
| | |
| |
| |
| |
| |
| | |
Previously, these were stored in the immutable state behind a mutex, but
since they're not really immutable (we update them if the config
changes), it makes more sense to put them in `State`.
|
| | |
| |
| |
| |
| | |
These TODOs were addressed a while ago (when we introduced
`IptManager::ipt_errors`).
|
| | |
| |
| |
| |
| | |
These aren't dead code anymore, with the exception of
`PublisherStatusSender::send_recovering`, which isn't used.
|
| | |
| |
| |
| | |
This is already implemented.
|
| | |
| |
| |
| |
| |
| | |
This TODO was added in !2353 and was supposed to be about reporting a
broken/degraded onion service status if the restricted discovery config
watcher fails.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are three places where we query the KeyMgr for an `HsIdKeypair` but all
we really need is the public part. This commit changes those three callsites
to instead use `get::<HsIdKey>`.
This relies on the previous commit, which makes sure that a request for an
`HsIdKey` will always succeed if the keystore has a `HsIdKeypair` with the
same service nickname.
|
| | |
| |
| |
| |
| |
| |
| | |
This commit adds a new method `get_keypair_specifier()` to `KeySpecifier`.
This method is used to indicate when one KeySpecifier (e.g. `KP_hs_id`) is the
public part of another keypair (e.g. `KS_hs_id`). It will return the
containing keypair in this case, and `None` otherwise.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
FooKeypairSpecifier` instances
This adds the following trivial `From` instances:
- tor_hsservice: impl From<&HsIdPublicKeySpecifier> for HsIdKeypairSpecifier
- tor_hsservice: impl From<&BlindIdPublicKeySpecifier> for BlindIdKeypairSpecifier
- tor_hscrypto::pk: impl From<HsBlindIdKeypair> for HsBlindIdKey
- tor_llcrypto::pk::ed25519: impl From<ExpandedKeypair> for PublicKey
- tor_keymgr::mgr: impl From<TestKey> for TestPublicKey
- tor::hscrypto::pk: impl From<HsIdKeypair> for HsIdKey
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Everything copied in the previous commits to tor-keys is now removed and
tor-keys crate is used accross the code.
Minor changes to tor-keys to accomodate this change.
Part of #1137
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having this in the `tor-async-utils` crate prevents us from doing both
of the following without introducing a circular dependency:
* using it in `tor-rtmock` (which we currently do, particularly in
tests).
* using `tor-rtmock` to test things in `tor-async-utils`. We don't do
this yet, but it is generally sensible to do so. In particular we
want to move the `stream_peak` module there, which is currently tested
with `tor-rtmock`.
Moving this into its own crate avoids this circular dependency.
|
| |
|
|
|
|
|
| |
This ensures that if a directory used as a `key_dir` is moved (e.g.
renamed), and then moved back to its original location (the one
specified in `key_dirs`), our watcher continues watching the `key_dirs`
contents.
|
| |
|
|
| |
`FileWatcher::watch_file` can be used with arbitrary paths.
|
| |
|
|
|
| |
This ensures that if a `key_dir` is created after we start watching it
(or if it's moved), we are still able to detect changes.
|
| |
|
|
|
|
| |
While this means we will be recreating the watcher slightly more often
than necessary, this new approach is less error-prone than what we had
before.
|
| | |
|
| | |
|