cryptsetup: revert to systemd 248 up/pin/uv FIDO2 settings when we don't have LUKS2 JSON data telling us the precise configuration
Let's improve compatibility with systemd 248 enrollments of FIDO2 keys: if we have no information about the up/uv/pin settings, let's try to determine them automatically, i.e. use up and pin if needed. This only has an effect on LUKS2 volumes where a FIDO2 key was enrolled with systemd 248 and thus the JSON data lacks the up/uv/pin fields. It also matters if the user configured FIDO2 parameters explicitly via crypttab options, so that the JSON data is not used. For newer enrollments we'll stick to the explicit settings, as that's generally much safer and robust.
This commit is contained in:
@@ -758,7 +758,11 @@ static int attach_luks_or_plain_or_bitlk_by_fido2(
|
||||
cid = arg_fido2_cid;
|
||||
cid_size = arg_fido2_cid_size;
|
||||
|
||||
required = FIDO2ENROLL_PIN | FIDO2ENROLL_UP; /* For backwards compatibility, PIN+presence is required by default. */
|
||||
/* For now and for compatibility, if the user explicitly configured FIDO2 support and we do
|
||||
* not read FIDO2 metadata off the LUKS2 header, default to the systemd 248 logic, where we
|
||||
* use PIN + UP when needed, and do not configure UV at all. Eventually, we should make this
|
||||
* explicitly configurable. */
|
||||
required = FIDO2ENROLL_PIN_IF_NEEDED | FIDO2ENROLL_UP_IF_NEEDED | FIDO2ENROLL_UV_OMIT;
|
||||
} else {
|
||||
r = find_fido2_auto_data(
|
||||
cd,
|
||||
|
||||
Reference in New Issue
Block a user