Recognise a PKCS11 hardware token with its serial number instead of slot number #481
Labels
enhancement
New feature or request
good first issue
Good for newcomers
medium
Effort label
platforms
Compatibility with different secure services or hardware platforms
Milestone
To interface with a specific PKCS11 implementation token, Parsec currently uses the slot number (
CK_SLOT_ID
) of the token.As stated here and here this is a bit fragile:
Ideally, the admin would know the serial number of the device they want to use with Parsec and enter that + its PIN in the configuration file. That way, the slot number might change the same device will always be used with Parsec.
Parsec configuration is stable. That means that we can not remove support for the
slot_number
field. Instead we can do:slot_number
orserial_number
is entered and there is only one slot available, use that one (Make the slot_number field optional #375)slot_number
is entered, check that the slot number is valid viaGetSlotList
and use that one. Print a warning message that slot number might change and that serial number is preferred.serial_number
is entered, callGetSlotList
thenGetTokenInfo
for each one of them and use the slot ID mapping with the serial numberserial_number
logicAbout security: as per our threat model, the admin and what they write in the configuration file is trusted. The machine is not supposed to be accessed physically by untrusted agents. For those reasons I don't recognise this as a security issue.
The text was updated successfully, but these errors were encountered: