From 742e42581b48d51a3b1d869f5fe5a14cabd44248 Mon Sep 17 00:00:00 2001 From: Patrick Dowler Date: Tue, 5 Sep 2023 11:54:32 -0700 Subject: [PATCH] icewind-0.9.7: fall back to anon endpoint if cert configured but remote does not support --- caom2-repo/build.gradle | 2 +- .../java/ca/nrc/cadc/caom2/repo/client/RepoClient.java | 8 +++++++- icewind/VERSION | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/caom2-repo/build.gradle b/caom2-repo/build.gradle index 6afa815f..1a890098 100644 --- a/caom2-repo/build.gradle +++ b/caom2-repo/build.gradle @@ -17,7 +17,7 @@ sourceCompatibility = 1.8 group = 'org.opencadc' -version = '1.4.6' +version = '1.4.7' description = 'OpenCADC CAOM repository client library' def git_url = 'https://github.com/opencadc/caom2db' diff --git a/caom2-repo/src/main/java/ca/nrc/cadc/caom2/repo/client/RepoClient.java b/caom2-repo/src/main/java/ca/nrc/cadc/caom2/repo/client/RepoClient.java index 0aa7582b..ba926b29 100644 --- a/caom2-repo/src/main/java/ca/nrc/cadc/caom2/repo/client/RepoClient.java +++ b/caom2-repo/src/main/java/ca/nrc/cadc/caom2/repo/client/RepoClient.java @@ -237,7 +237,13 @@ private void init() { } Interface iface = obs.findInterface(meth); if (iface == null) { - throw new RuntimeException("observation list capability does not suppoort auth: " + meth.getValue()); + iface = obs.findInterface(AuthMethod.ANON); + if (iface == null) { + throw new RuntimeException("observation list capability does not support auth: " + meth.getValue() + + " or anon"); + } + log.debug("observation list capability does not support auth: " + meth.getValue() + ": using anon"); + meth = AuthMethod.ANON; // use same for deletion endpoint below } this.baseServiceURL = iface.getAccessURL().getURL(); log.debug("observation list URL: " + baseServiceURL.toString()); diff --git a/icewind/VERSION b/icewind/VERSION index e8d97fb6..6bf3d427 100644 --- a/icewind/VERSION +++ b/icewind/VERSION @@ -1,6 +1,6 @@ ## deployable containers have a semantic and build tag # semantic version tag: major.minor[.patch] # build version tag: timestamp -VER=0.9.6 +VER=0.9.7 TAGS="${VER} ${VER}-$(date --utc +"%Y%m%dT%H%M%S")" unset VER