Skip to content

Commit

Permalink
Align authselect profile in test scenarios
Browse files Browse the repository at this point in the history
The minimal profile is not present in containers, for example. On the
other hand, the sssd profile is already used in many test scenarios and
seems to be present both in contaiers and VMs used in CI tests.
  • Loading branch information
marcusburghardt committed Jul 10, 2024
1 parent 4a28512 commit 50aeda0
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# packages = authselect
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9

if authselect list-features minimal | grep -q with-silent-lastlog; then
if authselect list-features sssd | grep -q with-silent-lastlog; then
authselect select sssd --force
authselect disable-feature with-silent-lastlog
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# packages = authselect
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9

if authselect list-features minimal | grep -q with-silent-lastlog; then
if authselect list-features sssd | grep -q with-silent-lastlog; then
authselect select sssd --force
authselect enable-feature with-silent-lastlog
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pam_files=("password-auth" "system-auth")

authselect create-profile testingProfile --base-on minimal
authselect create-profile testingProfile --base-on sssd

CUSTOM_PROFILE_DIR="/etc/authselect/custom/testingProfile"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora
# variables = var_password_pam_remember=5,var_password_pam_remember_control_flag=requisite

if authselect list-features minimal | grep -q with-pwhistory; then
if authselect list-features sssd | grep -q with-pwhistory; then
authselect select sssd --force
authselect enable-feature with-pwhistory
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora
# variables = var_password_pam_remember=5,var_password_pam_remember_control_flag=requisite

if authselect list-features minimal | grep -q with-pwhistory; then
if authselect list-features sssd | grep -q with-pwhistory; then
authselect select sssd --force
authselect disable-feature with-pwhistory
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora
# variables = var_password_pam_remember=5,var_password_pam_remember_control_flag=requisite

if authselect list-features minimal | grep -q with-pwhistory; then
if authselect list-features sssd | grep -q with-pwhistory; then
# There is no easy way to skip this test scenario in systems with "with-pwhistory" feature.
# In these systems, if the controls of a existing feature are modified in authselect profiles,
# this impacts directly in the feature behaviour and is strongly not recommended. In any case,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora
# variables = var_password_pam_remember=5,var_password_pam_remember_control_flag=requisite

if authselect list-features minimal | grep -q with-pwhistory; then
if authselect list-features sssd | grep -q with-pwhistory; then
authselect select sssd --force
authselect enable-feature with-pwhistory
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora
# variables = var_password_pam_remember=5,var_password_pam_remember_control_flag=requisite

if authselect list-features minimal | grep -q with-pwhistory; then
if authselect list-features sssd | grep -q with-pwhistory; then
authselect select sssd --force
authselect disable-feature with-pwhistory
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# platform = Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora
# variables = var_password_pam_remember=5,var_password_pam_remember_control_flag=requisite

if authselect list-features minimal | grep -q with-pwhistory; then
if authselect list-features sssd | grep -q with-pwhistory; then
# There is no easy way to skip this test scenario in systems with "with-pwhistory" feature.
# In these systems, if the controls of a existing feature are modified in authselect profiles,
# this impacts directly in the feature behaviour and is strongly not recommended. In any case,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# platform = Oracle Linux 8,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora
# variables = var_password_pam_unix_remember=5

if authselect list-features minimal | grep -q with-pwhistory; then
if authselect list-features sssd | grep -q with-pwhistory; then
authselect select sssd --force
authselect enable-feature with-pwhistory
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# platform = Oracle Linux 8,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9,multi_platform_fedora
# variables = var_password_pam_unix_remember=5

if authselect list-features minimal | grep -q with-pwhistory; then
if authselect list-features sssd | grep -q with-pwhistory; then
authselect select sssd --force
authselect disable-feature with-pwhistory
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

pam_files=("password-auth" "system-auth")

authselect create-profile testingProfile --base-on minimal
authselect create-profile testingProfile --base-on sssd

CUSTOM_PROFILE_DIR="/etc/authselect/custom/testingProfile"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pam_files=("password-auth" "system-auth")

authselect create-profile testingProfile --base-on minimal
authselect create-profile testingProfile --base-on sssd

CUSTOM_PROFILE_DIR="/etc/authselect/custom/testingProfile"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ configuration_files=("system-auth")


{{% if product in ['ol8', 'ol9', 'rhel8', 'rhel9'] %}}
authselect create-profile testingProfile --base-on minimal
authselect create-profile testingProfile --base-on sssd

for file in ${configuration_files[@]}; do
sed -i --follow-symlinks "/pam_pwquality\.so/d" \
Expand Down

0 comments on commit 50aeda0

Please sign in to comment.