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
This commit is contained in:
parent
372f1ee084
commit
5137dc4fdd
@ -247,6 +247,7 @@ class UpdateIPSecSiteConnection(forms.SelfHandlingForm):
|
|||||||
version=forms.IPv4 | forms.IPv6,
|
version=forms.IPv4 | forms.IPv6,
|
||||||
mask=True)
|
mask=True)
|
||||||
psk = forms.CharField(
|
psk = forms.CharField(
|
||||||
|
widget=forms.PasswordInput(render_value=True),
|
||||||
max_length=80, label=_("Pre-Shared Key (PSK) string"))
|
max_length=80, label=_("Pre-Shared Key (PSK) string"))
|
||||||
mtu = forms.IntegerField(
|
mtu = forms.IntegerField(
|
||||||
min_value=68,
|
min_value=68,
|
||||||
|
@ -39,9 +39,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>{% trans "Pre-Shared Key string" %}</dt>
|
|
||||||
<dd>{{ ipsecsiteconnection.psk }}</dd>
|
|
||||||
|
|
||||||
<dt>{% trans "MTU" %}</dt>
|
<dt>{% trans "MTU" %}</dt>
|
||||||
<dd>{{ ipsecsiteconnection.mtu }}</dd>
|
<dd>{{ ipsecsiteconnection.mtu }}</dd>
|
||||||
|
|
||||||
|
@ -340,6 +340,7 @@ class AddIPSecSiteConnectionAction(workflows.Action):
|
|||||||
psk = forms.CharField(
|
psk = forms.CharField(
|
||||||
max_length=80,
|
max_length=80,
|
||||||
label=_("Pre-Shared Key (PSK) string"),
|
label=_("Pre-Shared Key (PSK) string"),
|
||||||
|
widget=forms.PasswordInput(render_value=False),
|
||||||
help_text=_("The pre-defined key string "
|
help_text=_("The pre-defined key string "
|
||||||
"between the two peers of the VPN connection"))
|
"between the two peers of the VPN connection"))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user