Skip to content

feat(web): re-introduce the storage encryption settings#2031

Merged
joseivanlopez merged 18 commits intomasterfrom
storage-config-ui-encryption
Feb 21, 2025
Merged

feat(web): re-introduce the storage encryption settings#2031
joseivanlopez merged 18 commits intomasterfrom
storage-config-ui-encryption

Conversation

@dgdavid
Copy link
Copy Markdown
Contributor

@dgdavid dgdavid commented Feb 20, 2025

First iteraration to bring the encryption section back.

The implementation at backend side is very simplistic and it does not properly work with several scenarios, for example:

  • If some partitions are encrypted and others don't.
  • If different encryptions are used (e.g., a password for root and other for home).

In those cases, the model considers that all the new partitions are encrypted, and the encryption config is taken from either the root partition or any other encrypted partition.

Note that these scenarios can only happen if a custom config is loaded. They cannot be accomplished by using the UI.

Base automatically changed from storage-config-ui to master February 20, 2025 13:44
@dgdavid dgdavid changed the title feat(web) re-introduce the storage encryption settings. feat(web) re-introduce the storage encryption settings Feb 20, 2025
import { ActionGroup, Alert, Checkbox, Content, Form, Stack, Switch } from "@patternfly/react-core";
import { Page, PasswordAndConfirmationInput } from "~/components/core";
import { EncryptionMethods } from "~/types/storage";
import sizingStyles from "@patternfly/react-styles/css/utilities/Sizing/sizing";
Copy link
Copy Markdown
Contributor Author

@dgdavid dgdavid Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to drop this and its usage, but need a bit more of time for testing how to limit the width used by the Checkbox description without affecting to the rest of the form and allowing Form#isWidthLimited to do its work properly.

Will invest some time on Monday, if priorities permits.

@joseivanlopez joseivanlopez force-pushed the storage-config-ui-encryption branch 5 times, most recently from 17b590a to 19ea4df Compare February 21, 2025 06:19
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 21, 2025

Pull Request Test Coverage Report for Build 13459450863

Details

  • 23 of 25 (92.0%) changed or added relevant lines in 8 files are covered.
  • 6 unchanged lines in 3 files lost coverage.
  • Overall coverage remained the same at 72.525%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/lib/agama/storage/config_conversions/from_model_conversions.rb 0 1 0.0%
service/lib/agama/storage/config_conversions/to_model_conversions.rb 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
service/lib/agama/storage/config_conversions/from_model_conversions.rb 2 0.0%
service/lib/agama/storage/config_conversions/to_model_conversions.rb 2 0.0%
service/lib/agama/storage/proposal.rb 2 97.78%
Totals Coverage Status
Change from base Build 13443082010: 0.0%
Covered Lines: 19758
Relevant Lines: 27243

💛 - Coveralls

@joseivanlopez joseivanlopez force-pushed the storage-config-ui-encryption branch 4 times, most recently from e5670df to 298e066 Compare February 21, 2025 11:25
@ancorgs

This comment was marked as resolved.

@joseivanlopez joseivanlopez force-pushed the storage-config-ui-encryption branch from 298e066 to 3d6a47d Compare February 21, 2025 12:35
@joseivanlopez joseivanlopez changed the title feat(web) re-introduce the storage encryption settings feat(web): re-introduce the storage encryption settings Feb 21, 2025
@ancorgs
Copy link
Copy Markdown
Contributor

ancorgs commented Feb 21, 2025

I just wanted to mention that the length of the form feels a big inconsistent depending on whether TPM is possible or not.

I will fixed with a hack just for today.

@dgdavid

This comment was marked as resolved.

@joseivanlopez joseivanlopez force-pushed the storage-config-ui-encryption branch from 3d6a47d to 322710e Compare February 21, 2025 13:56
dgdavid and others added 10 commits February 21, 2025 14:05
This commit simplifies the encryption section by displaying only useful,
read-only information to users and providing a consistent "Edit" action
to navigate to the encryption settings page, where users can adjust the
settings.
It will no longer be a modal dialog, but a page instead.
Now implemented as a form in its dedicated route/page.

Note that:

 * It's unclear how to handle the isEnabled status—whether to hide the
   rest of the widgets or disable them. Disabling them allows users to
   see what they'll find, but we should apply the same approach across all
   forms, which isn't currently the case for the RootUserForm.

 * Tests are still pending, as we're not using real hooks, making
   testing difficult. Recreating fake tests would not be worthwhile.
@joseivanlopez joseivanlopez force-pushed the storage-config-ui-encryption branch from 2ab59aa to 07f61b1 Compare February 21, 2025 14:06
@joseivanlopez joseivanlopez force-pushed the storage-config-ui-encryption branch from 6ab8dbc to 544c138 Compare February 21, 2025 15:01
Copy link
Copy Markdown
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This is, of course, far from perfection. But it exactly what we need (and can afford) now.

@joseivanlopez joseivanlopez merged commit acd9e34 into master Feb 21, 2025
14 checks passed
@joseivanlopez joseivanlopez deleted the storage-config-ui-encryption branch February 21, 2025 15:14
@imobachgs imobachgs mentioned this pull request Feb 26, 2025
imobachgs added a commit that referenced this pull request Feb 26, 2025
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Feb 26, 2025
https://build.opensuse.org/request/show/1248595
by user IGonzalezSosa + dimstar_suse
- Version 12

- Add the missing shebang line to the agama-scripts.sh shell script
  (gh#agama-project/agama#2077).
- Save logs after running post installation scripts
  (gh#agama-project/agama#2078).

- Keep the encoding when storing the locale (gh#agama-project/agama#2062).

- Extend storage model schema to support global encryption
  (gh#agama-project/agama#2031).

- Introduce the storage model to support the new storage user
  interface (gh#agama-project/agama#2033)

- Expose root and first user passwords (gh#agama-project/agama#2005).
- Remove support for auto-login.

- Added reboot command to the CLI (gh#agama-project/agama#1970)

- Set console and X11 keymaps when changing the installer keymap
  (bsc#1236174).
- Use the "dashed" form of the keymap identifier when calling
  systemd-firstboo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants