Only configure v2 ssh service when v2 services are enabled #5718
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
Ready for review
Description of Changes
Fixes #5717
Updates the torrc template to conditionally add the ssh config for v2 onion services
Testing
v2_onion_services: false
and run./securedrop-admin install
/var/ossec/logs/alerts.log
does not contain a new rule 4000901 that was triggered/etc/tor/torrc
does not contain occurrences ofHiddenServiceVersion 2
on both app and monDeployment
New and existing installs will be configured using Ansible. For orgs which have already updated to disable v2, they will need to run the playbook again to ensure v2 onion services for ssh are properly disabled.
Disabling v2 and enabling v3 in a single pass might prove problematic if provisioning over Tor, but the documentation appears sufficiently clear that one should enable v2+v3 first, then disable v2: https://docs.securedrop.org/en/stable/v3_services.html#disabling-v2-onion-services
Checklist
If you made non-trivial code changes: