aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/ipt_mgr.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-hsservice: todos: Reference the tickets for expiryIan Jackson2024-01-111-1/+2
| | | | | The referenced #1198 is a MUST ticket. #1067 relates to no-longer-configred services and is in the Security milestone.
* tor-hsservice: todos: Reference the ticket for ipt mgr testsIan Jackson2024-01-111-5/+5
| | | | This is *not* a MUST ticket.
* tor-hsservice: todos: Permanently accept 2 clippy warningsIan Jackson2024-01-111-2/+2
|
* tor-hsservice: todos: Remove an obsolete allow.Ian Jackson2024-01-111-1/+0
|
* tor-hsservice: todos: Remove unused merge_join_subset_byIan Jackson2024-01-111-67/+1
| | | | | | | This is a rather specialised function which we had for a previous data structure but no longer use. Just get rid of it.
* tor-hsservice: todos: Add more work to #1210Ian Jackson2024-01-111-4/+4
|
* tor-hsservice: todos: Delete a done TODOIan Jackson2024-01-111-2/+0
| | | | We have IPT persistence now.
* tor-hsservice: todos: Reference the code motion ticketIan Jackson2024-01-111-1/+1
| | | | That ticket is *not* MUST.
* tor-hsservice: todos: Reference the IPT selection ticketIan Jackson2024-01-111-1/+1
|
* tor-hsservice: todos: Reference the ephemeral services ticketIan Jackson2024-01-111-1/+1
|
* tor-hsservice: todos: Reference a new ticket about parametersIan Jackson2024-01-111-2/+2
| | | | | This ticket is a MUST. We might downgrade it, but only after actually thinking about this question.
* tor-hsservice: todos: downgrade TODOs re keymgr APIIan Jackson2024-01-111-2/+2
| | | | When we fix #1074, we should change this code too.
* tor-hsservice: todos: reference a new ticket about reconfigurationIan Jackson2024-01-111-1/+1
|
* Fix typosDimitris Apostolou2024-01-081-1/+1
|
* tor-hsservice: Make IPT logs be persistent (fmt)Ian Jackson2023-12-131-1/+3
|
* tor-hsservice: Make IPT logs be persistentIan Jackson2023-12-131-7/+72
|
* tor-hsservice ipt_mgr: Rename STORAGE_RETRY from KEYSTORE_RETRYIan Jackson2023-12-131-2/+2
| | | | We're going to reuse this for other kinds of storage error.
* tor-hsservice: Plumb state dir and its mistrust into ipt_mgr (fmt)Ian Jackson2023-12-131-5/+2
|
* tor-hsservice: Plumb state dir and its mistrust into ipt_mgrIan Jackson2023-12-131-2/+16
| | | | | | | | | | | This is needed for the replay logs. It's a shame that CheckedDir is (i) a bit unergonomic (ii) has an extra bool in it, or we could pass one of those instead of these two arguments. Since HS's might be created after startup, TorClient must have these fields.
* tor-hsservice tests: replay: Pass nick to ↵Ian Jackson2023-12-131-1/+2
| | | | create_storage_handles_from_state_mgr (fmt)
* tor-hsservice tests: replay: Pass nick to create_storage_handles_from_state_mgrIan Jackson2023-12-131-1/+1
| | | | | This will allow us to more faithfully model the actual Arti state directory layout.
* tor-hsservice: Move ReplayLog construction to ipt_mgrIan Jackson2023-12-131-0/+7
|
* tor-hsservice: Move ShutdownStatus to svc.Gabriela Moldovan2023-12-131-16/+1
| | | | | | | This will be used by the descriptor publisher soon (we want to abolish its `ReactorError` altogether, and to do that, we need to get rid of `ReactorError::ShuttingDown`. `ShuttingDown::Terminate` happens to be a suitable replacement).
* Merge branch 'persist-macro' into 'main'Ian Jackson2023-12-071-1/+1
|\ | | | | | | | | | | | | Improve KeySpecifier, errors, IptKeySpecifier impl, etc. Closes #1116 and #1148 See merge request tpo/core/arti!1796
| * tor-hsservice: IptKeySpecifier: make it ownedIan Jackson2023-12-071-1/+1
| | | | | | | | | | The macro is going to want to be able to do a back-conversion from an ArtiPath, so there has to be an owned version.
* | Add a "Shutdown" status, and clarify places where status should change.Nick Mathewson2023-12-071-0/+1
|/
* tor-hsservice: Stop the KeystoreSweeper task when the service exits (fmt).Gabriela Moldovan2023-12-051-1/+1
|
* tor-hsservice: Make shutdown a broadcast channel.Gabriela Moldovan2023-12-051-8/+10
| | | | | We will soon need another component to be able to subscribe to the shutdown signal.
* tor-hsservice tests: Add some TODOs re IPT accepting stateIan Jackson2023-12-041-0/+8
|
* tor-hsservice tests: Check that restart gives us the same IPTs (fmt)Ian Jackson2023-12-041-11/+18
| | | | Mandatory formatting degradation.
* tor-hsservice tests: Check that restart gives us the same IPTsIan Jackson2023-12-041-2/+24
| | | | | | Store the IptParameters in the MockEstabState, and provide a function to list what the IPTs are. Then we can check the IPTs are reloaded and restored after restart.
* tor-hsservice tests: Test restarting the IPT managerIan Jackson2023-12-041-0/+9
| | | | | This is supposed to reload the state. In the next commit we'll check at least some of the things.
* tor-hsservice tests: Break out shutdown_check_no_tasksIan Jackson2023-12-041-4/+7
| | | | We're going to add another call site in a moment.
* tor-hsservice: Use keystore to store and reuse IPT keysIan Jackson2023-12-041-8/+76
|
* tor-hsservice: ipt_mgr: Prepare for nonfatal IPT creation errorsIan Jackson2023-12-041-4/+32
| | | | | | | | | Previously IPT creation could only fail due to key generation failures or other kinds of internal error, which were very unlikely and treated as fatal. But with key persistence, IPT creation will be able to fail due to eg disk full.
* tor-hsservice: ipt_mgr: Save and load IPT relays etc.Ian Jackson2023-12-041-6/+16
| | | | | | | | Store the IPT manager's data structure to the provided storage manager. Keys are not persistent yet! And we must save the publication IPT set since it can have the only record of IPT publication times.
* tor-hsservice: ipt_set: Have various methods take a RuntimeIan Jackson2023-12-041-2/+2
| | | | | | | | Actually, a SleepProvider. We will need this for timestamp conversion during loading and saving. channel() needs it to load. note_publication_attempt needs it for saving, as does borrow_for_update.
* tor-hsservice: ipt_set: Have various methods take a Runtime (pre-fmt)Ian Jackson2023-12-041-1/+2
| | | | Whitespace changes that make the next commit less noisy.
* tor-hsservice tests: Use a real storage manager for IPT manager testsIan Jackson2023-12-041-2/+8
|
* tor-hsservice tests: Break out MockedIptManager state structIan Jackson2023-12-041-18/+45
| | | | | | | And therefore, break out the IPT manager startup, into a MockedIptManager::start. We can have it borrow the TempDir, legitimising the _untracked call.
* tor-hsservice tests: Use a real keystore for IPT manager testsIan Jackson2023-12-041-54/+4
| | | | | | IPT persistence tests will need to actually save things. We'll fix up the `.into_untracked()` wrinkle shortly.
* tor-hsservice: ipt_set: Make ::channel() fallibleIan Jackson2023-12-041-1/+1
| | | | This is going to load the state from disk.
* tor-hsservice: Pass and record storage handlesIan Jackson2023-12-041-1/+15
| | | | | | | | | | | | | | | * Introduce type aliases for the Arc<dyn >. Add Send and Sync bounds. * Pass the storage manager to ipt_mgr and the per-key handle to ipt_set. * Store the handles in ipt_mgr::Immutable and IptPublishSet. * Change the ipt mgr storage key to "hs_ipts_{nickname}". This avoids use of "_" as a non-separator, and allows the possibility of other submodules using other storage keys too - and, here, we introduce one. * Provide a dummy struct for the IPT set state, which is needed to define the type alias etc. We'll populate that struct later.
* tor-hsservice: Introduce IptStoreErrorIan Jackson2023-12-041-4/+11
| | | | | | | | | | If we can't store IPT details, we mustn't publish the corresponding IPT. But that's not fatal; maybe we can store later. So introduce a new IptStoreError type, and change the return value from some functions that are going to be able to fail that way. This introduces a new TODO HSS: we need the publisher to be able to retry after such a failure.
* tor-hsservice: Add a TODO about state_dir reconfigurationIan Jackson2023-12-041-0/+3
|
* Merge branch 'hss-notes' into 'main'Ian Jackson2023-11-301-0/+101
|\ | | | | | | | | hssvc-ipt-algorithms.md: Move and fix up some text See merge request tpo/core/arti!1777
| * hssvc-ipt-algorithms.md: Fix moved text syntaxIan Jackson2023-11-291-2/+2
| | | | | | | | | | Fixes a rustdoc warning. This was already wrong in the .md file but nothing checked it there.
| * hssvc-ipt-algorithms.md: Move some text to ipt_setIan Jackson2023-11-291-0/+67
| | | | | | | | | | This is describing the detailed algorithm in compute_iptsetstatus_publish. Move it there (and add an xref).
| * hssvc-ipt-algorithms.md: Move some text to ipt_mgrIan Jackson2023-11-291-0/+33
| | | | | | | | | | This is describing the detailed algorithm in idempotently_progress_things_now. Move it there (and add an xref).
| * hssvc-ipt-algorithms.md: Delete rendundant textIan Jackson2023-11-291-0/+1
| | | | | | | | | | | | | | | | This is describing our data structures and IPT states. But we have this documented elsewhere, largely. There are a few sentences here that can usefully be replaced with a bit of extra text in the data structure docs.