summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | tor-hsservice: Change TODO to reference #1194.Gabriela Moldovan2024-01-241-2/+2
| | | | | | | | | | | | | | | | This isn't something we need to do for #1083.
| * | | tor-hsservice: Map the publisher status to a State variant.Gabriela Moldovan2024-01-241-1/+8
| | | |
| * | | tor-hsservice: Update the publisher state on shutdown.Gabriela Moldovan2024-01-241-2/+10
| | | |
| * | | tor-hsservice: Implement {Publisher, IptMgr}StatusSender.Gabriela Moldovan2024-01-241-23/+54
| | | |
| * | | tor-hsservice: Implement OnionServiceStatus::current_problem.Gabriela Moldovan2024-01-241-1/+9
| | | |
| * | | tor-hsservice: Rename OnionServiceStatus fields.Gabriela Moldovan2024-01-241-7/+7
| | | | | | | | | | | | | | | | The new names are shorter and just as descriptive.
| * | | tor-hsservice: Remove outdated TODO.Gabriela Moldovan2024-01-241-2/+0
| | | |
| * | | tor-hsservice: Add separate status structs for the svc subsystems.Gabriela Moldovan2024-01-241-7/+48
| | | |
| * | | tor-hsservice: Replace StartupError with Problem.Gabriela Moldovan2024-01-241-10/+16
| | | |
| * | | tor-hsservice: Make UploadError public.Gabriela Moldovan2024-01-244-1/+4
| | | | | | | | | | | | | | | | | | | | We need it to be public, because we're about to expose it in the `OnionServiceStatus`.
| * | | tor-hsservice: Implement Into<RetryError<E>> for BackoffError.Gabriela Moldovan2024-01-241-0/+11
| | | | | | | | | | | | | | | | | | | | We're about to report the inner error in the `OnionServiceStatus` (without making `BackoffError` public).
| * | | tor-hsservice: Remove unused BackoffError variants.Gabriela Moldovan2024-01-241-31/+1
| | | | | | | | | | | | | | | | They're not used anywhere, so let's remove them.
| * | | tor-hsservice: Reassign a TODO to #1194.Gabriela Moldovan2024-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | The key expiration status is only relevant if the service is running in "offline mode", so these TODOs should be part of #1194.
| * | | tor-hsservice: Remove unused field.Gabriela Moldovan2024-01-241-4/+0
| | | | | | | | | | | | | | | | This field is unused now that we have `ipt_mgr_state` and `publisher_state`.
| * | | tor-hsservice: Give the IptManager a StatusSender.Gabriela Moldovan2024-01-242-0/+15
| | | | | | | | | | | | | | | | Part of #1083
| * | | tor-hsservice: Give the publisher a StatusSender.Gabriela Moldovan2024-01-243-0/+20
| | | | | | | | | | | | | | | | The publisher needs it to notify `OnionService` of status changes.
| * | | tor-hsservice: Add separate StatusSender types for the publisher and IPT mgr.Gabriela Moldovan2024-01-241-0/+10
| |/ / | | | | | | | | | | | | | | | For updating the underlying component statuses of an `OnionServiceStatus. Part of #1083
* | | Merge branch 'hss_errorkinds' into 'main'Nick Mathewson2024-01-243-43/+44
|\ \ \ | |/ / |/| / | |/ | | | | | | hsservice: Fix some errorkinds and related error handling issues. Closes #1225 See merge request tpo/core/arti!1906
| * hss: Report errors from keep_intro_established.Nick Mathewson2024-01-241-3/+3
| | | | | | | | | | Also, change `keep_intro_established`'s return type to indicate that it has no non-failing return cases.
| * hss: Refactor keep_intro_established to avoid needing NetDirNick Mathewson2024-01-241-22/+9
| | | | | | | | | | | | | | | | We already have the NetDir in establish_intro_once, so we might as well use it to get the intro-point details there. This confirms that we will not need IptError::NoNetdir, since we use wait_for_netdir in establish_intro_once.
| * hss: Downgrade MissingHsIdKeypair TODONick Mathewson2024-01-241-1/+1
| | | | | | | | | | This is not typically wrong, but it may become wrong if we do not tidy up MissingHsIdKeypair in the future. The TODO now refers to
| * hss: Change ticket about ErrorKind for IntroPointNotListedNick Mathewson2024-01-241-1/+1
| | | | | | | | This is now #1255, which is not a MUST.
| * hss: Clean up errors while expecting intro_establishedNick Mathewson2024-01-241-11/+25
| | | | | | | | Part of #1225, also #1237.
| * hss: Correct the Kind for EstablishTimeout.Nick Mathewson2024-01-241-1/+1
| |
| * hss: Return LocalResourceAlreadyInUse on StateLocked.Nick Mathewson2024-01-231-2/+1
| |
| * hss: Return summarized errorkind for RendCirc error.Nick Mathewson2024-01-231-2/+3
| |
* | tor-hsservice: Fix typos etc.gabi-2502024-01-241-2/+2
| |
* | tor-hsservice: key expiry: Code motion and reindentingIan Jackson2024-01-241-26/+22
| | | | | | | | | | Now the remove_if_expire closure, which does the actual work, is lexically outside the macro, and the macro is trivial.
* | tor-hsservice: key expiry: Introduce HsTimePeriodKeySpecifier traitIan Jackson2024-01-241-10/+49
| | | | | | | | | | | | This allows us to have a closure containing runtime-polymorphic code, reducing monomorphisation and moving code out of a macro into a closure.
* | tor-hsservice: key expiry: Rely on limiting publisher key scanIan Jackson2024-01-241-2/+6
| | | | | | | | | | | | | | | | Our pattern is now supposed to ensure that we don't see any irrelevant keys. So if we do, that's a bug. (The code layout is getting increasingly odd. We'll sort that out along with some code motion later.)
* | tor-hsservice: key expiry: Limit publisher key scanIan Jackson2024-01-241-5/+5
| | | | | | | | | | | | | | Only examine keys for this HS. This avoids thinking about every key for every HS for every netdir change. That's quadratic in the number of HS's.
* | tor-hsservice: key expiry: clippy followupIan Jackson2024-01-241-3/+2
| | | | | | | | | | These are now the last uses of these values, so they need the "no clone" form.
* | tor-hsservice: key expiry: Do publisher expiry from reactorIan Jackson2024-01-243-131/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In principle there is a small race with doing this in a separate task: the reactor and the sweeper might process the new netdir at different times. For example, if two netdir updates come in quick succession, and the sweeper is slower, the sweeper might still be running with the previous TPs as the publisher is creating keys in the new TPs. Theoretically, the sweeper might delete keys the reactor has just generated. This is also considerably simpler.
* | tor-hsservice: key expiry: Break out KeystoreSweeper::expire_keysIan Jackson2024-01-242-43/+55
| | | | | | | | We're going to change where this is called.
* | tor-netdir: Make hs_dirs_{upload, download} take separate args instead of tuple.Gabriela Moldovan2024-01-242-2/+2
| | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1904#note_2987777
* | tor-netdir, tor-hscrypto: Add function for computing SRV period offset.Gabriela Moldovan2024-01-241-6/+8
| | | | | | | | Part of #1166
* | tor-hsservice: Generate revision counter using the start of SRV period (fmt).Gabriela Moldovan2024-01-241-2/+1
| |
* | tor-hsservice: Generate revision counter using the start of SRV period.Gabriela Moldovan2024-01-241-18/+17
| | | | | | | | Closes #1166
* | tor-netdir: Simplify `hs_dirs_upload` by only returning the `Relay`.Gabriela Moldovan2024-01-242-3/+3
| | | | | | | | | | | | | | | | The publisher is the only user of `hs_dirs_upload`. It turns out it never actually uses the first element of the yielded `Item`s, so we can simplify `hs_dir_upload` to only return the HsDir `Relay`s. Part of #1166
* | tor-hsservice: Store HsDirParams in the publisher's TimePeriodContext.Gabriela Moldovan2024-01-241-10/+19
| | | | | | | | Part of #1166
* | tor-netdir: Make hs_all_time_periods return HsDirParams.Gabriela Moldovan2024-01-242-8/+10
|/ | | | | | | | | The descriptor publisher uses this function to obtain the list of relevant time periods. It will soon also need to know the `srv_lifespan` associated with each time period, so we change this function to return `HsDirParams`. Part of #1166
* tor-hsservice: Move compute_subcredentials to RendRequestContext.Gabriela Moldovan2024-01-223-103/+100
| | | | Part of #1242
* tor-hsservice: Do not store the subcredentials in RendRequestContext.Gabriela Moldovan2024-01-223-21/+22
| | | | | | | | | | | | | | | Previously, the subcredentials were computed in `IptEstablisher::launch` and stored in `RendRequestContext`. This caused long-running services to report errors like: ``` WARN tor_hsservice::helpers: Problem while accepting rendezvous request: error: Could not process INTRODUCE request: Introduction handshake was invalid: Circuit-extension handshake authentication failed ``` for clients using newer subcredentials than the ones the service had at the time the IPT was established. Fixes #1242
* tor-hsservice: Add an error type for subcredential lookup failures.Gabriela Moldovan2024-01-222-0/+6
| | | | | | | | The subcredential lookup will be moved to `IntroRequest::decrypt_from_introduce2`. The error returned on failure is going to be `IntroRequestError::Subcredentials`. Part of #1242
* Merge branch 'shutdown_on_drop' into 'main'gabi-2502024-01-195-14/+27
|\ | | | | | | | | | | | | Clarify shutdown behavior when RemoteOnionService is dropped. Closes #1238 and #1236 See merge request tpo/core/arti!1899
| * Document when (most) spawned tasks will be canceled.Nick Mathewson2024-01-182-0/+6
| |
| * hsservice: Temporarily remove .pause() (formerly stop()).Nick Mathewson2024-01-182-0/+3
| | | | | | | | | | We don't need to implement this for our first release of onion services, but we shouldn't ship a function that calls todo!().
| * Clarify usage and behavior of shutdown_tx.Nick Mathewson2024-01-181-6/+7
| |
| * Clarify IptEstablisher shutdown rulesNick Mathewson2024-01-181-8/+11
| | | | | | | | | | | | There was no actual bug here; just some missing comments. Closes #1236.
* | Merge branch 'tolerant_intro_established' into 'main'gabi-2502024-01-191-17/+12
|\| | | | | | | | | | | | | Do not reject INTRO_ESTABLISHED messages with extensions Closes #1238 See merge request tpo/core/arti!1898