How do I create a new disclosure setting?

Hi,

I want to enhance some of the existing dsBase functions to include a disclosure trap around dominance/concentration. This is where we block results that are dominated by a single value - because that could disclose information about that value. To do this requires a new disclosure setting. I can see in Opal where the settings are, and that I can add a new one there. But this would need to be in place when dsBase is installed, so do they get picked up from there somehow?

Please can anyone help!?

Hi,

The options are defined in the dsBase’s DESCRIPTION file

By the way, a more CRAN compliant way of declaring the Datashield settings is to define a separate inst/DATASHIELD file

Opal reads both.

Regards
Yannick

Great, thanks @yannick

Sorry to reopen this, but I can now see that the options in the example above are duplicated (e.g. nfilter.tab is set in both dsBase and dsSurvival). How will Opal behave in this case, if the different packages have different default settings?

I did some experiments to determine the behaviour. It appears to reliably update to options you need to remove the package, before updating. If did appear on occasion that if the version of the package had increased the options would be updated.

One thing to note is that the value of the default option will only be used if the option is not set. For example, “default.nfilter.kNN” will only be used if “nfilter.kNN” is not set.

Stuart

Hi,

The DS package settings are read from the packages in the order they are listed by R, which you could consider to be unpredictable. This is why I have recommended in a dsSurvival issue to not override the dsBase settings, as it is useless and confusing: https://github.com/neelsoumya/dsSurvival/issues/3

Regards Yannick

Hey, I encountered a problem to change one of the option in dsBase package. Based on the documentation of the datashield release 6.2 (https://data2knowledge.atlassian.net/wiki/spaces/DSDEV/pages/714768398/Disclosure+control) I would like to change datashield.privacyControlLevel to non-permissive. I am aware that I can do it through dsadmin.set_option() method, but I also want to change it directly in the code. So far I cloned dsbase repo to R server and Ive changed that option in DESCRIPTION file and reinstall package. Then in Datashield UI in Administration tab, I see dsBase package with changed option, but when I call functions ds.listDisclosureSettings(datasources = connections) or dsadmin.set_option() through Rstudio I see still old value. How can I do it properly? What did I wrong? Maybe, should I put that option in OPAL_HOME/conf/opal-config.properties ?

Hi,

Would it be possible that you have several profiles and applied the new setting to a profile different from the one you are checking?

Yannick

Hi, I dont think so, because I work on default profile.

Hi,

I just tried on opal-demo.obiba.org (credentials administrator/password) and it works as expected. Here is how I did it:

  • from the Administration/DataSHIELD page, I installed a modified version of dsBase with the non-permissive setting

  • I verified that the appropriate option is set in the DataSHIELD config. If it is not the case (when dsBase was already installed), click on the Publish link for the dsBase package, this will reinitialize the DS config with the package’s settings.

  • the following script will then return the expected results:
library(opalr)
o <- opal.login(username = "administrator", password = "password", url = "https://opal-demo.obiba.org")
dsadmin.get_options(o)
opal.logout(o)

Yannick

Thank you Yannick, I got it. Just the last question, is it possible to start datashield in non-permissive mode by modifying OPAL_HOME/conf/opal-config.properties?

No, it is not a “opal configuration” per say. These are settings discovered from the R server(s), potentially overridable.

1 Like