[Feature] Allow metadata_type.prefixes
and data_type.prefixes
in ServiceTHREDDS
configuration to contain /
character
#633
Labels
feature
New feature to be developed
Is your feature request related to a problem? Please describe.
THREDDS can have service paths that include subpaths (ex:
/ncss/grid
andncss/point
). We should be able to define a configuration file for the Magpie THREDDS service like so:So that part of the URL path that defines the service can be treated as a prefix.
Currently, we cannot include
/
in prefix values because Magpie splits the URL path on/
characters.The current workaround is to just include the top-most path part as the prefix and apply permissions to the rest of the path parts as if they were directories. However, this means that we need to define permissions multiple times for the same resource.
For example:
Right now we have URL paths like:
${FQDN}/twitcher/ows/proxy/thredds/ncss/datasets/...
${FQDN}/twitcher/ows/proxy/thredds/dodsC/datasets/...
So if we want to set specific permissions on the
datasets/
directory we can do that by setting one directory permission rule on thedatasets/
subdirectory and it will work for all services.But if we instead have:
${FQDN}/twitcher/ows/proxy/thredds/ncss/point/datasets/...
${FQDN}/twitcher/ows/proxy/thredds/dodsC/datasets/...
Then we would need to set the same permission rule on
datasets/
as well aspoint/datasets/
. If we don't set the same rule onpoint/datasets/
then the rule won't apply to resources accessed by thencss/point
service.Describe the solution you'd like
Parse the prefix values differently so that values that include
/
can be matched. I suggest thatpermission_requested
function should detect that a prefix includes a/
and applies multiple matches to each path part in order.Additional context
See initial discussion of this issue here: bird-house/birdhouse-deploy#413 (comment)
The text was updated successfully, but these errors were encountered: