Make VPN IPSec Site Connection PSK field hidden

The Pre-Shared Key (PSK) field on the VPN IPSec Site Connection tab
should not be displayed in plain text due to security concerns. Set
the PSK field in the Add Connection and the Edit Connection dialogs
to be a password field to provide the user some protection when
entering the value. Remove the PSK field from the details page since
this is the pattern used with the password field in Identity Users
panel.

Change-Id: I4dd713f01b02c29d9822efcb519de60fd9d035e6
Close-Bug: #1575909
(cherry picked from commit 5137dc4fdd)
This commit is contained in:
Julie Gravel
2017-02-15 12:08:12 -08:00
committed by Rob Cresswell
parent 984d9cf7b8
commit 03f78705e8
3 changed files with 2 additions and 3 deletions

View File

@@ -247,6 +247,7 @@ class UpdateIPSecSiteConnection(forms.SelfHandlingForm):
version=forms.IPv4 | forms.IPv6,
mask=True)
psk = forms.CharField(
widget=forms.PasswordInput(render_value=True),
max_length=80, label=_("Pre-Shared Key (PSK) string"))
mtu = forms.IntegerField(
min_value=68,

View File

@@ -39,9 +39,6 @@
{% endfor %}
</dd>
<dt>{% trans "Pre-Shared Key string" %}</dt>
<dd>{{ ipsecsiteconnection.psk }}</dd>
<dt>{% trans "MTU" %}</dt>
<dd>{{ ipsecsiteconnection.mtu }}</dd>

View File

@@ -340,6 +340,7 @@ class AddIPSecSiteConnectionAction(workflows.Action):
psk = forms.CharField(
max_length=80,
label=_("Pre-Shared Key (PSK) string"),
widget=forms.PasswordInput(render_value=False),
help_text=_("The pre-defined key string "
"between the two peers of the VPN connection"))