-
Notifications
You must be signed in to change notification settings - Fork 718
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #12948 from vojtapolasek/rhel8_stig_update_rounds
rhel8 STIG: update password hashing rounds
Showing
15 changed files
with
113 additions
and
16 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
4 changes: 3 additions & 1 deletion
4
...m/set_password_hashing_algorithm/set_password_hashing_min_rounds_logindefs/bash/shared.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,7 +1,9 @@ | ||
# platform = multi_platform_all | ||
|
||
{{{ bash_instantiate_variables("var_password_hashing_min_rounds_login_defs") }}} | ||
|
||
{{{ set_config_file(path="/etc/login.defs", | ||
parameter="SHA_CRYPT_MIN_ROUNDS", | ||
value="5000", | ||
value="$var_password_hashing_min_rounds_login_defs", | ||
separator=" ", | ||
separator_regex="\s*") }}} |
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
1 change: 1 addition & 0 deletions
1
..._hashing_algorithm/set_password_hashing_min_rounds_logindefs/tests/correct_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_min_rounds_login_defs=5000 | ||
|
||
echo "SHA_CRYPT_MIN_ROUNDS 5000" > "/etc/login.defs" | ||
echo "SHA_CRYPT_MAX_ROUNDS 5000" >> "/etc/login.defs" |
1 change: 1 addition & 0 deletions
1
...g_algorithm/set_password_hashing_min_rounds_logindefs/tests/missing_max_parameter.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,4 +1,5 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_min_rounds_login_defs=5000 | ||
|
||
# Default values are 5000 if the parameters are not defined. | ||
echo "SHA_CRYPT_MIN_ROUNDS 5000" > "/etc/login.defs" |
1 change: 1 addition & 0 deletions
1
...g_algorithm/set_password_hashing_min_rounds_logindefs/tests/missing_min_parameter.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,4 +1,5 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_min_rounds_login_defs=5000 | ||
|
||
# Default values are 5000 if the parameters are not defined. | ||
echo "SHA_CRYPT_MAX_ROUNDS 5000" > "/etc/login.defs" |
5 changes: 5 additions & 0 deletions
5
...et_password_hashing_min_rounds_logindefs/tests/missing_min_parameter_higher_value.fail.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_min_rounds_login_defs=100000 | ||
|
||
# Default values are 5000 if the parameters are not defined. | ||
echo "SHA_CRYPT_MAX_ROUNDS 5000" > "/etc/login.defs" |
1 change: 1 addition & 0 deletions
1
...hing_algorithm/set_password_hashing_min_rounds_logindefs/tests/missing_parameters.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,4 +1,5 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_min_rounds_login_defs=5000 | ||
|
||
# Default values are 5000 if the parameters are not defined. | ||
truncate -s 0 "/etc/login.defs" |
5 changes: 5 additions & 0 deletions
5
...m/set_password_hashing_min_rounds_logindefs/tests/missing_parameters_higher_value.fail.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_min_rounds_login_defs=100000 | ||
|
||
# Default values are 5000 if the parameters are not defined. | ||
truncate -s 0 "/etc/login.defs" |
1 change: 1 addition & 0 deletions
1
...ng_algorithm/set_password_hashing_min_rounds_logindefs/tests/only_max_value_wrong.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,4 +1,5 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_min_rounds_login_defs=5000 | ||
|
||
echo "SHA_CRYPT_MIN_ROUNDS 5000" > "/etc/login.defs" | ||
echo "SHA_CRYPT_MAX_ROUNDS 4999" >> "/etc/login.defs" |
1 change: 1 addition & 0 deletions
1
...ng_algorithm/set_password_hashing_min_rounds_logindefs/tests/only_min_value_wrong.fail.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,4 +1,5 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_min_rounds_login_defs=5000 | ||
|
||
echo "SHA_CRYPT_MIN_ROUNDS 4999" > "/etc/login.defs" | ||
echo "SHA_CRYPT_MAX_ROUNDS 5000" >> "/etc/login.defs" |
1 change: 1 addition & 0 deletions
1
...rd_hashing_algorithm/set_password_hashing_min_rounds_logindefs/tests/wrong_values.fail.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,4 +1,5 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_min_rounds_login_defs=5000 | ||
|
||
echo "SHA_CRYPT_MIN_ROUNDS 4999" > "/etc/login.defs" | ||
echo "SHA_CRYPT_MAX_ROUNDS 4999" >> "/etc/login.defs" |
17 changes: 17 additions & 0 deletions
17
...ccounts-pam/set_password_hashing_algorithm/var_password_hashing_min_rounds_login_defs.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: "Minimum number of password hashing rounds configured through /etc/login.defs" | ||
|
||
description: |- | ||
Minimum number of password hashing rounds configured through /etc/login.defs | ||
|
||
type: number | ||
|
||
operator: equals | ||
|
||
interactive: false | ||
|
||
options: | ||
default: 5000 | ||
"5000": 5000 | ||
"100000": 100000 |