microsoft/Tools-for-Health-Data-Anonymization

Running the tool with a fake/wrong path in the config.json does not result in an error

CarlosSardo opened this issue · 2 comments

Description:

When running the tool with a with a fake/wrong path in the config.json does not result in an error

This could happen by mistake and it is very unlikely to go unnoticed. Nevertheless, if it happens, it might be seen as undesireable behaviour because the user might assume that its data is being anonymized, while it is not.

Desired outcome

Throw an AnonymizerConfigurationException error informing that the path is not valid.

Reproduction steps:

Edit the tool's configuration-sample.json file and purposefuly set a non supported anonymization method:
{"path": "Resource.id-MISTAKE", "method": "cryptoHash"}.
Run the tool in Windows as it follows:
Microsoft.Health.Fhir.Anonymizer.R4.CommandLineTool.exe -i "C:\Tool\FHIR\samples\fhir-r4-files" -o "C:\Tool\FHIR\samples\fhir-r4-files\output" -c "C:\Tool\configuration-sample.json"

You'll see: Finished processing 'C:\Tool\FHIR\samples\fhir-r4-files'! no error is thrown. And the user might not notice that Resource.id was not cryptoHashed.

@sowu880 is this resolved and can the bug be closed?

Hi,
For now, we don't support validate pattern of the path. We can add this feature in the future, and also welcome to contribute to our project.

Thanks,
Songrui.