How do I create a new disclosure setting?


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!?


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.


Great, thanks @yannick

Sorry to reopen this, but I can now see that the options in the example above are duplicated (e.g. 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.



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:

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 ( 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/ ?


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


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


I just tried on (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:
o <- opal.login(username = "administrator", password = "password", url = "")


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/

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

1 Like