Open
Description
Design the OnDisk
->SQLite
KIM migration script.
This script could have a config file for setting required fields such as the authenticator_id
& provider_name
.
provider_uuid
, key_name
& application_name
can be inferred from the values held within the OnDisk
KIM.
Design considerations:
- Within the
OnDisk
KIM it is possible to create two keys with the same name on different providers. The namespace for the keys held in the SQLiteKIM does not support this, keys are not separated by provider type. For exampleMy Key 🔑
can exist within anMbedCrypto
andTrustedServices
provider at the same time, for the same client; this is not the case for the SQLiteKeyInfoManager. Some method for dealing with duplicate key names should be thought of. This could be an explicit mapping from old to new like Figure. 1. - The original data held within the OnDisk key info manager should not be altered. This data can serve as a backup if the migration fails.
- We should think about how much data should be inferred/defaulted from the original OnDisk mappings. For example,
provider_uuid
can be inferred from theprovider_id
of the originalKeyTriple
. Likewise,application_name
can be inferred from the original application name, anauthenticator_id
just needs appending. Could theauthenticator_id
be inferred from the new Parsecconfig.toml
if there is only one? Could theprovider_name
be inferred from theconfig.toml
if there is only one provider of each type?
# Generic rules to handle non-duplicate cases.
[config]
authenticator_type = "UnixPeerCredentials"
##############################################################
# Explicit mapping to handle duplicate cases.
[[key_mapping]]
# The old key_triple identifier information.
[key_mapping.old]
application_name = "1523"
provider_type = "MbedCrypto"
key_name = "My Key 🔑"
# What this should be mapped to.
[key_mapping.new]
key_name = "My MbedCrypto Key 🔑"
[key_mapping.new.application_identity]
authenticator_type = "UnixPeerCredentials" # Could accept either authenticator_id (int) or authenticator_type (AuthType).
application_name = "1523"
[key_mapping.new.provider_identity]
provider_uuid = "1c1139dc-ad7c-47dc-ad6b-db6fdb466552" # Could accept either provider_uuid (str) or provider_type (ProviderId).
provider_name = "mbed-crypto-provider-3"
Figure. 1