-
Notifications
You must be signed in to change notification settings - Fork 709
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12727 from alanmcanonical/ubt24_53325
Ubuntu 24.04: Implement 5.3.3.2.5 Ensure password maximum sequential characters is configured
- Loading branch information
Showing
11 changed files
with
145 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...am/password_quality/password_quality_pwquality/accounts_password_pam_maxsequence/rule.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
documentation_complete: true | ||
|
||
|
||
title: 'Limit the maximum number of sequential characters in passwords' | ||
|
||
description: |- | ||
The <tt>pwquality maxsequence</tt> setting defines the maximum allowable length for consecutive | ||
character sequences in a new password. Such sequences can be, e.g., 123 or abc. If the value is | ||
set to 0, this check will be turned off. | ||
<br /><br /> | ||
Note: Passwords that consist mainly of such sequences are unlikely to meet the simplicity criteria | ||
unless the sequence constitutes only a small portion of the overall password. | ||
rationale: |- | ||
Use of a strong password helps to increase the time and resources required to | ||
compromise the password. Password complexity, or strength, is a measure of the | ||
effectiveness of a password in resisting attempts at guessing and brute-force attacks. | ||
<br /><br /> | ||
Password complexity is one important factor that determines the duration required to crack it. | ||
A more intricate password results in a larger number of potential combinations that must be | ||
tested before successfully compromising the password. | ||
severity: medium | ||
|
||
platform: package[pam] | ||
|
||
template: | ||
name: accounts_password | ||
vars: | ||
variable: maxsequence | ||
operation: less than or equal | ||
zero_comparison_operation: greater than |
17 changes: 17 additions & 0 deletions
17
...accounts-pam/password_quality/password_quality_pwquality/var_password_pam_maxsequence.var
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
documentation_complete: true | ||
|
||
title: maxsequence | ||
|
||
description: 'Maximum Number of Consecutive Character Sequences in a Password' | ||
|
||
type: number | ||
|
||
operator: equals | ||
|
||
interactive: false | ||
|
||
options: | ||
1: 1 | ||
2: 2 | ||
3: 3 | ||
default: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
shared/templates/accounts_password/tests/correct_value.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#!/bin/bash | ||
# variables = var_password_pam_{{{ VARIABLE }}}={{{ TEST_VAR_VALUE }}} | ||
|
||
{{% if product == "ubuntu2404" %}} | ||
{{{ bash_pam_pwquality_enable() }}} | ||
{{% endif %}} | ||
|
||
truncate -s 0 /etc/security/pwquality.conf | ||
|
||
echo "{{{ VARIABLE }}} = {{{ TEST_CORRECT_VALUE }}}" >> /etc/security/pwquality.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
shared/templates/accounts_password/tests/duplicated_values.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters