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 /officecfg | |
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 'officecfg')
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index fcb8392436a9..76aa4e6c02d9 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -2455,6 +2455,26 @@ </info> <value>false</value> </prop> + <prop oor:name="PasswordPolicy" oor:type="xs:string"> + <info> + <desc>Specifies the password policy regular expression to be forced + when a password is being entered. If the password doesn't match the + regular expression it is denied. + + For example a policy that enforces minimum eight characters, at + least one uppercase, one lowercase letter and one number would be: + ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$ + </desc> + </info> + </prop> + <prop oor:name="PasswordPolicyErrorMessage" oor:type="xs:string" oor:localized="true" oor:nillable="false"> + <info> + <desc>Specifies the displayed error message when the entered + password doesn't meet the password policy. Should describe the + password policy.</desc> + </info> + <value>Password does not meet the password policy.</value> + </prop> <prop oor:name="HyperlinksWithCtrlClick" oor:type="xs:boolean" oor:nillable="false"> <info> <desc>Specifies whether ctrl-click is required to follow |