diff --git a/NOTICE b/NOTICE index 878e5e17c130b55f98a6cc98bc813ced6ffe695a..313c46e4e329833ef5b24cb514cbf17b0456f536 100644 --- a/NOTICE +++ b/NOTICE @@ -231,6 +231,7 @@ The following software have components provided under the terms of this license: - Doxia :: XDoc Module (from ) - Doxia :: XHTML Module (from ) - Elastic JNA Distribution (from https://github.com/java-native-access/jna) +- Elastic JNA Distribution (from https://github.com/java-native-access/jna) - Elasticsearch: 5.0.0-alpha5 (from https://github.com/elastic/elasticsearch) - Elasticsearch: 5.0.0-alpha5 (from https://github.com/elastic/elasticsearch) - FindBugs-jsr305 (from http://findbugs.sourceforge.net/) @@ -254,6 +255,7 @@ The following software have components provided under the terms of this license: - Guava: Google Core Libraries for Java (from https://github.com/google/guava.git) - Guava: Google Core Libraries for Java (from https://github.com/google/guava.git) - HPPC Collections (from http://labs.carrotsearch.com) +- HPPC Collections (from http://labs.carrotsearch.com) - Hibernate Validator Engine (from ) - 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) @@ -313,6 +315,9 @@ The following software have components provided under the terms of this license: - 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 :: Jackson (from ) - Lucene Common Analyzers (from ) - Lucene Common Analyzers (from ) - Lucene Core (from ) @@ -336,7 +341,6 @@ The following software have components provided under the terms of this license: - Lucene Sandbox (from ) - Lucene Sandbox (from ) - Lucene Spatial (from ) -- Lucene Spatial (from ) - Lucene Spatial 3D (from ) - Lucene Spatial 3D (from ) - Lucene Spatial Extras (from ) @@ -367,8 +371,8 @@ The following software have components provided under the terms of this license: - Microsoft Azure Netty HTTP Client Library (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) - Mockito (from http://mockito.org) -- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) +- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) - Mojo's Maven plugin for Cobertura (from http://mojo.codehaus.org/cobertura-maven-plugin/) - Netty Reactive Streams HTTP support (from ) @@ -385,11 +389,15 @@ The following software have components provided under the terms of this license: - Netty/TomcatNative [BoringSSL - Static] (from ) - Netty/Transport (from http://netty.io/) - Netty/Transport/Native/Unix/Common (from ) +- Nimbus Content Type (from https://bitbucket.org/connect2id/nimbus-content-type) +- Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt) - Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt) - Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt) - Nimbus LangTag (from https://bitbucket.org/connect2id/nimbus-language-tags) +- Nimbus LangTag (from https://bitbucket.org/connect2id/nimbus-language-tags) - Non-Blocking Reactive Foundation for the JVM (from https://github.com/reactor/reactor) - OAuth 2.0 SDK with OpenID Connect extensions (from https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions) +- OAuth 2.0 SDK with OpenID Connect extensions (from https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions) - OAuth2 for Spring Security (from ) - Objenesis (from http://objenesis.org) - OkHttp (from ) @@ -473,9 +481,11 @@ The following software have components provided under the terms of this license: - com.google.api.grpc:proto-google-iam-v1 (from https://github.com/googleapis/googleapis) - commons-collections (from ) - compiler (from http://github.com/spullara/mustache.java) +- compiler (from http://github.com/spullara/mustache.java) - datastore-v1-proto-client (from ) - elasticsearch-core (from https://github.com/elastic/elasticsearch) - elasticsearch-core (from https://github.com/elastic/elasticsearch) +- elasticsearch-geo (from https://github.com/elastic/elasticsearch) - error-prone annotations (from ) - error-prone annotations (from ) - io.grpc:grpc-alts (from https://github.com/grpc/grpc-java) @@ -511,6 +521,7 @@ The following software have components provided under the terms of this license: - lang-mustache (from https://github.com/elastic/elasticsearch) - lang-mustache (from https://github.com/elastic/elasticsearch) - lettuce (from http://github.com/mp911de/lettuce/wiki) +- 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) - org.xmlunit:xmlunit-core (from http://www.xmlunit.org/) @@ -571,6 +582,7 @@ The following software have components provided under the terms of this license: - Hamcrest Core (from http://hamcrest.org/) - Lucene Common Analyzers (from ) - Lucene Common Analyzers (from ) +- Lucene Core (from ) - Plexus :: Default Container (from ) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) - StAX (from http://stax.codehaus.org/) @@ -719,6 +731,9 @@ EPL-1.0 The following software have components provided under the terms of this license: - Logback Classic Module (from ) +- Logback Contrib :: JSON :: Classic (from ) +- Logback Contrib :: JSON :: Core (from ) +- Logback Contrib :: Jackson (from ) - Logback Core Module (from ) - 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) @@ -825,11 +840,15 @@ The following software have components provided under the terms of this license: - Cobertura code coverage (from http://cobertura.sourceforge.net) - Commons Lang (from http://commons.apache.org/lang/) - Elastic JNA Distribution (from https://github.com/java-native-access/jna) +- Elastic JNA Distribution (from https://github.com/java-native-access/jna) - Java Native Access (from https://github.com/java-native-access/jna) - Java Native Access Platform (from https://github.com/java-native-access/jna) - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) - Logback Classic Module (from ) +- Logback Contrib :: JSON :: Classic (from ) +- Logback Contrib :: JSON :: Core (from ) +- Logback Contrib :: Jackson (from ) - Logback Core Module (from ) - 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) @@ -879,7 +898,6 @@ The following software have components provided under the terms of this license: - Lucene Core (from ) - Lucene Core (from ) - Lucene Sandbox (from ) -- Lucene Sandbox (from ) - 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) @@ -896,8 +914,8 @@ The following software have components provided under the terms of this license: - Microsoft Azure internal Avro module for Storage (from https://github.com/Azure/azure-sdk-for-java) - Mockito (from http://mockito.org) - Mockito (from http://mockito.org) -- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) +- Mockito (from http://www.mockito.org) - Netty/Codec/HTTP (from ) - Netty/Common (from ) - Plexus :: Default Container (from ) diff --git a/provider/indexer-gcp/README.md b/provider/indexer-gcp/README.md index b4b676171db6246e08ab4819d63580600dd7eb01..c40c11f423195ef35f0f093617f1dbcdcf0d3c75 100644 --- a/provider/indexer-gcp/README.md +++ b/provider/indexer-gcp/README.md @@ -35,7 +35,7 @@ In order to run the service locally or remotely, you will need to have the follo | `GOOGLE_AUDIENCES` | ex `*****.apps.googleusercontent.com` | Client ID for getting access to cloud resources | yes | https://console.cloud.google.com/apis/credentials | | `GOOGLE_APPLICATION_CREDENTIALS` | ex `/path/to/directory/service-key.json` | Service account credentials, you only need this if running locally | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | | `security.https.certificate.trust` | ex `false` | Elastic client connection uses TrustSelfSignedStrategy(), if it is 'true' | false | output of infrastructure deployment | -| `indexer.que.service.mail` | ex `default@iam.gserviceaccount.com` | IndexerQue environment service account mail, required if Indexer Que deployed in cloud task mode, to validate token from it | yes | - | +| `indexer.que.service.mail` | ex `default@iam.gserviceaccount.com` | Indexer Que environment service account mail, required if Indexer Que deployed in cloud task mode, to validate token from it | yes | - | ### Run Locally Check that maven is installed: @@ -154,7 +154,7 @@ You will need to have the following environment variables defined. | INTEGRATION_TESTER | NO_DATA_ACCESS_TESTER | | --- | --- | -| users<br/>service.entitlements.user<br/>service.search.user<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com | +| users<br/>service.entitlements.user<br/>service.search.user<br/>service.search.admin<br/>data.test1<br/>data.integration.test<br/>users@{tenant1}@{domain}.com | Execute following command to build code and run all the integration tests: @@ -199,9 +199,9 @@ Create king ring and key in the ***master project*** --purpose encryption ``` -Add **Cloud KMS CryptoKey Encrypter/Decrypter** role to the **App Engine default service account** of the master project through IAM - Role tab +Add **Cloud KMS CryptoKey Encrypter/Decrypter** role to the **App Engine default service account** of the ***master project*** through IAM - Role tab -Add "Cloud KMS Encrypt/Decrypt" role to the "App Engine default service account" of ***master project*** +Add **Cloud KMS Encrypt/Decrypt** role to the **App Engine default service account** of ***master project*** #### Memory Store (Redis Instance) Setup diff --git a/provider/indexer-gcp/pom.xml b/provider/indexer-gcp/pom.xml index bd7ee9b85f6dd24949f9ea4610d3d915bfe74bdd..a37a4df8947684574ceb67a8389f5b658fef23c7 100644 --- a/provider/indexer-gcp/pom.xml +++ b/provider/indexer-gcp/pom.xml @@ -25,7 +25,7 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>core-lib-gcp</artifactId> - <version>0.3.23</version> + <version>0.6.1-SNAPSHOT</version> </dependency> <dependency> @@ -148,7 +148,16 @@ <artifactId>proto-google-iam-v1</artifactId> <version>0.12.0</version> </dependency> - + <dependency> + <groupId>ch.qos.logback.contrib</groupId> + <artifactId>logback-json-classic</artifactId> + <version>0.1.5</version> + </dependency> + <dependency> + <groupId>ch.qos.logback.contrib</groupId> + <artifactId>logback-jackson</artifactId> + <version>0.1.5</version> + </dependency> </dependencies> <build> diff --git a/provider/indexer-gcp/src/main/resources/application.properties b/provider/indexer-gcp/src/main/resources/application.properties index b3d58b0c9b895a6ca38e8b29143edd258e7d8c8b..c2c74189250e40afae31e9f8c0174370a877c569 100644 --- a/provider/indexer-gcp/src/main/resources/application.properties +++ b/provider/indexer-gcp/src/main/resources/application.properties @@ -1,7 +1,7 @@ LOG_PREFIX=indexer server.servlet.contextPath=/api/indexer/v2 -logging.level.org.springframework.web=DEBUG +logging.level.org.springframework.web=${LOG_LEVEL:DEBUG} server.port=8080 JAVA_OPTS=-Xms3072m -Xmx3072m JAVA_GC_OPTS=-XX:+UseG1GC -XX:+UseStringDeduplication -XX:InitiatingHeapOccupancyPercent=45 diff --git a/provider/indexer-gcp/src/main/resources/logback.xml b/provider/indexer-gcp/src/main/resources/logback.xml new file mode 100644 index 0000000000000000000000000000000000000000..3d4fbc039ba4367897cba9a478d4ed44a2059b76 --- /dev/null +++ b/provider/indexer-gcp/src/main/resources/logback.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration> + <include resource="org/springframework/boot/logging/logback/defaults.xml"/> + <logger name="org.opengroup.osdu" level="DEBUG"/> + <springProfile name="local"> + <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%yellow([%thread]) %highlight(| %-5level |) %green(%d) %cyan(| %logger{15} |) %highlight(%msg) %n</pattern> + <charset>utf8</charset> + </encoder> + </appender> + <root level="info"> + <appender-ref ref="CONSOLE"/> + </root> + </springProfile> + + <springProfile name="!local"> + <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> + <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> + <layout class="ch.qos.logback.contrib.json.classic.JsonLayout"> + <timestampFormat>yyyy-MM-dd HH:mm:ss.SSS</timestampFormat> + <timestampFormatTimezoneId>Etc/UTC</timestampFormatTimezoneId> + <appendLineSeparator>true</appendLineSeparator> + + <jsonFormatter class="org.opengroup.osdu.core.gcp.logging.formatter.GoogleJsonFormatter"> + <prettyPrint>false</prettyPrint> + </jsonFormatter> + </layout> + </encoder> + </appender> + + <root level="info"> + <appender-ref ref="stdout"/> + </root> + </springProfile> + +</configuration>