aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/connection/auth.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* rpcserver: Improve conversion of authentication error.Nick Mathewson2025-01-281-0/+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.
* rpc: Refactor Cookie and UnloadedCookie into a single type.Nick Mathewson2025-01-151-1/+1
|
* rpc: consolodate naming of "inherent" auth.Nick Mathewson2025-01-151-4/+4
| | | | | | | | | 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.
* arti-rpcserver: Server side of cookie auth.Nick Mathewson2025-01-151-0/+17
|
* arti-rpcserver: Tell connections what kind of auth to expect.Nick Mathewson2025-01-151-8/+15
|
* arti-rpcserver: move inherent authentication to its own module.Nick Mathewson2025-01-151-69/+6
|
* 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