From 4a36922345eba99e302df65be9833f35940bef17 Mon Sep 17 00:00:00 2001 From: Denis Karpenok Date: Fri, 9 Oct 2020 14:16:10 +0300 Subject: [PATCH 01/10] GO3NRG-933 Sonar --- .../crs-catalog-gcp/crs-catalog-gke/pom.xml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml b/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml index 78b743a..6e02537 100644 --- a/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml +++ b/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml @@ -154,7 +154,25 @@ --> - + + org.jacoco + jacoco-maven-plugin + 0.7.7.201606060606 + + + + prepare-agent + + + + report + prepare-package + + report + + + + -- GitLab From d704532ac5216249b5e1bbeaa5f32794e5edfda8 Mon Sep 17 00:00:00 2001 From: Stanislav Riabokon Date: Thu, 12 Nov 2020 10:46:54 +0400 Subject: [PATCH 02/10] GONRG-1058 Updated poms. --- .mvn/community-maven.settings.xml | 28 ++++++++++++----- crs-catalog-core/pom.xml | 19 +----------- pom.xml | 31 +++++++++++++++---- provider/crs-catalog-aws/pom.xml | 20 +----------- .../crs-catalog-azure/crs-catalog-aks/pom.xml | 27 +++------------- .../crs-catalog-gcp/crs-catalog-gke/pom.xml | 19 +----------- .../crs-catalog-ibm/crs-catalog-ocp/pom.xml | 19 +----------- 7 files changed, 54 insertions(+), 109 deletions(-) diff --git a/.mvn/community-maven.settings.xml b/.mvn/community-maven.settings.xml index 75718a6..ed7ac91 100644 --- a/.mvn/community-maven.settings.xml +++ b/.mvn/community-maven.settings.xml @@ -7,22 +7,34 @@ true - community-maven-via-job-token + community-maven-repo + community-maven-via-job-token + community-maven-via-job-token + + https://community.opengroup.org/api/v4/groups/17/-/packages/maven + https://community.opengroup.org/api/v4/projects/21/packages/maven + https://community.opengroup.org/api/v4/projects/21/packages/maven + presence of the COMMUNITY_MAVEN_TOKEN variable triggers this and overrides the CI Token + based authentication --> GitLab-Authenticate-With-Private-Token - - env.COMMUNITY_MAVEN_TOKEN - + + env.COMMUNITY_MAVEN_TOKEN + - community-maven-via-private-token + community-maven-repo + community-maven-via-private-token + community-maven-via-private-token + + https://community.opengroup.org/api/v4/groups/17/-/packages/maven + https://community.opengroup.org/api/v4/projects/21/packages/maven + https://community.opengroup.org/api/v4/projects/21/packages/maven @@ -52,4 +64,4 @@ - + \ No newline at end of file diff --git a/crs-catalog-core/pom.xml b/crs-catalog-core/pom.xml index 9d62e64..f25299a 100644 --- a/crs-catalog-core/pom.xml +++ b/crs-catalog-core/pom.xml @@ -8,6 +8,7 @@ org.opengroup.osdu.crs-catalog-service crs-catalog-service 1.0.0 + ../pom.xml org.opengroup.osdu.crs-catalog-service @@ -37,24 +38,6 @@ 3.1.0 - - - ${gitlab-server} - https://community.opengroup.org/api/v4/groups/17/-/packages/maven - - - - - - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven - - - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven - - - diff --git a/pom.xml b/pom.xml index 7dba8bb..5e0f2e2 100644 --- a/pom.xml +++ b/pom.xml @@ -45,22 +45,41 @@ - ${gitlab-server} - https://community.opengroup.org/api/v4/groups/17/-/packages/maven + ${repo.releases.id} + ${repo.releases.url} - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven + ${publish.releases.id} + ${publish.releases.url} - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven + ${publish.snapshots.id} + ${publish.snapshots.url} + + + Default + + + !repo.releases.id + + + + community-maven-repo + community-maven-via-job-token + community-maven-via-job-token + https://community.opengroup.org/api/v4/groups/17/-/packages/maven + https://community.opengroup.org/api/v4/projects/21/packages/maven + https://community.opengroup.org/api/v4/projects/21/packages/maven + + + + diff --git a/provider/crs-catalog-aws/pom.xml b/provider/crs-catalog-aws/pom.xml index 66f6195..843871b 100644 --- a/provider/crs-catalog-aws/pom.xml +++ b/provider/crs-catalog-aws/pom.xml @@ -23,6 +23,7 @@ org.opengroup.osdu.crs-catalog-service crs-catalog-service 1.0.0 + ../../pom.xml org.opengroup.osdu.crs-catalog-service @@ -92,23 +93,4 @@ - - - - ${gitlab-server} - https://community.opengroup.org/api/v4/groups/17/-/packages/maven - - - - - - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven - - - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven - - - diff --git a/provider/crs-catalog-azure/crs-catalog-aks/pom.xml b/provider/crs-catalog-azure/crs-catalog-aks/pom.xml index 70fcb5d..d85ac57 100644 --- a/provider/crs-catalog-azure/crs-catalog-aks/pom.xml +++ b/provider/crs-catalog-azure/crs-catalog-aks/pom.xml @@ -6,10 +6,11 @@ - org.opengroup.osdu.crs-catalog-service - crs-catalog-service - 1.0.0 - + org.opengroup.osdu.crs-catalog-service + crs-catalog-service + 1.0.0 + ../../../pom.xml + org.opengroup.osdu.crs-catalog-service crs-catalog-aks @@ -18,24 +19,6 @@ crs-catalog-aks CRS Catalog service Google Kubernetes Engine deployment - - - ${gitlab-server} - https://community.opengroup.org/api/v4/groups/17/-/packages/maven - - - - - - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven - - - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven - - - 1 crs-catalog-aks diff --git a/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml b/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml index 6e02537..b7e9b38 100644 --- a/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml +++ b/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml @@ -9,6 +9,7 @@ org.opengroup.osdu.crs-catalog-service crs-catalog-service 1.0.0 + ../../../pom.xml org.opengroup.osdu.crs-catalog-service @@ -18,24 +19,6 @@ crs-catalog-gke CRS Catalog service Google Kubernetes Engine deployment - - - ${gitlab-server} - https://community.opengroup.org/api/v4/groups/17/-/packages/maven - - - - - - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven - - - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven - - - 1 crs-catalog-gke diff --git a/provider/crs-catalog-ibm/crs-catalog-ocp/pom.xml b/provider/crs-catalog-ibm/crs-catalog-ocp/pom.xml index 9b13177..5981d9f 100644 --- a/provider/crs-catalog-ibm/crs-catalog-ocp/pom.xml +++ b/provider/crs-catalog-ibm/crs-catalog-ocp/pom.xml @@ -9,6 +9,7 @@ org.opengroup.osdu.crs-catalog-service crs-catalog-service 1.0.0 + ../../../pom.xml jar @@ -16,24 +17,6 @@ crs-catalog-ocp CRS Catalog service Openshift Container Platform deployment - - - ${gitlab-server} - https://community.opengroup.org/api/v4/groups/17/-/packages/maven - - - - - - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven - - - ${gitlab-server} - https://community.opengroup.org/api/v4/projects/21/packages/maven - - - 1 crs-catalog-ocp -- GitLab From 7723c516ee83a17ed38ac93a9737fc8efaaa75d4 Mon Sep 17 00:00:00 2001 From: Stanislav Riabokon Date: Mon, 23 Nov 2020 17:34:45 +0400 Subject: [PATCH 03/10] Added AuthSecurityConfig for GCP --- .../osdu/crs/security/AuthSecurityConfig.java | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java diff --git a/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java new file mode 100644 index 0000000..1affb7c --- /dev/null +++ b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java @@ -0,0 +1,96 @@ +package org.opengroup.osdu.crs.security; + +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.opengroup.osdu.crs.middleware.AuthenticationRequestFilter; +import org.opengroup.osdu.crs.util.AppError; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; +import org.springframework.security.web.access.AccessDeniedHandler; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.web.servlet.HandlerExceptionResolver; + +@EnableWebSecurity +@EnableGlobalMethodSecurity(prePostEnabled = true) +public class AuthSecurityConfig extends WebSecurityConfigurerAdapter implements AccessDeniedHandler, AuthenticationEntryPoint { + + private AuthenticationRequestFilter authFilter; + + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + private static final String[] AUTH_WHITELIST = { + "/", + "/actuator/**", + "/_ah/*", + "/v2/api-docs", + "/configuration/ui", + "/swagger-resources/**", + "/configuration/security", + "/swagger-ui.html", + "/webjars/**", + "/csrf", + "/api/crs/catalog/actuator", + "/api/crs/catalog/actuator/**", + "/api/crs/catalog/actuator/health", +}; + + //AuthenticationRequestFilter is not a recognized bean, so construct it manually + public AuthSecurityConfig(@Value("${osdu.entitlement.url}") String entitlementsUrl, HandlerExceptionResolver handlerExceptionResolver) { + authFilter = new AuthenticationRequestFilter(entitlementsUrl, handlerExceptionResolver); + } + + @Override + protected void configure(HttpSecurity http) throws Exception { + http.csrf().disable() + .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER) + .and() + .authorizeRequests() + .antMatchers(AUTH_WHITELIST).permitAll() + .anyRequest().authenticated() + .and() + .addFilterBefore(authFilter, UsernamePasswordAuthenticationFilter.class); + } + + @Override + public void configure(WebSecurity web) { + web.ignoring().antMatchers(AUTH_WHITELIST); + } + + @Override + public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AccessDeniedException e) throws IOException { + writeUnauthorizedError(httpServletResponse); + } + + @Override + public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException { + writeUnauthorizedError(response); + } + + private static void writeUnauthorizedError(HttpServletResponse response) throws IOException { + AppError appError = AppError.builder() + .code(HttpStatus.UNAUTHORIZED.value()) + .message("The user is not authorized to perform this action") + .reason("Unauthorized") + .build(); + String body = OBJECT_MAPPER.writeValueAsString(appError); + + PrintWriter out = response.getWriter(); + response.setStatus(HttpStatus.UNAUTHORIZED.value()); + response.setContentType("application/json"); + response.setCharacterEncoding("UTF-8"); + out.print(body); + out.flush(); + } +} -- GitLab From 9244e00c8099a8330b9c974586d5d2247de3ec09 Mon Sep 17 00:00:00 2001 From: Anastasiia_Gelmut Date: Tue, 15 Dec 2020 16:17:09 +0400 Subject: [PATCH 04/10] GONRG-1371 Fixed Sonar Comments --- .../opengroup/osdu/crs/CRSGKEConfiguration.java | 17 +++++++++++++++++ .../osdu/crs/security/AuthSecurityConfig.java | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/CRSGKEConfiguration.java b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/CRSGKEConfiguration.java index 9c5b6ad..3699927 100644 --- a/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/CRSGKEConfiguration.java +++ b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/CRSGKEConfiguration.java @@ -1,3 +1,20 @@ +/* + Copyright 2020 Google LLC + Copyright 2020 EPAM Systems, Inc + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + package org.opengroup.osdu.crs; import org.opengroup.osdu.crs.model.CatalogImpl; diff --git a/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java index 1affb7c..55d88c8 100644 --- a/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java +++ b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java @@ -1,3 +1,20 @@ +/* + Copyright 2020 Google LLC + Copyright 2020 EPAM Systems, Inc + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + package org.opengroup.osdu.crs.security; import com.fasterxml.jackson.databind.ObjectMapper; -- GitLab From d17dd669c7b73e08e0f8743b503c7bc284f1cd01 Mon Sep 17 00:00:00 2001 From: Anastasiia_Gelmut Date: Thu, 4 Feb 2021 18:30:26 +0400 Subject: [PATCH 05/10] GONRG-1603 Audit Implementation --- .../opengroup/osdu/crs/api/CrsCatalogApi.java | 215 +++++++++---- .../osdu/crs/logging/AuditEvents.java | 295 +++++++++++++++++ .../osdu/crs/logging/AuditLogger.java | 193 +++++++++++ .../osdu/crs/api/CrsCatalogApiTestMock.java | 6 +- .../osdu/crs/logging/AuditLoggerTest.java | 304 ++++++++++++++++++ .../opengroup/osdu/crs/CRSGKEApplication.java | 2 + 6 files changed, 953 insertions(+), 62 deletions(-) create mode 100644 crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditEvents.java create mode 100644 crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditLogger.java create mode 100644 crs-catalog-core/src/test/java/org/opengroup/osdu/crs/logging/AuditLoggerTest.java diff --git a/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/api/CrsCatalogApi.java b/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/api/CrsCatalogApi.java index 7e31766..c99bb32 100644 --- a/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/api/CrsCatalogApi.java +++ b/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/api/CrsCatalogApi.java @@ -20,10 +20,14 @@ package org.opengroup.osdu.crs.api; import java.util.ArrayList; +import java.util.Collections; import java.util.List; +import java.util.Objects; import java.util.logging.Level; import java.util.logging.Logger; +import javax.inject.Inject; +import org.opengroup.osdu.crs.logging.AuditLogger; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -53,11 +57,14 @@ import org.opengroup.osdu.crs.model.search.*; @RequestMapping(path= "/v2") public class CrsCatalogApi { - private Catalog catalog = null; + private Catalog catalog = null; - private static final Logger log = Logger.getLogger(CrsCatalogApi.class.getName()); + @Inject + private AuditLogger auditLogger; - public CrsCatalogApi(Catalog catalog) { + private static final Logger log = Logger.getLogger(CrsCatalogApi.class.getName()); + + public CrsCatalogApi(Catalog catalog) { this.catalog = catalog; } @@ -78,7 +85,7 @@ public class CrsCatalogApi { public CatalogAttributes getCatalogAttributes() { return catalog.getAttributes(); } - + /** * get a list of AreasOfUses in the catalog * @param offset Offset of the first item in the AreasOfUses. It is optional and is 0 by default. @@ -88,7 +95,7 @@ public class CrsCatalogApi { */ @GetMapping("/area") public AreaOfUseResults getAreasOfUse( - @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, + @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, @RequestParam(name = "limit", required = false, defaultValue = "100") int limit, @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { assertRange(offset, limit); @@ -99,26 +106,31 @@ public class CrsCatalogApi { if(list != null) { if ((offset < 0) || ((list.size() > 0) && (offset >= list.size()))) throw new IndexOutOfBoundsException("The start index is out of the range"); - + if ((limit < 0) || (limit > list.size() - offset)) limit = list.size() - offset; - + if (limit >= 0) { ArrayList list2 = new ArrayList<>(); for (int i = offset; i < offset + limit; i++) { list2.add(list.get(i).convert(mode)); } results = new AreaOfUseResults(list2, offset, list.size()); - } + } } } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(results)) { + this.auditLogger.readAreaSuccess(Collections.singletonList(results.toString())); + } else { + this.auditLogger.readAreaSuccess(Collections.singletonList("AreaOfUseResults is null")); + } return results; } - + /** * get the AreaOfUse by essence * @param request AreaOfUseRequest @@ -146,9 +158,14 @@ public class CrsCatalogApi { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(aou)) { + this.auditLogger.readAreaByEssenceSuccess(Collections.singletonList(aou.toString())); + } else { + this.auditLogger.readAreaByEssenceSuccess(Collections.singletonList("AreaOfUse is null")); + } return aou; } - + /** * get a list of CRSes in the catalog * @param offset Offset of the first item in the crs. It is optional and is 0 by default. @@ -158,37 +175,42 @@ public class CrsCatalogApi { */ @GetMapping("/crs") public CRSResults getAllCRSes( - @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, + @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, @RequestParam(name = "limit", required = false, defaultValue = "100") int limit, @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { assertRange(offset, limit); - CRSResults results = null; + CRSResults results = null; try { RepresentationMode mode = RepresentationMode.getRepresentationMode(reprMode); List list = catalog.getAllCRSes(); if(list != null) { if ((offset < 0) || ((list.size() > 0) && (offset >= list.size()))) throw new IndexOutOfBoundsException("The start index is out of the range"); - + if ((limit < 0) || (limit > list.size() - offset)) limit = list.size() - offset; - + if (limit >= 0) { ArrayList list2 = new ArrayList<>(); for (int i = offset; i < offset + limit; i++) { list2.add((CRS)list.get(i).convert(mode)); } results = new CRSResults(list2, offset, list.size()); - } + } } } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(results)) { + this.auditLogger.readCrsSuccess(Collections.singletonList(results.toString())); + } else { + this.auditLogger.readCrsSuccess(Collections.singletonList("CRSResults is null")); + } return results; } - + /** * get the CRS by essence * @param request The CRSRequest object for the CRS @@ -217,9 +239,14 @@ public class CrsCatalogApi { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(crs)) { + this.auditLogger.readCrsByEssenceSuccess(Collections.singletonList(crs.toString())); + } else { + this.auditLogger.readCrsByEssenceSuccess(Collections.singletonList("CRS is null")); + } return crs; } - + /** * get a list of LateBoundCRSes in the catalog * @param offset Offset of the first item in the LateBoundCRSes. It is optional and is 0 by default. @@ -229,7 +256,7 @@ public class CrsCatalogApi { */ @GetMapping("/lateboundcrs") public LateBoundCRSResults getLateBoundCRSes( - @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, + @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, @RequestParam(name = "limit", required = false, defaultValue = "100") int limit, @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { assertRange(offset, limit); @@ -240,26 +267,31 @@ public class CrsCatalogApi { if(list != null) { if ((offset < 0) || ((list.size() > 0) && (offset >= list.size()))) throw new IndexOutOfBoundsException("The start index is out of the range"); - + if ((limit < 0) || (limit > list.size() - offset)) limit = list.size() - offset; - + if (limit >= 0) { ArrayList list2 = new ArrayList<>(); for (int i = offset; i < offset + limit; i++) { list2.add(list.get(i).convert(mode)); } results = new LateBoundCRSResults(list2, offset, list.size()); - } + } } } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(results)) { + this.auditLogger.readLateBoundCrsSuccess(Collections.singletonList(results.toString())); + } else { + this.auditLogger.readLateBoundCrsSuccess(Collections.singletonList("LateBoundCRSResults is null")); + } return results; } - + /** * get the LateBoundCRS by essence * @param request LateBoundCRSRequest @@ -288,9 +320,14 @@ public class CrsCatalogApi { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(crs)) { + this.auditLogger.readLateBoundCrsByEssenceSuccess(Collections.singletonList(crs.toString())); + } else { + this.auditLogger.readLateBoundCrsByEssenceSuccess(Collections.singletonList("LateBoundCRS is null")); + } return crs; } - + /** * get a list of the EarlyBoundCRSes in the catalog * @param offset Offset of the first item in the EarlyBoundCRSes. It is optional and is 0 by default. @@ -300,7 +337,7 @@ public class CrsCatalogApi { */ @GetMapping("/earlyboundcrs") public EarlyBoundCRSResults getEarlyBoundCRSes( - @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, + @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, @RequestParam(name = "limit", required = false, defaultValue = "100") int limit, @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { assertRange(offset, limit); @@ -311,26 +348,31 @@ public class CrsCatalogApi { if(list != null) { if ((offset < 0) || ((list.size() > 0) && (offset >= list.size()))) throw new IndexOutOfBoundsException("The start index is out of the range"); - + if ((limit < 0) || (limit > list.size() - offset)) limit = list.size() - offset; - + if (limit >= 0) { ArrayList list2 = new ArrayList<>(); for (int i = offset; i < offset + limit; i++) { list2.add(list.get(i).convert(mode)); } results = new EarlyBoundCRSResults(list2, offset, list.size()); - } + } } } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(results)) { + this.auditLogger.readEarlyBoundCrsSuccess(Collections.singletonList(results.toString())); + } else { + this.auditLogger.readEarlyBoundCrsSuccess(Collections.singletonList("EarlyBoundCRSResults is null")); + } return results; } - + /** * get the EarlyBoundCRS by essence * @param request EarlyBoundCRSRequest @@ -341,7 +383,7 @@ public class CrsCatalogApi { public EarlyBoundCRS getEarlyBoundCRS(@RequestBody EarlyBoundCRSRequest request, @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { EarlyBoundCRSEssence essence = null; - EarlyBoundCRS crs = null; + EarlyBoundCRS crs = null; try { RepresentationMode mode = RepresentationMode.getRepresentationMode(reprMode); essence = request.getEarlyBoundCRSEssence(); @@ -358,9 +400,14 @@ public class CrsCatalogApi { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(crs)) { + this.auditLogger.readEarlyBoundCrsByEssenceSuccess(Collections.singletonList(crs.toString())); + } else { + this.auditLogger.readEarlyBoundCrsByEssenceSuccess(Collections.singletonList("EarlyBoundCRS is null")); + } return crs; } - + /** * get a list of the CompoundCRSes in the catalog * @param offset Offset of the first item in the CompoundCRSes. It is optional and is 0 by default. @@ -370,7 +417,7 @@ public class CrsCatalogApi { */ @GetMapping("/compoundcrs") public CompoundCRSResults getCompoundCRSes( - @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, + @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, @RequestParam(name = "limit", required = false, defaultValue = "100") int limit, @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { assertRange(offset, limit); @@ -381,26 +428,31 @@ public class CrsCatalogApi { if(list != null) { if ((offset < 0) || ((list.size() > 0) && (offset >= list.size()))) throw new IndexOutOfBoundsException("The start index is out of the range"); - + if ((limit < 0) || (limit > list.size() - offset)) limit = list.size() - offset; - + if (limit >= 0) { ArrayList list2 = new ArrayList<>(); for (int i = offset; i < offset + limit; i++) { list2.add(list.get(i).convert(mode)); } results = new CompoundCRSResults(list2, offset, list.size()); - } + } } } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(results)) { + this.auditLogger.readCompoundCrsSuccess(Collections.singletonList(results.toString())); + } else { + this.auditLogger.readCompoundCrsSuccess(Collections.singletonList("CompoundCRSResults is null")); + } return results; } - + /** * get the CompoundCRS by essence * @param request CompoundCRSRequest @@ -412,7 +464,7 @@ public class CrsCatalogApi { @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { CompoundCRSEssence essence = null; CompoundCRS crs = null; - try { + try { RepresentationMode mode = RepresentationMode.getRepresentationMode(reprMode); essence = request.getCompoundCRSEssence(); if (essence == null) { @@ -428,9 +480,14 @@ public class CrsCatalogApi { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(crs)) { + this.auditLogger.readCompoundCrsByEssenceSuccess(Collections.singletonList(crs.toString())); + } else { + this.auditLogger.readCompoundCrsByEssenceSuccess(Collections.singletonList("CompoundCRS is null")); + } return crs; } - + /** * get a list of cartographic transforms (CTs) in the catalog * @param offset Offset of the first item in the cartographic transforms. It is optional and is 0 by default. @@ -440,7 +497,7 @@ public class CrsCatalogApi { */ @GetMapping("/ct") public CTResults getAllCTs( - @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, + @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, @RequestParam(name = "limit", required = false, defaultValue = "100") int limit, @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { assertRange(offset, limit); @@ -451,26 +508,31 @@ public class CrsCatalogApi { if(list != null) { if ((offset < 0) || ((list.size() > 0) && (offset >= list.size()))) throw new IndexOutOfBoundsException("The start index is out of the range"); - + if ((limit < 0) || (limit > list.size() - offset)) limit = list.size() - offset; - + if (limit >= 0) { ArrayList list2 = new ArrayList<>(); for (int i = offset; i < offset + limit; i++) { list2.add((CT)list.get(i).convert(mode)); } results = new CTResults(list2, offset, list.size()); - } + } } } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(results)) { + this.auditLogger.readCtSuccess(Collections.singletonList(results.toString())); + } else { + this.auditLogger.readCtSuccess(Collections.singletonList("CTResults is null")); + } return results; } - + /** * get the CT by essence * @param request CTRequest @@ -499,9 +561,14 @@ public class CrsCatalogApi { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(ct)) { + this.auditLogger.readCtByEssenceSuccess(Collections.singletonList(ct.toString())); + } else { + this.auditLogger.readCtByEssenceSuccess(Collections.singletonList("CTResults is null")); + } return ct; } - + /** * get a list of SingleCTs in the catalog * @param offset Offset of the first item in the SingleCTs. It is optional and is 0 by default. @@ -511,7 +578,7 @@ public class CrsCatalogApi { */ @GetMapping("/singlect") public SingleCTResults getSingleCTs( - @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, + @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, @RequestParam(name = "limit", required = false, defaultValue = "100") int limit, @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { assertRange(offset, limit); @@ -522,26 +589,31 @@ public class CrsCatalogApi { if(list != null) { if ((offset < 0) || ((list.size() > 0) && (offset >= list.size()))) throw new IndexOutOfBoundsException("The start index is out of the range"); - + if ((limit < 0) || (limit > list.size() - offset)) limit = list.size() - offset; - + if (limit >= 0) { ArrayList list2 = new ArrayList<>(); for (int i = offset; i < offset + limit; i++) { list2.add(list.get(i).convert(mode)); } results = new SingleCTResults(list2, offset, list.size()); - } + } } } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(results)) { + this.auditLogger.readSingleCtSuccess(Collections.singletonList(results.toString())); + } else { + this.auditLogger.readSingleCtSuccess(Collections.singletonList("SingleCTResults is null")); + } return results; } - + /** * get the SingleCT by essence * @param request SingleCTRequest @@ -553,7 +625,7 @@ public class CrsCatalogApi { @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { SingleCTEssence essence = null; SingleCT ct = null; - try { + try { RepresentationMode mode = RepresentationMode.getRepresentationMode(reprMode); essence = request.getSingleCTEssence(); if (essence == null) { @@ -569,9 +641,14 @@ public class CrsCatalogApi { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(ct)) { + this.auditLogger.readSingleCtByEssenceSuccess(Collections.singletonList(ct.toString())); + } else { + this.auditLogger.readSingleCtByEssenceSuccess(Collections.singletonList("SingleCT is null")); + } return ct; } - + /** * get a list of CompoundCTs in the catalog * @param offset Offset of the first item in the CompoundCTs. It is optional and is 0 by default. @@ -581,7 +658,7 @@ public class CrsCatalogApi { */ @GetMapping("/compoundct") public CompoundCTResults getCompoundCTs( - @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, + @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, @RequestParam(name = "limit", required = false, defaultValue = "100") int limit, @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { assertRange(offset, limit); @@ -592,26 +669,31 @@ public class CrsCatalogApi { if(list != null) { if ((offset < 0) || ((list.size() > 0) && (offset >= list.size()))) throw new IndexOutOfBoundsException("The start index is out of the range"); - + if ((limit < 0) || (limit > list.size() - offset)) limit = list.size() - offset; - + if (limit >= 0) { ArrayList list2 = new ArrayList<>(); for (int i = offset; i < offset + limit; i++) { list2.add(list.get(i).convert(mode)); } results = new CompoundCTResults(list2, offset, list.size()); - } + } } } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(results)) { + this.auditLogger.readCompoundCtSuccess(Collections.singletonList(results.toString())); + } else { + this.auditLogger.readCompoundCtSuccess(Collections.singletonList("CompoundCTResults is null")); + } return results; } - + /** * get the CompoundCT by essence * @param request CompoundCTRequest @@ -623,7 +705,7 @@ public class CrsCatalogApi { @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { CompoundCTEssence essence = null; CompoundCT ct = null; - try { + try { RepresentationMode mode = RepresentationMode.getRepresentationMode(reprMode); essence = request.getCompoundCTEssence(); if (essence == null) { @@ -638,6 +720,11 @@ public class CrsCatalogApi { log.log(Level.WARNING, ex.toString(), ex); throw AppException.createBadRequest(ex.getMessage()); } + if (Objects.nonNull(ct)) { + this.auditLogger.readCompoundCtByEssenceSuccess(Collections.singletonList(ct.toString())); + } else { + this.auditLogger.readCompoundCtByEssenceSuccess(Collections.singletonList("CompoundCT is null")); + } return ct; } @@ -665,12 +752,14 @@ public class CrsCatalogApi { @RequestParam(name = "latitudeUpper", required = false, defaultValue = "90") double latitudeUpper, @RequestParam(name = "offset", required = false, defaultValue = "0") int offset, @RequestParam(name = "limit", required = false, defaultValue = "100") int limit, - @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { + @RequestParam(name = "mode", required = false, defaultValue = "persistableReference") String reprMode) { assertRange(offset, limit); try{ RepresentationMode mode = RepresentationMode.getRepresentationMode(reprMode); SphericalBoundingBox boundingBox = new SphericalBoundingBoxImpl(longitudeLeft, latitudeLower, longitudeRight, latitudeUpper); - return catalog.searchAreasOfUse(request, boundingBox, offset, limit, mode); + AreaOfUseResults results = catalog.searchAreasOfUse(request, boundingBox, offset, limit, mode); + this.auditLogger.searchAreaSuccess(Collections.singletonList(results.toString())); + return results; } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); @@ -703,7 +792,9 @@ public class CrsCatalogApi { try { RepresentationMode mode = RepresentationMode.getRepresentationMode(reprMode); SphericalBoundingBox boundingBox = new SphericalBoundingBoxImpl(longitudeLeft, latitudeLower, longitudeRight, latitudeUpper); - return catalog.searchCRSes(request, boundingBox, offset, limit, mode); + CRSResults results = catalog.searchCRSes(request, boundingBox, offset, limit, mode); + this.auditLogger.searchCrsSuccess(Collections.singletonList(results.toString())); + return results; } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); @@ -736,7 +827,9 @@ public class CrsCatalogApi { try { RepresentationMode mode = RepresentationMode.getRepresentationMode(reprMode); SphericalBoundingBox boundingBox = new SphericalBoundingBoxImpl(longitudeLeft, latitudeLower, longitudeRight, latitudeUpper); - return catalog.searchCTs(request, boundingBox, offset, limit, mode); + CTResults results = catalog.searchCTs(request, boundingBox, offset, limit, mode); + this.auditLogger.searchCtSuccess(Collections.singletonList(results.toString())); + return results; } catch(Exception ex) { log.log(Level.WARNING, ex.toString(), ex); @@ -751,7 +844,7 @@ public class CrsCatalogApi { if(limit < -1) stringBuilder.append("'-1' is the only valid negative value and means all. Other negative values for limit is invalid."); - + if(stringBuilder.length() > 0) throw AppException.createBadRequest(stringBuilder.toString()); } diff --git a/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditEvents.java b/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditEvents.java new file mode 100644 index 0000000..a3d70b1 --- /dev/null +++ b/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditEvents.java @@ -0,0 +1,295 @@ +package org.opengroup.osdu.crs.logging; + +import static java.lang.String.format; + +import com.google.common.base.Strings; +import java.util.List; +import org.opengroup.osdu.core.common.logging.audit.AuditAction; +import org.opengroup.osdu.core.common.logging.audit.AuditPayload; +import org.opengroup.osdu.core.common.logging.audit.AuditStatus; + +public class AuditEvents { + + private static final String READ_CRS_ACTION_ID = "CR001"; + private static final String READ_CRS_MESSAGE = "CRSResults read"; + + private static final String READ_CRS_BY_ESSENCE_ACTION_ID = "CR002"; + private static final String READ_CRS_BY_ESSENCE_MESSAGE = "CRS by essence read"; + + private static final String READ_LATE_BOUND_CRS_ACTION_ID = "CR003"; + private static final String READ_LATE_BOUND_CRS_MESSAGE = "LateBoundCRSResults read"; + + private static final String READ_LATE_BOUND_CRS_BY_ESSENCE_ACTION_ID = "CR004"; + private static final String READ_LATE_BOUND_CRS_BY_ESSENCE_MESSAGE = "LateBoundCRS by essence read"; + + private static final String READ_EARLY_BOUND_CRS_ACTION_ID = "CR005"; + private static final String READ_EARLY_BOUND_CRS_MESSAGE = "EarlyBoundCRSResults read"; + + private static final String READ_EARLY_BOUND_CRS_BY_ESSENCE_ACTION_ID = "CR006"; + private static final String READ_EARLY_BOUND_CRS_BY_ESSENCE_MESSAGE = "EarlyBoundCRS by essence read"; + + private static final String READ_COMPOUND_CRS_ACTION_ID = "CR007"; + private static final String READ_COMPOUND_CRS_MESSAGE = "CompoundCRSResults read"; + + private static final String READ_COMPOUND_CRS_BY_ESSENCE_ACTION_ID = "CR008"; + private static final String READ_COMPOUND_CRS_BY_ESSENCE_MESSAGE = "CompoundCRS by essence read"; + + private static final String SEARCH_CRS_ACTION_ID = "CR009"; + private static final String SEARCH_CRS_MESSAGE = "CRS search"; + + private static final String READ_CT_ACTION_ID = "CR010"; + private static final String READ_CT_MESSAGE = "CTResults read"; + + private static final String READ_CT_BY_ESSENCE_ACTION_ID = "CR011"; + private static final String READ_CT_BY_ESSENCE_MESSAGE = "CT by essence read"; + + private static final String READ_SINGLE_CT_ACTION_ID = "CR012"; + private static final String READ_SINGLE_CT_MESSAGE = "SingleCTResults read"; + + private static final String READ_SINGLE_CT_BY_ESSENCE_ACTION_ID = "CR013"; + private static final String READ_SINGLE_CT_BY_ESSENCE_MESSAGE = "SingleCT by essence read"; + + private static final String READ_COMPOUND_CT_ACTION_ID = "CR014"; + private static final String READ_COMPOUND_CT_MESSAGE = "CompoundCTResults read"; + + private static final String READ_COMPOUND_CT_BY_ESSENCE_ACTION_ID = "CR015"; + private static final String READ_COMPOUND_CT_BY_ESSENCE_MESSAGE = "CompoundCT by essence read"; + + private static final String SEARCH_CT_ACTION_ID = "CR0016"; + private static final String SEARCH_CT_MESSAGE = "CT search"; + + private static final String READ_AREA_ACTION_ID = "CR017"; + private static final String READ_AREA_MESSAGE = "AreaOfUseResults read"; + + private static final String READ_AREA_BY_ESSENCE_ACTION_ID = "CR018"; + private static final String READ_AREA_BY_ESSENCE_MESSAGE = "AreaOfUse by essence read"; + + private static final String SEARCH_AREA_ACTION_ID = "CR0019"; + private static final String SEARCH_AREA_MESSAGE = "Area search"; + + + private final String user; + + + public AuditEvents(String user) { + if (Strings.isNullOrEmpty(user)) { + throw new IllegalArgumentException("User not provided for audit events."); + } + this.user = user; + } + + public AuditPayload getReadCrsEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_CRS_ACTION_ID) + .message(getStatusMessage(status, READ_CRS_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadCrsByEssenceEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_CRS_BY_ESSENCE_ACTION_ID) + .message(getStatusMessage(status, READ_CRS_BY_ESSENCE_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadLateBoundCrsEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_LATE_BOUND_CRS_ACTION_ID) + .message(getStatusMessage(status, READ_LATE_BOUND_CRS_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadLateBoundCrsByEssenceEvent(AuditStatus status, + List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_LATE_BOUND_CRS_BY_ESSENCE_ACTION_ID) + .message(getStatusMessage(status, READ_LATE_BOUND_CRS_BY_ESSENCE_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadEarlyBoundCrsEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_EARLY_BOUND_CRS_ACTION_ID) + .message(getStatusMessage(status, READ_EARLY_BOUND_CRS_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadEarlyBoundCrsByEssenceEvent(AuditStatus status, + List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_EARLY_BOUND_CRS_BY_ESSENCE_ACTION_ID) + .message(getStatusMessage(status, READ_EARLY_BOUND_CRS_BY_ESSENCE_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadCompoundCrsEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_COMPOUND_CRS_ACTION_ID) + .message(getStatusMessage(status, READ_COMPOUND_CRS_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadCompoundCrsByEssenceEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_COMPOUND_CRS_BY_ESSENCE_ACTION_ID) + .message(getStatusMessage(status, READ_COMPOUND_CRS_BY_ESSENCE_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getSearchCrsEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(SEARCH_CRS_ACTION_ID) + .message(getStatusMessage(status, SEARCH_CRS_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadCtEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_CT_ACTION_ID) + .message(getStatusMessage(status, READ_CT_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadCtByEssenceEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_CT_BY_ESSENCE_ACTION_ID) + .message(getStatusMessage(status, READ_CT_BY_ESSENCE_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadSingleCtEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_SINGLE_CT_ACTION_ID) + .message(getStatusMessage(status, READ_SINGLE_CT_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadSingleCtByEssenceEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_SINGLE_CT_BY_ESSENCE_ACTION_ID) + .message(getStatusMessage(status, READ_SINGLE_CT_BY_ESSENCE_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadCompoundCtEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_COMPOUND_CT_ACTION_ID) + .message(getStatusMessage(status, READ_COMPOUND_CT_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadCompoundCtByEssenceEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_COMPOUND_CT_BY_ESSENCE_ACTION_ID) + .message(getStatusMessage(status, READ_COMPOUND_CT_BY_ESSENCE_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getSearchCtEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(SEARCH_CT_ACTION_ID) + .message(getStatusMessage(status, SEARCH_CT_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadAreaEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_AREA_ACTION_ID) + .message(getStatusMessage(status, READ_AREA_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getReadAreaByEssenceEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(READ_AREA_BY_ESSENCE_ACTION_ID) + .message(getStatusMessage(status, READ_AREA_BY_ESSENCE_MESSAGE)) + .resources(resources) + .build(); + } + + public AuditPayload getSearchAreaEvent(AuditStatus status, List resources) { + return AuditPayload.builder() + .action(AuditAction.READ) + .status(status) + .user(this.user) + .actionId(SEARCH_AREA_ACTION_ID) + .message(getStatusMessage(status, SEARCH_AREA_MESSAGE)) + .resources(resources) + .build(); + } + + private String getStatusMessage(AuditStatus status, String message) { + return format("%s - %s", message, status.name().toLowerCase()); + } +} diff --git a/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditLogger.java b/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditLogger.java new file mode 100644 index 0000000..782e428 --- /dev/null +++ b/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditLogger.java @@ -0,0 +1,193 @@ +package org.opengroup.osdu.crs.logging; + +import java.util.List; +import java.util.Objects; +import lombok.RequiredArgsConstructor; +import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; +import org.opengroup.osdu.core.common.logging.audit.AuditPayload; +import org.opengroup.osdu.core.common.logging.audit.AuditStatus; +import org.opengroup.osdu.core.common.model.entitlements.Groups; +import org.opengroup.osdu.core.common.model.http.DpsHeaders; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Component; +import org.springframework.web.context.annotation.RequestScope; + +@Component +@RequestScope +@RequiredArgsConstructor +public class AuditLogger { + + private final JaxRsDpsLog logger; + private final DpsHeaders headers; + private AuditEvents auditEvents; + + private AuditEvents getAuditEvents() { + if (this.auditEvents == null) { + Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + if (Objects.nonNull(authentication) && authentication.getPrincipal() instanceof Groups) { + Groups groups = (Groups) authentication.getPrincipal(); + this.auditEvents = new AuditEvents(groups.getMemberEmail()); + } else { + this.auditEvents = new AuditEvents(this.headers.getUserEmail()); + } + } + return this.auditEvents; + } + + public void readCrsSuccess(List resources) { + writeLog(getAuditEvents().getReadCrsEvent(AuditStatus.SUCCESS, resources)); + } + + public void readCrsFailure(List resources) { + writeLog(getAuditEvents().getReadCrsEvent(AuditStatus.FAILURE, resources)); + } + + public void readCrsByEssenceSuccess(List resources) { + writeLog(getAuditEvents().getReadCrsByEssenceEvent(AuditStatus.SUCCESS, resources)); + } + + public void readCrsByEssenceFailure(List resources) { + writeLog(getAuditEvents().getReadCrsByEssenceEvent(AuditStatus.FAILURE, resources)); + } + + public void readLateBoundCrsSuccess(List resources) { + writeLog(getAuditEvents().getReadLateBoundCrsEvent(AuditStatus.SUCCESS, resources)); + } + + public void readLateBoundCrsFailure(List resources) { + writeLog(getAuditEvents().getReadLateBoundCrsEvent(AuditStatus.FAILURE, resources)); + } + + public void readLateBoundCrsByEssenceSuccess(List resources) { + writeLog(getAuditEvents().getReadLateBoundCrsByEssenceEvent(AuditStatus.SUCCESS, resources)); + } + + public void readLateBoundCrsByEssenceFailure(List resources) { + writeLog(getAuditEvents().getReadLateBoundCrsByEssenceEvent(AuditStatus.FAILURE, resources)); + } + + public void readEarlyBoundCrsSuccess(List resources) { + writeLog(getAuditEvents().getReadEarlyBoundCrsEvent(AuditStatus.SUCCESS, resources)); + } + + public void readEarlyBoundCrsFailure(List resources) { + writeLog(getAuditEvents().getReadEarlyBoundCrsEvent(AuditStatus.FAILURE, resources)); + } + + public void readEarlyBoundCrsByEssenceSuccess(List resources) { + writeLog(getAuditEvents().getReadEarlyBoundCrsByEssenceEvent(AuditStatus.SUCCESS, resources)); + } + + public void readEarlyBoundCrsByEssenceFailure(List resources) { + writeLog(getAuditEvents().getReadLateBoundCrsByEssenceEvent(AuditStatus.FAILURE, resources)); + } + + public void readCompoundCrsSuccess(List resources) { + writeLog(getAuditEvents().getReadCompoundCrsEvent(AuditStatus.SUCCESS, resources)); + } + + public void readCompoundCrsFailure(List resources) { + writeLog(getAuditEvents().getReadCompoundCrsEvent(AuditStatus.FAILURE, resources)); + } + + public void readCompoundCrsByEssenceSuccess(List resources) { + writeLog(getAuditEvents().getReadCompoundCrsByEssenceEvent(AuditStatus.SUCCESS, resources)); + } + + public void readCompoundCrsByEssenceFailure(List resources) { + writeLog(getAuditEvents().getReadCompoundCrsByEssenceEvent(AuditStatus.FAILURE, resources)); + } + + public void searchCrsSuccess(List resources) { + writeLog(getAuditEvents().getSearchCrsEvent(AuditStatus.SUCCESS, resources)); + } + + public void searchCrsFailure(List resources) { + writeLog(getAuditEvents().getSearchCrsEvent(AuditStatus.FAILURE, resources)); + } + + public void readCtSuccess(List resources) { + writeLog(getAuditEvents().getReadCtEvent(AuditStatus.SUCCESS, resources)); + } + + public void readCtFailure(List resources) { + writeLog(getAuditEvents().getReadCtEvent(AuditStatus.FAILURE, resources)); + } + + public void readCtByEssenceSuccess(List resources) { + writeLog(getAuditEvents().getReadCtByEssenceEvent(AuditStatus.SUCCESS, resources)); + } + + public void readCtByEssenceFailure(List resources) { + writeLog(getAuditEvents().getReadCtByEssenceEvent(AuditStatus.FAILURE, resources)); + } + + public void readSingleCtSuccess(List resources) { + writeLog(getAuditEvents().getReadSingleCtEvent(AuditStatus.SUCCESS, resources)); + } + + public void readSingleCtFailure(List resources) { + writeLog(getAuditEvents().getReadSingleCtEvent(AuditStatus.FAILURE, resources)); + } + + public void readSingleCtByEssenceSuccess(List resources) { + writeLog(getAuditEvents().getReadSingleCtByEssenceEvent(AuditStatus.SUCCESS, resources)); + } + + public void readSingleCtByEssenceFailure(List resources) { + writeLog(getAuditEvents().getReadSingleCtByEssenceEvent(AuditStatus.FAILURE, resources)); + } + + public void readCompoundCtSuccess(List resources) { + writeLog(getAuditEvents().getReadCompoundCtEvent(AuditStatus.SUCCESS, resources)); + } + + public void readCompoundCtFailure(List resources) { + writeLog(getAuditEvents().getReadCompoundCtEvent(AuditStatus.FAILURE, resources)); + } + + public void readCompoundCtByEssenceSuccess(List resources) { + writeLog(getAuditEvents().getReadCompoundCtByEssenceEvent(AuditStatus.SUCCESS, resources)); + } + + public void readCompoundCtByEssenceFailure(List resources) { + writeLog(getAuditEvents().getReadCompoundCtByEssenceEvent(AuditStatus.FAILURE, resources)); + } + + public void searchCtSuccess(List resources) { + writeLog(getAuditEvents().getSearchCtEvent(AuditStatus.SUCCESS, resources)); + } + + public void searchCtFailure(List resources) { + writeLog(getAuditEvents().getSearchCtEvent(AuditStatus.FAILURE, resources)); + } + + public void readAreaSuccess(List resources) { + writeLog(getAuditEvents().getReadAreaEvent(AuditStatus.SUCCESS, resources)); + } + + public void readAreaFailure(List resources) { + writeLog(getAuditEvents().getReadAreaEvent(AuditStatus.FAILURE, resources)); + } + + public void readAreaByEssenceSuccess(List resources) { + writeLog(getAuditEvents().getReadAreaByEssenceEvent(AuditStatus.SUCCESS, resources)); + } + + public void readAreaByEssenceFailure(List resources) { + writeLog(getAuditEvents().getReadAreaByEssenceEvent(AuditStatus.FAILURE, resources)); + } + + public void searchAreaSuccess(List resources) { + writeLog(getAuditEvents().getSearchAreaEvent(AuditStatus.SUCCESS, resources)); + } + + public void searchAreaFailure(List resources) { + writeLog(getAuditEvents().getSearchAreaEvent(AuditStatus.FAILURE, resources)); + } + + private void writeLog(AuditPayload log) { + this.logger.audit(log); + } +} diff --git a/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/CrsCatalogApiTestMock.java b/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/CrsCatalogApiTestMock.java index c046754..1a031a1 100644 --- a/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/CrsCatalogApiTestMock.java +++ b/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/CrsCatalogApiTestMock.java @@ -14,6 +14,7 @@ package org.opengroup.osdu.crs.api; +import org.opengroup.osdu.crs.logging.AuditLogger; import org.opengroup.osdu.crs.model.request.*; import org.junit.Before; import org.junit.BeforeClass; @@ -54,6 +55,9 @@ public class CrsCatalogApiTestMock { @Mock private static Catalog catalogMock; + @Mock + private AuditLogger auditLogger; + @InjectMocks private static CrsCatalogApi crsCatalogApi; @@ -499,7 +503,7 @@ public class CrsCatalogApiTestMock { assertEquals(offset, results.getOffset()); assertEquals(CRSes.size(), results.getCount()); assertEquals(totalCount, results.getTotalCount()); - + } catch (Exception e) { e.printStackTrace(); fail(); diff --git a/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/logging/AuditLoggerTest.java b/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/logging/AuditLoggerTest.java new file mode 100644 index 0000000..f4c73ac --- /dev/null +++ b/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/logging/AuditLoggerTest.java @@ -0,0 +1,304 @@ +package org.opengroup.osdu.crs.logging; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.Collections; +import java.util.List; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; +import org.opengroup.osdu.core.common.model.http.DpsHeaders; + +@RunWith(MockitoJUnitRunner.class) +public class AuditLoggerTest { + + @Mock + private JaxRsDpsLog log; + + @Mock + private DpsHeaders headers; + + @InjectMocks + private AuditLogger sut; + + private List resources; + + @Before + public void setup() { + when(this.headers.getUserEmail()).thenReturn("test_user@email.com"); + resources = Collections.singletonList("resources"); + } + + @Test + public void should_writeReadCrsSuccessEvent() { + this.sut.readCrsSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCrsFailureFailureEvent() { + this.sut.readCrsFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCrsByEssenceSuccessEvent() { + this.sut.readCrsByEssenceSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCrsByEssenceFailureEvent() { + this.sut.readCrsByEssenceFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadLateBoundCrsSuccessEvent() { + this.sut.readLateBoundCrsSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadLateBoundCrsFailureEvent() { + this.sut.readLateBoundCrsFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadLateBoundCrsByEssenceSuccessEvent() { + this.sut.readLateBoundCrsByEssenceSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadLateBoundCrsByEssenceFailureEvent() { + this.sut.readLateBoundCrsByEssenceFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadEarlyBoundCrsSuccessEvent() { + this.sut.readEarlyBoundCrsSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadEarlyBoundCrsFailureEvent() { + this.sut.readEarlyBoundCrsFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadEarlyBoundCrsByEssenceSuccessEvent() { + this.sut.readEarlyBoundCrsByEssenceSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadEarlyBoundCrsByEssenceFailureEvent() { + this.sut.readEarlyBoundCrsByEssenceFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCompoundCrsSuccessEvent() { + this.sut.readCompoundCrsSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCompoundCrsFailureEvent() { + this.sut.readCompoundCrsFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCompoundCrsByEssenceSuccessEvent() { + this.sut.readCompoundCrsByEssenceSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCompoundCrsByEssenceFailureEvent() { + this.sut.readCompoundCrsByEssenceFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeSearchCrsSuccessEvent() { + this.sut.searchCrsSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeSearchCrsFailureEvent() { + this.sut.searchCrsFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCtSuccessEvent() { + this.sut.readCtSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCtFailureEvent() { + this.sut.readCtFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCtByEssenceSuccessEvent() { + this.sut.readCtByEssenceSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCtByEssenceFailureEvent() { + this.sut.readCtByEssenceFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadSingleCtSuccessEvent() { + this.sut.readSingleCtSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadSingleCtFailureEvent() { + this.sut.readSingleCtFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadSingleCtByEssenceSuccessEvent() { + this.sut.readSingleCtByEssenceSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadSingleCtByEssenceFailureEvent() { + this.sut.readSingleCtByEssenceFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCompoundCtSuccessEvent() { + this.sut.readCompoundCtSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCompoundCtFailureEvent() { + this.sut.readCompoundCtFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCompoundCtByEssenceSuccessEvent() { + this.sut.readCompoundCtByEssenceSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadCompoundCtByEssenceFailureEvent() { + this.sut.readCompoundCtByEssenceFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeSearchCtSuccessEvent() { + this.sut.searchCtSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeSearchCtFailureEvent() { + this.sut.searchCtFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadAreaSuccessEvent() { + this.sut.readAreaSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadAreaFailureEvent() { + this.sut.readAreaFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadAreaByEssenceSuccessEvent() { + this.sut.readAreaByEssenceSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeReadAreaByEssenceFailureEvent() { + this.sut.readAreaByEssenceFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeSearchAreaSuccessEvent() { + this.sut.searchAreaSuccess(this.resources); + + verify(this.log, times(1)).audit(any()); + } + + @Test + public void should_writeSearchAreaFailureEvent() { + this.sut.searchAreaFailure(this.resources); + + verify(this.log, times(1)).audit(any()); + } +} \ No newline at end of file diff --git a/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/CRSGKEApplication.java b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/CRSGKEApplication.java index 9394065..c766529 100644 --- a/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/CRSGKEApplication.java +++ b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/CRSGKEApplication.java @@ -16,7 +16,9 @@ package org.opengroup.osdu.crs; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; +@ComponentScan({"org.opengroup.osdu"}) @SpringBootApplication public class CRSGKEApplication { -- GitLab From ba26f9a09821b1c1efe3501561e4a574d0da7f80 Mon Sep 17 00:00:00 2001 From: Anastasiia_Gelmut Date: Thu, 4 Feb 2021 19:12:29 +0400 Subject: [PATCH 06/10] GONRG-1603 Fixed AuditEvents messages --- .../osdu/crs/logging/AuditEvents.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditEvents.java b/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditEvents.java index a3d70b1..a188fba 100644 --- a/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditEvents.java +++ b/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/logging/AuditEvents.java @@ -11,61 +11,61 @@ import org.opengroup.osdu.core.common.logging.audit.AuditStatus; public class AuditEvents { private static final String READ_CRS_ACTION_ID = "CR001"; - private static final String READ_CRS_MESSAGE = "CRSResults read"; + private static final String READ_CRS_MESSAGE = "Read CRSResults"; private static final String READ_CRS_BY_ESSENCE_ACTION_ID = "CR002"; - private static final String READ_CRS_BY_ESSENCE_MESSAGE = "CRS by essence read"; + private static final String READ_CRS_BY_ESSENCE_MESSAGE = "Read CRS by essence"; private static final String READ_LATE_BOUND_CRS_ACTION_ID = "CR003"; - private static final String READ_LATE_BOUND_CRS_MESSAGE = "LateBoundCRSResults read"; + private static final String READ_LATE_BOUND_CRS_MESSAGE = "Read LateBoundCRSResults"; private static final String READ_LATE_BOUND_CRS_BY_ESSENCE_ACTION_ID = "CR004"; - private static final String READ_LATE_BOUND_CRS_BY_ESSENCE_MESSAGE = "LateBoundCRS by essence read"; + private static final String READ_LATE_BOUND_CRS_BY_ESSENCE_MESSAGE = "Read LateBoundCRS by essence"; private static final String READ_EARLY_BOUND_CRS_ACTION_ID = "CR005"; - private static final String READ_EARLY_BOUND_CRS_MESSAGE = "EarlyBoundCRSResults read"; + private static final String READ_EARLY_BOUND_CRS_MESSAGE = "Read EarlyBoundCRSResults"; private static final String READ_EARLY_BOUND_CRS_BY_ESSENCE_ACTION_ID = "CR006"; - private static final String READ_EARLY_BOUND_CRS_BY_ESSENCE_MESSAGE = "EarlyBoundCRS by essence read"; + private static final String READ_EARLY_BOUND_CRS_BY_ESSENCE_MESSAGE = "Read EarlyBoundCRS by essence"; private static final String READ_COMPOUND_CRS_ACTION_ID = "CR007"; - private static final String READ_COMPOUND_CRS_MESSAGE = "CompoundCRSResults read"; + private static final String READ_COMPOUND_CRS_MESSAGE = "Read CompoundCRSResults"; private static final String READ_COMPOUND_CRS_BY_ESSENCE_ACTION_ID = "CR008"; - private static final String READ_COMPOUND_CRS_BY_ESSENCE_MESSAGE = "CompoundCRS by essence read"; + private static final String READ_COMPOUND_CRS_BY_ESSENCE_MESSAGE = "Read CompoundCRS by essence"; private static final String SEARCH_CRS_ACTION_ID = "CR009"; - private static final String SEARCH_CRS_MESSAGE = "CRS search"; + private static final String SEARCH_CRS_MESSAGE = "Search CRS"; private static final String READ_CT_ACTION_ID = "CR010"; - private static final String READ_CT_MESSAGE = "CTResults read"; + private static final String READ_CT_MESSAGE = "Read CTResults"; private static final String READ_CT_BY_ESSENCE_ACTION_ID = "CR011"; - private static final String READ_CT_BY_ESSENCE_MESSAGE = "CT by essence read"; + private static final String READ_CT_BY_ESSENCE_MESSAGE = "Read CT by essence"; private static final String READ_SINGLE_CT_ACTION_ID = "CR012"; - private static final String READ_SINGLE_CT_MESSAGE = "SingleCTResults read"; + private static final String READ_SINGLE_CT_MESSAGE = "Read SingleCTResults"; private static final String READ_SINGLE_CT_BY_ESSENCE_ACTION_ID = "CR013"; - private static final String READ_SINGLE_CT_BY_ESSENCE_MESSAGE = "SingleCT by essence read"; + private static final String READ_SINGLE_CT_BY_ESSENCE_MESSAGE = "Read SingleCT by essence"; private static final String READ_COMPOUND_CT_ACTION_ID = "CR014"; - private static final String READ_COMPOUND_CT_MESSAGE = "CompoundCTResults read"; + private static final String READ_COMPOUND_CT_MESSAGE = "Read CompoundCTResults"; private static final String READ_COMPOUND_CT_BY_ESSENCE_ACTION_ID = "CR015"; - private static final String READ_COMPOUND_CT_BY_ESSENCE_MESSAGE = "CompoundCT by essence read"; + private static final String READ_COMPOUND_CT_BY_ESSENCE_MESSAGE = "Read CompoundCT by essence"; private static final String SEARCH_CT_ACTION_ID = "CR0016"; - private static final String SEARCH_CT_MESSAGE = "CT search"; + private static final String SEARCH_CT_MESSAGE = "Search CT"; private static final String READ_AREA_ACTION_ID = "CR017"; - private static final String READ_AREA_MESSAGE = "AreaOfUseResults read"; + private static final String READ_AREA_MESSAGE = "Read AreaOfUseResults"; private static final String READ_AREA_BY_ESSENCE_ACTION_ID = "CR018"; - private static final String READ_AREA_BY_ESSENCE_MESSAGE = "AreaOfUse by essence read"; + private static final String READ_AREA_BY_ESSENCE_MESSAGE = "Read AreaOfUse by essence"; private static final String SEARCH_AREA_ACTION_ID = "CR0019"; - private static final String SEARCH_AREA_MESSAGE = "Area search"; + private static final String SEARCH_AREA_MESSAGE = "Search Area"; private final String user; -- GitLab From e80d1c0d34f25dde27e3639c5208925125026df3 Mon Sep 17 00:00:00 2001 From: Artem Dobrynin Date: Wed, 17 Feb 2021 11:45:30 +0400 Subject: [PATCH 07/10] GONRG-1775: Implement logic for CRS Catalog [publish] https://jiraeu.epam.com/browse/GONRG-1775 https://jiraeu.epam.com/browse/GONRG-1735 * Added logback.xml * Updated pom --- .../crs-catalog-gcp/crs-catalog-gke/pom.xml | 11 ++++++ .../src/main/resources/logback.xml | 36 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 provider/crs-catalog-gcp/crs-catalog-gke/src/main/resources/logback.xml diff --git a/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml b/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml index d729671..193a6a0 100644 --- a/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml +++ b/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml @@ -93,6 +93,17 @@ 2.7 test + + org.opengroup.osdu + core-lib-gcp + 0.6.0-SNAPSHOT + + + + ch.qos.logback.contrib + logback-json-classic + 0.1.5 + diff --git a/provider/crs-catalog-gcp/crs-catalog-gke/src/main/resources/logback.xml b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/resources/logback.xml new file mode 100644 index 0000000..e6bb61f --- /dev/null +++ b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/resources/logback.xml @@ -0,0 +1,36 @@ + + + + + + + %yellow([%thread]) %highlight(| %-5level |) %green(%d) %cyan(| %logger{15} |) %highlight(%msg) %n + utf8 + + + + + + + + + + + + yyyy-MM-dd HH:mm:ss.SSS + Etc/UTC + true + + + false + + + + + + + + + + + \ No newline at end of file -- GitLab From bafae12933937b5a2fd79e3f59d387143a013dd4 Mon Sep 17 00:00:00 2001 From: Dmitrii Novikov1 Date: Mon, 16 Aug 2021 10:17:33 +0000 Subject: [PATCH 08/10] GONRG-2811 Version endpoint --- .../org/opengroup/osdu/crs/api/InfoApi.java | 40 +++++++++++++++++++ .../opengroup/osdu/crs/api/InfoApiTest.java | 39 ++++++++++++++++++ pom.xml | 30 +++++++++++++- .../osdu/crs/security/AuthSecurityConfig.java | 1 + .../osdu/crs/security/SecurityConfig.java | 1 + .../crs-catalog-gcp/crs-catalog-gke/pom.xml | 36 ++++++++--------- .../osdu/crs/security/AuthSecurityConfig.java | 1 + .../osdu/crs/security/SecurityConfig.java | 1 + 8 files changed, 130 insertions(+), 19 deletions(-) create mode 100644 crs-catalog-core/src/main/java/org/opengroup/osdu/crs/api/InfoApi.java create mode 100644 crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/InfoApiTest.java diff --git a/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/api/InfoApi.java b/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/api/InfoApi.java new file mode 100644 index 0000000..6012178 --- /dev/null +++ b/crs-catalog-core/src/main/java/org/opengroup/osdu/crs/api/InfoApi.java @@ -0,0 +1,40 @@ +/* + * Copyright 2021 Google LLC + * Copyright 2021 EPAM Systems, Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.opengroup.osdu.crs.api; + +import java.io.IOException; +import org.opengroup.osdu.core.common.info.VersionInfoBuilder; +import org.opengroup.osdu.core.common.model.info.VersionInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping +public class InfoApi { + + @Autowired + private VersionInfoBuilder versionInfoBuilder; + + @GetMapping(value = "/info", produces = MediaType.APPLICATION_JSON_VALUE) + public VersionInfo info() throws IOException { + return versionInfoBuilder.buildVersionInfo(); + } +} \ No newline at end of file diff --git a/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/InfoApiTest.java b/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/InfoApiTest.java new file mode 100644 index 0000000..990155b --- /dev/null +++ b/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/InfoApiTest.java @@ -0,0 +1,39 @@ +package org.opengroup.osdu.crs.api; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.when; + +import java.io.IOException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.opengroup.osdu.core.common.info.VersionInfoBuilder; +import org.opengroup.osdu.core.common.model.info.VersionInfo; + +@RunWith(MockitoJUnitRunner.class) +public class InfoApiTest { + + @InjectMocks + private InfoApi sut; + + @Mock + private VersionInfoBuilder versionInfoBuilder; + + @Test + public void should_return200_getVersionInfo() throws IOException { + VersionInfo versionInfo = VersionInfo.builder() + .groupId("group") + .artifactId("artifact") + .version("0.1.0") + .buildTime("1000") + .branch("master") + .commitId("7777") + .commitMessage("Merge commit") + .build(); + when(versionInfoBuilder.buildVersionInfo()).thenReturn(versionInfo); + VersionInfo response = this.sut.info(); + assertEquals(versionInfo, response); + } +} diff --git a/pom.xml b/pom.xml index c4c1241..81f261e 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.opengroup.osdu 2.0.6 UTF-8 - 0.10.0 + 0.11.0-SNAPSHOT 1.26 7.9 @@ -108,10 +108,38 @@ repackage + + build-info + + build-info + + + + + pl.project13.maven + git-commit-id-plugin + 4.0.5 + + + + revision + + + + + true + yyyy-MM-dd'T'HH:mm:ssZ + true + + ${project.build.outputDirectory}/git.properties + + + + diff --git a/provider/crs-catalog-aws/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java b/provider/crs-catalog-aws/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java index 067be95..3b189f6 100644 --- a/provider/crs-catalog-aws/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java +++ b/provider/crs-catalog-aws/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java @@ -57,6 +57,7 @@ public class AuthSecurityConfig extends WebSecurityConfigurerAdapter implements "/swagger-resources/**", "/configuration/security", "/swagger-ui.html", + "/info", "/webjars/**", "/csrf", "/api/crs/catalog/actuator", diff --git a/provider/crs-catalog-azure/crs-catalog-aks/src/main/java/org/opengroup/osdu/crs/security/SecurityConfig.java b/provider/crs-catalog-azure/crs-catalog-aks/src/main/java/org/opengroup/osdu/crs/security/SecurityConfig.java index 18ba3ea..5e6fd00 100644 --- a/provider/crs-catalog-azure/crs-catalog-aks/src/main/java/org/opengroup/osdu/crs/security/SecurityConfig.java +++ b/provider/crs-catalog-azure/crs-catalog-aks/src/main/java/org/opengroup/osdu/crs/security/SecurityConfig.java @@ -43,6 +43,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter implements Acc "/configuration/security", "/swagger", "/swagger-ui.html", + "/info", "/webjars/**", "/csrf" }; diff --git a/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml b/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml index 3438b81..1ed0295 100644 --- a/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml +++ b/provider/crs-catalog-gcp/crs-catalog-gke/pom.xml @@ -143,24 +143,24 @@ - org.jacoco - jacoco-maven-plugin - 0.7.7.201606060606 - - - - prepare-agent - - - - report - prepare-package - - report - - - - + org.jacoco + jacoco-maven-plugin + 0.7.7.201606060606 + + + + prepare-agent + + + + report + prepare-package + + report + + + + diff --git a/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java index 9e2e3af..9fbbc4b 100644 --- a/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java +++ b/provider/crs-catalog-gcp/crs-catalog-gke/src/main/java/org/opengroup/osdu/crs/security/AuthSecurityConfig.java @@ -57,6 +57,7 @@ public class AuthSecurityConfig extends WebSecurityConfigurerAdapter implements "/swagger-resources/**", "/configuration/security", "/swagger-ui.html", + "/info", "/webjars/**", "/csrf", "/api/crs/catalog/actuator", diff --git a/provider/crs-catalog-ibm/crs-catalog-ocp/src/main/java/org/opengroup/osdu/crs/security/SecurityConfig.java b/provider/crs-catalog-ibm/crs-catalog-ocp/src/main/java/org/opengroup/osdu/crs/security/SecurityConfig.java index 07c8eaf..b64e507 100644 --- a/provider/crs-catalog-ibm/crs-catalog-ocp/src/main/java/org/opengroup/osdu/crs/security/SecurityConfig.java +++ b/provider/crs-catalog-ibm/crs-catalog-ocp/src/main/java/org/opengroup/osdu/crs/security/SecurityConfig.java @@ -45,6 +45,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter implements Acce "/swagger-resources/**", "/configuration/security", "/swagger-ui.html", + "/info", "/webjars/**", "/csrf", "/api/crs/catalog/actuator", -- GitLab From 8c373b10db3db8941bb66ea61cfa7b820f3a6bc3 Mon Sep 17 00:00:00 2001 From: Dmitriy Novikov <7nolikov@gmail.com> Date: Mon, 16 Aug 2021 14:24:14 +0400 Subject: [PATCH 09/10] Added copyright --- .../org/opengroup/osdu/crs/api/InfoApiTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/InfoApiTest.java b/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/InfoApiTest.java index 990155b..09edfd7 100644 --- a/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/InfoApiTest.java +++ b/crs-catalog-core/src/test/java/org/opengroup/osdu/crs/api/InfoApiTest.java @@ -1,3 +1,20 @@ +/* + * Copyright 2021 Google LLC + * Copyright 2021 EPAM Systems, Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.opengroup.osdu.crs.api; import static org.junit.Assert.assertEquals; -- GitLab From 275e78aa7e8a3f0c67d07297c2eb2faa58047920 Mon Sep 17 00:00:00 2001 From: Dmitriy Novikov <7nolikov@gmail.com> Date: Mon, 16 Aug 2021 14:54:50 +0400 Subject: [PATCH 10/10] Updated NOTICE --- NOTICE | 326 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 163 insertions(+), 163 deletions(-) diff --git a/NOTICE b/NOTICE index f8b9f84..bd7875f 100644 --- a/NOTICE +++ b/NOTICE @@ -16,7 +16,7 @@ The following software have components provided under the terms of this license: - Apache Commons CLI (from http://commons.apache.org/proper/commons-cli/) - Cobertura (from http://cobertura.sourceforge.net) -- Plexus :: Default Container (from ) +- Default Plexus Container (from https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) - oro (from ) @@ -27,19 +27,19 @@ The following software have components provided under the terms of this license: - AMQP 1.0 JMS Spring Boot AutoConfiguration (from https://repo1.maven.org/maven2/org/amqphub/spring/amqp-10-jms-spring-boot-autoconfigure) - AMQP 1.0 JMS Spring Boot Starter (from https://repo1.maven.org/maven2/org/amqphub/spring/amqp-10-jms-spring-boot-starter) -- ASM Core (from ) -- ASM Core (from ) -- ASM Core (from ) +- ASM Core (from https://repo1.maven.org/maven2/org/ow2/asm/asm) +- ASM Core (from https://repo1.maven.org/maven2/org/ow2/asm/asm) +- ASM Core (from https://repo1.maven.org/maven2/org/ow2/asm/asm) - ASM based accessors helper used by json-smart (from ) - ASM based accessors helper used by json-smart (from ) - Adapter: RxJava (from https://repo1.maven.org/maven2/com/squareup/retrofit2/adapter-rxjava) - Apache Ant + JUnit (from http://ant.apache.org/) - Apache Ant Core (from http://ant.apache.org/) - Apache Ant Launcher (from http://ant.apache.org/) -- Apache Commons BeanUtils (from http://commons.apache.org/proper/commons-beanutils/) - Apache Commons CLI (from http://commons.apache.org/proper/commons-cli/) - Apache Commons Codec (from https://commons.apache.org/proper/commons-codec/) -- Apache Commons Collections (from https://commons.apache.org/proper/commons-collections/) +- Apache Commons Collections (from http://commons.apache.org/proper/commons-collections/) +- Apache Commons IO (from https://commons.apache.org/proper/commons-io/) - Apache Commons Lang (from http://commons.apache.org/proper/commons-lang/) - Apache Commons Logging (from http://commons.apache.org/proper/commons-logging/) - Apache Commons Validator (from http://commons.apache.org/proper/commons-validator/) @@ -47,22 +47,13 @@ The following software have components provided under the terms of this license: - Apache HttpAsyncClient (from http://hc.apache.org/httpcomponents-asyncclient) - Apache HttpClient (from http://hc.apache.org/httpcomponents-client) - Apache HttpClient Cache (from http://hc.apache.org/httpcomponents-client) -- Apache HttpCore (from http://hc.apache.org/httpcomponents-core-ga) -- Apache HttpCore NIO (from http://hc.apache.org/httpcomponents-core-ga) - Apache Log4j API (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api) - Apache Log4j Core (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core) - Apache Log4j JUL Adapter (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul) - Apache Log4j SLF4J Binding (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-slf4j-impl) -- Apache Log4j to SLF4J Adapter (from ) +- Apache Log4j to SLF4J Adapter (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-to-slf4j) - Apache Maven Invoker (from ) -- Apache Maven Reporting Implementation (from ) -- Apache Maven Wagon :: API (from ) -- Apache Maven Wagon :: Providers :: File Provider (from ) -- Apache Maven Wagon :: Providers :: HTTP Shared Library (from ) -- Apache Maven Wagon :: Providers :: Lightweight HTTP Provider (from ) -- Apache Maven Wagon :: Providers :: SSH Common Library (from ) -- Apache Maven Wagon :: Providers :: SSH External Provider (from ) -- Apache Maven Wagon :: Providers :: SSH Provider (from ) +- Apache Maven Reporting Implementation (from https://repo1.maven.org/maven2/org/apache/maven/reporting/maven-reporting-impl) - Apache Velocity (from http://velocity.apache.org/engine/devel/) - AssertJ fluent assertions (from https://repo1.maven.org/maven2/org/assertj/assertj-core) - Asynchronous Http Client (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client) @@ -70,59 +61,62 @@ The following software have components provided under the terms of this license: - AutoValue Annotations (from https://github.com/google/auto/tree/master/value) - Azure Spring Boot Starter for Azure AD Spring Security Integration (from https://github.com/Azure/azure-sdk-for-java) - Bean Validation API (from http://beanvalidation.org) -- Brave Instrumentation: Http Adapters (from ) +- Bean Validation API (from http://beanvalidation.org) +- BeanUtils (from http://jakarta.apache.org/commons/beanutils/) +- Brave (from https://repo1.maven.org/maven2/io/zipkin/brave/brave) +- Brave Instrumentation: Http Adapters (from https://repo1.maven.org/maven2/io/zipkin/brave/brave-instrumentation-http) - Brave instrumentation for Reactor Netty HTTP (from https://github.com/reactor/reactor-netty) - Byte Buddy (without dependencies) (from https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy) -- Byte Buddy Java agent (from https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent) +- Byte Buddy agent (from https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent) - ClassMate (from http://github.com/cowtowncoder/java-classmate) -- Cloud Storage JSON API v1-rev20181109-1.28.0 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-storage) +- Cloud Storage JSON API v1-rev20200927-1.30.10 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-storage) - Cobertura (from http://cobertura.sourceforge.net) - Collections (from https://repo1.maven.org/maven2/commons-collections/commons-collections) - Commons Digester (from http://commons.apache.org/digester/) - Commons Lang (from http://commons.apache.org/lang/) - Converter: Jackson (from https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-jackson) - Core functionality for the Reactor Netty library (from https://github.com/reactor/reactor-netty) -- Doxia :: APT Module (from ) -- Doxia :: Core (from ) -- Doxia :: Decoration Model (from http://maven.apache.org/doxia/doxia-sitetools/doxia-decoration-model/) -- Doxia :: FML Module (from ) -- Doxia :: Sink API (from ) -- Doxia :: Site Renderer (from http://maven.apache.org/doxia/doxia-sitetools/doxia-site-renderer/) -- Doxia :: XDoc Module (from ) -- Doxia :: XHTML Module (from ) +- Default Plexus Container (from https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default) +- Doxia :: APT Module (from http://maven.apache.org/doxia/doxia/doxia-modules/doxia-module-apt/) +- Doxia :: Core (from http://maven.apache.org/doxia/doxia/doxia-core/) +- Doxia :: FML Module (from http://maven.apache.org/doxia/doxia/doxia-modules/doxia-module-fml/) +- Doxia :: Sink API (from http://maven.apache.org/doxia/doxia/doxia-sink-api/) +- Doxia :: XDoc Module (from http://maven.apache.org/doxia/doxia/doxia-modules/doxia-module-xdoc/) +- Doxia :: XHTML Module (from http://maven.apache.org/doxia/doxia/doxia-modules/doxia-module-xhtml/) +- Doxia Sitetools :: Decoration Model (from http://maven.apache.org/doxia/doxia-sitetools/doxia-decoration-model/) +- Doxia Sitetools :: Site Renderer Component (from http://maven.apache.org/doxia/doxia-sitetools/doxia-site-renderer/) - Elastic JNA Distribution (from https://github.com/java-native-access/jna) - Expression Language 3.0 (from https://projects.eclipse.org/projects/ee4j.el) - FindBugs-jsr305 (from http://findbugs.sourceforge.net/) - GSON extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-gson) - Google APIs Client Library for Java (from https://repo1.maven.org/maven2/com/google/api-client/google-api-client) - Google App Engine extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-appengine) -- Google Cloud Common Protos for Java (from https://github.com/googleapis/common-protos-java) -- Google Cloud Core (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core) -- Google Cloud Core HTTP (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-http) +- Google Cloud Core (from https://github.com/googleapis/java-core) +- Google Cloud Core HTTP (from https://github.com/googleapis/java-core) - Google Cloud Core gRPC (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-grpc) -- Google Cloud Datastore (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-datastore) +- Google Cloud Datastore (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-datastore) - Google Cloud IAM Service Account Credentials (from https://github.com/googleapis/java-iamcredentials) - Google Cloud Key Management Service (KMS) API v1-rev9-1.22.0 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-cloudkms) -- Google Cloud Logging (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-logging) -- Google Cloud Pub/Sub (from https://github.com/googleapis/java-pubsub) -- Google Cloud Storage (from https://github.com/googleapis/java-storage) +- Google Cloud Logging (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-logging) +- Google Cloud Pub/Sub (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-pubsub) +- Google Cloud Storage (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-storage) - Google HTTP Client Library for Java (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client) - Google OAuth Client Library for Java (from https://repo1.maven.org/maven2/com/google/oauth-client/google-oauth-client) -- Gson (from https://github.com/google/gson) -- Gson (from https://github.com/google/gson) +- Gson (from http://code.google.com/p/google-gson/) +- Gson (from http://code.google.com/p/google-gson/) - Guava InternalFutureFailureAccess and InternalFutures (from https://repo1.maven.org/maven2/com/google/guava/failureaccess) - Guava: Google Core Libraries for Java (from https://repo1.maven.org/maven2/com/google/guava/guava) - Guava: Google Core Libraries for Java (from https://repo1.maven.org/maven2/com/google/guava/guava) - HPPC Collections (from https://repo1.maven.org/maven2/com/carrotsearch/hppc) - HTTP functionality for the Reactor Netty library (from https://github.com/reactor/reactor-netty) -- Hibernate Validator Engine (from ) +- Hibernate Validator Engine (from https://repo1.maven.org/maven2/org/hibernate/validator/hibernate-validator) +- HttpCore (NIO extensions module) (from http://hc.apache.org/httpcomponents-core/) +- HttpCore (base module) (from http://hc.apache.org/httpcomponents-core/) - IBM COS Java SDK for Amazon S3 (from https://github.com/ibm/ibm-cos-sdk-java) - IBM COS Java SDK for COS KMS (from https://github.com/ibm/ibm-cos-sdk-java) - IBM COS SDK For Java (from https://github.com/ibm/ibm-cos-sdk-java) - IBM COS SDK for Java - Core (from https://github.com/ibm/ibm-cos-sdk-java) -- IO (from http://jakarta.apache.org/commons/${pom.artifactId.substring(8)}/) -- Identity and Access Management (IAM) API v1-rev247-1.23.0 (from ) -- IntelliJ IDEA Annotations (from http://www.jetbrains.org) +- Identity and Access Management (IAM) API v1-rev307-1.25.0 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-iam) - J2ObjC Annotations (from https://github.com/google/j2objc/) - J2ObjC Annotations (from https://github.com/google/j2objc/) - JBoss Logging 3 (from http://www.jboss.org) @@ -131,7 +125,7 @@ The following software have components provided under the terms of this license: - JDOM (from http://www.jdom.org) - JSON Small and Fast Parser (from https://repo1.maven.org/maven2/net/minidev/json-smart) - JSON Small and Fast Parser (from https://repo1.maven.org/maven2/net/minidev/json-smart) -- JSON Web Token support for the JVM (from https://github.com/jwtk/jjwt.git) +- JSON Web Token support for the JVM (from https://github.com/jwtk/jjwt) - JSON library from Android SDK (from http://developer.android.com/sdk) - JSONassert (from https://github.com/skyscreamer/JSONassert) - Jackson (from http://jackson.codehaus.org) @@ -141,54 +135,53 @@ The following software have components provided under the terms of this license: - Jackson datatype: JSR310 (from https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310) - 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: JAXB-annotations (from http://github.com/FasterXML/jackson-module-jaxb-annotations) +- Jackson module: JAXB Annotations (from https://github.com/FasterXML/jackson-modules-base) - Jackson-annotations (from http://github.com/FasterXML/jackson) - Jackson-core (from http://wiki.fasterxml.com/JacksonHome) - Jackson-dataformat-XML (from http://wiki.fasterxml.com/JacksonExtensionXmlDataBinding) - Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson-dataformats-text) - Jackson-datatype-Joda (from http://wiki.fasterxml.com/JacksonModuleJoda) +- Jackson-module-Afterburner (from http://wiki.fasterxml.com/JacksonHome) - 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) - Java Native Access (from https://github.com/java-native-access/jna) - Java Native Access Platform (from https://github.com/java-native-access/jna) - Java Servlet API (from https://projects.eclipse.org/projects/ee4j.servlet) - Java UUID Generator (from http://wiki.fasterxml.com/JugHome) - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) -- Jetty :: Asynchronous HTTP Client (from {$jetty.url}) -- Jetty :: Continuation (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-continuation) -- Jetty :: Http Utility (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http) -- Jetty :: IO Utility (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-io) -- Jetty :: Plus (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-plus) -- Jetty :: Security (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-security) -- Jetty :: Server Core (from ${jetty.url}) -- Jetty :: Servlet Annotations (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-annotations) -- Jetty :: Servlet Handling (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlet) -- Jetty :: Utilities (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util) +- JetBrains Java Annotations (from https://github.com/JetBrains/java-annotations) +- Jetty :: Asynchronous HTTP Client (from http://www.eclipse.org/jetty) +- Jetty :: Continuation (from http://www.eclipse.org/jetty) +- Jetty :: Http Utility (from http://www.eclipse.org/jetty) +- Jetty :: IO Utility (from http://www.eclipse.org/jetty) +- Jetty :: Plus (from http://www.eclipse.org/jetty) +- Jetty :: Security (from http://www.eclipse.org/jetty) +- Jetty :: Server Core (from http://www.eclipse.org/jetty) +- Jetty :: Servlet Annotations (from http://www.eclipse.org/jetty) +- Jetty :: Servlet Handling (from http://www.eclipse.org/jetty) +- Jetty :: Utilities (from http://www.eclipse.org/jetty) - Jetty :: Utilities :: Ajax(JSON) (from http://www.eclipse.org/jetty) -- Jetty :: Utility Servlets and Filters (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlets) -- Jetty :: Webapp Application Support (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-webapp) +- Jetty :: Utility Servlets and Filters (from http://www.eclipse.org/jetty) +- Jetty :: Webapp Application Support (from http://www.eclipse.org/jetty) - Jetty :: Websocket :: API (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-api) - Jetty :: Websocket :: Client (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-client) - Jetty :: Websocket :: Common (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-common) - Jetty :: Websocket :: Server (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-server) - Jetty :: Websocket :: Servlet Interface (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-servlet) -- Jetty :: Websocket :: javax.websocket :: Client Implementation (from ) -- Jetty :: Websocket :: javax.websocket.server :: Server Implementation (from ) -- Jetty :: XML utilities (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-xml) +- Jetty :: Websocket :: javax.websocket :: Client Implementation (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/javax-websocket-client-impl) +- Jetty :: Websocket :: javax.websocket.server :: Server Implementation (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/javax-websocket-server-impl) +- Jetty :: XML utilities (from http://www.eclipse.org/jetty) - Jetty Server (from https://repo1.maven.org/maven2/org/mortbay/jetty/jetty) - Jetty Utilities (from https://repo1.maven.org/maven2/org/mortbay/jetty/jetty-util) - Joda-Time (from https://www.joda.org/joda-time/) -- Json Path (from https://github.com/jayway/JsonPath) - KeePassJava2 :: All (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2) - KeePassJava2 :: DOM (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-dom) - KeePassJava2 :: JAXB (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-jaxb) - KeePassJava2 :: KDB (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-kdb) - KeePassJava2 :: KDBX (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-kdbx) - KeePassJava2 :: Simple (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-simple) -- Logback Contrib :: JSON :: Classic (from ) -- Logback Contrib :: JSON :: Core (from ) +- 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) - Logback Contrib :: Jackson (from ) - 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) @@ -204,22 +197,29 @@ The following software have components provided under the terms of this license: - Lucene Spatial 3D (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial3d) - Lucene Spatial Extras (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-spatial-extras) - Lucene Suggest (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-suggest) -- MapStruct Core (from http://mapstruct.org/mapstruct/) +- MapStruct Core (from https://repo1.maven.org/maven2/org/mapstruct/mapstruct) - Maven Artifact (from https://repo1.maven.org/maven2/org/apache/maven/maven-artifact) -- Maven Artifact Manager (from ) +- Maven Artifact Manager (from https://repo1.maven.org/maven2/org/apache/maven/maven-artifact-manager) - Maven Core (from https://repo1.maven.org/maven2/org/apache/maven/maven-core) -- Maven Error Diagnostics (from ) +- Maven Error Diagnostics (from https://repo1.maven.org/maven2/org/apache/maven/maven-error-diagnostics) - Maven Model (from https://repo1.maven.org/maven2/org/apache/maven/maven-model) -- Maven Monitor (from ) +- Maven Monitor (from https://repo1.maven.org/maven2/org/apache/maven/maven-monitor) - Maven Plugin API (from https://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api) -- Maven Plugin Descriptor Model (from ) -- Maven Plugin Parameter Documenter API (from ) -- Maven Plugin Registry Model (from ) -- Maven Profile Model (from ) -- Maven Project (from ) -- Maven Reporting API (from ) +- Maven Plugin Descriptor Model (from https://repo1.maven.org/maven2/org/apache/maven/maven-plugin-descriptor) +- Maven Plugin Parameter Documenter API (from https://repo1.maven.org/maven2/org/apache/maven/maven-plugin-parameter-documenter) +- Maven Plugin Registry Model (from https://repo1.maven.org/maven2/org/apache/maven/maven-plugin-registry) +- Maven Profile Model (from https://repo1.maven.org/maven2/org/apache/maven/maven-profile) +- Maven Project Builder (from https://repo1.maven.org/maven2/org/apache/maven/maven-project) +- Maven Reporting API (from https://repo1.maven.org/maven2/org/apache/maven/reporting/maven-reporting-api) - Maven Repository Metadata Model (from https://repo1.maven.org/maven2/org/apache/maven/maven-repository-metadata) - Maven Settings (from https://repo1.maven.org/maven2/org/apache/maven/maven-settings) +- Maven Wagon API (from https://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-provider-api) +- Maven Wagon File Provider (from https://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-file) +- Maven Wagon HTTP Shared Library (from https://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-http-shared) +- Maven Wagon Lightweight HTTP Provider (from https://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-http-lightweight) +- Maven Wagon SSH Common Library (from https://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh-common) +- Maven Wagon SSH External Provider (from https://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh-external) +- Maven Wagon SSH Provider (from https://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ssh) - Metrics Core (from https://repo1.maven.org/maven2/io/dropwizard/metrics/metrics-core) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) @@ -250,8 +250,6 @@ The following software have components provided under the terms of this license: - OAuth 2.0 SDK with OpenID Connect extensions (from https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions) - Objenesis (from http://objenesis.org) - OkHttp (from https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp) -- OkHttp Logging Interceptor (from https://repo1.maven.org/maven2/com/squareup/okhttp3/logging-interceptor) -- OkHttp URLConnection (from https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp-urlconnection) - Okio (from https://github.com/square/okio/) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) @@ -259,60 +257,61 @@ The following software have components provided under the terms of this license: - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) - PWDB :: Database (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/database) -- Plexus :: Default Container (from ) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) - Plexus Velocity Component (from ) - PowerMock (from http://www.powermock.org) +- PowerMock (from http://www.powermock.org) +- PowerMock (from http://www.powermock.org) +- PowerMock (from http://www.powermock.org) +- PowerMock (from http://www.powermock.org) - Protocol Buffer extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-protobuf) - Proton-J (from https://repo1.maven.org/maven2/org/apache/qpid/proton-j) - QpidJMS Client (from ) -- Reactive Streams Netty driver (from https://github.com/reactor/reactor-netty) -- Retrofit (from https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit) -- Servlet Specification 2.5 API (from ) -- SnakeYAML (from http://code.google.com/p/snakeyaml/) +- Reactor Netty with all modules (from https://github.com/reactor/reactor-netty) +- Retrofit (from https://github.com/square/retrofit) +- Servlet Specification 2.5 API (from http://jetty.mortbay.org) +- SnakeYAML (from http://www.snakeyaml.org) +- Spring AOP (from https://github.com/spring-projects/spring-framework) +- Spring Beans (from https://github.com/spring-projects/spring-framework) - Spring Boot (from http://projects.spring.io/spring-boot/) - Spring Boot Actuator (from http://projects.spring.io/spring-boot/) - Spring Boot Actuator AutoConfigure (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-actuator-autoconfigure) +- Spring Boot Actuator Starter (from http://projects.spring.io/spring-boot/) - Spring Boot AutoConfigure (from http://projects.spring.io/spring-boot/) -- Spring Boot Jetty Starter (from http://projects.spring.io/spring-boot/) -- Spring Boot Json Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-json) -- Spring Boot Log4J2 Starter (from http://projects.spring.io/spring-boot/) - Spring Boot Logging Starter (from http://projects.spring.io/spring-boot/) - Spring Boot Reactor Netty Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-reactor-netty) - Spring Boot Security Starter (from http://projects.spring.io/spring-boot/) - Spring Boot Starter (from http://projects.spring.io/spring-boot/) +- Spring Boot Test (from http://projects.spring.io/spring-boot/) - Spring Boot Test Auto-Configure (from http://projects.spring.io/spring-boot/) - Spring Boot Test Starter (from http://projects.spring.io/spring-boot/) +- Spring Boot Validation Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-validation) - Spring Boot WebFlux Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-webflux) - Spring Commons Logging Bridge (from https://github.com/spring-projects/spring-framework) +- Spring Context (from https://github.com/spring-projects/spring-framework) +- Spring Core (from https://github.com/spring-projects/spring-framework) - Spring Data Core (from https://repo1.maven.org/maven2/org/springframework/data/spring-data-commons) - Spring Expression Language (SpEL) (from https://github.com/spring-projects/spring-framework) -- Spring Framework: AOP (from http://www.springframework.org) -- Spring Framework: Context (from http://www.springframework.org) -- Spring Framework: WebMVC (from http://www.springframework.org) - Spring JMS (from https://github.com/spring-projects/spring-framework) - Spring Messaging (from https://github.com/spring-projects/spring-framework) -- Spring Plugin - Core (from ) - Spring Plugin - Metadata Extension (from https://repo1.maven.org/maven2/org/springframework/plugin/spring-plugin-metadata) -- Spring TestContext Framework (from https://github.com/spring-projects/spring-framework) +- Spring Plugin Core (from https://repo1.maven.org/maven2/org/springframework/plugin/spring-plugin-core) +- Spring TestContext Framework (from https://github.com/SpringSource/spring-framework) - Spring Transaction (from https://github.com/spring-projects/spring-framework) +- Spring Web (from https://github.com/spring-projects/spring-framework) +- Spring Web MVC (from https://github.com/spring-projects/spring-framework) - Spring WebFlux (from https://github.com/spring-projects/spring-framework) -- Spring beans (from https://repo1.maven.org/maven2/org/springframework/spring-beans) -- Spring core (from https://repo1.maven.org/maven2/org/springframework/spring-core) -- Spring web (from https://repo1.maven.org/maven2/org/springframework/spring-web) - T-Digest (from https://github.com/tdunning/t-digest) - 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 ) -- Zipkin v2 (from ) +- Zipkin Reporter: Core (from https://repo1.maven.org/maven2/io/zipkin/reporter2/zipkin-reporter) - aalto-xml (from ) - aggs-matrix-stats (from https://github.com/elastic/elasticsearch) -- brave (from ) -- com.google.api.grpc:grpc-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis) -- com.google.api.grpc:proto-google-cloud-logging-v2 (from https://github.com/googleapis/googleapis) +- com.google.api.grpc:proto-google-cloud-datastore-v1 (from https://github.com/googleapis/googleapis) +- com.google.api.grpc:proto-google-common-protos (from https://github.com/googleapis/googleapis) - compiler (from http://github.com/spullara/mustache.java) -- datastore-v1-proto-client (from ) +- datastore-v1-proto-client (from https://repo1.maven.org/maven2/com/google/cloud/datastore/datastore-v1-proto-client) - elasticsearch-cli (from https://github.com/elastic/elasticsearch) - elasticsearch-core (from https://github.com/elastic/elasticsearch) - elasticsearch-geo (from https://github.com/elastic/elasticsearch) @@ -320,6 +319,7 @@ The following software have components provided under the terms of this license: - elasticsearch-x-content (from https://github.com/elastic/elasticsearch) - error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations) - error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations) +- grpc-google-cloud-pubsub-v1 (from https://repo1.maven.org/maven2/com/google/api/grpc/grpc-google-cloud-pubsub-v1) - io.grpc:grpc-alts (from https://github.com/grpc/grpc-java) - io.grpc:grpc-api (from https://github.com/grpc/grpc-java) - io.grpc:grpc-auth (from https://github.com/grpc/grpc-java) @@ -332,47 +332,46 @@ The following software have components provided under the terms of this license: - io.grpc:grpc-protobuf-lite (from https://github.com/grpc/grpc-java) - io.grpc:grpc-stub (from https://github.com/grpc/grpc-java) - ion-java (from https://github.com/amznlabs/ion-java/) -- jackson-databind (from http://wiki.fasterxml.com/JacksonHome) +- jackson-databind (from http://github.com/FasterXML/jackson) - java-cloudant (from https://cloudant.com) - java-cloudant (from https://cloudant.com) - javatuples (from http://www.javatuples.org) - javax.inject (from http://code.google.com/p/atinject/) +- json-path (from http://code.google.com/p/json-path/) - 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) - mockito-core (from https://github.com/mockito/mockito) +- okhttp-urlconnection (from https://github.com/square/okhttp) - org.apiguardian:apiguardian-api (from https://github.com/apiguardian-team/apiguardian) - org.conscrypt:conscrypt-openjdk-uber (from https://conscrypt.org/) - org.opentest4j:opentest4j (from https://github.com/ota4j-team/opentest4j) -- org.xmlunit:xmlunit-core (from http://www.xmlunit.org/) +- org.xmlunit:xmlunit-core (from https://www.xmlunit.org/) - parent-join (from https://github.com/elastic/elasticsearch) - perfmark:perfmark-api (from https://github.com/perfmark/perfmark) -- powermock-api-support (from ) -- powermock-core (from http://www.powermock.org) -- powermock-module-junit4 (from http://www.powermock.org) -- powermock-module-junit4-common (from ) -- powermock-reflect (from ) -- proto-google-cloud-datastore-v1 (from https://github.com/googleapis/api-client-staging) +- powermock-module-junit4-common (from https://repo1.maven.org/maven2/org/powermock/powermock-module-junit4-common) - proto-google-cloud-iamcredentials-v1 (from https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-iamcredentials-v1) -- proto-google-cloud-pubsub-v1 (from https://github.com/googleapis/java-pubsub/proto-google-cloud-pubsub-v1) -- proto-google-iam-v1 (from https://github.com/googleapis/api-client-staging) +- proto-google-cloud-logging-v2 (from https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-logging-v2) +- proto-google-cloud-pubsub-v1 (from https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-pubsub-v1) +- proto-google-iam-v1 (from https://github.com/googleapis/java-iam/proto-google-iam-v1) - rank-eval (from https://github.com/elastic/elasticsearch) - rest (from https://github.com/elastic/elasticsearch) - rest-high-level (from https://github.com/elastic/elasticsearch) - rxjava (from https://github.com/ReactiveX/RxJava) - server (from https://github.com/elastic/elasticsearch) -- spring-boot-starter-actuator (from https://spring.io/projects/spring-boot) -- spring-boot-starter-validation (from https://spring.io/projects/spring-boot) +- spring-boot-starter-jetty (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-web (from https://spring.io/projects/spring-boot) -- spring-boot-test (from https://spring.io/projects/spring-boot) - spring-security-config (from http://spring.io/spring-security) -- spring-security-core (from https://spring.io/spring-security) +- spring-security-core (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-resource-server (from http://spring.io/spring-security) -- spring-security-web (from https://spring.io/spring-security) +- spring-security-web (from http://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) @@ -382,7 +381,8 @@ The following software have components provided under the terms of this license: - springfox-swagger2 (from https://github.com/springfox/springfox) - swagger-annotations (from https://repo1.maven.org/maven2/io/swagger/swagger-annotations) - swagger-jaxrs (from ) -- swagger-models (from ) +- swagger-models (from https://repo1.maven.org/maven2/io/swagger/swagger-models) +- xercesImpl (from https://repo1.maven.org/maven2/xerces/xercesImpl) - xml-apis (from ) ======================================================================== @@ -392,10 +392,10 @@ The following software have components provided under the terms of this license: - API Common (from https://github.com/googleapis/api-common-java) - ASM Analysis (from ) -- ASM Commons (from ) +- ASM Commons (from https://repo1.maven.org/maven2/org/ow2/asm/asm-commons) - ASM Tree (from ) - Apache Commons CLI (from http://commons.apache.org/proper/commons-cli/) -- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) (from https://github.com/googleapis) - GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) - GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) - Hamcrest (from http://hamcrest.org/JavaHamcrest/) @@ -417,16 +417,16 @@ The following software have components provided under the terms of this license: - API Common (from https://github.com/googleapis/api-common-java) - ASM Analysis (from ) - ASM Analysis (from ) -- ASM Commons (from ) -- ASM Commons (from ) -- ASM Core (from ) -- ASM Core (from ) -- ASM Core (from ) +- ASM Commons (from https://repo1.maven.org/maven2/org/ow2/asm/asm-commons) +- ASM Commons (from https://repo1.maven.org/maven2/org/ow2/asm/asm-commons) +- ASM Core (from https://repo1.maven.org/maven2/org/ow2/asm/asm) +- ASM Core (from https://repo1.maven.org/maven2/org/ow2/asm/asm) +- ASM Core (from https://repo1.maven.org/maven2/org/ow2/asm/asm) - ASM Tree (from ) - ASM Tree (from ) - ASM Util (from ) - Apache Commons Codec (from https://commons.apache.org/proper/commons-codec/) -- GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) +- GAX (Google Api eXtensions) (from https://github.com/googleapis) - GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) - GAX (Google Api eXtensions) for Java (from https://github.com/googleapis/gax-java) - Google APIs Client Library for Java (from https://repo1.maven.org/maven2/com/google/api-client/google-api-client) @@ -435,7 +435,6 @@ The following software have components provided under the terms of this license: - Hamcrest (from http://hamcrest.org/JavaHamcrest/) - Hamcrest Core (from http://hamcrest.org/) - HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) -- JSch (from http://www.jcraft.com/jsch/) - JavaBeans Activation Framework API jar (from ) - 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) @@ -449,12 +448,13 @@ 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) - Reflections (from http://github.com/ronmamo/reflections) -- SnakeYAML (from http://code.google.com/p/snakeyaml/) -- Spring core (from https://repo1.maven.org/maven2/org/springframework/spring-core) +- SnakeYAML (from http://www.snakeyaml.org) +- Spring Core (from https://github.com/spring-projects/spring-framework) - ThreeTen backport (from https://www.threeten.org/threetenbp) - classworlds (from http://classworlds.codehaus.org/) - jakarta.xml.bind-api (from ) - jaxen (from http://jaxen.codehaus.org/) +- jsch (from https://repo1.maven.org/maven2/com/jcraft/jsch) ======================================================================== CC-BY-2.5 @@ -486,7 +486,7 @@ CDDL-1.0 ======================================================================== The following software have components provided under the terms of this license: -- Servlet Specification 2.5 API (from ) +- Servlet Specification 2.5 API (from http://jetty.mortbay.org) ======================================================================== CDDL-1.1 @@ -495,7 +495,7 @@ The following software have components provided under the terms of this license: - Java EE Transaction API (from http://jcp.org/en/jsr/detail?id=907) - JavaBeans Activation Framework (from ) -- Servlet Specification 2.5 API (from ) +- Servlet Specification 2.5 API (from http://jetty.mortbay.org) - javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250) ======================================================================== @@ -521,43 +521,43 @@ The following software have components provided under the terms of this license: - Expression Language 3.0 (from https://projects.eclipse.org/projects/ee4j.el) - JUnit Jupiter (Aggregator) (from https://junit.org/junit5/) +- JUnit Jupiter Params (from https://junit.org/junit5/) - Jakarta WebSocket - Server API (from https://projects.eclipse.org/projects/ee4j.websocket) - Java Servlet API (from https://projects.eclipse.org/projects/ee4j.servlet) -- Jetty :: Asynchronous HTTP Client (from {$jetty.url}) -- Jetty :: Continuation (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-continuation) -- Jetty :: Http Utility (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http) -- Jetty :: IO Utility (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-io) -- Jetty :: Plus (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-plus) -- Jetty :: Security (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-security) -- Jetty :: Server Core (from ${jetty.url}) -- Jetty :: Servlet Annotations (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-annotations) -- Jetty :: Servlet Handling (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlet) -- Jetty :: Utilities (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util) +- Jetty :: Asynchronous HTTP Client (from http://www.eclipse.org/jetty) +- Jetty :: Continuation (from http://www.eclipse.org/jetty) +- Jetty :: Http Utility (from http://www.eclipse.org/jetty) +- Jetty :: IO Utility (from http://www.eclipse.org/jetty) +- Jetty :: Plus (from http://www.eclipse.org/jetty) +- Jetty :: Security (from http://www.eclipse.org/jetty) +- Jetty :: Server Core (from http://www.eclipse.org/jetty) +- Jetty :: Servlet Annotations (from http://www.eclipse.org/jetty) +- Jetty :: Servlet Handling (from http://www.eclipse.org/jetty) +- Jetty :: Utilities (from http://www.eclipse.org/jetty) - Jetty :: Utilities :: Ajax(JSON) (from http://www.eclipse.org/jetty) -- Jetty :: Utility Servlets and Filters (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlets) -- Jetty :: Webapp Application Support (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-webapp) +- Jetty :: Utility Servlets and Filters (from http://www.eclipse.org/jetty) +- Jetty :: Webapp Application Support (from http://www.eclipse.org/jetty) - Jetty :: Websocket :: API (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-api) - Jetty :: Websocket :: Client (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-client) - Jetty :: Websocket :: Common (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-common) - Jetty :: Websocket :: Server (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-server) - Jetty :: Websocket :: Servlet Interface (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-servlet) -- Jetty :: Websocket :: javax.websocket :: Client Implementation (from ) -- Jetty :: Websocket :: javax.websocket.server :: Server Implementation (from ) -- Jetty :: XML utilities (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-xml) +- Jetty :: Websocket :: javax.websocket :: Client Implementation (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/javax-websocket-client-impl) +- Jetty :: Websocket :: javax.websocket.server :: Server Implementation (from https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/javax-websocket-server-impl) +- Jetty :: XML utilities (from http://www.eclipse.org/jetty) - Logback Classic Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-classic) -- Logback Contrib :: JSON :: Classic (from ) -- Logback Contrib :: JSON :: Core (from ) +- 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) - Logback Contrib :: Jackson (from ) - Logback Core Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-core) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java) -- SnakeYAML (from http://code.google.com/p/snakeyaml/) +- SnakeYAML (from http://www.snakeyaml.org) - jakarta.annotation-api (from https://projects.eclipse.org/projects/ee4j.ca) - org.junit.jupiter:junit-jupiter-api (from http://junit.org/junit5/) - org.junit.jupiter:junit-jupiter-engine (from http://junit.org/junit5/) -- org.junit.jupiter:junit-jupiter-params (from http://junit.org/junit5/) - org.junit.platform:junit-platform-commons (from http://junit.org/junit5/) - org.junit.platform:junit-platform-engine (from http://junit.org/junit5/) @@ -568,12 +568,12 @@ The following software have components provided under the terms of this license: - Expression Language 3.0 (from https://projects.eclipse.org/projects/ee4j.el) - JUnit Jupiter (Aggregator) (from https://junit.org/junit5/) +- JUnit Jupiter Params (from https://junit.org/junit5/) - Jakarta WebSocket - Server API (from https://projects.eclipse.org/projects/ee4j.websocket) - Java Servlet API (from https://projects.eclipse.org/projects/ee4j.servlet) - jakarta.annotation-api (from https://projects.eclipse.org/projects/ee4j.ca) - org.junit.jupiter:junit-jupiter-api (from http://junit.org/junit5/) - org.junit.jupiter:junit-jupiter-engine (from http://junit.org/junit5/) -- org.junit.jupiter:junit-jupiter-params (from http://junit.org/junit5/) - org.junit.platform:junit-platform-commons (from http://junit.org/junit5/) - org.junit.platform:junit-platform-engine (from http://junit.org/junit5/) @@ -594,7 +594,7 @@ GPL-2.0-or-later ======================================================================== The following software have components provided under the terms of this license: -- SnakeYAML (from http://code.google.com/p/snakeyaml/) +- SnakeYAML (from http://www.snakeyaml.org) ======================================================================== GPL-2.0-with-classpath-exception @@ -617,7 +617,7 @@ The following software have components provided under the terms of this license: - Expression Language 3.0 (from https://projects.eclipse.org/projects/ee4j.el) - Java Servlet API (from https://projects.eclipse.org/projects/ee4j.servlet) -- Project Lombok (from https://projectlombok.org) +- Project Lombok (from http://projectlombok.org) - jakarta.annotation-api (from https://projects.eclipse.org/projects/ee4j.ca) ======================================================================== @@ -655,8 +655,8 @@ The following software have components provided under the terms of this license: - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) - Logback Classic Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-classic) -- Logback Contrib :: JSON :: Classic (from ) -- Logback Contrib :: JSON :: Core (from ) +- 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) - Logback Contrib :: Jackson (from ) - Logback Core Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-core) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) @@ -671,7 +671,7 @@ The following software have components provided under the terms of this license: - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) -- SnakeYAML (from http://code.google.com/p/snakeyaml/) +- SnakeYAML (from http://www.snakeyaml.org) ======================================================================== LGPL-3.0-only @@ -694,11 +694,12 @@ The following software have components provided under the terms of this license: - Checker Qual (from https://checkerframework.org) - Checker Qual (from https://checkerframework.org) - Checker Qual (from https://checkerframework.org) +- Default Plexus Container (from https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default) - Extensions on Apache Proton-J library (from https://github.com/Azure/qpid-proton-j-extensions) -- JOpt Simple (from http://pholser.github.io/jopt-simple) +- JOpt Simple (from http://pholser.github.com/jopt-simple) - JUL to SLF4J bridge (from http://www.slf4j.org) - Java Client Runtime for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) -- Jetty :: Utilities (from https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util) +- Jetty :: Utilities (from http://www.eclipse.org/jetty) - Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) - Microsoft Application Insights Java SDK Core (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) @@ -720,22 +721,21 @@ The following software have components provided under the terms of this license: - Netty/Codec/HTTP (from https://repo1.maven.org/maven2/io/netty/netty-codec-http) - Netty/Common (from https://repo1.maven.org/maven2/io/netty/netty-common) - Objectify App Engine (from https://github.com/objectify/objectify) -- Plexus :: Default Container (from ) - Plexus Default Interactivity Handler (from ) -- Project Lombok (from https://projectlombok.org) +- Project Lombok (from http://projectlombok.org) - SLF4J API Module (from http://www.slf4j.org) - Spongy Castle (from http://rtyley.github.io/spongycastle/) - Spring Data for Azure Cosmos DB SQL API (from https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos) - adal4j (from https://github.com/AzureAD/azure-activedirectory-library-for-java) - azure-documentdb (from https://azure.microsoft.com/en-us/services/cosmos-db/) - documentdb-bulkexecutor (from http://azure.microsoft.com/en-us/services/documentdb/) -- java jwt (from http://www.jwt.io) +- java jwt (from https://github.com/auth0/java-jwt) - micrometer-core (from https://github.com/micrometer-metrics/micrometer) - mockito-core (from https://github.com/mockito/mockito) - mockito-junit-jupiter (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 https://spring.io/spring-security) +- spring-security-core (from http://spring.io/spring-security) ======================================================================== MPL-1.1 @@ -785,7 +785,7 @@ The following software have components provided under the terms of this license: - Checker Qual (from https://checkerframework.org) - Checker Qual (from https://checkerframework.org) -- Servlet Specification 2.5 API (from ) +- Servlet Specification 2.5 API (from http://jetty.mortbay.org) ======================================================================== SunPro @@ -801,7 +801,7 @@ The following software have components provided under the terms of this license: - Apache Ant Core (from http://ant.apache.org/) - JTidy (from http://jtidy.sourceforge.net) -- Xerces2-j (from https://xerces.apache.org/xerces2-j/) +- xercesImpl (from https://repo1.maven.org/maven2/xerces/xercesImpl) - xml-apis (from ) ======================================================================== @@ -835,8 +835,8 @@ The following software have components provided under the terms of this license: - Microsoft Azure SDK for EventGrid Management (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure SDK for SQL API of Azure Cosmos DB Service (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure client library for Blob Storage (from https://github.com/Azure/azure-sdk-for-java) -- Project Lombok (from https://projectlombok.org) -- Spring web (from https://repo1.maven.org/maven2/org/springframework/spring-web) +- Project Lombok (from http://projectlombok.org) +- Spring Web (from https://github.com/spring-projects/spring-framework) - azure-documentdb (from https://azure.microsoft.com/en-us/services/cosmos-db/) - msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java) - reactive-streams (from http://www.reactive-streams.org/) @@ -853,12 +853,12 @@ The following software have components provided under the terms of this license: - JTidy (from http://jtidy.sourceforge.net) - JUnit (from http://junit.org) - JUnit Jupiter (Aggregator) (from https://junit.org/junit5/) +- JUnit Jupiter Params (from https://junit.org/junit5/) - JavaBeans Activation Framework API jar (from ) - Spongy Castle (from http://rtyley.github.io/spongycastle/) - jakarta.xml.bind-api (from ) - org.junit.jupiter:junit-jupiter-api (from http://junit.org/junit5/) - org.junit.jupiter:junit-jupiter-engine (from http://junit.org/junit5/) -- org.junit.jupiter:junit-jupiter-params (from http://junit.org/junit5/) - org.junit.platform:junit-platform-commons (from http://junit.org/junit5/) - org.junit.platform:junit-platform-engine (from http://junit.org/junit5/) - xml-apis (from ) -- GitLab