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 support for support TLSv1.3 ciphersuites as for #4769 #5988

Merged
merged 4 commits into from
Aug 2, 2021
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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ safety: ## Run `safety check` to check python dependencies for vulnerabilities.
--ignore 39606 \
--ignore 39611 \
--ignore 39621 \
--ignore 41002 \
--full-report -r $$req_file \
&& echo -e '\n' \
|| exit 1; \
Expand Down
2 changes: 0 additions & 2 deletions install_files/ansible-base/roles/app/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
- include_vars: "{{ ansible_distribution }}_{{ ansible_distribution_release }}.yml"

- include: app_install_fpf_deb_pkgs.yml
when: securedrop_app_install_from_repo

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ SSLCertificateFile /var/lib/ssl/{{ securedrop_app_https_certificate_cert_src|bas
SSLCertificateKeyFile /var/lib/ssl/{{ securedrop_app_https_certificate_key_src|basename }}
SSLCertificateChainFile /var/lib/ssl/{{ securedrop_app_https_certificate_chain_src|basename }}

# Evaluate support for TLSv1.3 in Tor Browser for Onions, conservatively
# we'll continue to support TLSv1.2 for now.
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite {{ securedrop_app_https_ssl_ciphers|join(':') }}
SSLHonorCipherOrder on
# Support only TLSv1.3, all older versions are prohibited.
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 -TLSv1.2
SSLHonorCipherOrder off
SSLSessionTickets off
SSLCompression off
{% endif %}

Expand Down
9 changes: 0 additions & 9 deletions install_files/ansible-base/roles/app/vars/Ubuntu_focal.yml

This file was deleted.

15 changes: 15 additions & 0 deletions install_files/securedrop-app-code/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,18 @@ remove_bytecode() {
find "${SDVE}" -name '*.py[co]' -delete
}

#
# Modify existing instance to use only TLS1.3 for the source.
update_to_tls13(){
source_conf="/etc/apache2/sites-available/source.conf"
if grep -qP '^SSLProtocol all' "$source_conf"; then
sed -i '/^SSLProtocol all/c\SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 -TLSv1.2' "$source_conf"
sed -i '/^SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384/d' "$source_conf"
sed -i '/^SSLHonorCipherOrder on/c\SSLHonorCipherOrder off' "$source_conf"
sed -i '/^SSLCompression off/ a \\SSLSessionTickets off' "$source_conf"
fi
}

case "$1" in
configure)

Expand Down Expand Up @@ -169,6 +181,9 @@ case "$1" in
# Remove Python bytecode from virtualenv
remove_bytecode

# Add TLS1.3 configruation to the source configruation if required
update_to_tls13

# Restart apache so it loads with the apparmor profiles in enforce mode.
service apache2 restart

Expand Down