freedomofpress / securedrop

GitHub repository for the SecureDrop whistleblower platform. Do not submit tips here!
https://securedrop.org/
Other
3.62k stars 687 forks source link

Release SecureDrop 2.0.0 #5969

Closed zenmonkeykstop closed 3 years ago

zenmonkeykstop commented 3 years ago

This is a tracking issue for the release of SecureDrop 2.0.0

Tentatively scheduled as follows:

String and feature freeze: 2021-06-08 String comment period: 2021-06-08 - 2021-06-11 Translation period: 2021-06-11 - 2021-06-21 Pre-release announcement: 2021-06-15 Release date: ~2021-06-22

Release manager: @zenmonkeykstop Deputy release manager: @kushaldas Localization manager: @rmol
Deputy localization manager: @kushaldas Communications manager:: @rocodes

SecureDrop maintainers and testers: As you QA 2.0.0, please report back your testing results as comments on this ticket. File GitHub issues for any problems found, tag them "QA: Release", and associate them with the 2.0.0 milestone for tracking (or ask a maintainer to do so).

Test debian packages will be posted on https://apt-test.freedom.press signed with the test key. An Ansible playbook testing the upgrade path is here.

QA Matrix for 2.0.0

Test Plan for 2.0.0

Prepare release candidate (2.0.0~rc1)

Prepare release candidate (2.0.0~rc2)

Prepare release candidate (2.0.0~rc3)

Prepare release candidate (2.0.0~rc4)

Prepare release candidate (2.0.0~rc5)

After each test, please update the QA matrix and post details for Basic Server Testing, Application Acceptance Testing and 1.8.0-specific testing below in comments to this ticket.

Final release

Post release

zenmonkeykstop commented 3 years ago

2.0.0 QA Checklist - VMs

Environment

Basic Server Testing

Command Line User Generation

Administration

Application Acceptance Testing

Source Interface

Landing page base cases
First submission base cases
Returning source base cases

Journalist Interface

Login base cases
Index base cases
Individual source page

Basic Tails Testing

After updating to this release candidate and running securedrop-admin tailsconfig

2.0.0 release-specific changes

Preflight testing

Basic testing

Tails

kushaldas commented 3 years ago

2.0.0 QA Checklist - VMs

Environment

Basic Server Testing

Command Line User Generation

Administration

Application Acceptance Testing

Source Interface

Landing page base cases
First submission base cases
Returning source base cases

Journalist Interface

Login base cases
Index base cases
Individual source page

Basic Tails Testing

After updating to this release candidate and running securedrop-admin tailsconfig

2.0.0 release-specific changes

Preflight testing

Basic testing

Tails

kushaldas commented 3 years ago

I did fresh install on 2.0.0-rc2 couple of time with #5990 in mind. By keeping all the ths and private key files, and after removing all of those files.

rocodes commented 3 years ago

2.0.0 QA Checklist

Environment

Basic Server Testing

Command Line User Generation

Administration

Application Acceptance Testing

Source Interface

Landing page base cases
First submission base cases
Returning source base cases

Journalist Interface

Login base cases
Index base cases
Individual source page

Basic Tails Testing

After updating to this release candidate and running securedrop-admin tailsconfig

2.0.0 release-specific changes

sssoleileraaa commented 3 years ago

2.0.0 QA Checklist - Upgrade hardware installation Environment • Install target: NUC 7i5BNH • Tails version: 4.17 • Test Scenario: upgrade from 1.8.2 • SSH over Tor: yes • Release candidate: rc2 • General notes: Upgrade

  1. securedrop-admin backup
  2. Modify /etc/apt/sources.list.d/apt_freedom_press.list and /etc/apt/security.list to point to apt-test.freedom.press, then sudo apt update && sudo apt full-upgrade on app and mon servers
  3. Confirm package versions: • apt-cache policy securedrop-config -> Installed: 0.1.4+2.0.0~rc2+focal • apt-cache policy securedrop-app-code -> Installed: 2.0.0~rc2+focal • apt-cache policy securedrop-ossec-agent -> Installed: 3.6.0+2.0.0~rc2+focal • apt-cache policy securedrop-ossec-server -> Installed: 3.6.0+2.0.0~rc2+focal (mon)
  4. sudo unattended-upgrades -d Kernel testing on app server ☑︎ paxtest blackhat has expected results
    • strcpy and strcpy, PIE should be paxtest: return address contains a NULL byte
    • Randomization tests: bit guesses in the high 20s or higher (there may be one or two in the mid-20s, this is still okay).
    • Everything else: "Killed" Note: memcpy shows Vulnerable ☑︎ curl -L https://meltdown.ovh -o meltdown.sh && sudo bash meltdown.sh -v- No tests come back asSTATUS:VULNERABLE`
    • Expected NUC7i5BNH false-positive on the Foreshadow L1TF test (#5040 (comment)) Basic Server Testing ☑︎ I can access both the source and journalist interfaces ☑︎ I can SSH into both machines over Tor ☑︎ AppArmor is loaded on app ☑︎ 0 processes are running unconfined ☑︎ AppArmor is loaded on mon ☑︎ 0 processes are running unconfined ☑︎ Both servers are running grsec kernels ☑︎ iptables rules loaded ☑︎ OSSEC emails begin to flow after install ☑︎ OSSEC emails are decrypted to correct key and I am able to decrypt them ☑︎ After installing the testinfra dependencies, all tests in ./securedrop-admin verify are passing: • Install dependencies on Admin Workstation with cd ~/Persistent/securedrop && ./securedrop-admin setup -t • Run tests with ./securedrop-admin verify (this will take a while) • Remove test dependencies: rm -rf admin/.venv3/ && ./securedrop-admin setup ☑︎ QA Matrix checks pass Command Line User Generation ☑︎ Can successfully add admin user and login Administration (skip) ☐ I have backed up and successfully restored the app server following the backup documentation ☐ If doing upgrade testing, make a backup on 1.8.2 and restore this backup on this release candidate N/A ☐ "Send Test OSSEC Alert" button in the journalist triggers an OSSEC alert and an email is sent ☐ Can successfully add journalist account with HOTP authentication not tested Application Acceptance Testing Source Interface Landing page base cases ☑︎ JS warning bar does not appear when using Security Slider high ☑︎ JS warning bar does appear when using Security Slider Low First submission base cases ☑︎ On generate page, refreshing codename produces a new 7-word codename ☑︎ On submit page, empty submissions produce flashed message ☑︎ On submit page, short message submitted successfully ☑︎ On submit page, file greater than 500 MB produces "The connection was reset" in Tor Browser quickly before the entire file is uploaded ☑︎ On submit page, file less than 500 MB submitted successfully Returning source base cases ☑︎ Nonexistent codename cannot log in ☑︎ Empty codename cannot log in ☑︎ Legitimate codename can log in ☑︎ Returning user can view journalist replies - need to log into journalist interface to test Journalist Interface Login base cases ☑︎ Can log in with 2FA tokens ☑︎ incorrect password cannot log in ☑︎ invalid 2fa token cannot log in ☑︎ 2fa immediate reuse cannot log in ☑︎ Journalist account with HOTP can log in Index base cases ☑︎ Filter by codename works ☑︎ Starring and unstarring works ☑︎ Click select all selects all submissions ☑︎ Selecting all and clicking "Download" works Individual source page ☑︎ You can submit a reply and a flashed message and new row appears ☑︎ You cannot submit an empty reply ☑︎ Clicking "Delete Source Account" and the source and docs are deleted ☑︎ You can click on a document and successfully decrypt using application private key Basic Tails Testing After updating to this release candidate and running securedrop-admin tailsconfig ☑︎ The Updater GUI appears on boot ☐ Updating occurs without issue (testing this for rc3) 2.0.0 release-specific changes (testing this for rc3)
sssoleileraaa commented 3 years ago

2.0.0 QA Checklist

Environment

Downgrade

Since this is the second RC that I'm testing, I downgraded the servers back to 1.8.2 by following these steps:

  1. Change /etc/apt/sources.list.d/apt_freedom_press.list and /etc/apt/security.list to point to apt.freedom.press on app and mon servers
  2. apt remove securedrop-* packages and make sure apt-cache is clean
  3. run securedrop-admin install on my app and mon servers. I ran into this issue: https://github.com/freedomofpress/securedrop/issues/4839 but got around it by following the workaround in that issue.
  4. Confirm installed package versions are back to 1.8.2 on app and mon servers
    • apt-cache policy securedrop-app-code -> Installed: 1.8.2+focal
    • apt-cache policy securedrop-config -> Installed: 0.1.4+1.8.2+focal
    • apt-cache policy securedrop-keyring -> Installed: 0.1.5+1.8.2+focal
    • apt-cache policy securedrop-ossec-agent -> Installed: 3.6.0+1.8.2+focal
    • apt-cache policy securedrop-ossec-server -> Installed: 3.6.0+1.8.2+focal (mon)

Upgrade

  1. securedrop-admin backup
  2. Modify /etc/apt/sources.list.d/apt_freedom_press.list and /etc/apt/security.list to point to apt-test.freedom.press
  3. sudo unattended-upgrades -d and confirm package versions:
    • apt-cache policy securedrop-app-code -> Installed: 2.0.0~rc3+focal
    • apt-cache policy securedrop-config -> Installed: 0.1.4+2.0.0~rc3+focal
    • apt-cache policy securedrop-keyring -> Installed: 0.1.5+2.0.0~rc3+focal
    • apt-cache policy securedrop-ossec-agent -> Installed: 3.6.0+2.0.0~rc3+focal
    • apt-cache policy securedrop-ossec-server -> Installed: 3.6.0+2.0.0~rc3+focal (mon)

Kernel testing on app server

Basic Server Testing

:x: ./securedrop-admin --force verify has expected results

See notes in QA Matrix

Command Line User Generation

Administration

Application Acceptance Testing

Source Interface

Landing page base cases
First submission base cases
Returning source base cases

Journalist Interface

Login base cases
Index base cases
Individual source page

Basic Tails Testing

After updating to this release candidate and running securedrop-admin tailsconfig

2.0.0 release-specific changes

kushaldas commented 3 years ago

I can now verify what @zenmonkeykstop also noticed via unattended-upgrade -d, securedrop-app-code was not upgraded.

<snipped>
Checking: securedrop-app-code ([<Origin component:'main' archive:'' origin:'SecureDrop' label:'' site:'apt-test.freedom.press' isTrusted:True>])              
sanity check failed for: {'haveged=1.9.1-6ubuntu1', 'securedrop-app-code=2.0.0~rc3+focal'} : pkg haveged is marked to be deleted                              
falling back to adjusting securedrop-app-code's dependencies                                                                                                  
sanity check failed for: {'haveged=1.9.1-6ubuntu1', 'securedrop-app-code=2.0.0~rc3+focal'} : pkg haveged is marked to be deleted                              
Checking: securedrop-config ([<Origin component:'main' archive:'' origin:'SecureDrop' label:'' site:'apt-test.freedom.press' isTrusted:True>])                
Checking: securedrop-keyring ([<Origin component:'main' archive:'' origin:'SecureDrop' label:'' site:'apt-test.freedom.press' isTrusted:True>])               
Checking: securedrop-ossec-agent ([<Origin component:'main' archive:'' origin:'SecureDrop' label:'' site:'apt-test.freedom.press' isTrusted:True>])           
Checking: tor ([<Origin component:'main' archive:'' origin:'SecureDrop' label:'' site:'apt-test.freedom.press' isTrusted:True>])                              
pkgs that look like they should be upgraded: securedrop-config                                                                                                
securedrop-keyring                                                                                                                                            
securedrop-ossec-agent                                                                                                                                        
tor                                                                                                                                                           
Get:1 https://apt-test.freedom.press focal/main amd64 securedrop-config all 0.1.4+2.0.0~rc3+focal [3064 B]                                                    
Get:2 https://apt-test.freedom.press focal/main amd64 securedrop-keyring amd64 0.1.5+2.0.0~rc3+focal [8120 B]                                                 
Get:3 https://apt-test.freedom.press focal/main amd64 securedrop-ossec-agent amd64 3.6.0+2.0.0~rc3+focal [4664 B]                                             
Get:4 https://apt-test.freedom.press focal/main amd64 tor amd64 0.4.5.8-1~focal+1 [1488 kB]                                                                   
Fetched 1503 kB in 0s (0 B/s)                                                                                                                                 
fetch.run() result: 0                                                                                                                                         
dpkg is configured not to cause conffile prompts                                                                                                              
Packages that will be upgraded: securedrop-config securedrop-keyring securedrop-ossec-agent tor 

<snipped>

Log started: 2021-06-21  06:57:55
(Reading database ... 46453 files and directories currently installed.)
Preparing to unpack .../tor_0.4.5.8-1~focal+1_amd64.deb ...
Unpacking tor (0.4.5.8-1~focal+1) over (0.4.5.7-1~focal+1) ...
Setting up tor (0.4.5.8-1~focal+1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.7) ...
left to upgrade set()
All upgrades installed
InstCount=0 DelCount=0 BrokenCount=0
Package securedrop-app-code has a higher version available, checking if it is from an allowed origin and is not pinned down.
Package securedrop-app-code is kept back because a related package is kept back or due to local apt_preferences(5).
Extracting content from /var/log/unattended-upgrades/unattended-upgrades-dpkg.log since 2021-06-21 06:57:34
kushaldas commented 3 years ago

From 1.8.2 I can upgrade to SecureDrop 2.0.0~rc5 using the command sudo unattended-upgrade -d. I can also verify that the haveged is masked.

vagrant@app-prod:~$ sudo systemctl status haveged
● haveged.service
     Loaded: masked (Reason: Unit haveged.service is masked.)
     Active: inactive (dead)

Jun 23 16:16:05 app-prod systemd[1]: Started Entropy daemon using the HAVEGE algorithm.
Jun 23 16:16:05 app-prod haveged[541]: haveged starting up
Jun 23 16:16:06 app-prod haveged[541]: haveged: ver: 1.9.1; arch: x86; vend: GenuineIntel; build: (gcc 8.3.0 ITV); collect: 128K
Jun 23 16:16:06 app-prod haveged[541]: haveged: cpu: (L4 VC); data: 32K (L2 L4 V); inst: 32K (L2 L4 V); idx: 24/40; sz: 31410/52825
Jun 23 16:16:06 app-prod haveged[541]: haveged: tot tests(BA8): A:1/1 B:1/1 continuous tests(B):  last entropy estimate 7.9984
Jun 23 16:16:06 app-prod haveged[541]: haveged: fills: 0, generated: 0
Jun 23 16:22:27 app-prod systemd[1]: Stopping Entropy daemon using the HAVEGE algorithm...
Jun 23 16:22:27 app-prod haveged[541]: haveged: Stopping due to signal 15
Jun 23 16:22:27 app-prod systemd[1]: haveged.service: Succeeded.
Jun 23 16:22:27 app-prod systemd[1]: Stopped Entropy daemon using the HAVEGE algorithm.
zenmonkeykstop commented 3 years ago

2.0.0 QA Checklist

Environment

Basic Server Testing

Command Line User Generation

Administration SKIPPED

Application Acceptance Testing SKIPPED

Basic Tails Testing

After updating to this release candidate and running securedrop-admin tailsconfig

2.0.0 release-specific changes

Preflight testing

Basic testing

Tails

rmol commented 3 years ago

2.0.0 QA Checklist

Environment

Basic Server Testing

Command Line User Generation

Administration: SKIPPED

Application Acceptance Testing: SKIPPED

Basic Tails Testing: SKIPPED

2.0.0 release-specific changes