summaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/mgr.rs
Commit message (Collapse)AuthorAgeFilesLines
* Force use of standard hasher with weak_tables.Nick Mathewson2026-03-241-1/+5
| | | | | | | | | | | | | Closes #2418. Fixes TROVE-2026-005, where we would use a less cryptographically secure (and probably less DoS resistant) hash function for these tables if: - We are built alongside another crate that uses `weak-table` - That crate enables the `weak-table/ahash` feature. - We are running on a system without hardware AES. Severity: Low
* rpc: Move responsibility for Session creation to ConnectionNick Mathewson2026-03-161-22/+8
| | | | | The Connection will know the options that the listener was created with, as opposed to RpcMgr, which is the same for every listener.
* rpc: Clean up GlobalId decoding API.Nick Mathewson2025-08-271-3/+3
|
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-2/+2
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* rpcserver: Remove a stale TODO. (RpcMgr works.)Nick Mathewson2025-01-281-2/+0
|
* rpc: Rename InvalidMethodName to InvalidRpcIdentifier.Nick Mathewson2025-01-271-3/+3
| | | | We're about to use this error type for other things too.
* arti-rpcserver: Tell connections what kind of auth to expect.Nick Mathewson2025-01-151-1/+5
|
* rpc: Make RpcMgr::lookup_object return context along with object.Nick Mathewson2024-06-101-6/+12
| | | | The context will make it possible to invoke rpc methods.
* rpc: Make the connection type always-Arc.Nick Mathewson2024-06-101-2/+2
|
* RPC: Give error from RpcMgr::new if method name is sufficiently bad.Nick Mathewson2024-05-141-4/+22
| | | | | (We don't give an error about unrecognized namespaces (for now), since we have no way to opt in to them.)
* RPC: Enforce method name format.Nick Mathewson2024-05-141-0/+6
| | | | | | | | | | | | We need to do this carefully, since we want our system to be extensible with new namespaces. First, when we are constructing an RpcMgr, we _warn_ about any method names that are misformed. Second, we add a test in the `arti` crate to fail if any method names are invalid. This will only catch method names in crates that `arti` depends on.
* Make RpcSession parameterized.Nick Mathewson2024-05-091-5/+4
| | | | | | This change allows it to hold a TorClient<R> that isn't type-erased. We'll use this for cases when we need to get the client directly and call functions on it.
* TorClient: Slightly cleaner (?) interface for registering RPC methods.Nick Mathewson2024-05-061-0/+19
|
* RPC: Implement methods to get and watch client bootstrap status.Nick Mathewson2024-05-061-0/+11
|
* Remove explicit allows for missing_panics_docs.Nick Mathewson2023-07-061-1/+0
| | | | These are no longer needed.
* Merge branch 'rpcdoc' into 'main'Ian Jackson2023-06-201-6/+32
|\ | | | | | | | | rpc: Minor docs improvements See merge request tpo/core/arti!1260
| * rpc: Expand and clarify and cross-reference lock hierarchyIan Jackson2023-06-161-6/+32
| |
* | Fix compilation afver last suggestion.Nick Mathewson2023-06-161-1/+2
| |
* | Apply 1 suggestion(s) to 1 file(s)Ian Jackson2023-06-161-0/+1
|/
* rpc: Document and apply lock hierarchy for Mgr/ConnectionNick Mathewson2023-06-151-4/+13
|
* rpc: Give the session-creation function an argument.Nick Mathewson2023-06-151-7/+5
| | | | | | This will later let us tell the session-creation function how the authentication occurred, which will let it decide what privileges to provide.
* rpc: revise session initialization a lot.Nick Mathewson2023-06-151-14/+23
| | | | | | | | | | | | | | Formerly, every time we wanted to launch a new connection, we had to give the RpcMgr a TorClient. The connection would hold that TorClient until a session was authenticated, and then would wrap it in a Session and put it in the object map. Now, the RpcMgr holds a Box<dyn Fn()...> that knows how to create Sessions. When a connection is authenticated, it asks the Mgr to make it a new session. This lets us make it clearer that the TorClient simply can't be given out until the connection is authenticated. Later, it will let us create more types of Session objects under more complicated rules.
* RPC: rename new_session to new_connectionNick Mathewson2023-06-151-1/+1
|
* rpc: revise the relationship between Mgr and ConnectionNick Mathewson2023-06-141-20/+22
| | | | | | | | This adds a Weak reference from Connection to Mgr, makes DispatchTable mutable, and makes a few other changes as discussed between me and Diziet the other week. I bet we are not done tweaking this, but I hope it's a setp forwards.
* RPC: Note a possible API change in RpcMgr::new.Nick Mathewson2023-06-051-0/+4
|
* RPC: Give out and accept GlobalIds for appropriate objects.Nick Mathewson2023-06-051-0/+1
|
* RPC: Implement a "global identifier" for non-session-bound IDsNick Mathewson2023-06-051-1/+32
| | | | | | | These identifiers are actually only "global" with respect to a given `RpcMgr`, but they should not be forgeable or reusable across RpcMgr objects. We're going to use them so that we have a kind of identifier for `TorClient`s that we can expose to SOCKS.
* rpc: Slightly refactor GenIdx encoding.Nick Mathewson2023-06-051-1/+1
|
* rpc: Give RpcMgr a registry of connections.Nick Mathewson2023-06-051-5/+50
| | | | | We're going to use this to implement arti#863, which requires that some RPC objects be globally nameable.
* rpc: Move Arc::new() to RpcMgr code.Nick Mathewson2023-06-051-2/+2
|
* RPC: Rename session.rs to connection.rsNick Mathewson2023-05-041-1/+1
|
* RPC: rename Session to Connection.Nick Mathewson2023-05-041-3/+3
| | | | | | | To me, "Session" suggests that we're authenticated, when we are not necessarily authenticated. Also, we may eventually want to have some kind of persistent session object; if we do, then we'll want Connections to be separate.
* RPC: Make authentication return a TorClient.Nick Mathewson2023-05-041-8/+4
| | | | | | (This is the correct capabilities-based behavior. For now it will only work if the TorClient uses a PreferredRuntime, but with luck we will find a solution for #837 soon.)
* RPC: Start on plumbing TorClient into our RPC codeNick Mathewson2023-05-041-3/+8
| | | | | Because of #837, we won't be able to work with _every_ TorClient<R>, so I'm only going to be using TorClient<PreferredRuntime> for now.
* RPC: Move the "listen" part of the RPC listener code to `arti`.Nick Mathewson2023-05-041-1/+1
| | | | | | | | | Now there's a module in `arti` that runs the loop for an RPC listener. The part of the old `listener` module that made the framed connections is now part of the `Session` object. There is now yet another a temporary location for the pipe; we should pick something better. At least now it's configurable.
* rpc: Make an RpcMgr type to own the DispatchTable.Nick Mathewson2023-05-041-0/+38
In the future, this will probably hold more data as well, like a TorClient and some configuration info. The TorClient will present an issue; I've made comments about that. Closes #820