-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make TPM-based encryption more explicit (#995)
## Problem Sometimes, Agama decides to use the encryption method `TPM_FDE` which results in the system being configured via `fde-tools` to open the encryption devices automatically during system boot without needing to enter the password. That happens if the configuration parameter `encryption.tpm_luks_open` is set AND the system supports TPM unlocking. If that the case, the `TPM_FDE` encryption method is used without even asking the user. In any other case, the encryption method specified at the configuration parameter `encryption.method` is used. That's all quite obscure, the users don't know whether TPM-based unlocking is going to be configured. Not even if it's possible to configure it or not. ## Solution This pull request introduces some changes in how the whole thing is managed. Now if the system or the distribution being installed don't support TPM-based decryption, the encryption method `LUKS2` is used and nothing is shown in the UI. ![tpm_not_available](https://github.com/openSUSE/agama/assets/3638289/f53925cf-8101-4b13-a1ba-e19b6d78907d) So no big change for the user except the fact that now LUKS2 with PBKDF2 as derivation function is the default for all distributions (it's a pretty sensible default for distributions based on Grub2 at 2024). But if the system and the distribution both support to configure TPM-based opening of the LUKS devices, the user can choose between the `TPM_FDE` and the `LUKS2` encryption methods via a checkbox shown in the UI. ![attempt](https://github.com/openSUSE/agama/assets/3638289/ed539bbb-08f8-4761-9834-c3fa05c6b27f) The default encryption method (and thus, the default value of the checkbox) is configured per-product at `encryption.method`. If the value there is `"tpm_fde"` but the system does not support such a method (eg. there is no TPMv2 chip), Agama will use the default encryption method (`LUKS2`) as fallback. Additionally, to make sure the user does not overlook the need to boot the machine directly to the new system in order to complete the setup, the following warning has been added to the page at the end of the installation process. ![finish-tpm-b2](https://github.com/openSUSE/agama/assets/3638289/a410242d-7680-4108-a6f7-013dca905259) Expanded version: ![finish-tpm-a2](https://github.com/openSUSE/agama/assets/3638289/82b2d1a4-0f2b-4e39-b899-b47e96a4ea57) Of course, if TPM encryption was not used, the hint is not there. ![finish-no-tpm2](https://github.com/openSUSE/agama/assets/3638289/de385977-08ee-4d3f-b3df-22548a45ebdf) ## Testing - Tested manually - New unit tests for the `InstallationFinished` page - No tests added to the storage page, since it's going to [heavily change](#982) soon
- Loading branch information
Showing
17 changed files
with
309 additions
and
78 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
------------------------------------------------------------------- | ||
Thu Jan 18 08:35:01 UTC 2024 - Ancor Gonzalez Sosa <[email protected]> | ||
|
||
- New default encryption settings: LUKS2 with PBKDF2. | ||
- Expose encryption methods at D-Bus API (gh#openSUSE/agama#995). | ||
|
||
------------------------------------------------------------------- | ||
Tue Jan 16 10:49:14 UTC 2024 - Michal Filka <[email protected]> | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
------------------------------------------------------------------- | ||
Thu Jan 18 08:33:52 UTC 2024 - Ancor Gonzalez Sosa <[email protected]> | ||
|
||
- Make TPM-based encryption more explicit (gh#openSUSE/agama#995) | ||
|
||
------------------------------------------------------------------- | ||
Tue Jan 16 15:27:28 UTC 2024 - José Iván López González <[email protected]> | ||
|
||
|
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
Oops, something went wrong.