-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
OEM-> User transfer of devices ownership wizard, triggered by the presence of an empty /boot/oem file #507
Conversation
…lly work, tools and libs updated to latest versions
…ty is used to enter passphrase. Else, gpg complaints of not being able to open /dev/tty, even though GPG_TTY environmenent variable is forced in init
…lled; trying to get console tty from the tty returns "no console". NEEDs BETTER FIX.
initrd/etc/functions
Outdated
echo -e "\n" | ||
cryptsetup-reencrypt -B 32 --use-directio $luks_container | ||
else | ||
echo "You have to reown the TPM, sign configurations with your GPG smartcard first and select a new default boot option!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kylerankin : Not ideal. Suggestions?
f8b0665
to
f3a44d2
Compare
@kylerankin @flammit : please comment and suggest improvements in the functional code. TODO:
And create subfunctions to create only one task, taking input from those /tmp/secret files if present, else ask for the information from the console for each of the actions ( Set user and admin passphrases and generate keys). And then create different Whiptail menus for:
For the drive reencryption code, I was thinking into splitting actual code into two submenus:
|
…o adding key and otrust output after GPG card key generation.
…s instead of luksDump.
/initrd/bin/gui-init: -inclusion of cryptsetup-reencrypt code -WiP: Onboarding menu enforced by /boot/oem file being present --State of onboarding progress is appended in that file.
-tpm ownership added into ownership process -cryptsetup forced to change password on slot0. Learned my lesson: not specifying it makes cryptsetup writes the new password into slot 1, leaving slot 0 empty. As a result, the luksKillslot done by setting a new default wiped out the recovery password, making the Luks container without any key to unlock it.
Removing cryptsetup Whital yessno menu for a textbox. Was misleading to the user. We want the user to not have any choice but continue the onboarding process until it's done. TODO: move gpg2 code from /etc/functions to gui-init.
… non empty. check_onboarding_progress inserts "onboarding" when it first checks checks that file. Afterward, the C (Continue Ownership) is triggered when the /boot/oem file is found unempty. check_onboarding_progress checks for status updates being inserted in /boot/oem and selects the proper menu until all unboarding is done. In successive stages, the user is invited to: Rencrypt LUKS container with a new key and Recovery passphrase Factory reset it's GPG card, own it, genrate keys and insert public and trusdb export into reflashed rom. TPM/HOTP reownership and sealing. (Might not be needed) New menus are provided: R: Reencrypt LUKS container and change it's password F: Factory reset GPG card
e476647
to
22b7e3d
Compare
…eyring_detection-reown_hardware
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to remove the two CONFIG_GPG=y
lines in the Librem config files. When I added the CONFIG_GPG2=y
lines I wasn't sure if the old one should be removed or not, so I didn't do it.
…can grow LUKS container if needed from recovery shell
…ction-reown_hardware' of github.com:tlaurion/heads into x230_FBWhiptail_GPG2_clean_LibremKey-empty_keyring_detection-reown_hardware
So at this point, here is what we have. I know, I need a better camera. That will happen soon. :) OEM/tech-savvy user common parts:
OEM specifics:
OEM-> user devices transfer of ownership: @marmarek @mfc @andrewdavidwong @kylerankin @osresearch @flammit : Your input would be more then welcome. I'm going to use this PoC as it is for a start, but would love it to be mainstreamed and merge efforts to ease remote support of users. This seals my PoC to go forward with the QubesOS Hardware Certification. |
…IOS" option when no GPG key is found into rom.
…ing. Switching back to 30 90, which is used everywhere else.
replaced by #511 |
UPDATE: see QubesOS OEM to user transfer of ownership below for current state.
Advanced menu addition:
GPG card: factory reset, set key-attr to 4096bits, set passwords, generate keys, remove old keys from rom and insert public and trustdb back, and flash it.
Cryptsetup-reencrypt: reencrypt device and change recovery disk passphrase.
Please review. This is first draft. Everything works but it could be more beautiful and menus should probably be seperated.
@kyle: I was thinking of a oem file being present under /boot to engage a wizard or something.