Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deprecation warning if v2 config detected #593

Merged
merged 1 commit into from Jul 22, 2020
Merged

Add deprecation warning if v2 config detected #593

merged 1 commit into from Jul 22, 2020

Conversation

eloquence
Copy link
Member

Status

Ready for review

Description of Changes

Fixes #585. The warning is added to the validator, so it will also be displayed on the make validate target or manual invocation of the validation script.

Test plan

  • Clone this branch to dom0.
  • Ensure you have a valid v3 config under /usr/share/securedrop-workstation-dom0-config.
  • Run python3 scripts/securedrop-admin.py --validate
  • Observe that the configuration still validates without errors or warnings.
  • Make a breaking modification to the .onion configuration (back up config as needed) and re-validate. For example, you could use an address of the wrong length.
  • Observe that validation errors still get reported as exceptions
  • Change the config to a correctly formatted v2 address.
  • Observe that the configuration now validates successfully, but a deprecation warning is shown.

Checklist

  • Linter (make flake8) passes in the development environment
  • No packaging changes
  • All tests (make test) pass in dom0 of a Qubes install [no current tests for this logic]

@emkll emkll added this to Under Review in SecureDrop Team Board Jul 22, 2020
@emkll emkll self-requested a review July 22, 2020 16:17
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @eloquence. Functionally this works as expected, and while it's non blocking, should be sufficiently informative. The only change i would recommend here is inline

Tested as follows:

  • Observe that the configuration still validates without errors or warnings.
  • Make a breaking modification to the .onion configuration (back up config as needed) and re-validate. For example, you could use an address of the wrong length.
  • Observe that validation errors still get reported as exceptions
  • Change the config to a correctly formatted v2 address.
  • Observe that the configuration now validates successfully, but a deprecation warning is shown.
  • make test: all but one tests passed, encountered the issue described in sd-log sometimes ingests logs as host #583

scripts/validate_config.py Outdated Show resolved Hide resolved
Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @eloquence

@emkll emkll merged commit dcef4ec into main Jul 22, 2020
SecureDrop Team Board automation moved this from Under Review to Done Jul 22, 2020
@emkll emkll deleted the 585-v2-warning branch July 22, 2020 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Add deprecation warning to securedrop-admin
2 participants