Skip to content

[BUG] Thredds Deny Recursive permission not working as intended on "old upgraded" server. #632

@tlvu

Description

@tlvu

Describe the bug
I am not supposed to be able to browse this link https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/catalog/birdhouse/testdata/secure/catalog.html?dataset=birdhouse/testdata/secure/tasmax_Amon_MPI-ESM-MR_rcp45_r2i1p1_200601-200612.nc since the path "/birdhouse/testdata/secure" has "Deny, Recursive" permission set on it.

On only that, I was able to download the .nc raw file. The only path that actually has a "Deny, Recursive" permission working is "Opendap" path on that file. All other paths I can access.

Jenkins was passing on production server all this time because the notebook only checks for the Opendap path and the Opendap path is the only path being "denied" as expected.

The weirder problem is I deployed a fresh server on the exact same birdhouse-deploy commit and "Deny, Recursive" was able to block everything, ex: https://lvu8.ouranos.ca/twitcher/ows/proxy/thredds/catalog/birdhouse/testdata/secure/catalog.html?dataset=birdhouse/testdata/secure/tasmax_Amon_MPI-ESM-MR_rcp45_r2i1p1_200601-200612.nc (exact same file, just fresh server).

So it seems that on a production server where we have done many DB upgrades, some "cruft" is left behind and confused Twitcher/Magpie? Another difference is on the production server we have 800+ users whereas my fresh test server only has 3 users (admin, anonymous, authtest).

Found accidentally when testing for bird-house/birdhouse-deploy#478.

To Reproduce
Steps to reproduce the behavior:
Deploy the stack at this commit bird-house/birdhouse-deploy@eefea61

Expected behavior
Should get "Access to service is forbidden" for this link https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/catalog/birdhouse/testdata/secure/catalog.html?dataset=birdhouse/testdata/secure/tasmax_Amon_MPI-ESM-MR_rcp45_r2i1p1_200601-200612.nc

Screenshots
Correct behavior on my fresh server
Screenshot from 2024-11-21 01-24-58

Wrong behavior on production server
Screenshot from 2024-11-21 01-29-04

Magpie config on production server is properly set to "Deny, Recursive"
Screenshot from 2024-11-21 00-57-43

Desktop (please complete the following information):

Metadata

Metadata

Assignees

Labels

bugProblem, error, or invalid behaviour

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions