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

removed TODOs and documented them in ticket tracker #3615

Merged
merged 1 commit into from
Jun 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/backup_and_restore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ Once the restore is done, the Application Server will use the original Source an
*Journalist Interface* Onion URLs. You will need to update the corresponding
files on the Admin Workstation:

.. todo:: We really should automate this process for Admins.
Copy link
Contributor

Choose a reason for hiding this comment

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

imho fine to remove, this is no longer a priority to implement as:

  1. the correct behavior is documented for admins,
  2. the restore part of the backup/restore is a rare action. as such, engineering effort spent on automating it does not produce benefits to end users as much as automating more common tasks e.g. the journalist provisioning process (issue Provisioning utility for journalists & Journalist Workstations #1177, a common request by admins)


* ``app-source-ths``
* ``app-journalist-aths``
* ``app-ssh-aths``
Expand Down
3 changes: 0 additions & 3 deletions docs/create_admin_account.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ output like this:
Passphrases include the spaces between the words, but not leading or trailing
whitespace. Be sure to save this passphrase in the appropriate KeePassX database.

.. todo:: Clarify how to set up TOTP/HOTP through ``./manage.py
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3594

add-admin``.

Once that's done, you should open the Tor Browser |TorBrowser| and
navigate to the *Journalist Interface*'s .onion address. Verify that you
can log in to the *Journalist Interface* with the admin account you just
Expand Down
9 changes: 0 additions & 9 deletions docs/development/setup_development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,6 @@ from the `Vagrant Downloads page`_ and then install it.
instructions in Vagrantfile that would enable vagrant-cachier are
currently commented out.

.. todo:: This warning is here because a common refrain during hackathons for
Copy link
Contributor

Choose a reason for hiding this comment

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

irrelevant, we use the Docker dev env at hackathons (rarely if ever to people wade into the waters 🌊 of the staging VMs at hackathons)

SecureDrop a while back was "setting up VMs is too slow, you should
use vagrant-cachier". We tried it and it had some nasty interactions
with Ansible, so we dropped it, and added this note to prevent other
people from making the same suggestion. Eventually, we should: (i)
Build our own base boxes to dramatically cut down on provisioning
times (ii) Remove this note as well as the commented vagrant-cachier
lines from the Vagrantfile

VirtualBox should be at least version 5.x. See `GitHub #1381`_ for documentation
of incompatibility with the older VirtualBox 4.x release series.

Expand Down
7 changes: 0 additions & 7 deletions docs/journalist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ key, used for decryption, stays on the *Journalist Workstation*. The
public key, used for encryption, is copied to the *Secure Viewing
Station*.

.. todo:: This document recommends transferring documents from the
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3598

*SVS* to the *Journalist Workstation*, without any
discussion of the potential risks or mitigations that should
be taken when doing so. A section needs to be added on why
doing this could be risky, and what can be done to make this
situation better.

If you do not yet have a GPG key, follow the instructions for your
operating system to set one up:

Expand Down
3 changes: 0 additions & 3 deletions docs/onboarding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ you have a lot of journalists who wish to access SecureDrop
concurrently, you will need to provision multiple *Secure Viewing
Stations*.

.. todo:: Describe best practices for provisioning multiple Secure
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3596

Viewing Stations.

Create a Journalist Tails USB
-----------------------------

Expand Down
3 changes: 0 additions & 3 deletions docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ the sources, and the journalists.

|SecureDrop architecture overview diagram|

.. todo:: A picture of an actual physical setup (e.g. the office
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3599

setup) with the components labeled would also be good here.

Servers
~~~~~~~

Expand Down
6 changes: 0 additions & 6 deletions docs/source.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
Source Guide
============

.. todo:: There's a lot more to it than this, but then we begin to
Copy link
Contributor

Choose a reason for hiding this comment

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

Not actually a TODO. And covered by #490

duplicate content from individual organization's landing
pages and Micah's Intercept article. For example: what
computer should you use? what network should you be on? etc.


Choosing the Right Location
---------------------------

Expand Down
2 changes: 0 additions & 2 deletions docs/terminology.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ diagram <https://docs.securedrop.org/en/latest/overview.html#infrastructure>`__,
are specific to SecureDrop. The list below attempts to enumerate and
define these terms.

.. todo:: Pictures would be good for many of the objects defined here
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3597


Source
------

Expand Down
1 change: 0 additions & 1 deletion install_files/ansible-base/inventory
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#
# Connection information so Ansible can access the app and monitor servers.
# Defaults are from the documentation, adjust to your configuration.
# TODO: configure networking with Ansible
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3601

#
# NOTE: after the install is complete, you can re-provision with Ansible but you will need to:
# 1. Set up HidServAuth in your torrc with the values from app-ssh-aths and mon-ssh-aths
Expand Down
1 change: 0 additions & 1 deletion install_files/ansible-base/prod-specific.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ssh_users: ""
dns_server: "8.8.8.8"
daily_reboot_time: 4 # An integer between 0 and 23

# TODO Should use ansible to gather this info
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3603

monitor_ip: ""
monitor_hostname: ""
app_hostname: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# logging for the source interface is useful for debugging,
# so we enable it here.

# TODO: This staging-only template clobbers the production template
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3614

# This staging-only template clobbers the production template
# installed by the `app` role. That means the app-staging host
# will always mark the task as changed. It would be cleaner to merge
# the templates and use group_vars to conditionally enable the logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@
- permissions
- securedrop_config

# TODO: config.py.example is already written using Jinja2 format, and should be
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3611

# easy to template-ize. However, we cannot do this because when Ansible writes
# a template, it re-does the entire thing. This would cause a problem in the
# case where we want to re-provision a machine with an updated value (e.g. the
# application key fingerprint). Blindly overwriting the entire file would cause
# major problems. It would be nice to use templates here, assuming we find a
# way to selectively update the file.

# Note: we can also use register with with_items to cut down on repetition
# here. See
# http://docs.ansible.com/playbooks_loops.html#using-register-with-a-loop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Install sass Ruby gem
gem:
name: sass
# TODO: This version lock can be removed when if/when we can get Ruby>2
Copy link
Contributor

Choose a reason for hiding this comment

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

already covered by #1594

# This version lock can be removed when if/when we can get Ruby>2
# installed on the machine that runs this task (see
# https://github.com/freedomofpress/securedrop/issues/1594).
version: "3.4.23"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
- users
- environment

# TODO: Backwards-compatibility. Previously, the SecureDrop bashrc additions
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3609

# Backwards-compatibility. Previously, the SecureDrop bashrc additions
# for forcing a terminal multiplexer during interactive login sessions were
# added to ~/.bashrc for each admin user account. It's cleaner to add the
# config lines to /etc/profile.d, so all accounts get them by default.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,3 @@
name: postfix
state: "{{ 'started' if postfix_enable_service else 'stopped' }}"
enabled: "{{ postfix_enable_service }}"

# TODO - name: configure postfix proxy
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3610

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
{% endif %}

# Load before tor user drop rules
# TODO: use ansible facts to populate the in use interface to further restrict
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3612

# the rules.
-A OUTPUT -p tcp -m owner --uid-owner debian-tor -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT -m comment --comment "Allow tor outbound"
-A INPUT -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT -m comment --comment "Allow traffic back for tor"

Expand Down Expand Up @@ -69,13 +67,11 @@

{% if 'securedrop_application_server' in group_names %}
# OSSEC server-agent rules
# TODO add owner to OUTPUT rule
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3613

-A OUTPUT -d {{ monitor_hostname }} -p udp --dport 1514 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT -m comment --comment "OSSEC server agent"
-A INPUT -s {{ monitor_hostname }} -p udp --sport 1514 -m state --state ESTABLISHED,RELATED -j ACCEPT -m comment --comment "OSSEC server agent"

{% elif 'securedrop_monitor_server' in group_names %}
# OSSEC server-agent rules
# TODO add owner to OUTPUT rule
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3613

-A INPUT -s {{ app_hostname }} -p udp --dport 1514 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT -m comment --comment "Allow OSSEC agent to monitor"
-A OUTPUT -d {{ app_hostname }} -p udp --sport 1514 -m state --state ESTABLISHED,RELATED -j ACCEPT -m comment --comment "Allow OSSEC agent to monitor"

Expand Down
5 changes: 0 additions & 5 deletions securedrop/config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class FlaskConfig(object):

# Use different secret keys for the two different applications so their
# sessions can't be confused.
# TODO consider using salts instead: http://pythonhosted.org//itsdangerous/#the-salt
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3595

class SourceInterfaceFlaskConfig(FlaskConfig):
SECRET_KEY = '{{ source_secret_key.stdout }}'
SESSION_COOKIE_NAME = "ss"
Expand Down Expand Up @@ -60,7 +59,6 @@ elif env == 'test':
FlaskConfig.TESTING = True
# Disable CSRF checks to make writing tests easier
FlaskConfig.WTF_CSRF_ENABLED = False
# TODO use a unique temporary directory for each test so we can parallelize them
Copy link
Contributor

Choose a reason for hiding this comment

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

covered by #2755 and #2535

SECUREDROP_DATA_ROOT = '/tmp/securedrop'

# The following configuration is dependent on SECUREDROP_DATA_ROOT
Expand All @@ -78,9 +76,6 @@ GPG_KEY_DIR=os.path.join(SECUREDROP_DATA_ROOT, 'keys')
TEMP_DIR = os.path.join(SECUREDROP_DATA_ROOT, "tmp")

# Database configuration
# TODO we currently use sqlite in production since it is sufficient and simple,
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a very old comment, back before we standardized on sqlite databases, so good to remove. #2225 is a good place for thoughts on this

# but in the future may want to be able to choose a different database
# depending on the environment
DATABASE_ENGINE = 'sqlite'
DATABASE_FILE = os.path.join(SECUREDROP_DATA_ROOT, 'db.sqlite')

Expand Down
2 changes: 0 additions & 2 deletions securedrop/crypto_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def __init__(self,
self.adjectives = f.read().splitlines()

# Make sure these pass before the app can run
# TODO: Add more tests
Copy link
Contributor

Choose a reason for hiding this comment

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

old comment, this file has good test coverage (according to codecov)

def do_runtime_tests(self):
if self.scrypt_id_pepper == self.scrypt_gpg_pepper:
raise AssertionError('scrypt_id_pepper == scrypt_gpg_pepper')
Expand Down Expand Up @@ -184,7 +183,6 @@ def delete_reply_keypair(self, source_filesystem_id):
# deleted. http://pythonhosted.org/python-gnupg/#deleting-keys
self.gpg.delete_keys(key, True) # private key
self.gpg.delete_keys(key) # public key
# TODO: srm?
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3593


def getkey(self, name):
for key in self.gpg.list_keys():
Expand Down
1 change: 0 additions & 1 deletion securedrop/journalist_app/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def admin_required(func):
def wrapper(*args, **kwargs):
if logged_in() and g.user.is_admin:
return func(*args, **kwargs)
# TODO: sometimes this gets flashed 2x (Chrome only?)
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3605

flash(gettext("Only administrators can access this page."),
"notification")
return redirect(url_for('main.index'))
Expand Down
2 changes: 1 addition & 1 deletion securedrop/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def reset(args):
"""
# Erase the development db file
if not hasattr(config, 'DATABASE_FILE'):
raise Exception("TODO: ./manage.py doesn't know how to clear the db "
Copy link
Contributor

Choose a reason for hiding this comment

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

everyone is using sqlite and they should just be warned than non-sqlite is not supported, so this is a reasonable behavior change imho

raise Exception("./manage.py doesn't know how to clear the db "
'if the backend is not sqlite')

# we need to save some data about the old DB file so we can recreate it
Expand Down
10 changes: 0 additions & 10 deletions securedrop/management/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,6 @@ def __init__(self, proc_funcs):

def monitor(self):
while True:
# TODO: we currently don't handle input, which makes using an
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3604

# interactive debugger like pdb impossible. Since Flask provides
# a featureful in-browser debugger, I'll accept that pdb is
# broken for now. If someone really wants it, they should be
# able to change this function to make it work (although I'm not
# sure how hard that would be).
#
# If you really want to use pdb, you can just run the
# application scripts individually (`python source.py` or
# `python journalist.py`).
rprocs, _, _ = select.select(self.procs, [], [])

for proc in rprocs:
Expand Down
3 changes: 0 additions & 3 deletions securedrop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@


LOGIN_HARDENING = True
# Unfortunately, the login hardening measures mess with the tests in
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3600

# non-deterministic ways. TODO rewrite the tests so we can more
# precisely control which code paths are exercised.
if os.environ.get('SECUREDROP_ENV') == 'test':
LOGIN_HARDENING = False

Expand Down
2 changes: 1 addition & 1 deletion securedrop/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from source_app import create_app as create_source_app
import utils

# TODO: the PID file for the redis worker is hard-coded below.
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3606

# The PID file for the redis worker is hard-coded below.
# Ideally this constant would be provided by a test harness.
# It has been intentionally omitted from `config.py.example`
# in order to isolate the test vars from prod vars.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ def _add_user(self, username, is_admin=False, hotp=None):
hotp_secret.send_keys(hotp)

if is_admin:
# TODO implement (checkbox is unchecked by default)
Copy link
Contributor

Choose a reason for hiding this comment

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

raising a NotImplementedError seems like a reasonable change, someone should implement this when they need it in the tests

issue #3608

pass
raise NotImplementedError("Admin's can't be added yet.")

submit_button = self.driver.find_element_by_css_selector(
'button[type=submit]')
Expand Down
4 changes: 0 additions & 4 deletions securedrop/tests/test_journalist.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ def test_unauthorized_access_redirects_to_login(journalist_app):

def test_login_throttle(journalist_app, test_journo):
# Overwrite the default value used during testing
# TODO this may break other tests during parallel testing
Copy link
Contributor

Choose a reason for hiding this comment

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

covered by #2755 and #2535

models.LOGIN_HARDENING = True
try:
with journalist_app.test_client() as app:
Expand Down Expand Up @@ -1130,9 +1129,6 @@ def tearDown(self):
# making a point of this, we hope to avoid the introduction of new tests,
# that do not truly prove their result because of this disconnect between
# request context in Flask Testing and production.
#
# TODO: either ditch Flask Testing or subclass it as discussed in the
# aforementioned issue to fix the described problem.
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3607

def _login_admin(self):
self._ctx.g.user = self.admin

Expand Down
2 changes: 1 addition & 1 deletion securedrop/tests/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

FILES_DIR = abspath(join(dirname(realpath(__file__)), '..', 'files'))

# TODO: the PID file for the redis worker is hard-coded below. Ideally this
Copy link
Contributor

Choose a reason for hiding this comment

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

this one is also issue #3606

# The PID file for the redis worker is hard-coded below. Ideally this
# constant would be provided by a test harness. It has been intentionally
# omitted from `config.py.example` in order to isolate the test vars from prod
# vars. When refactoring the test suite, the test_worker_pidfile
Expand Down
1 change: 0 additions & 1 deletion testinfra/app/test_tor_hidden_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def test_tor_service_directories(File, Sudo, tor_service):
with Sudo():
f = File("/var/lib/tor/services/{}".format(tor_service['name']))
assert f.is_directory
# TODO: tor might mark these dirs as setgid
Copy link
Contributor

Choose a reason for hiding this comment

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

issue #3602

assert oct(f.mode) == "0700"
assert f.user == "debian-tor"
assert f.group == "debian-tor"
Expand Down