`xcube serve` to make available public datasets to logged in users per default
Opened this issue · 0 comments
Is your feature request related to a problem? Please describe.
We have several xcube server-viewer apps configured, which use user login. Some of them have public data configured, which is available to users who are not logged in. Usually, we want to keep these datasets after a user logs in additionally to protected datasets. To achieve this, I have to configure the same datasets twice in two different datastores. Once in a public one with
AccessControl:
# Due to this it will only appear for unauthorized clients
IsSubstitute: true
defined and once without. This creates a lot of overhead configuration.
Describe the solution you'd like
I would like to make available the public datasets by default to logged in users.
Currently we do not have the case where public datasets should disappear for logged in users. In case the public datasets should not show up for logged in users, we could add a parameter to the configuration which would indicate that it should be skipped after logging in.
Describe alternatives you've considered
Currently the datasets are configured twice:
DataStores:
- Identifier: public
StoreId: s3
StoreParams:
root: public-bucket
storage_options:
anon: true
Datasets:
- Path: some_dataset.zarr
Title: Black Sea
Style: default
PlaceGroups:
- PlaceGroupRef: countries
AccessControl:
# Due to this it will only appear for unauthorized clients
IsSubstitute: true
- Identifier: non-public
StoreId: s3
StoreParams:
root: public-bucket
storage_options:
anon: true
Datasets:
- Path: some_dataset.zarr
Title: Black Sea
Style: default
PlaceGroups:
- PlaceGroupRef: countries