-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededlargeEffort labelEffort labelsqlite-kimIssues related to the implementation or maintainance of the SQLite KIMIssues related to the implementation or maintainance of the SQLite KIMstabilityIssues related to the stability of the serviceIssues related to the stability of the service
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
OnDiskKIM 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 anMbedCryptoandTrustedServicesprovider 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_uuidcan be inferred from theprovider_idof the originalKeyTriple. Likewise,application_namecan be inferred from the original application name, anauthenticator_idjust needs appending. Could theauthenticator_idbe inferred from the new Parsecconfig.tomlif there is only one? Could theprovider_namebe inferred from theconfig.tomlif 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededlargeEffort labelEffort labelsqlite-kimIssues related to the implementation or maintainance of the SQLite KIMIssues related to the implementation or maintainance of the SQLite KIMstabilityIssues related to the stability of the serviceIssues related to the stability of the service