summaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/connection
Commit message (Collapse)AuthorAgeFilesLines
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* rpcserver: Remove stale TODO about authenticationNick Mathewson2025-01-281-3/+0
| | | | (This TODO dates back to the point before we had sessions.)
* rpcserver: Improve conversion of authentication error.Nick Mathewson2025-01-282-7/+14
|
* rpc: Remove auth:query.Nick Mathewson2025-01-281-53/+0
| | | | | Nothing uses it; its role in negotiation has been replaced by the connect-point design.
* Document more that cancel is uncancellable.Nick Mathewson2025-01-221-0/+2
|
* rpc: Make cancel requests uncancellable.Nick Mathewson2025-01-221-2/+2
| | | | | | | | | The current cancel code is prone to deadlock, so the easiest way to solve it appears to be making cancel requests themselves uncancellable. I've included a test to verify the behavior; previously, this test caused a deadlock.
* rpc: Implement the rpc:cancel command.Nick Mathewson2025-01-161-0/+44
|
* rpc: More documentation on cookie_continue.Nick Mathewson2025-01-151-0/+5
|
* rpc: Clarify auth-repetition rules.Nick Mathewson2025-01-151-2/+5
|
* rpc: Document cookie messages a little more.Nick Mathewson2025-01-151-1/+14
|
* rpc: Refactor Cookie and UnloadedCookie into a single type.Nick Mathewson2025-01-152-2/+11
|
* rpc: consolodate naming of "inherent" auth.Nick Mathewson2025-01-152-9/+13
| | | | | | | | | We don't want to call this "unix path" anywhere, since it corresponds to _any_ case where the ability to negotiate a successful connection means that the client is authorized. We also don't want to call it "none": The authentication is inherent to the connection, not nonexistent.
* rpc: Tweak cookie protocol to bind both nonces.Nick Mathewson2025-01-151-4/+9
| | | | | | | | | | Previously participants in the cookie protocol only bound the peer nonce in their MACs. With this change, they bind both nonces. This change is _probably_ not necessary for security, but it can't hurt. It follows a general principle that Adam Langley told me a long time ago: you won't regret binding more, but you might regret binding less.
* rpc: Keep Cookie in an Arc.Nick Mathewson2025-01-151-2/+2
| | | | | Since this is a secret value, it's probably best not to copy it all over the place.
* arti-rpcserver: Server side of cookie auth.Nick Mathewson2025-01-153-8/+189
|
* arti-rpcserver: Tell connections what kind of auth to expect.Nick Mathewson2025-01-152-13/+22
|
* arti-rpcserver: move inherent authentication to its own module.Nick Mathewson2025-01-152-69/+83
|
* arti-rpcserver: remove some dead code.Nick Mathewson2025-01-151-57/+0
| | | | | Now that we have a solid idea of how connections happen, it's clear we won't need to enable this negotiation mechanism.
* Fix typo in arti-rpcserver auth.rs commentNeel Chauhan2024-10-181-1/+1
|
* Revise RPC documentation to be more informative.Nick Mathewson2024-10-021-4/+17
| | | | | | Previous documentation was more-or-less meant for the Arti developer only. This new documentation is intended for actual users of RPC functionality. It's meant to be extracted with `maint/rpc-doc-tool`.
* rpc: Refactor errors part 1: a new RpcMethod trait.Nick Mathewson2024-07-251-4/+2
| | | | | It is no longer necessary to say, for every RPC method, that its error type is RpcError.
* rpc: Pass around our rpc::Context in an Arc.Nick Mathewson2024-06-101-2/+2
| | | | | | | | Formerly we used a Box. That was okay at first, but now that we want RPC methods to be able to invoke other RPC methods, we don't want the Invocable methods to have to consume the Context. This requires that Context become Sync.
* RPC: Require an Error type in methods.Nick Mathewson2024-05-161-0/+2
| | | | | | | | This is needed so that we can cast special methods' return types properly. I wish I could make this optional, but Rust doesn't allow defaulting an associated type.
* Add a dead code allow in RPC codeIan Jackson2024-04-251-0/+1
|
* RPC: Remove method and object type from macros.Nick Mathewson2024-04-221-2/+2
| | | | | These are no longer needed, since they are inferred from the types of the functions.
* rpc: Move deftly attributes into an `rpc` namespace.Nick Mathewson2024-04-111-2/+2
|
* Globally rename rpc_invoke_fn to static_rpc_invoke_fnNick Mathewson2024-04-081-3/+3
| | | | | | | | This will be called _static_ to make it clear that it registers the method statically, so you don't need to install it at runtime. After a bit more work, there will be a separate macro that declares an installer function.
* Refactor: remove existence of HasConstTypeId_ as a traitNick Mathewson2024-04-081-2/+2
| | | | | | | | | We don't actually need this to be a trait; we just need methods and objects to have a `CONST_TYPE_ID_` if they want to participate in the inventory-based method registry. Removing this trait makes it much simpler to declare methods and objects.
* Port many of the macros in tor-rpcbase to use derive-deftly.Nick Mathewson2024-04-041-4/+8
| | | | | | This simplifies our implementation logic in a few places, and simplifies our invocation syntax greatly. There are a few infelicities, noted in `TODO RPC` comments.
* rpc: Give the session-creation function an argument.Nick Mathewson2023-06-151-1/+11
| | | | | | 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-8/+4
| | | | | | | | | | | | | | 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 Session=>RpcSessionNick Mathewson2023-06-151-1/+1
|
* rpc: Disable auth:get_rpc_protocol for now.Nick Mathewson2023-05-241-0/+8
|
* rpc: Make the top-level returned object a "session".Nick Mathewson2023-05-241-6/+12
| | | | | | This will make it easier to change the semantics of what exactly we return, whether it has to be/contain a client, whether you can use it to look up all the live objects, &etc.
* rpc: Implement auth:query.Nick Mathewson2023-05-231-1/+39
|
* rpc: Implement the auth:get_rpc_protocol method.Nick Mathewson2023-05-231-0/+49
|
* rpc: move existing auth code to new module.Nick Mathewson2023-05-231-0/+82