HakaiInstitute / hakai-datasets

Hakai Datasets that are going into https://catalogue.hakai.org/erddap/
0 stars 0 forks source link

Add non public datasets to hakai ERDDAP #93

Closed JessyBarrette closed 1 year ago

JessyBarrette commented 1 year ago

General idea

As Hakai starts to use more and more ERDDAP has a primary platform to share and make accessible data. We're hoping to provide access to some of our data to our different internal Hakai groups through some non-public ERDDAP datasets. (see #92 as a first example)

Those datasets will be generated to help the different Hakai groups to get access to their data, access the data quality and problems, and eventually either make this specific dataset available or create another data product that will be made available.

Solutions

ERDDAP provides the ability to keep some datasets behind an authentication wall (see here for documentation). A number of methods can be used to authenticate. Among those the most interesting are:

  1. custom -> username password
  2. google
  3. 2Oauth

Conditions

The method used needs to be:

Steps

JessyBarrette commented 1 year ago

I believe the easiest is to use the ERDDAP custom method which is a simple username/password protection. To use it, we would need to include the server dataset.xml the definition of the different users through the field:

<erddapDatasets>
    <user username="USERNAME" password="PASSWORD" role="ROLE">
    ....
<erddapDatasets>

and include within each protected dataset the key

<dataset ... >
   <accesibleTo>ROLE(comma delimited list)</accessibleTo>
    ...
</dataset>

Within setup.xml, custom must be selected in the authentication

  <authentication>custom</authentication>

@raytula @n-a-t-e le me know your thoughts regarding his issue.

n-a-t-e commented 1 year ago

We could do that, another option would be to stick it on goose ERDDAP which is already protected and wouldn't require any config changes - http://goose.hakai.org/erddap

JessyBarrette commented 1 year ago

We've decided to maintain for now any non public datasets within on dev server only for now