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

secboot: register keys in keyring with also the legacy paths #14718

Conversation

valentindavid
Copy link
Contributor

@valentindavid valentindavid commented Nov 13, 2024

snap-bootstrap use to unlock encrypted disks using /dev/disk/by-partuuid paths. This was used ask identifier for the keys stored in the keyring. However /dev/disk/by-uuid path makes more sense as UUID is a part of LUKS2, and cryptsetup uses it for the identify of the volume key. Partition UUID on the other hand are only for GPT partitions.

However older snapd will query the key using the old path. So we need to make sure snap-bootstrap also register the old name. A new snap-bootstrap should always be able to run and older snapd.

@valentindavid valentindavid added Run nested The PR also runs tests inluded in nested suite FDE Manager Pull requests that target FDE manager branch labels Nov 13, 2024
@valentindavid valentindavid force-pushed the valentindavid/keyring-legacy-paths branch 2 times, most recently from 000f73a to fca73da Compare November 13, 2024 09:51
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (fde-manager-features@cbf35eb). Learn more about missing BASE report.

Additional details and impacted files
@@                   Coverage Diff                   @@
##             fde-manager-features   #14718   +/-   ##
=======================================================
  Coverage                        ?   78.83%           
=======================================================
  Files                           ?     1093           
  Lines                           ?   147820           
  Branches                        ?        0           
=======================================================
  Hits                            ?   116541           
  Misses                          ?    24002           
  Partials                        ?     7277           
Flag Coverage Δ
unittests 78.83% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@github-actions github-actions bot added the Run Nested -auto- Label automatically added in case nested tests need to be executed label Nov 15, 2024
@valentindavid valentindavid force-pushed the valentindavid/keyring-legacy-paths branch from 88965fe to e952017 Compare November 18, 2024 12:26
@valentindavid valentindavid marked this pull request as ready for review November 18, 2024 12:26
snap-bootstrap use to unlock encrypted disks using
/dev/disk/by-partuuid paths.  This was used ask identifier for the
keys stored in the keyring. However /dev/disk/by-uuid path makes more
sense as UUID is a part of LUKS2, and cryptsetup uses it for the
identify of the volume key. Partition UUID on the other hand are only for
GPT partitions.

However older snapd will query the key using the old path. So we need
to make sure snap-bootstrap also register the old name. A new
snap-bootstrap should always be able to run and older snapd.
Copy link
Contributor

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

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

Thanks

Copy link
Contributor

@ZeyadYasser ZeyadYasser left a comment

Choose a reason for hiding this comment

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

Thank you!

@ernestl ernestl merged commit 5f5f773 into canonical:fde-manager-features Nov 19, 2024
43 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FDE Manager Pull requests that target FDE manager branch Run Nested -auto- Label automatically added in case nested tests need to be executed Run nested The PR also runs tests inluded in nested suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants