From e1522e11e085ccbed0be07c987e9a69675680d25 Mon Sep 17 00:00:00 2001 From: Dustin Jenkins Date: Wed, 10 Apr 2024 08:40:14 -0700 Subject: [PATCH] Fix for GMS lookup. --- README.md | 5 ++--- VERSION | 2 +- .../canfar/storage/web/config/StorageConfiguration.java | 7 ++++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0e11329..6a78343 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,6 @@ org.opencadc.vosui..service.features.paging = # Note: replace with the name of the VOSpace implementation in all cases, ie `vault` or `cavern`. # END: For each backend service available (used in a pulldown on the page) -org.opencadc.vosui.gms.service_id = ivo://cadc.nrc.ca/gms org.opencadc.vosui.theme.name = canfar # For OpenID Connect support. @@ -98,9 +97,9 @@ To specify the Service ID (often called Resource ID) of your services. The User See the 'Configuration' section for how to set up access to a VOSpace implementation. -To specify the Service ID for Group Management, add the appropriate System property, e.g.: +To specify the Service ID for Group Management, add the appropriate entry in the `cadc-registry.properties`: -`... -Dorg.opencadc.gms.service_id=ivo:/// ...` +ivo://ivoa.net/std/GMS#search-1.0 = ivo:/// Or deploy the `war` file in `build/libs` into a Java container such as Tomcat. diff --git a/VERSION b/VERSION index 831f6d4..00216a8 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ ## deployable containers have a semantic and build tag # semantic version tag: major.minor # build version tag: timestamp -VERSION="1.1.2" +VERSION="1.1.3" TAGS="${VERSION} ${VERSION}-$(date -u +"%Y%m%dT%H%M%S")" unset VERSION diff --git a/src/main/java/net/canfar/storage/web/config/StorageConfiguration.java b/src/main/java/net/canfar/storage/web/config/StorageConfiguration.java index 58a1960..26116e2 100644 --- a/src/main/java/net/canfar/storage/web/config/StorageConfiguration.java +++ b/src/main/java/net/canfar/storage/web/config/StorageConfiguration.java @@ -70,6 +70,8 @@ import ca.nrc.cadc.ac.client.GMSClient; import ca.nrc.cadc.accesscontrol.AccessControlClient; +import ca.nrc.cadc.reg.Standards; +import ca.nrc.cadc.reg.client.LocalAuthority; import ca.nrc.cadc.util.StringUtil; import org.apache.commons.configuration2.CombinedConfiguration; import org.apache.commons.configuration2.Configuration; @@ -126,8 +128,8 @@ public String[] getServiceNames() { } public URI getGMSServiceURI() { - final String gmsService = lookup(StorageConfigurationKey.GMS_SERVICE_URI); - return URI.create(gmsService); + final LocalAuthority localAuthority = new LocalAuthority(); + return localAuthority.getServiceURI(Standards.GMS_SEARCH_10.toASCIIString()); } public String getTokenCacheURLString() { @@ -232,7 +234,6 @@ public String[] lookupStringArray(final String key, final boolean required) { enum StorageConfigurationKey { DEFAULT_SERVICE_NAME("org.opencadc.vosui.service.default", true), SERVICE_NAME("org.opencadc.vosui.service.name", true), - GMS_SERVICE_URI("org.opencadc.vosui.gms.service_id", true), THEME_NAME("org.opencadc.vosui.theme.name", false), TOKEN_CACHE_URL("org.opencadc.vosui.tokenCache.url", false), OIDC_CLIENT_ID("org.opencadc.vosui.oidc.clientID", false),