Question wrt assigning data from Opal server (dsBase 6.0.1)

Dear dataSHIELD team,

I have a question that I hope you can help me with.

We have just upgraded from dsBase 5.0.0 to dsBase 6.0.1 on our Opal server and I have some problems assigning data in dataSHIELD version 6.0.1.

I have looked at the training at https://data2knowledge.atlassian.net/wiki/spaces/DSDEV/pages/1241120778/DataSHIELD+Training+Part+1+Introduction+and+logging+in

And my script based on this tutorial is as follows:

Loading libraries

library(DSI)

library(DSOpal)

library(dsBaseClient)

Lists functionality currently available in DS.

ls(“package:DSI”)

ls(“package:DSOpal”)

ls(“package:dsBaseClient”)

Login information

server = “dnbc”

url = “https://opal.sund.ku.dk

user=“x”

password =“y”

table = “lc_dnbc_core_2_0.2_0_core_1_0_non_rep”

driver = ‘OpalDriver’

Gathering login information

builder <- DSI::newDSLoginBuilder()

builder$append(server, url, table, resource="", driver, user, password)

logindata <- builder$build()

logindata

Defining variables

nonrep.vars <- c(

“child_id”, “sex”, “agebirth_m_y”, “preg_smk”, “parity_m”, “height_m”,

“prepreg_weight”, “ga_bj”, “ga_us”, “cohort_id”)

Assigning data

connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = “D”, variables=nonrep.vars)

I get the following error:

Logging into the collaborating servers

Error in curl::curl_fetch_memory(url, handle = handle) :

Peer certificate cannot be authenticated with known CA certificates

Do you have an idea as to why it is not working? I have permission to access the table on the Opal server.

Hi, Please could you try adding, to the Login information::

options=“list(ssl_verifyhost=0,ssl_verifypeer=0)”

This will TLS disable certificate checking, but if you want to have certificate validation you will need to install the your CA certificate.

Stuart

Hi,

I agree with Stuart, this is an SSL error that may be due to the opal server (or any proxy that is in between) having a self-signed/invalid/not recognized certificate. SSL options mentioned by Stuart would work, but it is definitely not secure.

Regards
Yannick

Thank you both for your replies! I will definitely sort out the CA certificate!

1 Like