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

SecureDrop validate role fails on Tails 3.3 #2591

Closed
msheiny opened this issue Nov 20, 2017 · 3 comments · Fixed by #2622
Closed

SecureDrop validate role fails on Tails 3.3 #2591

msheiny opened this issue Nov 20, 2017 · 3 comments · Fixed by #2622
Assignees
Labels
Milestone

Comments

@msheiny
Copy link
Contributor

msheiny commented Nov 20, 2017

Bug

Description

Under Tails 3.3 - the validate script will bomb out because it is trying to shell out to nslookup but the deb package dnsutils is not installed.

A short summary of the issue.

Steps to Reproduce

Under a fresh tails 3.3:

  • clone down securedrop, cd into that directory
  • run ./securedrop-admin setup
  • run ./securedrop-admin sdconfig or ./securedrop-admin install

Expected Behavior

You'll get prompted for variables and everything should pass validation.

Actual Behavior

The validation role bombs out with the following output:

TASK [validate : Perform SMTP lookup check.] *******************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["torify", "nslookup", "-vc", "-retry=3", "-timeout=10", "-fail", "mail.electricembers.net", "8.8.8.8"], "delta": "0:00:00.029899", "end": "2017-11-20 16:01:33.483484", "failed": true, "rc": 1, "start": "2017-11-20 16:01:33.453585", "stderr": "ERROR: nslookup cannot be found.", "stderr_lines": ["ERROR: nslookup cannot be found."], "stdout": "", "stdout_lines": []}
...ignoring

TASK [validate : Validate SMTP relay connection.] **************************************************************
fatal: [localhost]: FAILED! => {
    "assertion": false, 
    "changed": false, 
    "evaluated_to": false, 
    "failed": true, 
    "msg": "The SMTP relay domain failed during lookup. This domain is the server contacted for authentication in order to send OSSEC email notifications. You should manually edit the file `group_vars/all/site-specific` and confirm that the `smtp_relay` var is set correctly."
}
	to retry, use: --limit @/home/amnesia/Persistent/securedrop/install_files/ansible-base/securedrop-configure.retry

Comments

We really shouldn't be shellin' out and instead should be taking advantage of either the dig lookup or stop using ansible and use python scripts. As the fastest short-term work-around we could install dnsutils during the setup step.

@msheiny msheiny added the bug label Nov 20, 2017
@msheiny msheiny changed the title SecureDrop validate role fails on Tails 3.3 SecureDrop validate role fails on Tails`3.3 Nov 20, 2017
@msheiny msheiny changed the title SecureDrop validate role fails on Tails`3.3 SecureDrop validate role fails on Tails 3.3 Nov 20, 2017
msheiny added a commit that referenced this issue Nov 20, 2017
dnsutils was removed from Tails 3.3 which causes problems with our
validate role.
msheiny added a commit that referenced this issue Nov 20, 2017
dnsutils was removed from Tails 3.3 which causes problems with our
validate role.
msheiny added a commit that referenced this issue Nov 20, 2017
dnsutils was removed from Tails 3.3 which causes problems with our
validate role.
@redshiftzero redshiftzero added this to the 0.5 milestone Nov 27, 2017
@conorsch
Copy link
Contributor

The solution proposed in aa22719 is not a sufficient patch, given that the securedrop-admin skips apt package installation if the virtualenv already exists. Any PR closing this issue should also address that shortcoming, otherwise we break Tails 3.3 for preexisting Admin Workstations.

@msheiny
Copy link
Contributor Author

msheiny commented Nov 27, 2017

yeah i totally agree @conorsch - its not a sufficient patch it was just a hot-fix for a new install but this issue should definitely be left open

@conorsch
Copy link
Contributor

Even if we modify the apt install logic to run every time, we're still breaking Tails 3.3, since the dnsutils apt package will not persist across reboots. Therefore we should investigate replacing the nslookup shell-out calls with Ansible built-ins. We can more easily provide persistence for addition Python requirements, so adding pip libraries to the Admin requirements files will only require running ./securedrop-admin setup once after upgrading to 0.5.

msheiny added a commit that referenced this issue Nov 27, 2017
dnsutils was removed from Tails 3.3 which causes problems with our
validate role.
msheiny added a commit that referenced this issue Nov 27, 2017
dnsutils was removed from Tails 3.3 which causes problems with our
validate role.
redshiftzero added a commit that referenced this issue Nov 27, 2017
will repush with actually informative commit message when this is working
redshiftzero added a commit that referenced this issue Nov 27, 2017
will repush with actually informative commit message when this is working
redshiftzero added a commit that referenced this issue Nov 27, 2017
* Replace nslookup with host so dnsutils is not required (fix for #2591).

* Instead of using return code, inspect output of host command, which
should have something like:

smtp.gmail.com has address 209.85.232.109

if successful.
redshiftzero added a commit that referenced this issue Nov 27, 2017
* Replace nslookup with host so dnsutils is not required (fix for #2591).

* Instead of using return code, inspect output of host command, which
should have something like:

smtp.gmail.com has address 209.85.232.109

if successful.
msheiny added a commit that referenced this issue Nov 28, 2017
dnsutils was removed from Tails 3.3 which causes problems with our
validate role.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants