From 72f438fc5de9aee44dcd76224076e72d7c862a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Thu, 28 Mar 2024 11:32:43 +0000 Subject: [PATCH 1/2] Use release versions of omero-ms-core and omero-zarr-pixel-buffer --- README.md | 2 -- build.gradle | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cd4b2bf2..6d423764 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![AppVeyor status](https://ci.appveyor.com/api/projects/status/github/omero-ms-image-region)](https://ci.appveyor.com/project/gs-jenkins/omero-ms-image-region) - OMERO Image Region Microservice =============================== diff --git a/build.gradle b/build.gradle index dd39da2d..633c3fde 100644 --- a/build.gradle +++ b/build.gradle @@ -62,8 +62,8 @@ dependencies { implementation 'io.zipkin.reporter2:zipkin-sender-okhttp3:2.10.0' implementation 'ch.qos.logback:logback-classic:1.3.14' implementation 'org.slf4j:log4j-over-slf4j:1.7.32' - implementation 'com.glencoesoftware.omero:omero-zarr-pixel-buffer:0.3.0-SNAPSHOT' - implementation 'com.glencoesoftware.omero:omero-ms-core:0.8.0-SNAPSHOT' + implementation 'com.glencoesoftware.omero:omero-zarr-pixel-buffer:0.3.0' + implementation 'com.glencoesoftware.omero:omero-ms-core:0.8.0' implementation 'io.vertx:vertx-web:3.8.1' implementation 'io.vertx:vertx-config:3.8.1' implementation 'io.vertx:vertx-config-yaml:3.8.1' From 2db6be98ac60d63e550b2bf1e26b9c5ecaa6f110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Wed, 3 Apr 2024 09:24:38 +0100 Subject: [PATCH 2/2] Remove unnecessary OmeroAmazonS3ClientFactory class --- .../region/OmeroAmazonS3ClientFactory.java | 68 ------------------- 1 file changed, 68 deletions(-) delete mode 100644 src/main/java/com/glencoesoftware/omero/ms/image/region/OmeroAmazonS3ClientFactory.java diff --git a/src/main/java/com/glencoesoftware/omero/ms/image/region/OmeroAmazonS3ClientFactory.java b/src/main/java/com/glencoesoftware/omero/ms/image/region/OmeroAmazonS3ClientFactory.java deleted file mode 100644 index 7126ec1c..00000000 --- a/src/main/java/com/glencoesoftware/omero/ms/image/region/OmeroAmazonS3ClientFactory.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2022 Glencoe Software, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -package com.glencoesoftware.omero.ms.image.region; - -import java.util.Properties; - -import org.slf4j.LoggerFactory; - -import com.amazonaws.auth.AWSCredentialsProvider; -import com.amazonaws.auth.AWSCredentialsProviderChain; -import com.amazonaws.auth.AWSStaticCredentialsProvider; -import com.amazonaws.auth.AnonymousAWSCredentials; -import com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper; -import com.amazonaws.auth.profile.ProfileCredentialsProvider; -import com.upplication.s3fs.AmazonS3ClientFactory; - -public class OmeroAmazonS3ClientFactory extends AmazonS3ClientFactory { - - private static final org.slf4j.Logger log = - LoggerFactory.getLogger(OmeroAmazonS3ClientFactory.class); - - @Override - protected AWSCredentialsProvider getCredentialsProvider(Properties props) { - // If AWS Environment or System Properties are set, throw an exception - // so users will know they are not supported - if (System.getenv("AWS_ACCESS_KEY_ID") != null || - System.getenv("AWS_SECRET_ACCESS_KEY") != null || - System.getenv("AWS_SESSION_TOKEN") != null || - System.getProperty("aws.accessKeyId") != null || - System.getProperty("aws.secretAccessKey") != null) { - throw new RuntimeException("AWS credentials supplied by environment variables" - + " or Java system properties are not supported." - + " Please use either named profiles or instance" - + " profile credentials."); - } - boolean anonymous = Boolean.parseBoolean( - (String) props.get("s3fs_anonymous")); - if (anonymous) { - log.debug("Using anonymous credentials"); - return new AWSStaticCredentialsProvider( - new AnonymousAWSCredentials()); - } else { - String profileName = - (String) props.get("s3fs_credential_profile_name"); - // Same instances and order from DefaultAWSCredentialsProviderChain - return new AWSCredentialsProviderChain( - new ProfileCredentialsProvider(profileName), - new EC2ContainerCredentialsProviderWrapper() - ); - } - } - -}