Skip to content

Commit

Permalink
Merge pull request os-autoinst#19952 from paolostivanin/p164556
Browse files Browse the repository at this point in the history
CC: handle also the not encrypted scenario
  • Loading branch information
paolostivanin authored Aug 13, 2024
2 parents 088c46b + f08bd07 commit 89138bd
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
package Installation::CommonCriteriaConfiguration::CommonCriteriaConfigurationController;
use strict;
use warnings;
use testapi;
use Installation::CommonCriteriaConfiguration::CommonCriteriaConfigurationPage;
use Installation::Popups::YesNoPopup;
use YuiRestClient;
Expand All @@ -32,7 +33,9 @@ sub new {
sub init {
my ($self, $args) = @_;
$self->{CommonCriteriaConfigurationPage} = Installation::CommonCriteriaConfiguration::CommonCriteriaConfigurationPage->new({app => YuiRestClient::get_app()});
$self->{WeakPasswordPopup} = Installation::Popups::YesNoPopup->new({app => YuiRestClient::get_app()});
if (check_var('ENCRYPT', '1')) {
$self->{WeakPasswordPopup} = Installation::Popups::YesNoPopup->new({app => YuiRestClient::get_app()});
}
return $self;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@
package Installation::CommonCriteriaConfiguration::CommonCriteriaConfigurationPage;
use parent 'Installation::Navigation::NavigationBase';
use strict;
use testapi;
use warnings;

sub init {
my $self = shift;
$self->SUPER::init();
$self->{txb_password} = $self->{app}->textbox({id => 'passphrase'});
$self->{txb_repeat_password} = $self->{app}->textbox({id => 'repeat_passphrase'});
if (check_var('ENCRYPT', '1')) {
$self->{txb_password} = $self->{app}->textbox({id => 'passphrase'});
$self->{txb_repeat_password} = $self->{app}->textbox({id => 'repeat_passphrase'});
} else {
$self->{txt_cc} = $self->{app}->textbox({id => 'text'});
}

return $self;
}

Expand All @@ -32,7 +38,7 @@ sub enter_confirm_password {

sub is_shown {
my ($self) = @_;
return $self->{txb_password}->exist();
return check_var('ENCRYPT', '1') ? $self->{txb_password}->exist() : $self->{txt_cc}->exist();
}

1;
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ description: >
Installation using the Common Criteria role and full disk
encryption on beta SLES.
schedule:
access_beta:
- installation/access_beta_distribution
system_role:
- installation/system_role/select_common_criteria_role
- installation/common_criteria_configuration/common_criteria_encryption_pwd
- installation/common_criteria_configuration/common_criteria_configuration
suggested_partitioning:
- installation/partitioning/new_partitioning_gpt
grub:
- installation/handle_reboot
first_login:
- installation/boot_encrypt
- installation/first_boot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ description: >
Installation using the Common Criteria role and full disk
encryption on QR SLES.
schedule:
access_beta: []
product_selection:
- installation/product_selection/install_SLES
system_role:
- installation/system_role/select_common_criteria_role
- installation/common_criteria_configuration/common_criteria_encryption_pwd
- installation/common_criteria_configuration/common_criteria_configuration
suggested_partitioning:
- installation/partitioning/new_partitioning_gpt
grub: []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
---
name: create_hdd_common_criteria
description: >
Installation using the Common Criteria role and full disk
encryption on QR SLES.
Installation using the Common Criteria role without full disk
encryption on QR SLES 15-SP4.
schedule:
access_beta: []
product_selection:
- installation/product_selection/install_SLES
system_role:
- installation/system_role/select_common_criteria_role
- installation/common_criteria_configuration/common_criteria_encryption_pwd
suggested_partitioning:
- installation/partitioning/new_partitioning_gpt
first_login:
- installation/boot_encrypt
- installation/first_boot
- installation/common_criteria_configuration/common_criteria_configuration
system_preparation:
- console/hostname
- console/system_prepare
Expand Down
25 changes: 0 additions & 25 deletions schedule/security/create_hdd_cc_libyui/cc_qr_x86_64.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
---
name: create_hdd_common_criteria
description: >
Installation using the Common Criteria role and full disk
encryption on beta SLES.
schedule:
access_beta:
- installation/access_beta_distribution
system_role:
- installation/system_role/select_common_criteria_role
- installation/common_criteria_configuration/common_criteria_encryption_pwd
- installation/common_criteria_configuration/common_criteria_configuration
suggested_partitioning:
- installation/partitioning/new_partitioning_gpt
grub:
- installation/boot_encrypt
- installation/handle_reboot
first_login:
- installation/boot_encrypt
- installation/first_boot
system_preparation:
- console/hostname
- console/system_prepare
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ description: >
Installation using the Common Criteria role and full disk
encryption on QR SLES.
schedule:
access_beta: []
system_role:
- installation/system_role/select_common_criteria_role
- installation/common_criteria_configuration/common_criteria_encryption_pwd
- installation/common_criteria_configuration/common_criteria_configuration
suggested_partitioning:
- installation/partitioning/new_partitioning_gpt
grub:
- installation/boot_encrypt
- installation/handle_reboot
first_login:
- installation/boot_encrypt
- installation/first_boot
system_preparation:
- console/hostname
- console/system_prepare
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
---
name: create_hdd_common_criteria
description: >
Installation using the Common Criteria role and full disk
encryption on QR SLES.
Installation using the Common Criteria role without full disk
encryption on QR SLES 15-SP4.
schedule:
access_beta:
- installation/product_selection/install_SLES
system_role:
- installation/system_role/select_common_criteria_role
- installation/common_criteria_configuration/common_criteria_encryption_pwd
suggested_partitioning:
- installation/partitioning/new_partitioning_gpt
grub:
- installation/boot_encrypt
- installation/handle_reboot
- installation/common_criteria_configuration/common_criteria_configuration
system_preparation:
- console/hostname
- console/system_prepare
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@

use parent 'y2_installbase';
use strict;
use testapi;
use warnings;

sub run {
my $common_criteria_configuration = $testapi::distri->get_common_criteria_configuration();
$common_criteria_configuration->configure_encryption($testapi::password);
$common_criteria_configuration->go_forward();
$common_criteria_configuration->get_weak_password_warning->press_yes();
if (check_var('ENCRYPT', '1')) {
$common_criteria_configuration->configure_encryption($testapi::password);
$common_criteria_configuration->go_forward();
$common_criteria_configuration->get_weak_password_warning->press_yes();
} else {
$common_criteria_configuration->go_forward();
}
}

1;

0 comments on commit 89138bd

Please sign in to comment.