diff options
author | Sarper Akdemir <sarper.akdemir.extern@allotropia.de> | 2023-10-18 15:55:52 +0300 |
---|---|---|
committer | Sarper Akdemir <sarper.akdemir.extern@allotropia.de> | 2023-11-06 09:03:47 +0100 |
commit | b1e24664de424a626f78b9fe002bf4d47c8907d5 (patch) | |
tree | 603dc8bb48b546fe4d9fb445e8ba6bc7836ec466 /cui/uiconfig/ui/password.ui | |
parent | 383f666bcad27b2fbea6ac13a42cafd6f035fc5c (diff) |
tdf#157518: add password policy and strength meter to save with password dialog
Introduces new configuration options PasswordPolicy and
PasswordPolicyErrorMessage.
PasswordPolicy takes a regular expression. When set, it only
accepts passwords that match that regular expression.
PasswordPolicyErrorMessage is the label displayed when the
password does not meet the PasswordPolicy.
In the ideal case, it should contain an explainer of the
PasswordPolicy, so the user is aware of the requirements.
Save with password dialog had maximum password length enforcing
bits depending on the requirements of the saved file format.
These are still applicable in combination with the password
policy.
Also introduces a visual password meter under the password
entries. If the password policy isn't satisfied the password
strength meter is capped at 70%.
The entropy bits to password quality is taken as a linear range.
Where the range of [0, 112] entropy bits is mapped to percentage
[0, 100]. Entropy bits ≥ 112 are mapped to 100% since, according
to KeePass' info page, ≥ 112 entropy bits correspond to a strong
password: <https://keepass.info/help/kb/pw_quality_est.html>
Change-Id: I2e70adacf271916661219f702dfc217292a1b59f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158453
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
Diffstat (limited to 'cui/uiconfig/ui/password.ui')
-rw-r--r-- | cui/uiconfig/ui/password.ui | 126 |
1 files changed, 76 insertions, 50 deletions
diff --git a/cui/uiconfig/ui/password.ui b/cui/uiconfig/ui/password.ui index 447968f7fce0..e7bc05e138e4 100644 --- a/cui/uiconfig/ui/password.ui +++ b/cui/uiconfig/ui/password.ui @@ -73,7 +73,7 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=6 --> + <!-- n-columns=1 n-rows=7 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -83,47 +83,6 @@ <property name="row-spacing">6</property> <property name="column-spacing">12</property> <child> - <object class="GtkEntry" id="newpassEntry"> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="hexpand">True</property> - <property name="visibility">False</property> - <property name="activates-default">True</property> - <property name="width-chars">50</property> - <property name="truncate-multiline">True</property> - <property name="input-purpose">password</property> - <child internal-child="accessible"> - <object class="AtkObject" id="newpassEntry-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="password|extended_tip|newpassEntry">Type a password. A password is case sensitive.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="confirmpassEntry"> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="hexpand">True</property> - <property name="visibility">False</property> - <property name="activates-default">True</property> - <property name="truncate-multiline">True</property> - <property name="input-purpose">password</property> - <child internal-child="accessible"> - <object class="AtkObject" id="confirmpassEntry-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="password|extended_tip|confirmpassEntry">Re-enter the password.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">3</property> - </packing> - </child> - <child> <object class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -134,7 +93,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">4</property> + <property name="top-attach">5</property> </packing> </child> <child> @@ -150,7 +109,7 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=5 --> + <!-- n-columns=1 n-rows=6 --> <object class="GtkGrid" id="grid3"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -198,7 +157,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">4</property> + <property name="top-attach">5</property> </packing> </child> <child> @@ -206,6 +165,7 @@ <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="label7"> <property name="visible">True</property> @@ -226,10 +186,11 @@ <property name="no-show-all">True</property> <property name="halign">end</property> <property name="hexpand">True</property> + <property name="wrap">True</property> <property name="xalign">0</property> <child internal-child="accessible"> <object class="AtkObject" id="newpassroIndicator-atkobject"> - <property name="AtkObject::accessible-role" translatable="no">static</property> + <property name="AtkObject::accessible-role">static</property> </object> </child> </object> @@ -249,6 +210,7 @@ <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> + <property name="column-spacing">6</property> <child> <object class="GtkLabel" id="label8"> <property name="visible">True</property> @@ -272,7 +234,7 @@ <property name="xalign">0</property> <child internal-child="accessible"> <object class="AtkObject" id="confirmropassIndicator-atkobject"> - <property name="AtkObject::accessible-role" translatable="no">static</property> + <property name="AtkObject::accessible-role">static</property> </object> </child> </object> @@ -284,6 +246,16 @@ </object> <packing> <property name="left-attach">0</property> + <property name="top-attach">4</property> + </packing> + </child> + <child> + <object class="GtkLevelBar" id="ropasslevelbar"> + <property name="visible">True</property> + <property name="can-focus">False</property> + </object> + <packing> + <property name="left-attach">0</property> <property name="top-attach">3</property> </packing> </child> @@ -317,7 +289,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">5</property> + <property name="top-attach">6</property> </packing> </child> <child> @@ -325,6 +297,7 @@ <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="label4"> <property name="visible">True</property> @@ -345,10 +318,11 @@ <property name="no-show-all">True</property> <property name="halign">end</property> <property name="hexpand">True</property> + <property name="wrap">True</property> <property name="xalign">0</property> <child internal-child="accessible"> <object class="AtkObject" id="newpassIndicator-atkobject"> - <property name="AtkObject::accessible-role" translatable="no">static</property> + <property name="AtkObject::accessible-role">static</property> </object> </child> </object> @@ -368,6 +342,7 @@ <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> + <property name="column-spacing">6</property> <child> <object class="GtkLabel" id="label5"> <property name="visible">True</property> @@ -391,7 +366,7 @@ <property name="xalign">0</property> <child internal-child="accessible"> <object class="AtkObject" id="confirmpassIndicator-atkobject"> - <property name="AtkObject::accessible-role" translatable="no">static</property> + <property name="AtkObject::accessible-role">static</property> </object> </child> </object> @@ -403,6 +378,57 @@ </object> <packing> <property name="left-attach">0</property> + <property name="top-attach">3</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="confirmpassEntry"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="visibility">False</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> + <property name="input-purpose">password</property> + <child internal-child="accessible"> + <object class="AtkObject" id="confirmpassEntry-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="password|extended_tip|confirmpassEntry">Re-enter the password.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">4</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="newpassEntry"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="visibility">False</property> + <property name="activates-default">True</property> + <property name="width-chars">50</property> + <property name="truncate-multiline">True</property> + <property name="input-purpose">password</property> + <child internal-child="accessible"> + <object class="AtkObject" id="newpassEntry-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="password|extended_tip|newpassEntry">Type a password. A password is case sensitive.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkLevelBar" id="passlevelbar"> + <property name="visible">True</property> + <property name="can-focus">False</property> + </object> + <packing> + <property name="left-attach">0</property> <property name="top-attach">2</property> </packing> </child> |