Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select APQNs for a new secure key #1033

Merged
merged 4 commits into from
Mar 2, 2020

Conversation

joseivanlopez
Copy link
Contributor

@joseivanlopez joseivanlopez commented Jan 24, 2020

Problem

When a device is going to be encrypted with pervasive encryption (s390), a new secure key is generated for the device (if there is none yet). By default, this new secure key will be generated for all adapters/domains available in the system. But this could fail when the adapters/domains are set with different master keys. In that case, only adapters using the same master key should be taken into account for generating the new secure key.

Solution

Now, the dialog for pervasive encryption allows to select APQNs when a new secure key is going to be generated. An error is shown when the secure key cannot be generated with the selected APQNs.

Theoretically, zkey generate command should fail when the APQNs used to generate the secure key are configured with different master keys. But, according to my tests, the command does not fail in that case. It only fails when none of the given APQNs are configured with a master key.

Testing

  • Added unit tests.
  • Manually tested.

Screenshots

Show/Hide

Screenshot from 2020-01-27 15-15-45

Screenshot from 2020-02-28 17-34-28

@joseivanlopez joseivanlopez marked this pull request as ready for review February 28, 2020 17:08
@coveralls
Copy link

coveralls commented Feb 28, 2020

Coverage Status

Coverage decreased (-0.008%) to 97.625% when pulling d148370 on joseivanlopez:select_apqns into 1808d2f on yast:master.

Copy link
Contributor

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

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

In general, it looks good. Just a few comments and most of them can be ignored :)

src/lib/y2partitioner/actions/controllers/encryption.rb Outdated Show resolved Hide resolved
src/lib/y2partitioner/widgets/apqn_selector.rb Outdated Show resolved Hide resolved
src/lib/y2storage/blk_device.rb Show resolved Hide resolved
src/lib/y2storage/encryption_processes/apqn.rb Outdated Show resolved Hide resolved
src/lib/y2storage/encryption_processes/apqn.rb Outdated Show resolved Hide resolved
@joseivanlopez joseivanlopez merged commit 017b05a into yast:master Mar 2, 2020
@yast-bot
Copy link

yast-bot commented Mar 2, 2020

✔️ Internal Jenkins job #95 successfully finished
✔️ Created IBS submit request #212972

@yast-bot
Copy link

yast-bot commented Mar 3, 2020

✔️ Public Jenkins job #271 successfully finished
✔️ Created OBS submit request #781211

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.

None yet

4 participants