-
Notifications
You must be signed in to change notification settings - Fork 687
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
[2.6.0-rc1] Application Server's SSH alias is configured incorrectly #6847
Comments
The incorrect |
The following patch allows --- a/install_files/ansible-base/roles/tails-config/tasks/install_shell_extension.yml
+++ b/install_files/ansible-base/roles/tails-config/tasks/install_shell_extension.yml
@@ -1,4 +1,7 @@
---
+- name: Import variables
+ include_vars: "group_vars/all/site-specific"
+
- name: Check for v3 Source Interface file
stat:
path: app-sourcev3-ths
@@ -26,18 +29,6 @@
register: journalistv3_interface_lookup_result
when: v3_source_file.stat.exists == true
-- name: Look up app server hostname
- command: "awk -v FS='app_hostname: ' 'NF>1{print $2}' group_vars/all/site-specific"
- changed_when: false
- register: app_server_lookup_result
- when: site_specific_file.stat.exists == true
-
-- name: Look up mon server hostname
- command: "awk -v FS='monitor_hostname: ' 'NF>1{print $2}' /home/amnesia/Persistent/securedrop/install_files/ansible-base/group_vars/all/site-specific"
- changed_when: false
- register: mon_server_lookup_result
- when: site_specific_file.stat.exists == true
-
- name: Create the SecureDrop GNOME Shell Extension directories
file:
state: directory
@@ -87,14 +78,6 @@
set_fact:
journalist_iface: "{{ journalistv3_interface_lookup_result }}"
-- name: Set the right variable for app server hostname
- set_fact:
- app_hostname: "{{ app_server_lookup_result }}"
-
-- name: Set the right variable for app server hostname
- set_fact:
- mon_hostname: "{{ mon_server_lookup_result }}"
-
- name: Assemble interface information for extension
set_fact:
_securedrop_extension_info:
@@ -102,8 +85,6 @@
filename: extension.js
source_interface_address: "{{ source_iface.stdout }}"
journalist_interface_address: "{{ journalist_iface.stdout }}"
- app_hostname: "{{ app_hostname.stdout }}"
- mon_hostname: "{{ mon_hostname.stdout }}"
- name: Create SecureDrop extension
become: yes
--- a/install_files/ansible-base/roles/tails-config/templates/extension.js.in
+++ b/install_files/ansible-base/roles/tails-config/templates/extension.js.in
@@ -19,8 +19,8 @@ const Domain = Gettext.domain(GETTEXT_DOMAIN)
const source_interface_address = "{{ item.0.source_interface_address }}";
const journalist_interface_address = "{{ item.0.journalist_interface_address }}";
-const app_server_hostname = "{{ item.0.app_hostname }}";
-const mon_server_hostname = "{{ item.0.mon_hostname }}";
+const app_server_hostname = "{{ app_hostname }}";
+const mon_server_hostname = "{{ monitor_hostname }}";
const _ = Domain.gettext; What feels like a data race between the securedrop/install_files/ansible-base/roles/tails-config/tasks/create_ssh_aliases.yml Lines 46 to 48 in e22374d
—and then securedrop/install_files/ansible-base/roles/tails-config/tasks/install_shell_extension.yml Lines 98 to 106 in e22374d
The solution is to just not redefine the Why didn't we catch this in testing #6712? I've just confirmed that my Admin Workstation on that branch did (does) have the Python-dictionary junk templated into |
Description
With production VMs, where the Application Server's hostname is
app-prod
,ssh app-prod
fails withHost unreachable
, because its SSH alias is templated incorrectly:Steps to Reproduce
securedrop-admin {sdconfig,install,tailsconfig}
incantation.ssh app-prod
, or select SSH into the App Server from the SecureDrop menu.Expected Behavior
An SSH connection is established.
Actual Behavior
Via the SecureDrop menu, the terminal window opens, hangs, and closes.
Comments
I've checked that this is not an obstruction due to SSH host-key verification, which can be accepted normally in the terminal window opened by the SecureDrop menu.
The text was updated successfully, but these errors were encountered: