diff --git a/NOTICE b/NOTICE index 8eeea0d2434f28ced32db9e9725e95de07de1e57..cf207af2adc5e5e9f7438c830089849e874aaec6 100644 --- a/NOTICE +++ b/NOTICE @@ -397,6 +397,7 @@ The following software have components provided under the terms of this license: - JSON library from Android SDK (from http://developer.android.com/sdk) - JSON.simple (from http://code.google.com/p/json-simple/) - JSONassert (from https://github.com/skyscreamer/JSONassert) +- JSR107 API and SPI (from https://github.com/jsr107/jsr107spec) - Jackson (from http://jackson.codehaus.org) - Jackson (from http://jackson.codehaus.org) - Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-jackson2) @@ -404,21 +405,21 @@ The following software have components provided under the terms of this license: - Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary) - Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310) - Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310) -- Jackson datatype: Joda (from https://github.com/FasterXML/jackson-datatype-joda) - Jackson datatype: jdk8 (from https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8) - Jackson datatype: jdk8 (from https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8) - Jackson extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-jackson) - Jackson module: Afterburner (from https://github.com/FasterXML/jackson-modules-base) -- Jackson module: Old JAXB Annotations (javax.xml.bind) (from https://github.com/FasterXML/jackson-modules-base) -- Jackson module: Old JAXB Annotations (javax.xml.bind) (from https://github.com/FasterXML/jackson-modules-base) +- Jackson module: JAXB-annotations (from http://github.com/FasterXML/jackson-module-jaxb-annotations) +- Jackson module: JAXB-annotations (from http://github.com/FasterXML/jackson-module-jaxb-annotations) - Jackson-annotations (from http://github.com/FasterXML/jackson) - Jackson-annotations (from http://github.com/FasterXML/jackson) - Jackson-core (from https://github.com/FasterXML/jackson-core) - Jackson-dataformat-Smile (from http://wiki.fasterxml.com/JacksonForSmile) - Jackson-dataformat-Smile (from http://wiki.fasterxml.com/JacksonForSmile) -- Jackson-dataformat-XML (from https://github.com/FasterXML/jackson-dataformat-xml) +- Jackson-dataformat-XML (from http://wiki.fasterxml.com/JacksonExtensionXmlDataBinding) - Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson-dataformats-text) - Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson-dataformats-text) +- Jackson-datatype-JODA (from http://wiki.fasterxml.com/JacksonModuleJoda) - Jackson-module-parameter-names (from https://repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-module-parameter-names) - Jackson-module-parameter-names (from https://repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-module-parameter-names) - Jakarta Bean Validation API (from https://beanvalidation.org) @@ -447,8 +448,8 @@ The following software have components provided under the terms of this license: - Lucene Grouping (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-grouping) - Lucene Highlighter (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-highlighter) - Lucene Join (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-join) -- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs) - Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory) +- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs) - Lucene Miscellaneous (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-misc) - Lucene Queries (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-queries) - Lucene QueryParsers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-queryparser) @@ -519,13 +520,14 @@ The following software have components provided under the terms of this license: - Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt) - Nimbus LangTag (from https://bitbucket.org/connect2id/nimbus-language-tags) - Nimbus LangTag (from https://bitbucket.org/connect2id/nimbus-language-tags) -- Non-Blocking Reactive Foundation for the JVM (from https://github.com/reactor/reactor-core) +- Non-Blocking Reactive Foundation for the JVM (from https://github.com/reactor/reactor) - OAuth 2.0 SDK with OpenID Connect extensions (from https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions) - OAuth 2.0 SDK with OpenID Connect extensions (from https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions) - OAuth 2.0 SDK with OpenID Connect extensions (from https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions) - OAuth2 for Spring Security (from https://repo1.maven.org/maven2/org/springframework/security/oauth/spring-security-oauth2) - OAuth2 for Spring Security (from https://repo1.maven.org/maven2/org/springframework/security/oauth/spring-security-oauth2) - Objenesis (from http://objenesis.org) +- OkHttp Logging Interceptor (from https://repo1.maven.org/maven2/com/squareup/okhttp3/logging-interceptor) - Okio (from https://github.com/square/okio/) - Okio (from https://github.com/square/okio/) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) @@ -556,7 +558,6 @@ The following software have components provided under the terms of this license: - Spring AMQP Core (from https://github.com/spring-projects/spring-amqp) - Spring AOP (from https://github.com/spring-projects/spring-framework) - Spring Beans (from https://github.com/spring-projects/spring-framework) -- Spring Boot Log4j 2 Starter (from http://projects.spring.io/spring-boot/) - Spring Boot Tomcat Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-tomcat) - Spring Commons Logging Bridge (from https://github.com/spring-projects/spring-framework) - Spring Context (from https://github.com/spring-projects/spring-framework) @@ -583,9 +584,9 @@ The following software have components provided under the terms of this license: - Vavr Match (from http://vavr.io) - Woodstox (from https://github.com/FasterXML/woodstox) - Xerces2-j (from https://xerces.apache.org/xerces2-j/) -- Zipkin Core Library (from https://repo1.maven.org/maven2/io/zipkin/zipkin2/zipkin) - Zipkin Reporter Brave (from https://repo1.maven.org/maven2/io/zipkin/reporter2/zipkin-reporter-brave) - Zipkin Reporter: Core (from https://repo1.maven.org/maven2/io/zipkin/reporter2/zipkin-reporter) +- Zipkin v2 (from https://repo1.maven.org/maven2/io/zipkin/zipkin2/zipkin) - aalto-xml (from ) - aggs-matrix-stats (from https://github.com/elastic/elasticsearch) - asm (from http://asm.ow2.io/) @@ -595,6 +596,7 @@ The following software have components provided under the terms of this license: - com.google.api.grpc:proto-google-cloud-datastore-v1 (from https://github.com/googleapis/googleapis) - compiler (from http://github.com/spullara/mustache.java) - core (from https://github.com/elastic/elasticsearch) +- core (from https://github.com/elastic/elasticsearch) - datastore-v1-proto-client (from https://repo1.maven.org/maven2/com/google/cloud/datastore/datastore-v1-proto-client) - elasticsearch-geo (from https://github.com/elastic/elasticsearch) - error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations) @@ -651,7 +653,6 @@ The following software have components provided under the terms of this license: - jose4j (from https://bitbucket.org/b_c/jose4j/) - lang-mustache (from https://github.com/elastic/elasticsearch) - lettuce (from http://github.com/mp911de/lettuce/wiki) -- logging-interceptor (from https://github.com/square/okhttp) - mapper-extras (from https://github.com/elastic/elasticsearch) - micrometer-core (from https://github.com/micrometer-metrics/micrometer) - micrometer-registry-azure-monitor (from https://github.com/micrometer-metrics/micrometer) @@ -680,13 +681,18 @@ The following software have components provided under the terms of this license: - proto-google-common-protos (from https://github.com/googleapis/java-iam/proto-google-common-protos) - proto-google-iam-v1 (from https://github.com/googleapis/java-iam/proto-google-iam-v1) - rank-eval (from https://github.com/elastic/elasticsearch) +- resilience4j (from https://github.com/resilience4j/resilience4j) +- resilience4j (from https://resilience4j.readme.io) +- resilience4j (from https://resilience4j.readme.io) +- resilience4j (from https://resilience4j.readme.io) +- resilience4j (from https://resilience4j.readme.io) +- resilience4j (from https://github.com/resilience4j/resilience4j) - resilience4j (from https://resilience4j.readme.io) - resilience4j (from https://resilience4j.readme.io) - rest (from https://github.com/elastic/elasticsearch) - rest-high-level (from https://github.com/elastic/elasticsearch) - rxjava (from https://github.com/ReactiveX/RxJava) - secure-sm (from https://github.com/elastic/elasticsearch) -- server (from https://github.com/elastic/elasticsearch) - spring-boot (from https://spring.io/projects/spring-boot) - spring-boot-actuator (from https://spring.io/projects/spring-boot) - spring-boot-actuator-autoconfigure (from https://spring.io/projects/spring-boot) @@ -696,9 +702,11 @@ The following software have components provided under the terms of this license: - spring-boot-starter (from https://spring.io/projects/spring-boot) - spring-boot-starter-actuator (from https://spring.io/projects/spring-boot) - spring-boot-starter-amqp (from https://spring.io/projects/spring-boot) +- spring-boot-starter-aop (from https://spring.io/projects/spring-boot) - spring-boot-starter-data-mongodb (from https://spring.io/projects/spring-boot) - spring-boot-starter-jersey (from https://spring.io/projects/spring-boot) - spring-boot-starter-json (from https://spring.io/projects/spring-boot) +- spring-boot-starter-log4j2 (from https://spring.io/projects/spring-boot) - spring-boot-starter-logging (from https://spring.io/projects/spring-boot) - spring-boot-starter-reactor-netty (from https://spring.io/projects/spring-boot) - spring-boot-starter-security (from https://spring.io/projects/spring-boot) @@ -708,15 +716,15 @@ The following software have components provided under the terms of this license: - spring-boot-starter-webflux (from https://spring.io/projects/spring-boot) - spring-boot-test (from https://spring.io/projects/spring-boot) - spring-boot-test-autoconfigure (from https://spring.io/projects/spring-boot) -- spring-security-config (from http://spring.io/spring-security) -- spring-security-core (from http://spring.io/spring-security) -- spring-security-oauth2-client (from http://spring.io/spring-security) -- spring-security-oauth2-core (from http://spring.io/spring-security) -- spring-security-oauth2-jose (from http://spring.io/spring-security) -- spring-security-oauth2-jose (from http://spring.io/spring-security) -- spring-security-oauth2-resource-server (from http://spring.io/spring-security) -- spring-security-test (from http://spring.io/spring-security) -- spring-security-web (from http://spring.io/spring-security) +- spring-security-config (from https://spring.io/spring-security) +- spring-security-core (from https://spring.io/spring-security) +- spring-security-oauth2-client (from https://spring.io/spring-security) +- spring-security-oauth2-core (from https://spring.io/spring-security) +- spring-security-oauth2-jose (from https://spring.io/spring-security) +- spring-security-oauth2-jose (from https://spring.io/spring-security) +- spring-security-oauth2-resource-server (from https://spring.io/spring-security) +- spring-security-test (from https://spring.io/spring-security) +- spring-security-web (from https://spring.io/spring-security) - springfox-core (from https://github.com/springfox/springfox) - springfox-schema (from https://github.com/springfox/springfox) - springfox-spi (from https://github.com/springfox/springfox) @@ -727,10 +735,10 @@ The following software have components provided under the terms of this license: - swagger-annotations (from https://repo1.maven.org/maven2/io/swagger/swagger-annotations) - swagger-jaxrs (from ) - swagger-models (from https://repo1.maven.org/maven2/io/swagger/swagger-models) -- tomcat-annotations-api (from https://tomcat.apache.org/) +- tomcat-annotations-api (from http://tomcat.apache.org/) - tomcat-embed-core (from http://tomcat.apache.org/) - tomcat-embed-el (from https://tomcat.apache.org/) -- tomcat-embed-websocket (from https://tomcat.apache.org/) +- tomcat-embed-websocket (from http://tomcat.apache.org/) - x-content (from https://github.com/elastic/elasticsearch) - xml-apis (from ) @@ -750,7 +758,7 @@ The following software have components provided under the terms of this license: - Lucene Common Analyzers (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-analyzers-common) - Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) - Plexus Common Utilities (from https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils) -- Reflections (from http://github.com/ronmamo/reflections) +- Reflections (from http://code.google.com/p/reflections/) - Stax2 API (from http://github.com/FasterXML/stax2-api) - ThreeTen backport (from https://www.threeten.org/threetenbp) - jersey-ext-bean-validation (from https://repo1.maven.org/maven2/org/glassfish/jersey/ext/jersey-bean-validation) @@ -796,7 +804,7 @@ The following software have components provided under the terms of this license: - Protocol Buffers [Core] (from https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java) - Protocol Buffers [Util] (from https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util) - Protocol Buffers [Util] (from https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java-util) -- Reflections (from http://github.com/ronmamo/reflections) +- Reflections (from http://code.google.com/p/reflections/) - SnakeYAML (from http://www.snakeyaml.org) - Spring Core (from https://github.com/spring-projects/spring-framework) - ThreeTen backport (from https://www.threeten.org/threetenbp) @@ -908,6 +916,7 @@ EPL-1.0 ======================================================================== The following software have components provided under the terms of this license: +- AspectJ Weaver (from https://www.eclipse.org/aspectj/) - Logback Classic Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-classic) - Logback Contrib :: JSON :: Classic (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-json-classic) - Logback Contrib :: JSON :: Core (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-json-core) @@ -1130,7 +1139,7 @@ The following software have components provided under the terms of this license: - mockito-core (from https://github.com/mockito/mockito) - msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java) - msal4j-persistence-extension (from https://github.com/AzureAD/microsoft-authentication-extensions-for-java) -- spring-security-core (from http://spring.io/spring-security) +- spring-security-core (from https://spring.io/spring-security) ======================================================================== MPL-1.1 @@ -1224,7 +1233,7 @@ WTFPL ======================================================================== The following software have components provided under the terms of this license: -- Reflections (from http://github.com/ronmamo/reflections) +- Reflections (from http://code.google.com/p/reflections/) ======================================================================== X11 diff --git a/indexer-core/pom.xml b/indexer-core/pom.xml index 650b0702f9d6140364f4b8635753a1e0d125ffac..2ff7f227edea60a4fe75867c589546d459df2af8 100644 --- a/indexer-core/pom.xml +++ b/indexer-core/pom.xml @@ -4,12 +4,12 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>indexer-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <name>indexer-core</name> <description>Indexer Service Core</description> <packaging>jar</packaging> diff --git a/pom.xml b/pom.xml index a59ee5d608b24071b98192b249c169d14a3aa4fa..ea8da0746bfa9be8cd8a962910a54555a6013bf5 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> <packaging>pom</packaging> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <description>Indexer Service</description> <properties> diff --git a/provider/indexer-aws/pom.xml b/provider/indexer-aws/pom.xml index 11edf9f28af5494bd373437c6b823455ac722ddc..060335dfadae635d9ce4ae91d614b267767fd148 100644 --- a/provider/indexer-aws/pom.xml +++ b/provider/indexer-aws/pom.xml @@ -18,7 +18,7 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> @@ -26,7 +26,7 @@ <artifactId>indexer-aws</artifactId> <description>Indexer service on AWS</description> <packaging>jar</packaging> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <properties> <aws.version>1.11.1018</aws.version> @@ -42,7 +42,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.opengroup.osdu.core.aws</groupId> diff --git a/provider/indexer-azure/pom.xml b/provider/indexer-azure/pom.xml index e72f50d6d77e850e0b6375742d32de1bd01cb4b1..e9434c2401aa5564cc4387b485de6b36282cb8d4 100644 --- a/provider/indexer-azure/pom.xml +++ b/provider/indexer-azure/pom.xml @@ -21,12 +21,12 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <artifactId>indexer-azure</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <name>indexer-azure</name> <description>Indexer Service Azure</description> <packaging>jar</packaging> @@ -39,9 +39,9 @@ <azure.appservice.subscription /> <log4j.version>2.11.2</log4j.version> <nimbus-jose-jwt.version>8.2</nimbus-jose-jwt.version> - <indexer-core.version>0.11.0-SNAPSHOT</indexer-core.version> + <indexer-core.version>0.12.0-SNAPSHOT</indexer-core.version> <spring-security-jwt.version>1.1.1.RELEASE</spring-security-jwt.version> - <osdu.corelibazure.version>0.10.1</osdu.corelibazure.version> + <osdu.corelibazure.version>0.11.0-rc5</osdu.corelibazure.version> <reactor-netty.version>0.9.12.RELEASE</reactor-netty.version> <java-jwt.version>3.8.1</java-jwt.version> <powermock.version>2.0.2</powermock.version> diff --git a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/ServiceAccountJwtClientImpl.java b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/ServiceAccountJwtClientImpl.java index 202dd483b059254566f8cc3b971e678934f6db94..12ff2ac7990717e41ff96496bc48e65accdcb055 100644 --- a/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/ServiceAccountJwtClientImpl.java +++ b/provider/indexer-azure/src/main/java/org/opengroup/osdu/indexer/azure/util/ServiceAccountJwtClientImpl.java @@ -14,29 +14,19 @@ package org.opengroup.osdu.indexer.azure.util; -import com.auth0.jwt.JWT; -import com.auth0.jwt.exceptions.JWTDecodeException; -import com.microsoft.aad.adal4j.AuthenticationContext; -import com.microsoft.aad.adal4j.AuthenticationResult; -import com.microsoft.aad.adal4j.ClientCredential; import org.apache.http.HttpStatus; - +import org.opengroup.osdu.azure.util.AzureServicePrincipleTokenService; import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; import org.opengroup.osdu.core.common.model.http.AppException; import org.opengroup.osdu.core.common.model.http.DpsHeaders; -import org.opengroup.osdu.core.common.model.search.IdToken; import org.opengroup.osdu.core.common.model.tenant.TenantInfo; -import org.opengroup.osdu.core.common.provider.interfaces.IJwtCache; import org.opengroup.osdu.core.common.provider.interfaces.ITenantFactory; import org.opengroup.osdu.core.common.util.IServiceAccountJwtClient; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.web.context.annotation.RequestScope; import javax.inject.Inject; -import javax.inject.Named; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; @Component @RequestScope @@ -48,76 +38,23 @@ public class ServiceAccountJwtClientImpl implements IServiceAccountJwtClient { @Inject private DpsHeaders dpsHeaders; - @Inject - private IJwtCache cacheService; - @Inject private JaxRsDpsLog log; - @Inject - @Named("AAD_OBO_API") - private String authAPI; + @Autowired + private AzureServicePrincipleTokenService tokenService; - @Inject - @Named("AUTH_CLIENT_ID") - private String authClientID; - - @Inject - @Named("AUTH_CLIENT_SECRET") - private String authClientSecret; - - @Inject - @Named("AUTH_URL") - private String authURL; + @Override + public String getIdToken(String partitionId){ - public String getIdToken(String tenantName) { - this.log.info("Tenant name received for auth token is: " + tenantName); - TenantInfo tenant = this.tenantInfoServiceProvider.getTenantInfo(tenantName); + TenantInfo tenant = this.tenantInfoServiceProvider.getTenantInfo(partitionId); if (tenant == null) { this.log.error("Invalid tenant name receiving from azure"); throw new AppException(HttpStatus.SC_BAD_REQUEST, "Invalid tenant Name", "Invalid tenant Name from azure"); } - String ACCESS_TOKEN = ""; - try { - IdToken cachedToken = (IdToken) this.cacheService.get(tenant.getServiceAccount()); - this.dpsHeaders.put(DpsHeaders.USER_EMAIL, tenant.getServiceAccount()); - - if (!IdToken.refreshToken(cachedToken)) { - return cachedToken.getTokenValue(); - } - - ExecutorService service = Executors.newFixedThreadPool(1); - AuthenticationContext context = null; - - try { - context = new AuthenticationContext(authURL, false, service); - ClientCredential credential = new ClientCredential(authClientID, authClientSecret); - Future<AuthenticationResult> future = context.acquireToken(authAPI, credential, null); - - ACCESS_TOKEN = future.get().getAccessToken(); - - if (future == null) { - log.error(String.format("Azure Authentication: %s", future.get().getAccessToken())); - throw new AppException(HttpStatus.SC_FORBIDDEN, "Access denied", "The user is not authorized to perform this action"); - } - IdToken idToken = IdToken.builder().tokenValue(ACCESS_TOKEN).expirationTimeMillis(JWT.decode(ACCESS_TOKEN).getExpiresAt().getTime()).build(); - - this.cacheService.put(tenant.getServiceAccount(), idToken); - - } catch (InterruptedException e) { - e.printStackTrace(); - } finally { - service.shutdown(); - } - } catch (JWTDecodeException e) { - throw new AppException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "Persistence error", "Invalid token, error decoding", e); - } catch (AppException e) { - throw e; - } catch (Exception e) { - throw new AppException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "Persistence error", "Error generating token", e); - } + this.dpsHeaders.put(DpsHeaders.USER_EMAIL, tenant.getServiceAccount()); - return ACCESS_TOKEN; + return this.tokenService.getAuthorizationToken(); } } diff --git a/provider/indexer-gcp/pom.xml b/provider/indexer-gcp/pom.xml index a04ddb08ca81f99410fdb050b8cbb998936cce96..d66e0332947f702e9b3b75dd1871e1219c64ed1e 100644 --- a/provider/indexer-gcp/pom.xml +++ b/provider/indexer-gcp/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <artifactId>indexer-gcp</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <name>indexer-gcp</name> <description>Indexer Service GCP App Engine</description> <packaging>jar</packaging> @@ -19,7 +19,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/provider/indexer-ibm/pom.xml b/provider/indexer-ibm/pom.xml index 6b70e9a7122fc83890ca55124f79aba69a197f22..a270931b72639e2bcf278592904a7f726dbe5d0b 100644 --- a/provider/indexer-ibm/pom.xml +++ b/provider/indexer-ibm/pom.xml @@ -21,7 +21,7 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> @@ -53,7 +53,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/provider/indexer-reference/pom.xml b/provider/indexer-reference/pom.xml index 76da4d50f8b5df385f6862ac06a943c3b85b6619..466615c5d41bc043d69f1ae557a168847c1bd0df 100644 --- a/provider/indexer-reference/pom.xml +++ b/provider/indexer-reference/pom.xml @@ -22,12 +22,12 @@ <parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-service</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <artifactId>indexer-reference</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <name>indexer-reference</name> <description>Indexer Service GCP Anthos</description> <packaging>jar</packaging> @@ -36,7 +36,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/testing/indexer-test-aws/pom.xml b/testing/indexer-test-aws/pom.xml index 1f44c614b05c08ac7a73f1d52d0cdabcc7971f03..9a4521d04c6c9d2c9a56322eb50a82f1c4dafc6e 100644 --- a/testing/indexer-test-aws/pom.xml +++ b/testing/indexer-test-aws/pom.xml @@ -21,13 +21,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-aws</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -42,7 +42,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <!-- AWS specific packages --> diff --git a/testing/indexer-test-azure/pom.xml b/testing/indexer-test-azure/pom.xml index 744346e091543648ed971b079e30c2e80aaf2a83..ffa914cff0ea424a8dbd2155dd19c710682e9b90 100644 --- a/testing/indexer-test-azure/pom.xml +++ b/testing/indexer-test-azure/pom.xml @@ -21,13 +21,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-azure</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -45,7 +45,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> diff --git a/testing/indexer-test-core/pom.xml b/testing/indexer-test-core/pom.xml index 8fbb5bb85063e6c4a6acbfc4f3c7a8a65644ed57..bbe26ce1b7d67604a0a4caf6b4e8f8b33c88ff65 100644 --- a/testing/indexer-test-core/pom.xml +++ b/testing/indexer-test-core/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <properties> <maven.compiler.target>1.8</maven.compiler.target> diff --git a/testing/indexer-test-gcp/pom.xml b/testing/indexer-test-gcp/pom.xml index c04bfaa9a8eeaab55a87e34ab2cb2800c579bfb2..7da406de1e06c2f4188a94cb75d3cd381085e8bb 100644 --- a/testing/indexer-test-gcp/pom.xml +++ b/testing/indexer-test-gcp/pom.xml @@ -6,13 +6,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-gcp</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -37,7 +37,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <!-- Cucumber --> diff --git a/testing/indexer-test-ibm/pom.xml b/testing/indexer-test-ibm/pom.xml index 26a2c992ad25c8a1fd09441cbb78d85b431bf90f..36aabbea47d42d2e760904e3cc9ac2109b9d1e62 100644 --- a/testing/indexer-test-ibm/pom.xml +++ b/testing/indexer-test-ibm/pom.xml @@ -6,13 +6,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-ibm</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -38,7 +38,7 @@ <dependency> <groupId>org.opengroup.osdu.indexer</groupId> <artifactId>indexer-test-core</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/testing/pom.xml b/testing/pom.xml index 948d86e1854bb3a62757e5da3bf2989e01799783..183574e5095bd2e311e9fa78a1cecaaf69fada40 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -18,7 +18,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu</groupId> <artifactId>indexer-test</artifactId> - <version>0.11.0-SNAPSHOT</version> + <version>0.12.0-SNAPSHOT</version> <description>Indexer Service Integration Test Root Project</description> <properties> <spring.version>5.1.19.RELEASE</spring.version>