Project

General

Profile

Actions

action #175419

closed

openQA Tests (public) - action #166613: Yast default selected LSM changes from Apparmor to SELinux, existing openQA test fails in first_boot

[MinimalVM] Prepare for switch to SELinux as default MAC in Tumbleweed

Added by ph03nix 5 months ago. Updated 2 months ago.

Status:
Closed
Priority:
High
Assignee:
-
Target version:
-
Start date:
2025-01-14
Due date:
% Done:

50%

Estimated time:

Description

A pending change in Tumbleweed is to switch to SELinux as the default MAC security solution. We need to prepare our test run for this change.

Actions #2

Updated by ph03nix 4 months ago

We need to create a new scenario that disables SELinux, installs AppArmor and then tests AppArmor.

Actions #3

Updated by ph03nix 4 months ago

I need to think of a good way for the test runs. It needs to include a simple variable that allows to set the MAC.

Actions #4

Updated by ph03nix 4 months ago

After looking at the Tumbleweed test runs and used variables in openQA I suggest the following to enable MinimalVM and Tumbleweed testing for now and during the transition period for AppArmor and SELinux:

  • SECURITY_MAC defines which LSM (Linux Security Module) is expected to be installed on the system. Values are apparmor or selinux.
  • SECURITY_TEST defines which LSM should be tested. Values are apparmor or selinux.

As a first step to ensure the transitioning from AppArmor to SELinux can happen without interruptions, we need to implement those setting in the current test runs.

Also both the jeos-apparmor and jeos-selinux test modules need to be adjusted such, that the test modules are capable to switch the system from apparmor to selinux and vice-versa if needed.

Actions #5

Updated by ph03nix 4 months ago

  • Status changed from Workable to In Progress
  • Assignee set to ph03nix
  • % Done changed from 0 to 50

On second look it appears to me that everything is already in place for the switch

There is https://openqa.opensuse.org/tests/overview?distri=opensuse&version=Tumbleweed&build=20250115-SELinux&groupid=1 with https://openqa.opensuse.org/tests/4784081 and with https://openqa.opensuse.org/tests/4780117 that show that this is already working.

Actions #7

Updated by ph03nix 4 months ago

  • Status changed from In Progress to Workable
  • Assignee deleted (ph03nix)
Actions #8

Updated by ph03nix 4 months ago

So what's still missing are the container apparmor tests. They still need to be prepared to switch back to AppArmor when Tumbleweed is going to switch over to SELinux by default. We can use the above test runs as template for doing so, the test modules for switching to AppArmor already exist.

Actions #9

Updated by rbranco 4 months ago

  • Assignee set to rbranco
Actions #10

Updated by ph03nix 4 months ago ยท Edited

For the AppArmor test runs, there is also https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/main_security.pm#L141

TLDR: We just need to use SECURITY_MAC=SELinux and then the AppArmor tests should sort it out themselves.

Actions #11

Updated by ph03nix 4 months ago

  • Status changed from Workable to Blocked

I'm putting this to blocked until I figure out how this can be handled in the whole Tumbleweed job groups.

Actions #12

Updated by ph03nix 4 months ago

  • Parent task set to #176565

Blocked until there is an agreement on #176565

Actions #13

Updated by ph03nix 4 months ago

  • Parent task changed from #176565 to #166613
Actions #14

Updated by slo-gin 3 months ago

This ticket was set to High priority but was not updated within the SLO period. Please consider picking up this ticket or just set the ticket to the next lower priority.

Actions #15

Updated by rbranco 3 months ago

  • Assignee deleted (rbranco)
Actions #16

Updated by ph03nix 2 months ago

  • Status changed from Blocked to Closed

This happened already.

Actions

Also available in: Atom PDF