| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| | |
We'll need this for our rpc-library code to meaningfully open SOCKS
connections.
Closes #1523.
|
| | |
| |
| |
| |
| |
| |
| | |
This type exists in the `arti` crate. It wraps and delegates to
`arti_rpcserver::RpcSession`. Subsequent commits will use it to
expose information from the `arti` crate to the RPC system; right
now it does nothing.
|
| |/
|
|
| |
`FileWatcher::watch_file` can be used with arbitrary paths.
|
| |\
| |
| |
| |
| | |
Run tests of every crate, with all features disabled
See merge request tpo/core/arti!2350
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We can't do this for every crate.
I looked at what is now matrix-check to see if I wanted to use any of
the code. But it seems too entangled with its particular purpose, and
has a lot of embedded knowledge of our crates' features. I found it
sufficiently far from what I wanted that I decided on a fresh script.
|
| | |
| |
| |
| |
| | |
Fixes compilation with
cargo test --no-default-features -p arti --features=tokio,rustls
|
| | |
| |
| |
| | |
Disabling until #1549 is fixed to unblock CI.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The watch channel should help prevent flakiness in the tests
(`TestModule` uses `maybe_send` to only send the received config if it's
different from the previously received value. This is supposed to
prevent the tests from failing when duplicate update events are
received).
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
We need to know if `watch_configuration` is set in the descriptor
publisher reactor to know whether we should be watching the
`restricted_discovery.key_dirs` directories.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This also fixes a couple of issues with the previous implementation:
* it enables you to watch for more than just one file/extension per
directory (each directory now has a list of filters. If any of the
filters apply to the path contained in the notify::Event, the
`FilterWatcher` notifies the listeners
* it removes the list watched files from `FileWatcher`. This makes
things a lot simpler to grok: essentially, the file watcher only
ever watches directories, notifying if an "interesting" file was
changed (in our case, the interesting files are files that have a
relevant extension, such as `.auth`, or specific configuration
files, as specified by `ConfigurationSources`).
|
| | |
| |
| |
| | |
The `FileWatcher` now uses a `postage::watch` channel under the hood.
|
| | |
| |
| |
| |
| | |
The event handler will soon be made async, so we need a handle to the
runtime.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
For the most part, this is just code motion.
The only change here is that `prepare` is no longer a method on
`FileWatcher`. This decouples `FileWatcher` from `ConfigurationSources`,
enabling us to use it to watch files and directories that aren't
configuration.
|
| |/
|
|
|
| |
The `FileWatcher` doesn't contain the channel for receiving events
anymore, and `FileWatcher::event_matched` was removed at some point.
|
| |\
| |
| |
| |
| |
| |
| | |
Use std::backtrace instead of backtrace crate
Closes #1144
See merge request tpo/core/arti!2301
|
| | |
| |
| |
| |
| | |
std::backtrace::Backtrace's Display looks the same as
backtrace_rs::Backtrace's Debug
|
| | |
| |
| |
| |
| | |
Removes resolve_backtraces from rtmock since it is no longer needed as
stdlib's backtraces automatically lazily resolve without needing a &mut.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Don't need to tell docs.rs to enable `docsrs` cfg. It does it automatically as of https://github.com/rust-lang/docs.rs/pull/2390#event-11664409098
While this change isn't in our MSRV yet, we were only using this when building for docs.rs, where we use the latest anyway.
See merge request tpo/core/arti!2308
|
| | | |
| | |
| | |
| | |
| | | |
It now does it automatically, see
<https://docs.rs/about/builds#detecting-docsrs>.
|
| | | |
| | |
| | |
| | | |
This also adds a test for it.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
We can just used `build_for_arti()` here.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Restricted discovery mode is initially going to be gated behind the
experimental `restricted-discovery` feature.
Part of #1292
|
| | | |
| | |
| | |
| | |
| | | |
This also makes the `tests/testcases/hsc/hsc.md` test case a symlink to
`doc/hsc.md`.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds a bit more information to `hsc.md`.
Note: `hsc.md` is currently just a test case for the CLI tests. A future
commit promote it to module-level README.
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The help output of the `-c ` option includes some local paths, which can
be quite long on some platforms, spanning over multiple lines. This
causes the CLI tests to fail, because they expect each of the paths from
the `-c` help to fit on a single line.
To fix this, we can use `trycmd`'s `...` to match as many lines as
needed.
Closes #1509
|
| | |
| |
| |
| |
| |
| |
| | |
There are two error cases where the onion name isn't printed, but
previously returned `Ok(())`.
It now returns an error to exit with a non-zero status code.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Done with
```
cargo set-version --bump patch -p arti
```
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is the result of:
```
for crate in $( ./maint/list_crates |grep '^\(tor\|arti-\)' ); do
cargo set-version -p $crate 0.21.0
done
```
|
| |/ |
|
| |\
| |
| |
| |
| |
| |
| | |
arti: Add tests for the hss/hsc subcomands
Closes #1250
See merge request tpo/core/arti!2275
|
| | | |
|
| | |
| |
| |
| | |
Closes #1250
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
The `arti hsc` subcommand can't run without keymgr support.
Previously, it relied on `tor-keymgr/keymgr` being enabled indirectly by
its dependencies, via the `experimental` feature. We need to be able to
enable this feature in `arti` without relying on `experimental` (because
`arti hsc` will eventually be made non-experimental).
Part of #1487
|
| |
|
|
|
|
|
| |
Adding a `keymgr` feature here will enable us to detect if `arti` is
running without keymgr support. This is needed for the correct handling
of subcommands that require keymgr support (such as the `arti hsc`
subcommand).
|
| |
|
|
|
|
|
|
|
|
|
| |
I don't think we need a separate wrapper type for displaying
`HsClientDescEncKey` keys in the "C Tor format"
(`<auth-type>:<key-type>:<base32-encoded-public-key>`).
I think this should be the canonical string representation of
`HsClientDescEncKey`, so I'm removing the `display_authorized_client`
function and corresponding `DisplayAuthorizedHsClientDescEncKey` wrapper
type.
|
| |\
| |
| |
| |
| | |
Fix or allow warnings that show up in beta
See merge request tpo/core/arti!2244
|
| | |
| |
| |
| |
| |
| |
| | |
See
https://github.com/rust-lang/rust-clippy/issues/13001
I think it's OK to change this in our tree, nevertheless.
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
Fixes:
warning: unclosed HTML tag `FILE`
--> crates/arti/src/subcommands/hsc.rs:56:33
|
56 | /// Write the public key to <FILE>. Use - to write to stdout
| ^^^^^^
|
= note: `#[warn(rustdoc::invalid_html_tags)]` on by default
|
| | |
|
| |
|
|
|
|
|
| |
The `arti hsc prepare-service-discovery-key` command is now
`arti hsc get-key [--key-type=service-discovery]`.
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2212#note_3042903
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds an experimental `arti hsc` subcommand for managing client
state and keys. Currently, it only supports the
`prepare-service-discovery-keys` operation described in #1281 and
`doc/dev/notes/client-auth.md`.
A note on terminology: I am referring to services that encrypt the
second layer of their descriptor as running in "restricted discovery"
mode (because they can only be discovered, i.e. have their IPT points
found out, by a set of authorized clients). The corresponding client
"auth" keys, being the keys that enable the client to find out the list
of intro points, pow-params etc. of the service, are referred to as
service "discovery keys".
Alternative names I considered:
* extra descriptor encryption: accurate, but overly technical. IMO,
the CLI should be accessible to users who aren't familiar with the
nitty-gritty of the protocol
* shielded mode: good, but slightly misleading. Calling it "shielded
mode" makes it sound like a universally desirable "extra protection"
that should almost always be enabled (which is not the case). Seeing
`shielded_mode = off` in the config might be worry operators that
don't fully understand what "extra descriptor encryption" or
"shielded mode" means
* restricted mode: slightly inaccurate. It implies this mechanism is a
good substitute for conventional service-side authentication, which
it isn't (because client authorization isn't instantaneous)
Closes #1281
|
| |
|
|
| |
cargo set-version --offline -p arti 1.2.5
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nailing-cargo -uE set-version -p arti-client 0.20.0
nailing-cargo -uE set-version -p arti-relay 0.20.0
nailing-cargo -uE set-version -p arti-rpcserver 0.20.0
nailing-cargo -uE set-version -p tor-async-utils 0.20.0
nailing-cargo -uE set-version -p tor-basic-utils 0.20.0
nailing-cargo -uE set-version -p tor-bytes 0.20.0
nailing-cargo -uE set-version -p tor-cell 0.20.0
nailing-cargo -uE set-version -p tor-cert 0.20.0
nailing-cargo -uE set-version -p tor-chanmgr 0.20.0
nailing-cargo -uE set-version -p tor-checkable 0.20.0
nailing-cargo -uE set-version -p tor-circmgr 0.20.0
nailing-cargo -uE set-version -p tor-config 0.20.0
nailing-cargo -uE set-version -p tor-consdiff 0.20.0
nailing-cargo -uE set-version -p tor-dirclient 0.20.0
nailing-cargo -uE set-version -p tor-dirmgr 0.20.0
nailing-cargo -uE set-version -p tor-error 0.20.0
nailing-cargo -uE set-version -p tor-geoip 0.20.0
nailing-cargo -uE set-version -p tor-guardmgr 0.20.0
nailing-cargo -uE set-version -p tor-hsclient 0.20.0
nailing-cargo -uE set-version -p tor-hscrypto 0.20.0
nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0
nailing-cargo -uE set-version -p tor-hsservice 0.20.0
nailing-cargo -uE set-version -p tor-keymgr 0.20.0
nailing-cargo -uE set-version -p tor-linkspec 0.20.0
nailing-cargo -uE set-version -p tor-llcrypto 0.20.0
nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0
nailing-cargo -uE set-version -p tor-memquota 0.20.0
nailing-cargo -uE set-version -p tor-netdir 0.20.0
nailing-cargo -uE set-version -p tor-netdoc 0.20.0
nailing-cargo -uE set-version -p tor-persist 0.20.0
nailing-cargo -uE set-version -p tor-proto 0.20.0
nailing-cargo -uE set-version -p tor-protover 0.20.0
nailing-cargo -uE set-version -p tor-ptmgr 0.20.0
nailing-cargo -uE set-version -p tor-relay-selection 0.20.0
nailing-cargo -uE set-version -p tor-rpcbase 0.20.0
nailing-cargo -uE set-version -p tor-rtcompat 0.20.0
nailing-cargo -uE set-version -p tor-rtmock 0.20.0
nailing-cargo -uE set-version -p tor-socksproto 0.20.0
nailing-cargo -uE set-version -p tor-units 0.20.0
Each of which runs a rune like
cargo set-version --offline -p tor-units 0.20.0
|
| |\
| |
| |
| |
| | |
Run maint/fixup-features
See merge request tpo/core/arti!2229
|
| | | |
|