maybeMigrateKeyStoreCredentials