diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..bacb052d60548b6b87af4147b65cbf1eef3d623f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +**/*.md +**/*.yml +**/*.yaml +**/Dockerfile* +.* diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..6313b56c57848efce05faa7aa7e901ccfc2886ea --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index af81fe6e274b30c856bb275c5aa90065266b38a2..31840c3b705b63c6c10fb2dd46c5710907f4f5f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,7 @@ include: file: "cloud-providers/azure.yml" - project: "osdu/platform/ci-cd-pipelines" - file: "cloud-providers/osdu-gcp-gke.yml" + file: "cloud-providers/osdu-gcp-global.yml" - project: "osdu/platform/ci-cd-pipelines" file: "cloud-providers/aws-global.yml" diff --git a/NOTICE b/NOTICE index 1c829190db3b5f815a31f4d3ca85c4df2842f971..98b4782bc1e6ab5c581f8ab14adbf80b5b4f54d5 100644 --- a/NOTICE +++ b/NOTICE @@ -3,6 +3,13 @@ Generated by fossa-cli (https://github.com/fossas/fossa-cli). Formatted by fossa-with-cache (https://community.opengroup.org/divido/fossa-with-cache). This software includes the following software and licenses: +======================================================================== +AML +======================================================================== +The following software have components provided under the terms of this license: + +- SnakeYAML (from http://code.google.com/p/snakeyaml/, http://www.snakeyaml.org, https://bitbucket.org/snakeyaml/snakeyaml) + ======================================================================== Android-Sdk ======================================================================== @@ -10,92 +17,266 @@ The following software have components provided under the terms of this license: - Android SDK (from https://www.android.com/) +======================================================================== +Apache-1.1 +======================================================================== +The following software have components provided under the terms of this license: + +- Apache Geronimo JMS Spec 2.0 (from http://geronimo.apache.org/maven/${siteId}/${version}) +- 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) +- AspectJ Weaver (from http://www.aspectj.org, https://www.eclipse.org/aspectj/) +- 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) +- Proton-J (from https://repo1.maven.org/maven2/org/apache/qpid/proton-j) +- QpidJMS Client (from https://repo1.maven.org/maven2/org/apache/qpid/qpid-jms-client) + ======================================================================== Apache-2.0 ======================================================================== 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 based accessors helper used by json-smart (from https://urielch.github.io/) +- AWS Java SDK for AWS Elemental MediaLive (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for AWS KMS (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for AWS Lambda (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for AWS STS (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for AWS Secrets Manager (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for Amazon CloudWatch Logs (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for Amazon Cognito Identity Provider Service (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for Amazon DynamoDB (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for Amazon S3 (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for Amazon SNS (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for Amazon SQS (from https://aws.amazon.com/sdkforjava) +- AWS Java SDK for the AWS Simple Systems Management (SSM) Service (from https://aws.amazon.com/sdkforjava) - AWS SDK for Java - BOM (from https://aws.amazon.com/sdkforjava) +- AWS SDK for Java - Core (from https://aws.amazon.com/sdkforjava) +- Adapter: RxJava (from https://github.com/square/retrofit) +- Animal Sniffer Annotations (from https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations) - Apache Commons Codec (from http://commons.apache.org/proper/commons-codec/, https://commons.apache.org/proper/commons-codec/) -- Apache Commons Collections (from http://commons.apache.org/proper/commons-collections/) +- Apache Commons Collections (from http://commons.apache.org/proper/commons-collections/, https://commons.apache.org/proper/commons-collections/) - Apache Commons IO (from http://commons.apache.org/io/, https://commons.apache.org/proper/commons-io/, https://repo1.maven.org/maven2/commons-io/commons-io) -- Apache Commons Lang (from http://commons.apache.org/proper/commons-lang/) +- Apache Commons Lang (from http://commons.apache.org/proper/commons-lang/, https://commons.apache.org/proper/commons-lang/) - Apache Commons Logging (from http://commons.apache.org/logging/, http://commons.apache.org/proper/commons-logging/) - Apache Geronimo JMS Spec 2.0 (from http://geronimo.apache.org/maven/${siteId}/${version}) +- Apache Groovy (from http://groovy-lang.org, http://groovy.codehaus.org/, https://groovy-lang.org) +- Apache HTTP transport v2 for the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-apache-v2) - 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, http://hc.apache.org/httpcomponents-core-ga/) -- AssertJ fluent assertions (from https://repo1.maven.org/maven2/org/assertj/assertj-core) +- 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 https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-to-slf4j) +- AssertJ fluent assertions (from ${project.parent.url}#${project.artifactId}, https://repo1.maven.org/maven2/org/assertj/assertj-core) +- Asynchronous Http Client (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client) +- Asynchronous Http Client Netty Utils (from https://repo1.maven.org/maven2/org/asynchttpclient/async-http-client-netty-utils) - AutoValue Annotations (from https://github.com/google/auto/tree/master/value, https://repo1.maven.org/maven2/com/google/auto/value/auto-value-annotations) +- BSON (from http://bsonspec.org, https://bsonspec.org) - Bean Validation API (from http://beanvalidation.org) - 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) - ClassMate (from http://github.com/cowtowncoder/java-classmate) +- Cloud Key Management Service (KMS) API v1-rev20220407-1.32.1 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-cloudkms) +- Cloud Storage JSON API v1-rev20220604-1.32.1 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-storage) +- Cloud Storage JSON API v1-rev20220608-1.32.1 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-storage) +- Converter: Jackson (from https://github.com/square/retrofit, https://repo1.maven.org/maven2/com/squareup/retrofit2/converter-jackson) +- Core functionality for the Reactor Netty library (from https://github.com/reactor/reactor-netty) - Expression Language 3.0 (from http://el-spec.java.net, http://uel.java.net, 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 Core (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core, https://github.com/googleapis/java-core) +- Google Cloud Core HTTP (from https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-core-http, https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-core-http, 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, https://github.com/googleapis/java-core) +- Google Cloud Datastore (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-datastore, https://github.com/googleapis/java-datastore) +- Google Cloud IAM Service Account Credentials (from https://github.com/googleapis/java-iamcredentials) +- Google Cloud Logging (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-logging, https://github.com/googleapis/java-logging) +- Google Cloud Pub/Sub (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-pubsub, https://github.com/googleapis/java-pubsub) +- Google Cloud Storage (from https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-storage, https://github.com/googleapis/java-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 http://code.google.com/p/google-gson/, https://repo1.maven.org/maven2/com/google/code/gson/gson) - Guava InternalFutureFailureAccess and InternalFutures (from https://repo1.maven.org/maven2/com/google/guava/failureaccess) +- Guava ListenableFuture only (from https://repo1.maven.org/maven2/com/google/guava/listenablefuture) - Guava: Google Core Libraries for Java (from http://code.google.com/p/guava-libraries, https://github.com/google/guava, https://repo1.maven.org/maven2/com/google/guava/guava) +- HTTP functionality for the Reactor Netty library (from https://github.com/reactor/reactor-netty) +- HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) +- Hibernate Validator (from https://repo1.maven.org/maven2/org/hibernate/hibernate-validator, https://repo1.maven.org/maven2/org/hibernate/validator/hibernate-validator) +- HikariCP (from https://github.com/brettwooldridge/HikariCP) +- Hop (from https://github.com/rabbitmq/hop, https://www.rabbitmq.com) +- 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) +- Identity and Access Management (IAM) API v2beta-rev20220421-1.32.1 (from https://repo1.maven.org/maven2/com/google/apis/google-api-services-iam) - J2ObjC Annotations (from https://github.com/google/j2objc/) +- JBoss Jakarta Annotations API (from https://github.com/jboss/jboss-jakarta-annotations-api_spec) +- JBoss Logging 3 (from http://www.jboss.org) +- JBoss Marshalling API (from https://repo1.maven.org/maven2/org/jboss/marshalling/jboss-marshalling) +- JBoss Marshalling River (from https://repo1.maven.org/maven2/org/jboss/marshalling/jboss-marshalling-river) - JBoss Threads (from https://repo1.maven.org/maven2/org/jboss/threads/jboss-threads) - JCIP Annotations under Apache License (from http://stephenc.github.com/jcip-annotations) +- JMES Path Query library (from https://aws.amazon.com/sdkforjava) - JSON Small and Fast Parser (from https://repo1.maven.org/maven2/net/minidev/json-smart, https://urielch.github.io/) +- JSON Web Token support for the JVM (from https://github.com/jwtk/jjwt) +- JSON in Java (from https://github.com/douglascrockford/JSON-java) - JSON library from Android SDK (from http://developer.android.com/sdk) - JSONassert (from http://github.com/skyscreamer/yoga, https://github.com/skyscreamer/JSONassert) - JSR107 API and SPI (from https://github.com/jsr107/jsr107spec) - Jackson (from http://jackson.codehaus.org) +- Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client-jackson2) - Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary) - Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310, https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310) +- Jackson datatype: Joda (from http://wiki.fasterxml.com/JacksonModuleJoda, https://github.com/FasterXML/jackson-datatype-joda) - 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 http://wiki.fasterxml.com/JacksonHome, https://github.com/FasterXML/jackson-modules-base) +- Jackson module: JAXB Annotations (from http://github.com/FasterXML/jackson-module-jaxb-annotations, http://wiki.fasterxml.com/JacksonJAXBAnnotations, https://github.com/FasterXML/jackson-modules-base) - Jackson-annotations (from http://github.com/FasterXML/jackson, http://wiki.fasterxml.com/JacksonHome) - Jackson-core (from http://wiki.fasterxml.com/JacksonHome, https://github.com/FasterXML/jackson-core) +- Jackson-dataformat-XML (from http://wiki.fasterxml.com/JacksonExtensionXmlDataBinding, https://github.com/FasterXML/jackson-dataformat-xml) - Jackson-dataformat-YAML (from http://wiki.fasterxml.com/JacksonExtensionYAML, https://github.com/FasterXML/jackson, https://github.com/FasterXML/jackson-dataformats-text) - 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) -- Jakarta Servlet (from http://servlet-spec.java.net, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta Servlet (from http://servlet-spec.java.net, https://javaee.github.io/servlet-spec/, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api, https://repo1.maven.org/maven2/org/jboss/spec/javax/xml/bind/jboss-jaxb-api_2.3_spec) +- Java Architecture for XML Binding (from http://jaxb.java.net/, https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api) - Java Native Access (from https://github.com/java-native-access/jna, https://github.com/twall/jna, https://repo1.maven.org/maven2/net/java/dev/jna/jna) - Java Native Access Platform (from https://github.com/java-native-access/jna) - Java Servlet 4.0 API - Java UUID Generator (from http://wiki.fasterxml.com/JugHome) +- JavaBeans Activation Framework (from https://repo1.maven.org/maven2/com/sun/activation/javax.activation) - Javassist (from http://www.javassist.org/) - JetBrains Java Annotations (from https://github.com/JetBrains/java-annotations) - Joda-Time (from http://joda-time.sourceforge.net, http://www.joda.org/joda-time/, https://www.joda.org/joda-time/) +- 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) - Kotlin Stdlib (from https://kotlinlang.org/, https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib) - Kotlin Stdlib Common (from https://kotlinlang.org/) +- LatencyUtils (from http://latencyutils.github.io/LatencyUtils/) - Lucene Core (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-core) +- MapStruct Core (from http://mapstruct.org/mapstruct/, https://repo1.maven.org/maven2/org/mapstruct/mapstruct) - 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) +- 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) +- Microsoft Azure Java Core Library (from https://github.com/Azure/azure-sdk-for-java) +- 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, https://github.com/mockito/mockito) +- Mockito (from http://mockito.org, http://www.mockito.org, https://github.com/mockito/mockito) +- MongoDB Driver (from https://www.mongodb.com/) +- MongoDB Java Driver (from http://mongodb.org/, http://www.mongodb.org, https://www.mongodb.com/) - Netty Reactive Streams Implementation (from https://repo1.maven.org/maven2/com/typesafe/netty/netty-reactive-streams) - Netty/Buffer (from https://repo1.maven.org/maven2/io/netty/netty-buffer) - Netty/Codec (from https://repo1.maven.org/maven2/io/netty/netty-codec) +- Netty/Codec/DNS (from https://repo1.maven.org/maven2/io/netty/netty-codec-dns) - Netty/Codec/HTTP (from https://repo1.maven.org/maven2/io/netty/netty-codec-http) - Netty/Codec/HTTP2 (from https://repo1.maven.org/maven2/io/netty/netty-codec-http2) +- Netty/Codec/Socks (from https://repo1.maven.org/maven2/io/netty/netty-codec-socks) - Netty/Common (from https://repo1.maven.org/maven2/io/netty/netty-common) - Netty/Handler (from https://repo1.maven.org/maven2/io/netty/netty-handler) +- Netty/Handler/Proxy (from https://repo1.maven.org/maven2/io/netty/netty-handler-proxy) - Netty/Resolver (from https://repo1.maven.org/maven2/io/netty/netty-resolver) +- Netty/Resolver/DNS (from https://repo1.maven.org/maven2/io/netty/netty-resolver-dns) +- Netty/Resolver/DNS/Classes/MacOS (from https://repo1.maven.org/maven2/io/netty/netty-resolver-dns-classes-macos) +- Netty/TomcatNative [BoringSSL - Static] (from https://github.com/netty/netty-tcnative/netty-tcnative-boringssl-static/) - Netty/Transport (from https://repo1.maven.org/maven2/io/netty/netty-transport) +- Netty/Transport/Classes/Epoll (from https://repo1.maven.org/maven2/io/netty/netty-transport-classes-epoll) +- Netty/Transport/Classes/KQueue (from https://repo1.maven.org/maven2/io/netty/netty-transport-classes-kqueue) - Netty/Transport/Native/Unix/Common (from https://repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common) - Nimbus Content Type (from https://bitbucket.org/connect2id/nimbus-content-type) +- Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt, https://bitbucket.org/nimbusds/nimbus-jose-jwt) - Nimbus LangTag (from https://bitbucket.org/connect2id/nimbus-language-tags) - Non-Blocking Reactive Foundation for the JVM (from https://github.com/reactor/reactor, https://github.com/reactor/reactor-core) -- Objenesis (from http://objenesis.org) +- 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, https://repo1.maven.org/maven2/org/objenesis/objenesis) - OkHttp (from https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp, https://square.github.io/okhttp/) +- OkHttp Logging Interceptor (from https://github.com/square/okhttp, https://repo1.maven.org/maven2/com/squareup/okhttp3/logging-interceptor, https://square.github.io/okhttp/) +- OkHttp URLConnection (from https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp-urlconnection, https://square.github.io/okhttp/) - Okio (from https://github.com/square/okio/, https://repo1.maven.org/maven2/com/squareup/okio/okio) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) +- PWDB :: Database (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/database) - PostgreSQL JDBC Driver - PowerMock (from http://www.powermock.org, https://repo1.maven.org/maven2/org/powermock/powermock-api-mockito) - Prometheus Java Simpleclient (from https://repo1.maven.org/maven2/io/prometheus/simpleclient) +- Prometheus Java Simpleclient Common (from https://repo1.maven.org/maven2/io/prometheus/simpleclient_common) - 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 https://repo1.maven.org/maven2/org/apache/qpid/qpid-jms-client) - RabbitMQ Java Client (from http://www.rabbitmq.com, https://www.rabbitmq.com) +- Reactive Streams Netty driver (from https://github.com/reactor/reactor-netty) +- Redisson (from http://redisson.org) +- Retrofit (from https://github.com/square/retrofit, https://repo1.maven.org/maven2/com/squareup/retrofit2/retrofit) - RxJava (from https://github.com/ReactiveX/RxJava) -- SnakeYAML (from http://code.google.com/p/snakeyaml/, http://www.snakeyaml.org) +- Simple XML (safe) (from https://github.com/dweiss/simplexml) +- SnakeYAML (from http://code.google.com/p/snakeyaml/, http://www.snakeyaml.org, https://bitbucket.org/snakeyaml/snakeyaml) +- Spring AMQP Core (from https://github.com/spring-projects/spring-amqp, https://projects.spring.io/spring-amqp) +- Spring AOP (from http://www.springframework.org, https://github.com/spring-projects/spring-framework, https://repo1.maven.org/maven2/org/springframework/spring-aop) +- Spring Beans (from http://www.springframework.org, https://github.com/SpringSource/spring-framework, https://github.com/spring-projects/spring-framework, https://repo1.maven.org/maven2/org/springframework/spring-beans) +- Spring Boot (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot, https://spring.io/projects/spring-boot) +- Spring Boot AMPQ Starter (from http://projects.spring.io/spring-boot/, https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-amqp, https://spring.io/projects/spring-boot) +- Spring Boot AOP Starter (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot Actuator (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot Actuator AutoConfigure (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-actuator-autoconfigure, https://spring.io/projects/spring-boot) +- Spring Boot Actuator Starter (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) - Spring Boot AutoConfigure (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-autoconfigure, https://spring.io/projects/spring-boot) +- Spring Boot Dependencies (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot JDBC Starter (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot Json Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-json, https://spring.io/projects/spring-boot) +- Spring Boot Log4j 2 Starter (from http://projects.spring.io/spring-boot/, https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-log4j2, https://spring.io/projects/spring-boot) +- Spring Boot Logging Starter (from http://projects.spring.io/spring-boot/, https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-logging, https://spring.io/projects/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, https://spring.io/projects/spring-boot) +- Spring Boot Security Starter (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot Starter (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot Test (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot Test Auto-Configure (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot Test Starter (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot Tomcat Starter (from http://projects.spring.io/spring-boot/, https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-tomcat, https://spring.io/projects/spring-boot) +- Spring Boot Validation Starter (from http://projects.spring.io/spring-boot/, https://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot Web Starter (from http://projects.spring.io/spring-boot/, https://spring.io/projects/spring-boot) +- Spring Boot WebFlux Starter (from https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter-webflux, https://spring.io/projects/spring-boot) +- Spring Commons Logging Bridge (from https://github.com/spring-projects/spring-framework) +- Spring Context (from http://www.springframework.org, https://github.com/spring-projects/spring-framework, https://repo1.maven.org/maven2/org/springframework/spring-context) +- Spring Core (from http://www.springframework.org, https://github.com/spring-projects/spring-framework, https://repo1.maven.org/maven2/org/springframework/spring-core) +- Spring Data Core (from https://repo1.maven.org/maven2/org/springframework/data/spring-data-commons) +- Spring Data MongoDB - Core (from https://repo1.maven.org/maven2/org/springframework/data/spring-data-mongodb) +- Spring Expression Language (SpEL) (from https://github.com/SpringSource/spring-framework, https://github.com/spring-projects/spring-framework, https://repo1.maven.org/maven2/org/springframework/spring-expression) +- Spring JDBC (from https://github.com/SpringSource/spring-framework, https://github.com/spring-projects/spring-framework, https://repo1.maven.org/maven2/org/springframework/spring-jdbc) +- Spring JMS (from http://www.springframework.org, https://github.com/SpringSource/spring-framework, https://github.com/spring-projects/spring-framework, https://repo1.maven.org/maven2/org/springframework/spring-jms) +- Spring Messaging (from https://github.com/spring-projects/spring-framework) +- Spring Plugin - Metadata Extension (from https://repo1.maven.org/maven2/org/springframework/plugin/spring-plugin-metadata) - Spring Plugin Core (from https://repo1.maven.org/maven2/org/springframework/plugin/spring-plugin-core) +- Spring RabbitMQ Support (from https://github.com/spring-projects/spring-amqp, https://projects.spring.io/spring-amqp) +- Spring Retry (from https://www.springsource.org) +- Spring Security - Core (from http://spring.io/spring-security, https://repo1.maven.org/maven2/org/springframework/security/spring-security-core, https://spring.io/projects/spring-security, https://spring.io/spring-security) +- Spring Security - Namespace Configuration Module (from http://spring.io/spring-security, https://repo1.maven.org/maven2/org/springframework/security/spring-security-config, https://spring.io/projects/spring-security, https://spring.io/spring-security) +- Spring Security - Web Application Security Module (from http://spring.io/spring-security, https://repo1.maven.org/maven2/org/springframework/security/spring-security-web, https://spring.io/projects/spring-security, https://spring.io/spring-security) +- Spring TestContext Framework (from https://github.com/SpringSource/spring-framework, https://github.com/spring-projects/spring-framework) +- Spring Transaction (from https://github.com/SpringSource/spring-framework, https://github.com/spring-projects/spring-framework) +- Spring Web (from http://www.springframework.org, https://github.com/spring-projects/spring-framework, https://repo1.maven.org/maven2/org/springframework/spring-web) +- Spring Web MVC (from https://github.com/spring-projects/spring-framework, https://repo1.maven.org/maven2/org/springframework/spring-webmvc) +- Spring WebFlux (from https://github.com/spring-projects/spring-framework) +- Undertow Core (from https://repo1.maven.org/maven2/io/undertow/undertow-core) +- Undertow Servlet (from https://repo1.maven.org/maven2/io/undertow/undertow-servlet) +- Undertow WebSockets JSR356 implementations (from https://repo1.maven.org/maven2/io/undertow/undertow-websockets-jsr) +- Vavr (from http://vavr.io, https://www.vavr.io) +- Vavr Match (from http://vavr.io) - WildFly Client Configuration (from https://repo1.maven.org/maven2/org/wildfly/client/wildfly-client-config) - Woodstox (from https://github.com/FasterXML/woodstox) - XNIO API (from http://www.jboss.org/xnio) @@ -104,24 +285,71 @@ The following software have components provided under the terms of this license: - Zipkin Reporter: Core (from https://repo1.maven.org/maven2/io/zipkin/reporter2/zipkin-reporter) - Zipkin v2 (from https://repo1.maven.org/maven2/io/zipkin/zipkin2/zipkin) - aalto-xml (from https://github.com/FasterXML/aalto-xml, https://repo1.maven.org/maven2/com/fasterxml/aalto-xml) +- datastore-v1-proto-client (from https://repo1.maven.org/maven2/com/google/cloud/datastore/datastore-v1-proto-client) +- documentdb-bulkexecutor (from http://azure.microsoft.com/en-us/services/documentdb/) - error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations) - grpc-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis, 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) - io.grpc:grpc-context (from https://github.com/grpc/grpc-java) +- io.grpc:grpc-core (from https://github.com/grpc/grpc-java) +- io.grpc:grpc-grpclb (from https://github.com/grpc/grpc-java) +- io.grpc:grpc-netty-shaded (from https://github.com/grpc/grpc-java) +- io.grpc:grpc-protobuf (from https://github.com/grpc/grpc-java) +- 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/amzn/ion-java/, https://github.com/amznlabs/ion-java/) - jackson-databind (from http://github.com/FasterXML/jackson, http://wiki.fasterxml.com/JacksonHome) +- java-cloudant (from https://cloudant.com) +- javatuples (from http://www.javatuples.org) +- javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250) - javax.inject (from http://code.google.com/p/atinject/, https://repo1.maven.org/maven2/org/glassfish/hk2/external/javax.inject) +- jose4j (from https://bitbucket.org/b_c/jose4j/) - json-path (from http://code.google.com/p/json-path/, https://github.com/jayway/JsonPath) +- lettuce (from http://github.com/mp911de/lettuce/wiki, https://github.com/lettuce-io/lettuce-core/wiki) +- micrometer-core (from https://github.com/micrometer-metrics/micrometer) +- micrometer-registry-azure-monitor (from https://github.com/micrometer-metrics/micrometer) +- micrometer-registry-prometheus (from https://github.com/micrometer-metrics/micrometer) +- minio (from https://github.com/minio/minio-java) - 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/, https://www.xmlunit.org/) +- perfmark:perfmark-api (from https://github.com/perfmark/perfmark) - powermock-api-mockito2 (from https://repo1.maven.org/maven2/org/powermock/powermock-api-mockito2) - powermock-api-support (from https://repo1.maven.org/maven2/org/powermock/powermock-api-support) - powermock-module-junit4 (from http://www.powermock.org) - powermock-module-junit4-common (from https://repo1.maven.org/maven2/org/powermock/powermock-module-junit4-common) - powermock-reflect (from https://repo1.maven.org/maven2/org/powermock/powermock-reflect) +- proto-google-cloud-datastore-v1 (from https://github.com/googleapis/googleapis, https://github.com/googleapis/java-datastore/proto-google-cloud-datastore-v1) +- proto-google-cloud-iamcredentials-v1 (from https://github.com/googleapis/java-iamcredentials/proto-google-cloud-iamcredentials-v1, https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-iamcredentials-v1) +- proto-google-cloud-logging-v2 (from https://github.com/googleapis/java-logging/proto-google-cloud-logging-v2, https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-logging-v2) +- proto-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis, https://github.com/googleapis/java-pubsub/proto-google-cloud-pubsub-v1) - proto-google-common-protos (from https://github.com/googleapis/api-client-staging, https://github.com/googleapis/googleapis, https://github.com/googleapis/java-iam/proto-google-common-protos) +- proto-google-iam-v1 (from https://github.com/googleapis/googleapis, https://github.com/googleapis/java-iam/proto-google-iam-v1) +- resilience4j (from https://github.com/resilience4j/resilience4j, https://resilience4j.readme.io, ttps://resilience4j.readme.io) +- spring-boot-starter-undertow (from https://spring.io/projects/spring-boot) +- springfox-bean-validators (from https://github.com/springfox/springfox) +- springfox-boot-starter (from https://github.com/springfox/springfox) +- springfox-core (from https://github.com/springfox/springfox) +- springfox-data-rest (from https://github.com/springfox/springfox) +- springfox-oas (from https://github.com/springfox/springfox) +- springfox-schema (from https://github.com/springfox/springfox) +- springfox-spi (from https://github.com/springfox/springfox) +- springfox-spring-web (from https://github.com/springfox/springfox) +- springfox-spring-webflux (from https://github.com/springfox/springfox) +- springfox-spring-webmvc (from https://github.com/springfox/springfox) +- springfox-swagger-common (from https://github.com/springfox/springfox) +- springfox-swagger-ui (from https://github.com/springfox/springfox) +- springfox-swagger2 (from https://github.com/springfox/springfox) +- swagger-annotations (from https://repo1.maven.org/maven2/io/swagger/core/v3/swagger-annotations, https://repo1.maven.org/maven2/io/swagger/swagger-annotations) +- swagger-core (from https://repo1.maven.org/maven2/io/swagger/swagger-core) +- swagger-jaxrs (from https://repo1.maven.org/maven2/io/swagger/swagger-jaxrs) +- swagger-models (from https://repo1.maven.org/maven2/io/swagger/core/v3/swagger-models) - tomcat-embed-core (from http://tomcat.apache.org/) +- tomcat-embed-el (from http://tomcat.apache.org/, https://tomcat.apache.org/) +- tomcat-embed-websocket (from http://tomcat.apache.org/, https://tomcat.apache.org/) - wildfly-common (from https://repo1.maven.org/maven2/org/wildfly/common/wildfly-common) ======================================================================== @@ -129,9 +357,14 @@ BSD-2-Clause ======================================================================== The following software have components provided under the terms of this license: +- API Common (from https://github.com/googleapis, https://github.com/googleapis/api-common-java) +- GAX (Google Api eXtensions) (from https://github.com/googleapis, https://github.com/googleapis/gax-java) - Hamcrest (from http://hamcrest.org/JavaHamcrest/) -- Hamcrest Core (from http://hamcrest.org/, https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core) +- Hamcrest Core (from http://hamcrest.org/, http://hamcrest.org/JavaHamcrest/, https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core) +- Hamcrest Library (from http://hamcrest.org/JavaHamcrest/) - HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) +- Jodd BeanUtil (from http://jodd.org) +- Jodd Core (from http://jodd.org) - PostgreSQL JDBC Driver - Reflections (from http://code.google.com/p/reflections/, http://github.com/ronmamo/reflections) - Stax2 API (from http://github.com/FasterXML/stax2-api) @@ -142,32 +375,88 @@ BSD-3-Clause ======================================================================== The following software have components provided under the terms of this license: +- API Common (from https://github.com/googleapis, https://github.com/googleapis/api-common-java) - ASM Core (from http://asm.ow2.io/, http://asm.ow2.org/) - Apache Commons Codec (from http://commons.apache.org/proper/commons-codec/, https://commons.apache.org/proper/commons-codec/) +- AspectJ Weaver (from http://www.aspectj.org, https://www.eclipse.org/aspectj/) +- Expression Language 3.0 (from http://el-spec.java.net, http://uel.java.net, https://projects.eclipse.org/projects/ee4j.el) +- GAX (Google Api eXtensions) (from https://github.com/googleapis, 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) +- Google Auth Library for Java - Credentials (from https://repo1.maven.org/maven2/com/google/auth/google-auth-library-credentials) +- Google Auth Library for Java - OAuth2 HTTP (from https://repo1.maven.org/maven2/com/google/auth/google-auth-library-oauth2-http) - Hamcrest (from http://hamcrest.org/JavaHamcrest/) -- Hamcrest Core (from http://hamcrest.org/, https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core) +- Hamcrest Core (from http://hamcrest.org/, http://hamcrest.org/JavaHamcrest/, https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core) - HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) +- JBoss Jakarta Annotations API (from https://github.com/jboss/jboss-jakarta-annotations-api_spec) +- Jackson module: Afterburner (from http://wiki.fasterxml.com/JacksonHome, https://github.com/FasterXML/jackson-modules-base) - Jakarta Activation API (from https://github.com/eclipse-ee4j/jaf, https://repo1.maven.org/maven2/jakarta/activation/jakarta.activation-api) +- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca) +- Jakarta WebSocket - Server API (from https://projects.eclipse.org/projects/ee4j.websocket) - Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api, https://repo1.maven.org/maven2/org/jboss/spec/javax/xml/bind/jboss-jaxb-api_2.3_spec) - 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) +- 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) +- Mockito (from http://mockito.org, http://www.mockito.org, https://github.com/mockito/mockito) - Netty/Codec/HTTP (from https://repo1.maven.org/maven2/io/netty/netty-codec-http) - PostgreSQL JDBC Driver +- Protocol Buffer Java API (from http://code.google.com/p/protobuf, 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) +- Redisson (from http://redisson.org) - Reflections (from http://code.google.com/p/reflections/, http://github.com/ronmamo/reflections) -- SnakeYAML (from http://code.google.com/p/snakeyaml/, http://www.snakeyaml.org) +- SnakeYAML (from http://code.google.com/p/snakeyaml/, http://www.snakeyaml.org, https://bitbucket.org/snakeyaml/snakeyaml) +- Spring Core (from http://www.springframework.org, https://github.com/spring-projects/spring-framework, https://repo1.maven.org/maven2/org/springframework/spring-core) - ThreeTen backport (from https://github.com/ThreeTen/threetenbp, https://www.threeten.org/threetenbp) +======================================================================== +Beerware +======================================================================== +The following software have components provided under the terms of this license: + +- 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) + +======================================================================== +BouncyCastle +======================================================================== +The following software have components provided under the terms of this license: + +- Bouncy Castle Provider (from http://www.bouncycastle.org/java.html, https://www.bouncycastle.org/java.html) + ======================================================================== CC-BY-2.5 ======================================================================== The following software have components provided under the terms of this license: - FindBugs-jsr305 (from http://findbugs.sourceforge.net/) +- MongoDB Java Driver (from http://mongodb.org/, http://www.mongodb.org, https://www.mongodb.com/) + +======================================================================== +CC-BY-4.0 +======================================================================== +The following software have components provided under the terms of this license: + +- 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) ======================================================================== CC0-1.0 ======================================================================== The following software have components provided under the terms of this license: +- Guava: Google Core Libraries for Java (from http://code.google.com/p/guava-libraries, https://github.com/google/guava, https://repo1.maven.org/maven2/com/google/guava/guava) +- HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/) +- Hibernate Validator (from https://repo1.maven.org/maven2/org/hibernate/hibernate-validator, https://repo1.maven.org/maven2/org/hibernate/validator/hibernate-validator) +- LatencyUtils (from http://latencyutils.github.io/LatencyUtils/) +- MongoDB Java Driver (from http://mongodb.org/, http://www.mongodb.org, https://www.mongodb.com/) +- Netty/Common (from https://repo1.maven.org/maven2/io/netty/netty-common) +- Prometheus Java Simpleclient (from https://repo1.maven.org/maven2/io/prometheus/simpleclient) +- Undertow Core (from https://repo1.maven.org/maven2/io/undertow/undertow-core) - reactive-streams (from http://www.reactive-streams.org/) ======================================================================== @@ -175,7 +464,14 @@ CDDL-1.0 ======================================================================== The following software have components provided under the terms of this license: +- Apache Log4j Core (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core) +- Expression Language 3.0 (from http://el-spec.java.net, http://uel.java.net, https://projects.eclipse.org/projects/ee4j.el) - Jakarta Activation API (from https://github.com/eclipse-ee4j/jaf, https://repo1.maven.org/maven2/jakarta/activation/jakarta.activation-api) +- Jakarta Servlet (from http://servlet-spec.java.net, https://javaee.github.io/servlet-spec/, https://projects.eclipse.org/projects/ee4j.servlet) +- Java Architecture for XML Binding (from http://jaxb.java.net/, https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api) +- JavaBeans Activation Framework (from https://repo1.maven.org/maven2/com/sun/activation/javax.activation) +- JavaBeans(TM) Activation Framework (from http://java.sun.com/javase/technologies/desktop/javabeans/jaf/index.jsp) +- javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250) ======================================================================== CDDL-1.1 @@ -184,10 +480,11 @@ The following software have components provided under the terms of this license: - Common Annotations 1.2 API - Expression Language 3.0 (from http://el-spec.java.net, http://uel.java.net, https://projects.eclipse.org/projects/ee4j.el) -- Jakarta Servlet (from http://servlet-spec.java.net, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta Servlet (from http://servlet-spec.java.net, https://javaee.github.io/servlet-spec/, https://projects.eclipse.org/projects/ee4j.servlet) - Java Architecture for XML Binding (from http://jaxb.java.net/, https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api) - Java Servlet 4.0 API -- JavaBeans Activation Framework +- Java(TM) API for WebSocket (from https://repo1.maven.org/maven2/org/jboss/spec/javax/websocket/jboss-websocket-api_1.1_spec) +- JavaBeans Activation Framework (from https://repo1.maven.org/maven2/com/sun/activation/javax.activation) - JavaBeans(TM) Activation Framework (from http://java.sun.com/javase/technologies/desktop/javabeans/jaf/index.jsp) - JavaMail API (from https://repo1.maven.org/maven2/com/sun/mail/javax.mail) - javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250) @@ -205,6 +502,7 @@ EPL-1.0 ======================================================================== The following software have components provided under the terms of this license: +- AspectJ Weaver (from http://www.aspectj.org, https://www.eclipse.org/aspectj/) - Expression Language 3.0 (from http://el-spec.java.net, http://uel.java.net, https://projects.eclipse.org/projects/ee4j.el) - JBoss Jakarta Annotations API (from https://github.com/jboss/jboss-jakarta-annotations-api_spec) - JUnit Jupiter (Aggregator) (from https://junit.org/junit5/) @@ -213,8 +511,12 @@ The following software have components provided under the terms of this license: - JUnit Jupiter Params (from http://junit.org/junit5/, https://junit.org/junit5/) - JUnit Platform Commons (from http://junit.org/junit5/, https://junit.org/junit5/) - JUnit Platform Engine API (from http://junit.org/junit5/, https://junit.org/junit5/) +- Jakarta Activation API (from https://github.com/eclipse-ee4j/jaf, https://repo1.maven.org/maven2/jakarta/activation/jakarta.activation-api) - Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca) -- Jakarta Servlet (from http://servlet-spec.java.net, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta Bean Validation API (from https://beanvalidation.org) +- Jakarta Servlet (from http://servlet-spec.java.net, https://javaee.github.io/servlet-spec/, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta WebSocket - Server API (from https://projects.eclipse.org/projects/ee4j.websocket) +- Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api, https://repo1.maven.org/maven2/org/jboss/spec/javax/xml/bind/jboss-jaxb-api_2.3_spec) - Java Servlet 4.0 API - Java(TM) API for WebSocket (from https://repo1.maven.org/maven2/org/jboss/spec/javax/websocket/jboss-websocket-api_1.1_spec) - Logback Classic Module (from http://logback.qos.ch, https://repo1.maven.org/maven2/ch/qos/logback/logback-classic) @@ -222,13 +524,17 @@ The following software have components provided under the terms of this license: - Logback Contrib :: JSON :: Core (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-json-core) - Logback Contrib :: Jackson (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-jackson) - Logback Core Module (from http://logback.qos.ch, https://repo1.maven.org/maven2/ch/qos/logback/logback-core) -- SnakeYAML (from http://code.google.com/p/snakeyaml/, http://www.snakeyaml.org) +- 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/, http://www.snakeyaml.org, https://bitbucket.org/snakeyaml/snakeyaml) ======================================================================== EPL-2.0 ======================================================================== The following software have components provided under the terms of this license: +- AspectJ Weaver (from http://www.aspectj.org, https://www.eclipse.org/aspectj/) - Expression Language 3.0 (from http://el-spec.java.net, http://uel.java.net, https://projects.eclipse.org/projects/ee4j.el) - JBoss Jakarta Annotations API (from https://github.com/jboss/jboss-jakarta-annotations-api_spec) - JUnit Jupiter (Aggregator) (from https://junit.org/junit5/) @@ -237,8 +543,12 @@ The following software have components provided under the terms of this license: - JUnit Jupiter Params (from http://junit.org/junit5/, https://junit.org/junit5/) - JUnit Platform Commons (from http://junit.org/junit5/, https://junit.org/junit5/) - JUnit Platform Engine API (from http://junit.org/junit5/, https://junit.org/junit5/) +- Jakarta Activation API (from https://github.com/eclipse-ee4j/jaf, https://repo1.maven.org/maven2/jakarta/activation/jakarta.activation-api) - Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca) -- Jakarta Servlet (from http://servlet-spec.java.net, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta Bean Validation API (from https://beanvalidation.org) +- Jakarta Servlet (from http://servlet-spec.java.net, https://javaee.github.io/servlet-spec/, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta WebSocket - Server API (from https://projects.eclipse.org/projects/ee4j.websocket) +- Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api, https://repo1.maven.org/maven2/org/jboss/spec/javax/xml/bind/jboss-jaxb-api_2.3_spec) - Java Servlet 4.0 API - Java(TM) API for WebSocket (from https://repo1.maven.org/maven2/org/jboss/spec/javax/websocket/jboss-websocket-api_1.1_spec) @@ -248,10 +558,14 @@ GPL-2.0-only The following software have components provided under the terms of this license: - Expression Language 3.0 (from http://el-spec.java.net, http://uel.java.net, https://projects.eclipse.org/projects/ee4j.el) -- Jakarta Servlet (from http://servlet-spec.java.net, https://projects.eclipse.org/projects/ee4j.servlet) +- JBoss Jakarta Annotations API (from https://github.com/jboss/jboss-jakarta-annotations-api_spec) +- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca) +- Jakarta Servlet (from http://servlet-spec.java.net, https://javaee.github.io/servlet-spec/, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta WebSocket - Server API (from https://projects.eclipse.org/projects/ee4j.websocket) - Java Architecture for XML Binding (from http://jaxb.java.net/, https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api) - Java Servlet 4.0 API -- JavaBeans Activation Framework +- Java(TM) API for WebSocket (from https://repo1.maven.org/maven2/org/jboss/spec/javax/websocket/jboss-websocket-api_1.1_spec) +- JavaBeans Activation Framework (from https://repo1.maven.org/maven2/com/sun/activation/javax.activation) - RabbitMQ Java Client (from http://www.rabbitmq.com, https://www.rabbitmq.com) - javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250) - tomcat-embed-core (from http://tomcat.apache.org/) @@ -261,7 +575,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/, http://www.snakeyaml.org) +- SnakeYAML (from http://code.google.com/p/snakeyaml/, http://www.snakeyaml.org, https://bitbucket.org/snakeyaml/snakeyaml) ======================================================================== GPL-2.0-with-classpath-exception @@ -271,12 +585,16 @@ The following software have components provided under the terms of this license: - Checker Qual (from https://checkerframework.org) - Expression Language 3.0 (from http://el-spec.java.net, http://uel.java.net, https://projects.eclipse.org/projects/ee4j.el) - JBoss Jakarta Annotations API (from https://github.com/jboss/jboss-jakarta-annotations-api_spec) +- Jakarta Activation API (from https://github.com/eclipse-ee4j/jaf, https://repo1.maven.org/maven2/jakarta/activation/jakarta.activation-api) - Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca) -- Jakarta Servlet (from http://servlet-spec.java.net, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta Bean Validation API (from https://beanvalidation.org) +- Jakarta Servlet (from http://servlet-spec.java.net, https://javaee.github.io/servlet-spec/, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta WebSocket - Server API (from https://projects.eclipse.org/projects/ee4j.websocket) +- Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api, https://repo1.maven.org/maven2/org/jboss/spec/javax/xml/bind/jboss-jaxb-api_2.3_spec) - Java Architecture for XML Binding (from http://jaxb.java.net/, https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api) - Java Servlet 4.0 API - Java(TM) API for WebSocket (from https://repo1.maven.org/maven2/org/jboss/spec/javax/websocket/jboss-websocket-api_1.1_spec) -- JavaBeans Activation Framework +- JavaBeans Activation Framework (from https://repo1.maven.org/maven2/com/sun/activation/javax.activation) - RabbitMQ Java Client (from http://www.rabbitmq.com, https://www.rabbitmq.com) - javax.annotation-api (from http://jcp.org/en/jsr/detail?id=250) - tomcat-embed-core (from http://tomcat.apache.org/) @@ -289,9 +607,32 @@ The following software have components provided under the terms of this license: - Expression Language 3.0 (from http://el-spec.java.net, http://uel.java.net, https://projects.eclipse.org/projects/ee4j.el) - JBoss Jakarta Annotations API (from https://github.com/jboss/jboss-jakarta-annotations-api_spec) - Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca) -- Jakarta Servlet (from http://servlet-spec.java.net, https://projects.eclipse.org/projects/ee4j.servlet) +- Jakarta Servlet (from http://servlet-spec.java.net, https://javaee.github.io/servlet-spec/, https://projects.eclipse.org/projects/ee4j.servlet) +- Java Architecture for XML Binding (from http://jaxb.java.net/, https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api) - Java Servlet 4.0 API +======================================================================== +ISC +======================================================================== +The following software have components provided under the terms of this license: + +- Java Native Access Platform (from https://github.com/java-native-access/jna) +- Spring Security - Core (from http://spring.io/spring-security, https://repo1.maven.org/maven2/org/springframework/security/spring-security-core, https://spring.io/projects/spring-security, https://spring.io/spring-security) + +======================================================================== +ImageMagick +======================================================================== +The following software have components provided under the terms of this license: + +- aalto-xml (from https://github.com/FasterXML/aalto-xml, https://repo1.maven.org/maven2/com/fasterxml/aalto-xml) + +======================================================================== +Info-ZIP +======================================================================== +The following software have components provided under the terms of this license: + +- ClassGraph (from https://github.com/classgraph/classgraph) + ======================================================================== JSON ======================================================================== @@ -312,6 +653,9 @@ The following software have components provided under the terms of this license: - Logback Contrib :: JSON :: Core (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-json-core) - Logback Contrib :: Jackson (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-jackson) - Logback Core Module (from http://logback.qos.ch, https://repo1.maven.org/maven2/ch/qos/logback/logback-core) +- 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) ======================================================================== LGPL-2.1-or-later @@ -319,14 +663,18 @@ LGPL-2.1-or-later The following software have components provided under the terms of this license: - JBoss Threads (from https://repo1.maven.org/maven2/org/jboss/threads/jboss-threads) +- Java Native Access (from https://github.com/java-native-access/jna, https://github.com/twall/jna, https://repo1.maven.org/maven2/net/java/dev/jna/jna) +- Java Native Access Platform (from https://github.com/java-native-access/jna) - Javassist (from http://www.javassist.org/) -- SnakeYAML (from http://code.google.com/p/snakeyaml/, http://www.snakeyaml.org) +- SnakeYAML (from http://code.google.com/p/snakeyaml/, http://www.snakeyaml.org, https://bitbucket.org/snakeyaml/snakeyaml) ======================================================================== LGPL-3.0-only ======================================================================== The following software have components provided under the terms of this license: +- Logback Classic Module (from http://logback.qos.ch, https://repo1.maven.org/maven2/ch/qos/logback/logback-classic) +- Logback Core Module (from http://logback.qos.ch, https://repo1.maven.org/maven2/ch/qos/logback/logback-core) - RabbitMQ Java Client (from http://www.rabbitmq.com, https://www.rabbitmq.com) ======================================================================== @@ -334,17 +682,61 @@ MIT ======================================================================== The following software have components provided under the terms of this license: +- AWS Java SDK for AWS Lambda (from https://aws.amazon.com/sdkforjava) - Animal Sniffer Annotations (from https://repo1.maven.org/maven2/org/codehaus/mojo/animal-sniffer-annotations) +- Apache HttpClient Cache (from http://hc.apache.org/httpcomponents-client) +- 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 SLF4J Binding (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-slf4j-impl) +- Apache Log4j to SLF4J Adapter (from https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-to-slf4j) +- Azure Java Client Authentication Library for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) +- Azure Java Client Runtime for ARM (from https://github.com/Azure/autorest-clientruntime-for-java) +- Azure Java Client Runtime for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) +- Azure Spring Boot AutoConfigure (from https://github.com/Azure/azure-sdk-for-java, https://github.com/Microsoft/azure-spring-boot) - Bouncy Castle Provider (from http://www.bouncycastle.org/java.html, https://www.bouncycastle.org/java.html) - Checker Qual (from https://checkerframework.org) +- ClassGraph (from https://github.com/classgraph/classgraph) - JUL to SLF4J bridge (from http://www.slf4j.org) +- Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api, https://repo1.maven.org/maven2/org/jboss/spec/javax/xml/bind/jboss-jaxb-api_2.3_spec) +- Java Client Runtime for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) +- Java JWT (from http://www.jwt.io, https://github.com/auth0/java-jwt) - 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) +- 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) +- Microsoft Azure Java Core Library (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure Netty HTTP Client Library (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure SDK annotations (from https://github.com/Microsoft/java-api-annotations) +- 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) -- Mockito (from http://mockito.org, https://github.com/mockito/mockito) +- Microsoft Azure SDK for Service Bus (from https://github.com/Azure/azure-sdk-for-java, https://github.com/Azure/azure-service-bus-java) +- Microsoft Azure SDK for eventgrid (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) +- Microsoft Azure client library for File Storage Data Lake (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure client library for Identity (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure client library for KeyVault Keys (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure client library for KeyVault Secrets (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure common module for Storage (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure internal Avro module for Storage (from https://github.com/Azure/azure-sdk-for-java) +- Mockito (from http://mockito.org, http://www.mockito.org, https://github.com/mockito/mockito) +- MongoDB Java Driver (from http://mongodb.org/, http://www.mongodb.org, https://www.mongodb.com/) - 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) +- Project Lombok (from http://projectlombok.org, https://projectlombok.org) +- QpidJMS Client (from https://repo1.maven.org/maven2/org/apache/qpid/qpid-jms-client) - 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) +- ThreeTen backport (from https://github.com/ThreeTen/threetenbp, https://www.threeten.org/threetenbp) +- adal4j (from https://github.com/AzureAD/azure-activedirectory-library-for-java) +- azure-documentdb (from http://azure.microsoft.com/en-us/services/documentdb/, https://azure.microsoft.com/en-us/services/cosmos-db/) +- documentdb-bulkexecutor (from http://azure.microsoft.com/en-us/services/documentdb/) +- micrometer-core (from https://github.com/micrometer-metrics/micrometer) - 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) +- qpid-proton-j-extensions (from https://github.com/Azure/qpid-proton-j-extensions) ======================================================================== MPL-1.1 @@ -366,11 +758,24 @@ The following software have components provided under the terms of this license: ======================================================================== PHP-3.01 ======================================================================== -The following software have components provided under the terms of this license: - - Jakarta Activation API (from https://github.com/eclipse-ee4j/jaf, https://repo1.maven.org/maven2/jakarta/activation/jakarta.activation-api) - Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api, https://repo1.maven.org/maven2/org/jboss/spec/javax/xml/bind/jboss-jaxb-api_2.3_spec) +======================================================================== +RSA-MD +======================================================================== +The following software have components provided under the terms of this license: + +- AWS Java SDK for Amazon SQS (from https://aws.amazon.com/sdkforjava) + +======================================================================== +SAX-PD +======================================================================== +The following software have components provided under the terms of this license: + +- Old JAXB Core (from https://eclipse-ee4j.github.io/jaxb-ri/) +- Old JAXB Runtime (from https://eclipse-ee4j.github.io/jaxb-ri/, https://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-impl) + ======================================================================== SunPro ======================================================================== @@ -385,6 +790,21 @@ The following software have components provided under the terms of this license: - Reflections (from http://code.google.com/p/reflections/, http://github.com/ronmamo/reflections) +======================================================================== +X11 +======================================================================== +The following software have components provided under the terms of this license: + +- Guava: Google Core Libraries for Java (from http://code.google.com/p/guava-libraries, https://github.com/google/guava, https://repo1.maven.org/maven2/com/google/guava/guava) +- MongoDB Java Driver (from http://mongodb.org/, http://www.mongodb.org, https://www.mongodb.com/) + +======================================================================== +cc-pd +======================================================================== +The following software have components provided under the terms of this license: + +- Netty/Codec (from https://repo1.maven.org/maven2/io/netty/netty-codec) + ======================================================================== public-domain ======================================================================== diff --git a/devops/gcp/configmap/README.md b/devops/gcp/configmap/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ce6bc6d029113e3223ba015cbe99f1663f94a295 --- /dev/null +++ b/devops/gcp/configmap/README.md @@ -0,0 +1,74 @@ +<!--- Configmap --> + +# Configmap helm chart + +## Introduction + +This chart bootstraps a configmap deployment on a [Kubernetes](https://kubernetes.io) cluster using [Helm](https://helm.sh) package manager. + +## Prerequisites + +The code was tested on **Kubernetes cluster** (v1.21.11) with **Istio** (1.12.6) +> It is possible to use other versions, but it hasn't been tested + +### Operation system + +The code works in Debian-based Linux (Debian 10 and Ubuntu 20.04) and Windows WSL 2. Also, it works but is not guaranteed in Google Cloud Shell. All other operating systems, including macOS, are not verified and supported. + +### Packages + +Packages are only needed for installation from a local computer. + +- **HELM** (version: v3.7.1 or higher) [helm](https://helm.sh/docs/intro/install/) +- **Kubectl** (version: v1.21.0 or higher) [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) +## Installation +This Helm chart should be installed before [deploy Helm Chart](../deploy) +First you need to set variables in **values.yaml** file using any code editor. Some of the values are prefilled, but you need to specify some values as well. You can find more information about them below. + +### Common variables + +| Name | Description | Type | Default |Required | +|------|-------------|------|---------|---------| +**logLevel** | logging level | string | INFO | yes +**springProfilesActive** | active spring profile | string | gcp | yes + +### GCP variables + +| Name | Description | Type | Default |Required | +|------|-------------|------|---------|---------| +**entitlementsHost** | entitlements service host address | string | `http://entitlements` | yes +**registerHost** | register service host address | string | `http://register` | yes +**partitionHost** | partition service host address | string | `http://partition` | yes +**googleAudiences** | your GCP client ID | string | - | yes + +> googleAudiences: If you are connected to GCP console with `gcloud auth application-default login --no-browser` from your terminal, you can get your client_id using the command: + +```console +cat ~/.config/gcloud/application_default_credentials.json | grep client_id +``` + +### Config variables + +| Name | Description | Type | Default |Required | +|------|-------------|------|---------|---------| +**configmap** | configmap name | string | notification-config | yes +**appName** | name of the app | string | notification | yes +**onPremEnabled** | whether on-prem is enabled | boolean | false | yes + +### Install the helm chart + +Run this command from within this directory: + +```bash +helm install gcp-notification-configmap . +``` + +## Uninstalling the Chart + +To uninstall the helm deployment: + +```bash +helm uninstall gcp-notification-configmap +``` + +[Move-to-Top](#configmap-helm-chart) diff --git a/devops/gcp/configmap/templates/configmap.yaml b/devops/gcp/configmap/templates/configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7ec041dc5c2a2b553c33719fffd3442c054c57d6 --- /dev/null +++ b/devops/gcp/configmap/templates/configmap.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: "{{ .Values.conf.appName }}" + name: "{{ .Values.conf.configmap }}" + namespace: "{{ .Release.Namespace }}" +data: + LOG_LEVEL: "{{ .Values.data.logLevel }}" + SPRING_PROFILES_ACTIVE: "{{ .Values.data.springProfilesActive }}" + ENTITLEMENTS_HOST: "{{ .Values.data.entitlementsHost }}" + REGISTER_HOST: "{{ .Values.data.registerHost }}" + PARTITION_HOST: "{{ .Values.data.partitionHost }}" + {{- if not .Values.conf.onPremEnabled }} + GOOGLE_AUDIENCES: "{{ .Values.data.googleAudiences }}" + {{- end }} diff --git a/devops/gcp/configmap/templates/notification-configmap.yaml b/devops/gcp/configmap/templates/notification-configmap.yaml deleted file mode 100644 index c3c1cbbf874a068170cfaf180253dadb25107764..0000000000000000000000000000000000000000 --- a/devops/gcp/configmap/templates/notification-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: "{{ .Values.conf.app_name }}" - name: "{{ .Values.conf.configmap }}" - namespace: "{{ .Release.Namespace }}" -data: - LOG_LEVEL: "{{ .Values.data.log_level }}" - SPRING_PROFILES_ACTIVE: "{{ .Values.data.spring_profiles_active }}" - APP_ENTITLEMENTS: "{{ .Values.data.app_entitlements }}" - APP_REGISTER: "{{ .Values.data.app_register }}" - PARTITION_API: "{{ .Values.data.partition_api }}" - {{- if not .Values.conf.on_prem_enabled }} - GOOGLE_AUDIENCES: "{{ .Values.data.google_audiences }}" - {{- end }} diff --git a/devops/gcp/configmap/values.yaml b/devops/gcp/configmap/values.yaml index 2316222a005ab8518dfe256132db69cc3d33da5b..38a7b11cde45628d78b2359b84fb618645df0072 100644 --- a/devops/gcp/configmap/values.yaml +++ b/devops/gcp/configmap/values.yaml @@ -1,13 +1,13 @@ data: # common - log_level: "INFO" - spring_profiles_active: "gcp" - app_entitlements: "http://entitlements/api/entitlements/v2/" - app_register: "http://register/api/register/v1" - partition_api: "http://partition/api/partition/v1/" + logLevel: "INFO" + springProfilesActive: "gcp" + entitlementsHost: "http://entitlements" + registerHost: "http://register" + partitionHost: "http://partition" # gcp - google_audiences: "" + googleAudiences: "" conf: configmap: "notification-config" - app_name: "notification" - on_prem_enabled: false + appName: "notification" + onPremEnabled: false diff --git a/devops/gcp/deploy/README.md b/devops/gcp/deploy/README.md new file mode 100644 index 0000000000000000000000000000000000000000..af91d321cfebfadb3d24f187d2106394124f0b11 --- /dev/null +++ b/devops/gcp/deploy/README.md @@ -0,0 +1,70 @@ +<!--- Deploy --> + +# Deploy helm chart + +## Introduction + +This chart bootstraps a deployment on a [Kubernetes](https://kubernetes.io) cluster using [Helm](https://helm.sh) package manager. + +## Prerequisites + +The code was tested on **Kubernetes cluster** (v1.21.11) with **Istio** (1.12.6) +> It is possible to use other versions, but it hasn't been tested + +### Operation system + +The code works in Debian-based Linux (Debian 10 and Ubuntu 20.04) and Windows WSL 2. Also, it works but is not guaranteed in Google Cloud Shell. All other operating systems, including macOS, are not verified and supported. + +### Packages + +Packages are only needed for installation from a local computer. + +- **HELM** (version: v3.7.1 or higher) [helm](https://helm.sh/docs/intro/install/) +- **Kubectl** (version: v1.21.0 or higher) [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) + +## Installation + +Before installing deploy Helm chart you need to install [configmap Helm chart](../configmap). +First you need to set variables in **values.yaml** file using any code editor. Some of the values are prefilled, but you need to specify some values as well. You can find more information about them below. + +### Common variables + +| Name | Description | Type | Default |Required | +|------|-------------|------|---------|---------| +**image** | your image name | string | - | yes +**requestsCpu** | amount of requested CPU | string | 0.1 | yes +**requestsMemory** | amount of requested memory| string | 256M | yes +**limitsCpu** | CPU limit | string | 1 | yes +**limitsMemory** | memory limit | string | 1G | yes +**serviceAccountName** | name of your service account | string | notification | yes +**imagePullPolicy** | when to pull image | string | IfNotPresent | yes +**image** | service image | string | - | yes + +### Config variables + +| Name | Description | Type | Default |Required | +|------|-------------|------|---------|---------| +**domain** | your domain | string | - | yes +**appName** | name of the app | string | `notification` | yes +**configmap** | configmap to be used | string | `notification-config` | yes +**onPremEnabled** | whether on-prem is enabled | boolean | false | yes +**rabbitmqSecretName** | secret for rabbitmq | string | `rabbitmq-secret` | yes +**openidSecretName** | secret for openid client | string | `notification-keycloak-secret` | yes + +### Install the helm chart + +Run this command from within this directory: + +```console +helm install gcp-notification-deploy . +``` + +## Uninstalling the Chart + +To uninstall the helm deployment: + +```console +helm uninstall gcp-notification-deploy +``` + +[Move-to-Top](#deploy-helm-chart) diff --git a/devops/gcp/deploy/templates/deployment.yaml b/devops/gcp/deploy/templates/deployment.yaml index 11d6d40c111ed104a5f638a932fc5442d5dcaa01..af1194fc152690421f5028adbc00bd9148b464ed 100644 --- a/devops/gcp/deploy/templates/deployment.yaml +++ b/devops/gcp/deploy/templates/deployment.yaml @@ -2,33 +2,33 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: "{{ .Values.conf.app_name }}" - name: "{{ .Values.conf.app_name }}" + app: "{{ .Values.conf.appName }}" + name: "{{ .Values.conf.appName }}" namespace: "{{ .Release.Namespace }}" spec: selector: matchLabels: - app: "{{ .Values.conf.app_name }}" + app: "{{ .Values.conf.appName }}" replicas: 1 template: metadata: labels: - app: "{{ .Values.conf.app_name }}" + app: "{{ .Values.conf.appName }}" annotations: rollme: {{ randAlphaNum 5 | quote }} spec: containers: - - name: "{{ .Values.conf.app_name }}" + - name: "{{ .Values.conf.appName }}" image: "{{ .Values.data.image }}" imagePullPolicy: "{{ .Values.data.imagePullPolicy }}" envFrom: - configMapRef: name: "{{ .Values.conf.configmap }}" - {{- if .Values.conf.on_prem_enabled }} + {{- if .Values.conf.onPremEnabled }} - secretRef: - name: "{{ .Values.conf.rabbitmq_secret_name }}" + name: "{{ .Values.conf.rabbitmqSecretName }}" - secretRef: - name: "{{ .Values.conf.openid_secret_name }}" + name: "{{ .Values.conf.openidSecretName }}" {{- end }} securityContext: allowPrivilegeEscalation: false @@ -37,9 +37,9 @@ spec: - containerPort: 8080 resources: requests: - cpu: "{{ .Values.data.requests_cpu }}" - memory: "{{ .Values.data.requests_memory }}" + cpu: "{{ .Values.data.requestsCpu }}" + memory: "{{ .Values.data.requestsMemory }}" limits: - cpu: "{{ .Values.data.limits_cpu }}" - memory: "{{ .Values.data.limits_memory }}" + cpu: "{{ .Values.data.limitsCpu }}" + memory: "{{ .Values.data.limitsMemory }}" serviceAccountName: "{{ .Values.data.serviceAccountName }}" diff --git a/devops/gcp/deploy/templates/service-account.yaml b/devops/gcp/deploy/templates/service-account.yaml index 61f46c8a5eab3b2e30ef8799b739cd9189561ca6..25fd74efbfca059f541af82d98b676cfcb930d64 100644 --- a/devops/gcp/deploy/templates/service-account.yaml +++ b/devops/gcp/deploy/templates/service-account.yaml @@ -1,7 +1,7 @@ -{{- if .Values.conf.on_prem_enabled }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: "{{ .Values.data.serviceAccountName }}" - namespace: "{{ .Release.Namespace }}" -{{- end }} +{{- if .Values.conf.onPremEnabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: "{{ .Values.data.serviceAccountName }}" + namespace: "{{ .Release.Namespace }}" +{{- end }} diff --git a/devops/gcp/deploy/templates/service.yaml b/devops/gcp/deploy/templates/service.yaml index 7f88561aad2b46006251e90dc3758e3a7cd0fbc0..49dc28423f0f65a54b786d74eefec4a81f81ea60 100644 --- a/devops/gcp/deploy/templates/service.yaml +++ b/devops/gcp/deploy/templates/service.yaml @@ -1,15 +1,15 @@ apiVersion: v1 kind: Service metadata: - name: "{{ .Values.conf.app_name }}" + name: "{{ .Values.conf.appName }}" annotations: - {{- if not .Values.conf.on_prem_enabled }} + {{- if not .Values.conf.onPremEnabled }} cloud.google.com/neg: '{"ingress": true}' {{- end }} namespace: "{{ .Release.Namespace }}" labels: - app: "{{ .Values.conf.app_name }}" - service: "{{ .Values.conf.app_name }}" + app: "{{ .Values.conf.appName }}" + service: "{{ .Values.conf.appName }}" spec: ports: - protocol: TCP @@ -17,4 +17,4 @@ spec: targetPort: 8080 name: http selector: - app: "{{ .Values.conf.app_name }}" + app: "{{ .Values.conf.appName }}" diff --git a/devops/gcp/deploy/templates/virtual-service.yaml b/devops/gcp/deploy/templates/virtual-service.yaml index 176fa89b85c5c0f92d9fd1af6545c0b6025d9853..3a5f6650fa0453f96973ab618a41d099fe301b68 100644 --- a/devops/gcp/deploy/templates/virtual-service.yaml +++ b/devops/gcp/deploy/templates/virtual-service.yaml @@ -1,12 +1,14 @@ apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: - name: "{{ .Values.conf.app_name }}" + name: "{{ .Values.conf.appName }}" namespace: "{{ .Release.Namespace }}" spec: hosts: - {{- if .Values.conf.domain }} + {{- if and .Values.conf.domain .Values.conf.onPremEnabled }} - {{ printf "osdu.%s" .Values.conf.domain | quote }} + {{- else if .Values.conf.domain }} + - {{ .Values.conf.domain | quote }} {{- else }} - "*" {{- end }} @@ -20,4 +22,4 @@ spec: - destination: port: number: 80 - host: "{{ .Values.conf.app_name }}.{{ .Release.Namespace }}.svc.cluster.local" + host: "{{ .Values.conf.appName }}.{{ .Release.Namespace }}.svc.cluster.local" diff --git a/devops/gcp/deploy/values.yaml b/devops/gcp/deploy/values.yaml index 93d88da235754c905068c713d46778c18f386ce6..6904a3b5fae20ecbeb525469e5a26ea68b3730ba 100644 --- a/devops/gcp/deploy/values.yaml +++ b/devops/gcp/deploy/values.yaml @@ -1,16 +1,16 @@ data: - requests_cpu: "0.1" - requests_memory: "256M" - limits_cpu: "1" - limits_memory: "1G" + requestsCpu: "0.1" + requestsMemory: "256M" + limitsCpu: "1" + limitsMemory: "1.5G" serviceAccountName: "notification" imagePullPolicy: "IfNotPresent" image: "" conf: configmap: "notification-config" - app_name: "notification" - rabbitmq_secret_name: "rabbitmq-secret" - openid_secret_name: "notification-keycloak-secret" - on_prem_enabled: false + appName: "notification" + rabbitmqSecretName: "rabbitmq-secret" + openidSecretName: "notification-keycloak-secret" + onPremEnabled: false domain: "" diff --git a/devops/gcp/pipeline/override-stages.yml b/devops/gcp/pipeline/override-stages.yml index f23363f65bd09b12d4b4790bc717d3fdecd4e190..ae54fdae554acc02d4262150b94cdf247988eac8 100644 --- a/devops/gcp/pipeline/override-stages.yml +++ b/devops/gcp/pipeline/override-stages.yml @@ -1,23 +1,6 @@ variables: OSDU_GCP_SERVICE: notification OSDU_GCP_VENDOR: gcp - OSDU_GCP_HELM_DEPLOYMENT_DIR: "devops/gcp/deploy" - OSDU_GCP_HELM_CONFIG_DIR: "devops/gcp/configmap" - OSDU_GCP_HELM_NAMESPACE: "default" - OSDU_GCP_HELM_CONFIG_SERVICE_VARS: > - --set data.log_level=$OSDU_GCP_LOG_LEVEL - --set data.google_audiences=$GOOGLE_AUDIENCE - --set data.app_register=$OSDU_GCP_REGISTER_API - OSDU_GCP_HELM_CONFIG_SERVICE_VARS_DEV2: > - --set data.log_level=$OSDU_GCP_LOG_LEVEL - --set data.google_audiences=$GOOGLE_AUDIENCE - --set data.app_register=$OSDU_GCP_REGISTER_API - OSDU_GCP_HELM_DEPLOYMENT_SERVICE_VARS: > - --set data.image=$CI_REGISTRY_IMAGE/osdu-gcp-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA - --set data.serviceAccountName=$OSDU_GCP_SERVICE-k8s - OSDU_GCP_HELM_CONFIG_SERVICE: "notification-config" - OSDU_GCP_HELM_DEPLOYMENT_SERVICE: "notification-deploy" - OSDU_GCP_HELM_PACKAGE_CHARTS: "devops/gcp/deploy devops/gcp/configmap" osdu-gcp-test: variables: @@ -28,3 +11,8 @@ osdu-gcp-dev2-test: variables: ENVIRONMENT: $OSDU_GCP_ENVIRONMENT REGISTER_BASE_URL: $OSDU_GCP_REGISTER_BASE_URL + +osdu-gcp-anthos-test: + variables: + REGISTER_BASE_URL: $OSDU_GCP_REGISTER_BASE_URL + OSDU_GCP_VENDOR: anthos diff --git a/notification-core/pom.xml b/notification-core/pom.xml index efb0b2598cc32fae491e7eaecae4e53742964630..b661b900a07bc2b33cc569bd6cc10bb540fd5df1 100644 --- a/notification-core/pom.xml +++ b/notification-core/pom.xml @@ -19,7 +19,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-core</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <name>notification-core</name> <description>Core module for the notification service</description> <packaging>jar</packaging> @@ -27,7 +27,7 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/pom.xml b/pom.xml index 1e129868b8dac8f3dac3dc8e839e46e5c2ff6a82..3242cd709e6f60548583b957e5ae2618fe1cd9e0 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <description>Root Notification Service project</description> <properties> @@ -148,7 +148,6 @@ <module>provider/notification-azure</module> <module>provider/notification-ibm</module> <module>provider/notification-aws</module> - <module>provider/notification-reference</module> </modules> <repositories> diff --git a/provider/notification-aws/build-aws/Dockerfile b/provider/notification-aws/build-aws/Dockerfile index 9e95e62d6b983eb876317ca354aed7a6bd39a4c3..bacdf23dcc2d3acf06a71d04dbd2ca9830c9efc3 100644 --- a/provider/notification-aws/build-aws/Dockerfile +++ b/provider/notification-aws/build-aws/Dockerfile @@ -28,4 +28,4 @@ COPY /provider/notification-aws/build-aws/ssl.sh /ssl.sh COPY /provider/notification-aws/build-aws/entrypoint.sh /entrypoint.sh EXPOSE 8080 -ENTRYPOINT ["/bin/sh", "-c", ". /entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/bin/sh", "-c", ". /entrypoint.sh"] diff --git a/provider/notification-aws/pom.xml b/provider/notification-aws/pom.xml index 52f706897d46e454238a7ec326707cae4d0a10f6..ddbc7390d49855a480b91c5e8f66b5f773518f3b 100644 --- a/provider/notification-aws/pom.xml +++ b/provider/notification-aws/pom.xml @@ -19,7 +19,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-aws</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <name>notification-aws</name> <description>AWS implementation for Notification service</description> <packaging>jar</packaging> @@ -27,7 +27,7 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> @@ -85,7 +85,7 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-core</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/provider/notification-azure/pom.xml b/provider/notification-azure/pom.xml index 38d6ced74dc248da1b9378dcc90c00db18e71397..aaf7c25be2602c7b75b755718d1859c61e83a3b7 100644 --- a/provider/notification-azure/pom.xml +++ b/provider/notification-azure/pom.xml @@ -18,7 +18,7 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>notification-azure</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <name>notification-azure</name> <description>Azure implementation for Notification service</description> <packaging>jar</packaging> @@ -26,7 +26,7 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> @@ -35,7 +35,7 @@ <maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.source>${java.version}</maven.compiler.source> <jacoco-maven-plugin.version>0.8.2</jacoco-maven-plugin.version> - <osdu.notification-core.version>0.15.0-SNAPSHOT</osdu.notification-core.version> + <osdu.notification-core.version>0.16.0-SNAPSHOT</osdu.notification-core.version> <springframework.version>4.3.0.RELEASE</springframework.version> <reactor.netty.version>0.11.0.RELEASE</reactor.netty.version> <reactor.core.version>3.3.0.RELEASE</reactor.core.version> @@ -50,6 +50,8 @@ <reactor-netty.version>1.0.7</reactor-netty.version> <oauth2-oidc-sdk.version>6.0</oauth2-oidc-sdk.version> <woodstox-core.version>5.3.0</woodstox-core.version> + <jackson-databind.version>2.13.2.2</jackson-databind.version> + <jackson.version>2.13.2</jackson.version> </properties> <dependencyManagement> @@ -205,6 +207,23 @@ <version>${mockito.version}</version> <scope>test</scope> </dependency> + + <!-- Jackson Dependencies --> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>${jackson.version}</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>${jackson-databind.version}</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + <version>${jackson.version}</version> + </dependency> </dependencies> <build> diff --git a/provider/notification-gcp/README.md b/provider/notification-gcp/README.md index ba9b8b9f35ce64f29320ddfcf810a37ec95e0bb6..710b48b07d013376f8a782b1095578e19118d039 100644 --- a/provider/notification-gcp/README.md +++ b/provider/notification-gcp/README.md @@ -115,55 +115,11 @@ cd provider/notification-gcp/ && mvn spring-boot:run -Dspring-boot.run.profiles= ``` ## Testing -Navigate to notification service's root folder and run all the tests: -```bash -# build + test + install core service code -$ (cd notification-core/ && mvn clean install) -``` - -### Test the application - -After the service has started it should be accessible via a web browser by visiting [http://localhost:8080/api/notification/v1/swagger-ui.html](http://localhost:8080/swagger-ui.html). If the request does not fail, you can then run the integration tests. - -### Dependencies needed to run the integration tests -* Java 8 -* Maven -* Values for the following environment variables in Config.java - -| name | value | description | sensitive? | source | -| --- | --- | --- | --- | --- | -| `DE_OPS_TESTER` | `*****` | Service account base64 encoded string for API calls. Note: this user must have entitlements configured already, also **Private key id** of this account must be set in Register service variable SUBSCRIBER_PRIVATE_KEY_ID | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | -| `DE_ADMIN_TESTER` | `*****` | Service account base64 encoded string for API calls. Note: this user must have entitlements configured already | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | -| `DE_EDITOR_TESTER` | `*****` | Service account base64 encoded string for API calls. Note: this user must have entitlements configured already | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | -| `DE_NO_ACCESS_TESTER` | `*****` | Service account base64 encoded string for API calls. Note: this user must have entitlements configured already | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | -| `ENVIRONMENT` | `dev` OR `local` OR `dev_gke`| Local for running locally with services url's predefined as http://localhost , Dev & Dev_Gke is configurable environment | no | - | -| `HMAC_SECRET` | ex`7a786376626e` | String in hex , must match pattern ^[a-zA-Z0-9]{8,30}+$ & be in register variable SUBSCRIBER_SECRET | yes | - | -| `REGISTER_BASE_URL` | `http://localhost:8081/api/register/v1` | Register service url | no | - | -| `NOTIFICATION_BASE_URL` | `http://localhost:8080/api/notification/v1/` | Notification service url | no | - | -| `INTEGRATION_TEST_AUDIENCE` | `********` | Client application ID | yes | https://console.cloud.google.com/apis/credentials | -| `CLIENT_TENANT` | ex `opendes` | Client tenant | no | - | -| `OSDU_TENANT` | ex `osdu` | Osdu tenant | no | - | -| `TOPIC_ID` | ex `records-changed` | PubSub topic id | no | https://console.cloud.google.com/cloudpubsub/topic | -| `REGISTER_CUSTOM_PUSH_URL_HMAC` | ex `http://localhost:8081/api/register/v1/test/challenge/hmac-integration-test` | Register testing push url | no | - | - - **Entitlements configuration for integration accounts** - -| DE_OPS_TESTER | DE_ADMIN_TESTER | DE_EDITOR_TESTER | DE_NO_ACCESS_TESTER | -| --- | --- | --- | --- | -|notification.pubsub<br/>service.entitlements.user<br/>users<br/>users.datalake.ops</br>| service.entitlements.user<br/>users<br/>users.datalake.admins</br> | service.entitlements.user<br/>users<br/>users.datalake.editors</br> | service.entitlements.user<br/>users<br/>| - -Above variables should be configured in the release pipeline to run integration tests. You should also replace them with proper values if you wish to run tests locally. - -### Commands to run tests -* Integration tests are refactored into two pieces: Core and Provider. Core contains business logic for tests and is a dependency for executing the tests from provider module. To build the core module, simply navigate to `notification-test-core` directory and run `mvn clean install`. This will build the core module -* Next, to execute the integration tests, navigate to the provider module and execute `mvn test` -```bash -# (cd testing/notification-test-core/ && mvn clean install) -# Note: this assumes that the environment variables for integration tests as outlined -# above are already exported in your environment. -$ (cd testing/notification-test-gcp/ && mvn clean test) -``` +#### Anthos: +[Anthos Testing](docs/anthos/README.md) +#### GCP: +[Gcp Testing](docs/gcp/README.md) ## Tutorial diff --git a/provider/notification-gcp/docker/Dockerfile b/provider/notification-gcp/docker/Dockerfile deleted file mode 100644 index 2e68183f5ef17c071cb878ad1f15d61e39aac6db..0000000000000000000000000000000000000000 --- a/provider/notification-gcp/docker/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2017-2020, Schlumberger -# -# 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. -# - -FROM openjdk:8-slim -RUN apt-get update && apt-get install -y curl - -ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] -EXPOSE 8080 - -ARG JAR_FILE -COPY ${JAR_FILE} app.jar diff --git a/provider/notification-gcp/docker/docker-compose.yml b/provider/notification-gcp/docker/docker-compose.yml deleted file mode 100644 index 8eba335a332002ad9d3bd71416ad2106fef6bcd3..0000000000000000000000000000000000000000 --- a/provider/notification-gcp/docker/docker-compose.yml +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2017-2020, Schlumberger -# -# 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. -# - -version: "3" -services: - os-notification-app: - build: - args: - JAR_FILE: target/notification-gcp-1.0.0-spring-boot.jar - context: .. - dockerfile: docker/Dockerfile - image: gcr.io/opendes/os-notification-app - ports: - - "8080:8080" - diff --git a/provider/notification-gcp/docs/anthos/README.md b/provider/notification-gcp/docs/anthos/README.md index 65d3dc918cc1b5302695fc141f26dc9aba792fea..b9c1c9b00a393e115d9c9265c353652ed5489f03 100644 --- a/provider/notification-gcp/docs/anthos/README.md +++ b/provider/notification-gcp/docs/anthos/README.md @@ -1,15 +1,19 @@ # Service Configuration for Anthos ## Table of Contents <a name="TOC"></a> -* [Environment variables](#Environment-variables) - * [Common properties for all environments](#Common-properties-for-all-environments) - * [For Mappers to activate drivers](#For-Mappers-to-activate-drivers) -* [Requirements for requests](#Requirements-for-requests) -* [Configuring mappers Datasources](#Configuring-mappers-Datasources) - * [For OQM RabbitMQ](#For-OQM-RabbitMQ) - * [Exchanges and queues configuration](#Exchanges-and-queues-configuration) -* [Interaction with message brokers](#Interaction-with-message-brokers) -* [Keycloak configuration](#Keycloak-configuration) + +* [Service Configuration for Anthos](#service-configuration-for-anthos) + * [Table of Contents <a name="TOC"></a>](#table-of-contents-) + * [Environment variables](#environment-variables) + * [Common properties for all environments](#common-properties-for-all-environments) + * [For Mappers to activate drivers](#for-mappers-to-activate-drivers) + * [Requirements for requests](#requirements-for-requests) + * [Configuring mappers Datasources](#configuring-mappers-datasources) + * [For OQM RabbitMQ](#for-oqm-rabbitmq) + * [Exchanges and queues configuration](#exchanges-and-queues-configuration) + * [Interaction with message brokers](#interaction-with-message-brokers) + * [Specifics of work through PULL subscription](#specifics-of-work-through-pull-subscription) + * [Keycloak configuration](#keycloak-configuration) ## Environment variables @@ -39,18 +43,72 @@ | OQMDRIVER | pubsub | to activate **OQM** driver for **Google PubSub** | | OQMDRIVER | rabbitmq | to activate **OQM** driver for **Rabbit MQ** | +## Testing + +After the service has started it should be accessible via a web browser by visiting [http://localhost:8080/api/notification/v1/swagger-ui.html](http://localhost:8080/swagger-ui.html). If the request does not fail, you can then run the integration tests. + +### Dependencies needed to run the integration tests +* Java 8 +* Maven +* Values for the following environment variables in Config.java + +| name | value | description | sensitive? | source | +| --- | --- | --- | --- | --- | +| `TEST_DE_OPS_OPENID_PROVIDER_CLIENT_ID` | `********` | Client Id for `DE_OPS_TESTER` | yes | -- | +| `TEST_DE_OPS_OPENID_PROVIDER_CLIENT_SECRET` | `********` | | Client secret for `DE_OPS_TESTER` | yes | -- | +| `TEST_DE_ADMIN_OPENID_PROVIDER_CLIENT_ID` | `********` | Client Id for `DE_ADMIN_TESTER` | yes | -- | +| `TEST_DE_ADMIN_OPENID_PROVIDER_CLIENT_SECRET` | `********` | | Client secret for `DE_ADMIN_TESTER` | yes | -- | +| `TEST_DE_EDITOR_OPENID_PROVIDER_CLIENT_ID` | `********` | Client Id for `DE_EDITOR_TESTER` | yes | -- | +| `TEST_DE_EDITOR_OPENID_PROVIDER_CLIENT_SECRET` | `********` | | Client secret for `DE_EDITOR_TESTER` | yes | -- | +| `TEST_NO_ACCESS_OPENID_PROVIDER_CLIENT_ID` | `********` | Client Id for `DE_NO_ACCESS_TESTER` | yes | -- | +| `TEST_NO_ACCESS_OPENID_PROVIDER_CLIENT_SECRET` | `********` | | Client secret for `DE_NO_ACCESS_TESTER` | yes | -- | +| `TEST_OPENID_PROVIDER_URL` | `https://keycloak.com/auth/realms/osdu` | OpenID provider url | yes | -- | +| `ENVIRONMENT` | `dev` OR `local` OR `dev_gke`| Local for running locally with services url's predefined as http://localhost , Dev & Dev_Gke is configurable environment | no | - | +| `HMAC_SECRET` | ex`7a786376626e` | String in hex , must match pattern ^[a-zA-Z0-9]{8,30}+$ & be in register variable SUBSCRIBER_SECRET | yes | - | +| `REGISTER_BASE_URL` | `http://localhost:8081/api/register/v1` | Register service url | no | - | +| `NOTIFICATION_BASE_URL` | `http://localhost:8080/api/notification/v1/` | Notification service url | no | - | +| `CLIENT_TENANT` | ex `opendes` | Client tenant | no | - | +| `OSDU_TENANT` | ex `osdu` | osdu tenant | no | - | +| `TOPIC_ID` | ex `records-changed` | PubSub topic id | no | https://console.cloud.google.com/cloudpubsub/topic | +| `REGISTER_CUSTOM_PUSH_URL_HMAC` | ex `http://localhost:8081/api/register/v1/test/challenge/hmac-integration-test` | Register testing push url | no | - | + +**Entitlements configuration for integration accounts** + +| DE_OPS_TESTER | DE_ADMIN_TESTER | DE_EDITOR_TESTER | DE_NO_ACCESS_TESTER | +| --- | --- | --- | --- | +|notification.pubsub<br/>service.entitlements.user<br/>users<br/>users.datalake.ops</br>| service.entitlements.user<br/>users<br/>users.datalake.admins</br> | service.entitlements.user<br/>users<br/>users.datalake.editors</br> | service.entitlements.user<br/>users<br/>| + +Above variables should be configured in the release pipeline to run integration tests. You should also replace them with proper values if you wish to run tests locally. + +### Commands to run tests +* Integration tests are refactored into two pieces: Core and Provider. Core contains business logic for tests and is a dependency for executing the tests from provider module. To build the core module, simply navigate to `notification-test-core` directory and run `mvn clean install`. This will build the core module +* Next, to execute the integration tests, navigate to the provider module and execute `mvn test` +```bash +# (cd testing/notification-test-core/ && mvn clean install) +# Note: this assumes that the environment variables for integration tests as outlined +# above are already exported in your environment. +$ (cd testing/notification-test-gcp/ && mvn clean test) +``` + +Navigate to notification service's root folder and run all the tests: + +```bash +# build + test + install core service code +$ (cd notification-core/ && mvn clean install) +``` + ## Requirements for requests Record identifiers cannot contain a space character. At the same time, they may contain a % character, which, when combined with subsequent numeric characters, may cause the application to misinterpret that combination. For example, the "%20" combination will be interpreted as a space " " character. To correctly transfer such an identifier, you should additionally perform the url-encode operation on it. This functionality can be built into the front-end application, or -you can use an online url-encoder tool ( eg.: https://www.urlencoder.org/). Thus, having ID "osdu: +you can use an online url-encoder tool ( eg.: <https://www.urlencoder.org/>). Thus, having ID "osdu: work-product-component--WellboreMarkerSet:3D%20Kirchhoff%20DepthMigration" (with %20 combination) you should url-encode it and request "osdu%3Awork-product-component--WellboreMarkerSet%3A3D%2520Kirchhoff%2520DepthMigration" instead. -## Configuring mappers Datasources +## Configuring mappers DataSources When using non-Google-Cloud-native technologies, property sets must be defined on the Partition service as part of PartitionInfo for each Tenant. @@ -60,14 +118,14 @@ PartitionInfo for each Tenant. **prefix:** `oqm.rabbitmq` It can be overridden by: -- through the Spring Boot property `oqm.rabbitmq.partition-properties-prefix` -- environment variable `OQM_RABBITMQ_PARTITION_PROPERTIES_PREFIX`` +* through the Spring Boot property `oqm.rabbitmq.partition-properties-prefix` +* environment variable `OQM_RABBITMQ_PARTITION_PROPERTIES_PREFIX`` -**Propertyset** (for two types of connection: messaging and admin operations): +**PropertySet** (for two types of connection: messaging and admin operations): | Property | Description | | --- | --- | -| oqm.rabbitmq.amqp.host | messaging hostnameorIP | +| oqm.rabbitmq.amqp.host | messaging hostname orIP | | oqm.rabbitmq.amqp.port | - port | | oqm.rabbitmq.amqp.path | - path | | oqm.rabbitmq.amqp.username | - username | @@ -145,8 +203,8 @@ At RabbitMq should be created exchange with name: It can be overridden by: -- through the Spring Boot property `oqm-register-subscriber-control-topic-name` -- environment variable `OQM_REGISTER_SUBSCRIBER_CONTROL_TOPIC_NAME` +* through the Spring Boot property `oqm-register-subscriber-control-topic-name` +* environment variable `OQM_REGISTER_SUBSCRIBER_CONTROL_TOPIC_NAME`  @@ -175,4 +233,4 @@ Each Client has embedded Service Account (SA) option. Enable SAs for Clients, ma Add `partition-and-entitlements` scope to `Default Client Scopes` and generate Keys. -Give `client-id` and `client-secret` to services, which should be authorized within the platform. \ No newline at end of file +Give `client-id` and `client-secret` to services, which should be authorized within the platform. diff --git a/provider/notification-gcp/docs/gcp/README.md b/provider/notification-gcp/docs/gcp/README.md index 0e193136cf2b7175e2de7ad7d94dc1ee61f8bdad..a0151f2ad91f21e687e43461ff5c47c874db401d 100644 --- a/provider/notification-gcp/docs/gcp/README.md +++ b/provider/notification-gcp/docs/gcp/README.md @@ -47,9 +47,61 @@ Also, the following IAM roles should be assigned to the service's Google service | Service Account Token Creator | To write yourself JWT for requesting neighbor microservices | | Pub/Sub Editor | To fetch available PubSub topics and subscriptions and be able to create them | -## Pubsub configuration: -At Pubsub should be created topic with name: +## Testing + +After the service has started it should be accessible via a web browser by visiting [http://localhost:8080/api/notification/v1/swagger-ui.html](http://localhost:8080/swagger-ui.html). If the request does not fail, you can then run the integration tests. + +### Dependencies needed to run the integration tests +* Java 8 +* Maven +* Values for the following environment variables in Config.java + +| name | value | description | sensitive? | source | +| --- | --- | --- | --- | --- | +| `DE_OPS_TESTER` | `*****` | Service account base64 encoded string for API calls. Note: this user must have entitlements configured already, also **Private key id** of this account must be set in Register service variable SUBSCRIBER_PRIVATE_KEY_ID | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | +| `DE_ADMIN_TESTER` | `*****` | Service account base64 encoded string for API calls. Note: this user must have entitlements configured already | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | +| `DE_EDITOR_TESTER` | `*****` | Service account base64 encoded string for API calls. Note: this user must have entitlements configured already | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | +| `DE_NO_ACCESS_TESTER` | `*****` | Service account base64 encoded string for API calls. Note: this user must have entitlements configured already | yes | https://console.cloud.google.com/iam-admin/serviceaccounts | +| `ENVIRONMENT` | `dev` OR `local` OR `dev_gke`| Local for running locally with services url's predefined as http://localhost , Dev & Dev_Gke is configurable environment | no | - | +| `HMAC_SECRET` | ex`7a786376626e` | String in hex , must match pattern ^[a-zA-Z0-9]{8,30}+$ & be in register variable SUBSCRIBER_SECRET | yes | - | +| `REGISTER_BASE_URL` | `http://localhost:8081/api/register/v1` | Register service url | no | - | +| `NOTIFICATION_BASE_URL` | `http://localhost:8080/api/notification/v1/` | Notification service url | no | - | +| `INTEGRATION_TEST_AUDIENCE` | `********` | Client application ID | yes | https://console.cloud.google.com/apis/credentials | +| `CLIENT_TENANT` | ex `opendes` | Client tenant | no | - | +| `OSDU_TENANT` | ex `osdu` | osdu tenant | no | - | +| `TOPIC_ID` | ex `records-changed` | PubSub topic id | no | https://console.cloud.google.com/cloudpubsub/topic | +| `REGISTER_CUSTOM_PUSH_URL_HMAC` | ex `http://localhost:8081/api/register/v1/test/challenge/hmac-integration-test` | Register testing push url | no | - | + +**Entitlements configuration for integration accounts** + +| DE_OPS_TESTER | DE_ADMIN_TESTER | DE_EDITOR_TESTER | DE_NO_ACCESS_TESTER | +| --- | --- | --- | --- | +|notification.pubsub<br/>service.entitlements.user<br/>users<br/>users.datalake.ops</br>| service.entitlements.user<br/>users<br/>users.datalake.admins</br> | service.entitlements.user<br/>users<br/>users.datalake.editors</br> | service.entitlements.user<br/>users<br/>| + +Above variables should be configured in the release pipeline to run integration tests. You should also replace them with proper values if you wish to run tests locally. + +### Commands to run tests +* Integration tests are refactored into two pieces: Core and Provider. Core contains business logic for tests and is a dependency for executing the tests from provider module. To build the core module, simply navigate to `notification-test-core` directory and run `mvn clean install`. This will build the core module +* Next, to execute the integration tests, navigate to the provider module and execute `mvn test` +* +```bash +# (cd testing/notification-test-core/ && mvn clean install) +# Note: this assumes that the environment variables for integration tests as outlined +# above are already exported in your environment. +$ (cd testing/notification-test-gcp/ && mvn clean test) +``` + +Navigate to notification service's root folder and run all the tests: + +```bash +# build + test + install core service code +$ (cd notification-core/ && mvn clean install) +``` + +## PubSub configuration: + +At PubSub should be created topic with name: **name:** `register-subscriber-control` diff --git a/provider/notification-gcp/pom.xml b/provider/notification-gcp/pom.xml index 9f871c7422486890869f3ade7a50ded2de1cb06e..a0b7901e413fbb4e15ddf30fe62bf2c2e6b430ef 100644 --- a/provider/notification-gcp/pom.xml +++ b/provider/notification-gcp/pom.xml @@ -18,7 +18,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-gcp</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <name>notification-gcp</name> <description>GCP implementation for Notification service</description> <packaging>jar</packaging> @@ -26,7 +26,7 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> @@ -44,13 +44,13 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>core-lib-gcp</artifactId> - <version>0.14.0</version> + <version>0.16.0-rc1</version> </dependency> <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-core</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/ServiceAccountJwtGcpClientImpl.java b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/ServiceAccountJwtGcpClientImpl.java index f05a02653d935c1cfe87885f0f38a6f0083f4ba7..194eee8cf8530970bb77ebbf6f49530f5c59e300 100644 --- a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/ServiceAccountJwtGcpClientImpl.java +++ b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/ServiceAccountJwtGcpClientImpl.java @@ -32,7 +32,7 @@ public class ServiceAccountJwtGcpClientImpl implements IServiceAccountJwtClient public String getIdToken(String tenantName) { log.info("Tenant name received for auth token is: {}", tenantName); - return tokenProvider.getIdToken(); + return "Bearer " + tokenProvider.getIdToken(); } } diff --git a/provider/notification-gcp/src/main/resources/application.properties b/provider/notification-gcp/src/main/resources/application.properties index 80608c45fc05d2d63dcfd205b997ac768ef0e5de..44979e699f41320200cf5db516d5fe5e38a5cf45 100644 --- a/provider/notification-gcp/src/main/resources/application.properties +++ b/provider/notification-gcp/src/main/resources/application.properties @@ -24,11 +24,20 @@ app.maxCacheSize=10 server.error.whitelabel.enabled=false # External services -app.entitlements=http://entitlements/api/entitlements/v2/ -app.register=http://register/api/register/v1 -partition.api=http://partition/api/partition/v1/ +ENTITLEMENTS_PATH=/api/entitlements/v2/ +ENTITLEMENTS_HOST=http://entitlements +app.entitlements=${ENTITLEMENTS_HOST}${ENTITLEMENTS_PATH} + +REGISTER_PATH=/api/register/v1 +REGISTER_HOST=http://register +app.register=${REGISTER_HOST}${REGISTER_PATH} + +PARTITION_PATH=/api/partition/v1/ +PARTITION_HOST=http://partition +PARTITION_API=${PARTITION_HOST}${PARTITION_PATH} +partition.api=${PARTITION_API} # No profile defaults service.token.provider=GCP partition-auth-enabled=true -oqmDriver=pubsub \ No newline at end of file +oqmDriver=pubsub diff --git a/provider/notification-gcp/src/main/resources/logback.xml b/provider/notification-gcp/src/main/resources/logback.xml index 8d6d9b1400206861a237843f40787180ea67fdc7..50c1b2b9477e7c44a1d2b4736e76e354651a315f 100644 --- a/provider/notification-gcp/src/main/resources/logback.xml +++ b/provider/notification-gcp/src/main/resources/logback.xml @@ -1,38 +1,38 @@ <?xml version="1.0" encoding="UTF-8"?> <configuration> - <include resource="org/springframework/boot/logging/logback/defaults.xml"/> - <property resource="application.properties" /> - <logger name="org.opengroup.osdu" level="${LOG_LEVEL}"/> - <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> + <include resource="org/springframework/boot/logging/logback/defaults.xml"/> + <property resource="application.properties" /> + <logger name="org.opengroup.osdu" level="${LOG_LEVEL}"/> + <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> + <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> + <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> + <root level="info"> + <appender-ref ref="stdout"/> + </root> + </springProfile> </configuration> \ No newline at end of file diff --git a/provider/notification-ibm/pom.xml b/provider/notification-ibm/pom.xml index 3f8ba4710215a362e42a52cd5c69a2d01054a9ff..cfba28f117ca02f3e6109f471edfd2b6e75ab38b 100644 --- a/provider/notification-ibm/pom.xml +++ b/provider/notification-ibm/pom.xml @@ -16,7 +16,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-ibm</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <name>notification-ibm</name> <description>IBM implementation for Notification service</description> <packaging>jar</packaging> @@ -24,7 +24,7 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> @@ -46,7 +46,7 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>os-core-lib-ibm</artifactId> - <version>0.15.0-rc2</version> + <version>0.15.2</version> <exclusions> <exclusion> <groupId>org.apache.lucene</groupId> @@ -80,7 +80,7 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-core</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <exclusions> <exclusion> <groupId>io.netty</groupId> diff --git a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/Application.java b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/Application.java index 595a25c7fb367251c02bf3a0bd1dd115c180f3b2..57d8d1a57591bc7c53e33a4d8f65e4546c0c7f17 100644 --- a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/Application.java +++ b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/Application.java @@ -1,20 +1,20 @@ -/* Licensed Materials - Property of IBM */ -/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ - -package org.opengroup.osdu.notification.provider.ibm; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.scheduling.annotation.EnableAsync; - -@SpringBootApplication -@ComponentScan({"org.opengroup.osdu"}) -@EnableAsync -public class Application { - - public static void main(String[] args) { - SpringApplication.run(new Class[] { Application.class} , args); - } -} - +/* Licensed Materials - Property of IBM */ +/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ + +package org.opengroup.osdu.notification.provider.ibm; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.scheduling.annotation.EnableAsync; + +@SpringBootApplication +@ComponentScan({"org.opengroup.osdu"}) +@EnableAsync +public class Application { + + public static void main(String[] args) { + SpringApplication.run(new Class[] { Application.class} , args); + } +} + diff --git a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/di/ServiceAccountJwtClientFactory.java b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/di/ServiceAccountJwtClientFactory.java index 9acd6a3efe2e5eab5aec819e71afd0b030bebc3c..6c29c213d9ee78a5623a443a6960a8b383cff112 100644 --- a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/di/ServiceAccountJwtClientFactory.java +++ b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/di/ServiceAccountJwtClientFactory.java @@ -1,25 +1,25 @@ -/* Licensed Materials - Property of IBM */ -/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ - -package org.opengroup.osdu.notification.provider.ibm.di; -import org.opengroup.osdu.core.common.util.IServiceAccountJwtClient; -import org.opengroup.osdu.notification.provider.ibm.util.AppProperties; -import org.opengroup.osdu.notification.provider.ibm.util.ServiceAccountJwtIBMClientImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.config.AbstractFactoryBean; -import org.springframework.stereotype.Component; - - -public class ServiceAccountJwtClientFactory extends AbstractFactoryBean<IServiceAccountJwtClient> { - - - @Override - public IServiceAccountJwtClient createInstance() throws Exception { - return new ServiceAccountJwtIBMClientImpl(); - } - - @Override - public Class<?> getObjectType() { - return IServiceAccountJwtClient.class; - } -} +/* Licensed Materials - Property of IBM */ +/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ + +package org.opengroup.osdu.notification.provider.ibm.di; +import org.opengroup.osdu.core.common.util.IServiceAccountJwtClient; +import org.opengroup.osdu.notification.provider.ibm.util.AppProperties; +import org.opengroup.osdu.notification.provider.ibm.util.ServiceAccountJwtIBMClientImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.AbstractFactoryBean; +import org.springframework.stereotype.Component; + + +public class ServiceAccountJwtClientFactory extends AbstractFactoryBean<IServiceAccountJwtClient> { + + + @Override + public IServiceAccountJwtClient createInstance() throws Exception { + return new ServiceAccountJwtIBMClientImpl(); + } + + @Override + public Class<?> getObjectType() { + return IServiceAccountJwtClient.class; + } +} diff --git a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/AppProperties.java b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/AppProperties.java index bb9bdcc5422c06c2e300e8a59f7add13315ba509..f69c72405bc3b76828c0e78bf1fded5d57f64cca 100644 --- a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/AppProperties.java +++ b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/AppProperties.java @@ -1,33 +1,33 @@ -/* Licensed Materials - Property of IBM */ -/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ - - -package org.opengroup.osdu.notification.provider.ibm.util; - -import org.opengroup.osdu.notification.provider.interfaces.IAppProperties; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -@Component -public class AppProperties implements IAppProperties { - - @Value("${app.entitlements}") - private String authorizeAPI; - @Value("${app.register}") - private String registerAPI; - @Value("${app.expireTime}") - private int expireTime; - @Value("${app.maxCacheSize}") - private int maxCacheSize; - - - public String getAuthorizeAPI() { - return authorizeAPI; - } - - public String getRegisterAPI() { - return registerAPI; - } - - -} +/* Licensed Materials - Property of IBM */ +/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ + + +package org.opengroup.osdu.notification.provider.ibm.util; + +import org.opengroup.osdu.notification.provider.interfaces.IAppProperties; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Component +public class AppProperties implements IAppProperties { + + @Value("${app.entitlements}") + private String authorizeAPI; + @Value("${app.register}") + private String registerAPI; + @Value("${app.expireTime}") + private int expireTime; + @Value("${app.maxCacheSize}") + private int maxCacheSize; + + + public String getAuthorizeAPI() { + return authorizeAPI; + } + + public String getRegisterAPI() { + return registerAPI; + } + + +} diff --git a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/GoogleServiceAccountImpl.java b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/GoogleServiceAccountImpl.java index f5740524f19563f0b4d2ce12e175e6795289db0c..3d3c32c0354e4504af3b53cb1ffec7b4c2db759b 100644 --- a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/GoogleServiceAccountImpl.java +++ b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/GoogleServiceAccountImpl.java @@ -1,24 +1,24 @@ -/* Licensed Materials - Property of IBM */ -/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ - - -package org.opengroup.osdu.notification.provider.ibm.util; - -import org.apache.http.impl.client.CloseableHttpClient; -//import org.opengroup.osdu.core.gcp.GoogleIdToken.IGoogleIdTokenFactory; -import org.opengroup.osdu.notification.provider.interfaces.IGoogleServiceAccount; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import lombok.SneakyThrows; - -@Component -public class GoogleServiceAccountImpl implements IGoogleServiceAccount { - - @SneakyThrows - @Override - public String getIdToken(String keyString, String audience) { - // TODO for GSA token validation check whether we have to impl - return "token";//this.googleIdTokenFactory.getGoogleIdToken(keyString, audience, this.closeableHttpClient); - } -} \ No newline at end of file +/* Licensed Materials - Property of IBM */ +/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ + + +package org.opengroup.osdu.notification.provider.ibm.util; + +import org.apache.http.impl.client.CloseableHttpClient; +//import org.opengroup.osdu.core.gcp.GoogleIdToken.IGoogleIdTokenFactory; +import org.opengroup.osdu.notification.provider.interfaces.IGoogleServiceAccount; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import lombok.SneakyThrows; + +@Component +public class GoogleServiceAccountImpl implements IGoogleServiceAccount { + + @SneakyThrows + @Override + public String getIdToken(String keyString, String audience) { + // TODO for GSA token validation check whether we have to impl + return "token";//this.googleIdTokenFactory.getGoogleIdToken(keyString, audience, this.closeableHttpClient); + } +} diff --git a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/IBMServiceAccountValidatorImpl.java b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/IBMServiceAccountValidatorImpl.java index 98ba70dd8d0098b1415ec3c175fa9e11d2cb679a..47ad624e24f03010fa1ee32fec5d4fd678d6e580 100644 --- a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/IBMServiceAccountValidatorImpl.java +++ b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/IBMServiceAccountValidatorImpl.java @@ -1,33 +1,33 @@ -/* Licensed Materials - Property of IBM */ -/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ - - -package org.opengroup.osdu.notification.provider.ibm.util; - -import com.google.api.client.googleapis.auth.oauth2.GoogleIdToken; -import com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier; -import com.google.api.client.http.javanet.NetHttpTransport; -import com.google.api.client.json.jackson2.JacksonFactory; -import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; -import org.opengroup.osdu.notification.provider.interfaces.IServiceAccountValidator; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class IBMServiceAccountValidatorImpl implements IServiceAccountValidator { - - - @Override - public boolean isValidPublisherServiceAccount(String jwt) { - //call isValidServiceAccount() - // Check whether IBM have to implement the service account verification for PubSub Role - // Marking it to return true, for the integration tests. - return false; - } - - @Override - public boolean isValidServiceAccount(String jwt, String userIdentity, String... googleAudiences) { - // Marking it to return true, for the integration tests. - return true; - } -} +/* Licensed Materials - Property of IBM */ +/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ + + +package org.opengroup.osdu.notification.provider.ibm.util; + +import com.google.api.client.googleapis.auth.oauth2.GoogleIdToken; +import com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier; +import com.google.api.client.http.javanet.NetHttpTransport; +import com.google.api.client.json.jackson2.JacksonFactory; +import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; +import org.opengroup.osdu.notification.provider.interfaces.IServiceAccountValidator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class IBMServiceAccountValidatorImpl implements IServiceAccountValidator { + + + @Override + public boolean isValidPublisherServiceAccount(String jwt) { + //call isValidServiceAccount() + // Check whether IBM have to implement the service account verification for PubSub Role + // Marking it to return true, for the integration tests. + return false; + } + + @Override + public boolean isValidServiceAccount(String jwt, String userIdentity, String... googleAudiences) { + // Marking it to return true, for the integration tests. + return true; + } +} diff --git a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/JwtValidity.java b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/JwtValidity.java index cee13c181f98c264c91f781e3f68c7cc00bab44c..38073f50afc2c47cc1b490073ab5c904168e9207 100644 --- a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/JwtValidity.java +++ b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/JwtValidity.java @@ -1,22 +1,22 @@ -/* Licensed Materials - Property of IBM */ -/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ - - - -package org.opengroup.osdu.notification.provider.ibm.util; - -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -public class JwtValidity { - - String token; - long expiryTime; - - JwtValidity(String jwt, long expiryTime) { - this.token = jwt; - this.expiryTime = expiryTime; - } -} +/* Licensed Materials - Property of IBM */ +/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ + + + +package org.opengroup.osdu.notification.provider.ibm.util; + +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +public class JwtValidity { + + String token; + long expiryTime; + + JwtValidity(String jwt, long expiryTime) { + this.token = jwt; + this.expiryTime = expiryTime; + } +} diff --git a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/ServiceAccountJwtIBMClientImpl.java b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/ServiceAccountJwtIBMClientImpl.java index 81cfbdf7ca4af19f2aaac5b8c4c92ce1dd3e83a0..97cd0fb273b575cc354aa36c8937940700eba264 100644 --- a/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/ServiceAccountJwtIBMClientImpl.java +++ b/provider/notification-ibm/src/main/java/org/opengroup/osdu/notification/provider/ibm/util/ServiceAccountJwtIBMClientImpl.java @@ -1,140 +1,140 @@ -/* Licensed Materials - Property of IBM */ -/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ - - -package org.opengroup.osdu.notification.provider.ibm.util; - -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLEncoder; -import java.util.HashMap; -import java.util.Map; - -import javax.net.ssl.HttpsURLConnection; - -import org.apache.http.HttpStatus; -import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; -import org.opengroup.osdu.core.common.model.http.AppException; -import org.opengroup.osdu.core.common.util.IServiceAccountJwtClient; -import org.opengroup.osdu.core.ibm.util.KeyCloakProvider; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -import com.google.gson.Gson; -import com.google.gson.JsonObject; - -import lombok.extern.slf4j.Slf4j; - -@Slf4j -@Component -public class ServiceAccountJwtIBMClientImpl implements IServiceAccountJwtClient { - - //private AppProperties config; - /*@Autowired - JaxRsDpsLog log;*/ - @Value("${keycloak.url}") - private String url; - @Value("${keycloak.realm}") - private String realm; - @Value("${keycloak.client_id}") - private String client_id; - @Value("${keycloak.client_secert}") - private String client_secret; - private String grant_type = "password"; - @Value("${keycloak.user}") - private String user; - @Value("${keycloak.password}") - private String pwd; - -/* public ServiceAccountJwtIBMClientImpl(AppProperties config) { - if (config == null) { - throw new IllegalArgumentException("AppProperties is null when initializing jwt client."); - } else { - this.config = config; - } - }*/ - - @Override - public String getIdToken(String tenantName) { - /* String t1=null; - try { - t1=KeyCloakProvider.getToken(user, pwd); - System.out.println("************t1 "+t1); - return "Bearer "+t1; - } catch (IOException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - }*/ - String token_endpoint = String.format("https://%s/auth/realms/%s/protocol/openid-connect/token", url, realm); - URL url; - String token = null; - HttpsURLConnection con; - try { - url = new URL(token_endpoint); - con = (HttpsURLConnection) url.openConnection(); - con.setRequestMethod("POST"); - con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - Map<String, String> parameters = new HashMap<>(); - parameters.put("grant_type", grant_type); - parameters.put("client_id", client_id); - parameters.put("client_secret", client_secret); - parameters.put("username", user); - parameters.put("password", pwd); - - con.setDoOutput(true); - DataOutputStream out = new DataOutputStream(con.getOutputStream()); - out.writeBytes(getParamsString(parameters)); - out.flush(); - out.close(); - - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); - String inputLine; - StringBuffer content = new StringBuffer(); - while ((inputLine = in.readLine()) != null) { - content.append(inputLine); - } - in.close(); - - con.disconnect(); - - Gson gson = new Gson(); - JsonObject jobj = gson.fromJson(content.toString(), JsonObject.class); - token = jobj.get("access_token").getAsString(); - token = "Bearer "+token; - } catch (MalformedURLException e) { - log.error("MalformedURLException while generating token"+e.getMessage()); - e.printStackTrace(); - } catch (IOException e) { - log.error("IOException while generating token"+e.getMessage()); - throw new AppException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "Provided invalid details", "Error generating token"); - } - return token; - // TODO : Implement jwtCache for storing generated token - } - - private static String getParamsString(Map<String, String> params) - throws UnsupportedEncodingException { - StringBuilder result = new StringBuilder(); - - for (Map.Entry<String, String> entry : params.entrySet()) { - result.append(URLEncoder.encode(entry.getKey(), "UTF-8")); - result.append("="); - result.append(URLEncoder.encode(entry.getValue(), "UTF-8")); - result.append("&"); - } - - String resultString = result.toString(); - return resultString.length() > 0 - ? resultString.substring(0, resultString.length() - 1) - : resultString; - } - -} - - +/* Licensed Materials - Property of IBM */ +/* (c) Copyright IBM Corp. 2020. All Rights Reserved.*/ + + +package org.opengroup.osdu.notification.provider.ibm.util; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLEncoder; +import java.util.HashMap; +import java.util.Map; + +import javax.net.ssl.HttpsURLConnection; + +import org.apache.http.HttpStatus; +import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; +import org.opengroup.osdu.core.common.model.http.AppException; +import org.opengroup.osdu.core.common.util.IServiceAccountJwtClient; +import org.opengroup.osdu.core.ibm.util.KeyCloakProvider; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import com.google.gson.Gson; +import com.google.gson.JsonObject; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Component +public class ServiceAccountJwtIBMClientImpl implements IServiceAccountJwtClient { + + //private AppProperties config; + /*@Autowired + JaxRsDpsLog log;*/ + @Value("${keycloak.url}") + private String url; + @Value("${keycloak.realm}") + private String realm; + @Value("${keycloak.client_id}") + private String client_id; + @Value("${keycloak.client_secert}") + private String client_secret; + private String grant_type = "password"; + @Value("${keycloak.user}") + private String user; + @Value("${keycloak.password}") + private String pwd; + +/* public ServiceAccountJwtIBMClientImpl(AppProperties config) { + if (config == null) { + throw new IllegalArgumentException("AppProperties is null when initializing jwt client."); + } else { + this.config = config; + } + }*/ + + @Override + public String getIdToken(String tenantName) { + /* String t1=null; + try { + t1=KeyCloakProvider.getToken(user, pwd); + System.out.println("************t1 "+t1); + return "Bearer "+t1; + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + }*/ + String token_endpoint = String.format("https://%s/auth/realms/%s/protocol/openid-connect/token", url, realm); + URL url; + String token = null; + HttpsURLConnection con; + try { + url = new URL(token_endpoint); + con = (HttpsURLConnection) url.openConnection(); + con.setRequestMethod("POST"); + con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + Map<String, String> parameters = new HashMap<>(); + parameters.put("grant_type", grant_type); + parameters.put("client_id", client_id); + parameters.put("client_secret", client_secret); + parameters.put("username", user); + parameters.put("password", pwd); + + con.setDoOutput(true); + DataOutputStream out = new DataOutputStream(con.getOutputStream()); + out.writeBytes(getParamsString(parameters)); + out.flush(); + out.close(); + + BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); + String inputLine; + StringBuffer content = new StringBuffer(); + while ((inputLine = in.readLine()) != null) { + content.append(inputLine); + } + in.close(); + + con.disconnect(); + + Gson gson = new Gson(); + JsonObject jobj = gson.fromJson(content.toString(), JsonObject.class); + token = jobj.get("access_token").getAsString(); + token = "Bearer "+token; + } catch (MalformedURLException e) { + log.error("MalformedURLException while generating token"+e.getMessage()); + e.printStackTrace(); + } catch (IOException e) { + log.error("IOException while generating token"+e.getMessage()); + throw new AppException(HttpStatus.SC_INTERNAL_SERVER_ERROR, "Provided invalid details", "Error generating token"); + } + return token; + // TODO : Implement jwtCache for storing generated token + } + + private static String getParamsString(Map<String, String> params) + throws UnsupportedEncodingException { + StringBuilder result = new StringBuilder(); + + for (Map.Entry<String, String> entry : params.entrySet()) { + result.append(URLEncoder.encode(entry.getKey(), "UTF-8")); + result.append("="); + result.append(URLEncoder.encode(entry.getValue(), "UTF-8")); + result.append("&"); + } + + String resultString = result.toString(); + return resultString.length() > 0 + ? resultString.substring(0, resultString.length() - 1) + : resultString; + } + +} + + diff --git a/provider/notification-ibm/src/main/resources/application.properties b/provider/notification-ibm/src/main/resources/application.properties index da5dcf415d247c231f4289c80a1e9a05dea0ecf0..197165f2a68519e6b8bbb1bc8b3ad92b9a443e66 100644 --- a/provider/notification-ibm/src/main/resources/application.properties +++ b/provider/notification-ibm/src/main/resources/application.properties @@ -1,12 +1,12 @@ - - -LOG_PREFIX=notification -server.servlet.contextPath=/ -app.expireTime=300 -app.maxCacheSize=10 -server.error.whitelabel.enabled=false - -keycloak.url=TODO -keycloak.realm=TODO -keycloak.client_id=TODO -keycloak.client_secert=TODO \ No newline at end of file + + +LOG_PREFIX=notification +server.servlet.contextPath=/ +app.expireTime=300 +app.maxCacheSize=10 +server.error.whitelabel.enabled=false + +keycloak.url=TODO +keycloak.realm=TODO +keycloak.client_id=TODO +keycloak.client_secert=TODO diff --git a/provider/notification-reference/pom.xml b/provider/notification-reference/pom.xml index e9996f3245664c572e9ec5b4e3fe717642e1eea4..a4d22a17a291a92a020fe12e81cb144884faf74e 100644 --- a/provider/notification-reference/pom.xml +++ b/provider/notification-reference/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-reference</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> @@ -35,7 +35,7 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-core</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/testing/notification-test-anthos/pom.xml b/testing/notification-test-anthos/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..61865ad75e1b8fa5feb24caef20b02c6ad24303f --- /dev/null +++ b/testing/notification-test-anthos/pom.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2002-2022 Google LLC + Copyright 2002-2022 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. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.opengroup.osdu</groupId> + <artifactId>os-notification-testing</artifactId> + <version>0.16.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>notification-test-anthos</artifactId> + <version>0.16.0-SNAPSHOT</version> + <name>notification-test-anthos</name> + <description>Integration tests Anthos for notification</description> + <packaging>jar</packaging> + + <properties> + <java.version>8</java.version> + <maven.compiler.target>${java.version}</maven.compiler.target> + <maven.compiler.source>${java.version}</maven.compiler.source> + </properties> + + <dependencies> + <dependency> + <groupId>org.opengroup.osdu.notification</groupId> + <artifactId>notification-test-core</artifactId> + <version>0.16.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.opengroup.osdu</groupId> + <artifactId>os-core-common</artifactId> + <version>0.3.6</version> + </dependency> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <version>1.18.8</version> + </dependency> + <dependency> + <groupId>org.opengroup.osdu</groupId> + <artifactId>core-test-lib-gcp</artifactId> + <version>0.0.2</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + </dependency> + <dependency> + <groupId>com.nimbusds</groupId> + <artifactId>oauth2-oidc-sdk</artifactId> + <version>9.15</version> + </dependency> + </dependencies> + +</project> diff --git a/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/api/TestPubSubEndpointGSA.java b/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/api/TestPubSubEndpointGSA.java new file mode 100644 index 0000000000000000000000000000000000000000..da4c56e88bdc7fd1e1c68f38fbe0a21cc3f48202 --- /dev/null +++ b/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/api/TestPubSubEndpointGSA.java @@ -0,0 +1,89 @@ +/* + Copyright 2002-2022 Google LLC + Copyright 2002-2022 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.notification.api; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import com.sun.jersey.api.client.ClientResponse; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.opengroup.osdu.notification.util.AnthosTestUtils; + +public class TestPubSubEndpointGSA extends PubsubEndpointGSATests { + + private static final AnthosTestUtils gcpTestUtils = new AnthosTestUtils(); + + + @BeforeClass + public static void classSetup() throws Exception { + PubsubEndpointGSATests.classSetup(gcpTestUtils.getOpsToken()); + } + + @AfterClass + public static void classTearDown() throws Exception { + } + + @Before + @Override + public void setup() throws Exception { + this.testUtils = new AnthosTestUtils(); + } + + @After + @Override + public void tearDown() throws Exception { + this.testUtils = null; + } + + @Override + @Test + public void should_return20X_when_usingCredentialsWithOpsPermission() throws Exception { + createResource(); + + try { + ClientResponse response = descriptor.run(getArg(), testUtils.getOpsToken()); + + assertEquals(error(response.getStatus() == 204 ? "" : response.getEntity(String.class)), + expectedOkResponseCode(), response.getStatus()); + assertEquals("GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH", + response.getHeaders().getFirst("Access-Control-Allow-Methods")); + assertEquals( + "access-control-allow-origin, origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey", + response.getHeaders().getFirst("Access-Control-Allow-Headers")); + assertEquals("*", response.getHeaders().getFirst("Access-Control-Allow-Origin")); + assertEquals("true", response.getHeaders().getFirst("Access-Control-Allow-Credentials")); + assertEquals("DENY", response.getHeaders().getFirst("X-Frame-Options")); + assertEquals("1; mode=block", response.getHeaders().getFirst("X-XSS-Protection")); + assertEquals("nosniff", response.getHeaders().getFirst("X-Content-Type-Options")); + assertEquals("no-cache, no-store, must-revalidate", + response.getHeaders().getFirst("Cache-Control")); + assertEquals("default-src 'self'", response.getHeaders().getFirst("Content-Security-Policy")); + assertTrue(response.getHeaders().get("Strict-Transport-Security").get(0) + .contains("max-age=31536000")); + assertTrue(response.getHeaders().get("Strict-Transport-Security").get(0) + .contains("includeSubDomains")); + assertEquals("0", response.getHeaders().getFirst("Expires")); + } finally { + deleteResource(); + } + } +} \ No newline at end of file diff --git a/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/api/TestPubSubEndpointHMAC.java b/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/api/TestPubSubEndpointHMAC.java new file mode 100644 index 0000000000000000000000000000000000000000..1f5e091d9acd36c89369b9f8fc9b69d7d1031857 --- /dev/null +++ b/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/api/TestPubSubEndpointHMAC.java @@ -0,0 +1,86 @@ +/* + Copyright 2002-2022 Google LLC + Copyright 2002-2022 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.notification.api; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import com.sun.jersey.api.client.ClientResponse; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.opengroup.osdu.notification.util.AnthosTestUtils; + +public class TestPubSubEndpointHMAC extends PubsubEndpointHMACTests { + + @BeforeClass + public static void classSetup() throws Exception { + PubsubEndpointHMACTests.classSetup(); + } + + @AfterClass + public static void classTearDown() throws Exception { + } + + @Before + @Override + public void setup() throws Exception { + this.testUtils = new AnthosTestUtils(); + } + + @After + @Override + public void tearDown() throws Exception { + this.testUtils = null; + } + + @Override + @Test + public void should_return20X_when_usingCredentialsWithOpsPermission() throws Exception { + createResource(); + + try { + ClientResponse response = descriptor.run(getArg(), testUtils.getOpsToken()); + + assertEquals(error(response.getStatus() == 204 ? "" : response.getEntity(String.class)), + expectedOkResponseCode(), response.getStatus()); + assertEquals("GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH", + response.getHeaders().getFirst("Access-Control-Allow-Methods")); + assertEquals( + "access-control-allow-origin, origin, content-type, accept, authorization, data-partition-id, correlation-id, appkey", + response.getHeaders().getFirst("Access-Control-Allow-Headers")); + assertEquals("*", response.getHeaders().getFirst("Access-Control-Allow-Origin")); + assertEquals("true", response.getHeaders().getFirst("Access-Control-Allow-Credentials")); + assertEquals("DENY", response.getHeaders().getFirst("X-Frame-Options")); + assertEquals("1; mode=block", response.getHeaders().getFirst("X-XSS-Protection")); + assertEquals("nosniff", response.getHeaders().getFirst("X-Content-Type-Options")); + assertEquals("no-cache, no-store, must-revalidate", + response.getHeaders().getFirst("Cache-Control")); + assertEquals("default-src 'self'", response.getHeaders().getFirst("Content-Security-Policy")); + assertTrue(response.getHeaders().get("Strict-Transport-Security").get(0) + .contains("max-age=31536000")); + assertTrue(response.getHeaders().get("Strict-Transport-Security").get(0) + .contains("includeSubDomains")); + assertEquals("0", response.getHeaders().getFirst("Expires")); + } finally { + deleteResource(); + } + } +} \ No newline at end of file diff --git a/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/config/OpenIDProviderConfig.java b/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/config/OpenIDProviderConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..58994bd3e7f5f09d1ed8c7ccb604c3d33da70e99 --- /dev/null +++ b/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/config/OpenIDProviderConfig.java @@ -0,0 +1,129 @@ +/* + Copyright 2002-2022 Google LLC + Copyright 2002-2022 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.notification.config; + +import com.nimbusds.oauth2.sdk.http.HTTPRequest; +import com.nimbusds.oauth2.sdk.http.HTTPResponse; +import com.nimbusds.oauth2.sdk.id.Issuer; +import com.nimbusds.openid.connect.sdk.op.OIDCProviderConfigurationRequest; +import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class OpenIDProviderConfig { + + private String opsClientId; + private String opsClientSecret; + private String adminClientId; + private String adminClientSecret; + private String editorClientId; + private String editorClientSecret; + private String noAccessClientId; + private String noAccessClientSecret; + private String url; + private final String[] scopes = {"openid"}; + private static final OpenIDProviderConfig openIDProviderConfig = new OpenIDProviderConfig(); + private static OIDCProviderMetadata providerMetadata; + + public static OpenIDProviderConfig Instance() { + try { + openIDProviderConfig.opsClientId = System.getProperty("TEST_DE_OPS_OPENID_PROVIDER_CLIENT_ID", + System.getenv("TEST_DE_OPS_OPENID_PROVIDER_CLIENT_ID")); + openIDProviderConfig.opsClientSecret = System.getProperty( + "TEST_DE_OPS_OPENID_PROVIDER_CLIENT_SECRET", + System.getenv("TEST_DE_OPS_OPENID_PROVIDER_CLIENT_SECRET")); + + openIDProviderConfig.adminClientId = System.getProperty( + "TEST_DE_ADMIN_OPENID_PROVIDER_CLIENT_ID", + System.getenv("TEST_DE_ADMIN_OPENID_PROVIDER_CLIENT_ID")); + openIDProviderConfig.adminClientSecret = System.getProperty( + "TEST_DE_ADMIN_OPENID_PROVIDER_CLIENT_SECRET", + System.getenv("TEST_DE_ADMIN_OPENID_PROVIDER_CLIENT_SECRET")); + + openIDProviderConfig.editorClientId = System.getProperty( + "TEST_DE_EDITOR_OPENID_PROVIDER_CLIENT_ID", + System.getenv("TEST_DE_EDITOR_OPENID_PROVIDER_CLIENT_ID")); + openIDProviderConfig.editorClientSecret = System.getProperty( + "TEST_DE_EDITOR_OPENID_PROVIDER_CLIENT_SECRET", + System.getenv("TEST_DE_EDITOR_OPENID_PROVIDER_CLIENT_SECRET")); + + openIDProviderConfig.noAccessClientId = System.getProperty( + "TEST_NO_ACCESS_OPENID_PROVIDER_CLIENT_ID", + System.getenv("TEST_NO_ACCESS_OPENID_PROVIDER_CLIENT_ID")); + openIDProviderConfig.noAccessClientSecret = System.getProperty( + "TEST_NO_ACCESS_OPENID_PROVIDER_CLIENT_SECRET", + System.getenv("TEST_NO_ACCESS_OPENID_PROVIDER_CLIENT_SECRET")); + + openIDProviderConfig.url = + System.getProperty("TEST_OPENID_PROVIDER_URL", System.getenv("TEST_OPENID_PROVIDER_URL")); + Issuer issuer = new Issuer(openIDProviderConfig.url); + OIDCProviderConfigurationRequest request = new OIDCProviderConfigurationRequest(issuer); + HTTPRequest httpRequest = request.toHTTPRequest(); + HTTPResponse httpResponse = httpRequest.send(); + providerMetadata = OIDCProviderMetadata.parse(httpResponse.getContentAsJSONObject()); + } catch (Exception e) { + throw new RuntimeException("Malformed token provider configuration", e); + } + return openIDProviderConfig; + } + + public String getOpsClientId() { + return opsClientId; + } + + public String getOpsClientSecret() { + return opsClientSecret; + } + + public String getAdminClientId() { + return adminClientId; + } + + public String getAdminClientSecret() { + return adminClientSecret; + } + + public String getEditorClientId() { + return editorClientId; + } + + public String getEditorClientSecret() { + return editorClientSecret; + } + + public String getNoAccessClientId() { + return noAccessClientId; + } + + public String getNoAccessClientSecret() { + return noAccessClientSecret; + } + + public String getUrl() { + return url; + } + + public String[] getScopes() { + return scopes; + } + + public OIDCProviderMetadata getProviderMetadata() { + return providerMetadata; + } +} + diff --git a/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/util/AnthosTestUtils.java b/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/util/AnthosTestUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..26fea32b42e4949962629bbcf8522d2eb29eb338 --- /dev/null +++ b/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/util/AnthosTestUtils.java @@ -0,0 +1,49 @@ +/* + Copyright 2002-2022 Google LLC + Copyright 2002-2022 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.notification.util; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class AnthosTestUtils extends TestUtils { + + private OpenIDTokenProvider tokenProvider = new OpenIDTokenProvider(); + + public AnthosTestUtils() { + } + + @Override + public synchronized String getOpsToken() { + return "Bearer " + tokenProvider.getOpsAccessToken(); + } + + @Override + public synchronized String getAdminToken() { + return "Bearer " + tokenProvider.getAdminAccessToken(); + } + + @Override + public synchronized String getEditorToken() { + return "Bearer " + tokenProvider.getEditorAccessToken(); + } + + @Override + public synchronized String getNoAccessToken() { + return "Bearer " + tokenProvider.getNoAccessToken(); + } +} \ No newline at end of file diff --git a/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/util/OpenIDTokenProvider.java b/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/util/OpenIDTokenProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..0b5d220ae7616453c0033f1c5f3cb8cb2b0a4d59 --- /dev/null +++ b/testing/notification-test-anthos/src/test/java/org/opengroup/osdu/notification/util/OpenIDTokenProvider.java @@ -0,0 +1,138 @@ +/* + Copyright 2002-2022 Google LLC + Copyright 2002-2022 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.notification.util; + +import com.nimbusds.oauth2.sdk.AuthorizationGrant; +import com.nimbusds.oauth2.sdk.ClientCredentialsGrant; +import com.nimbusds.oauth2.sdk.ParseException; +import com.nimbusds.oauth2.sdk.Scope; +import com.nimbusds.oauth2.sdk.TokenRequest; +import com.nimbusds.oauth2.sdk.TokenResponse; +import com.nimbusds.oauth2.sdk.auth.ClientAuthentication; +import com.nimbusds.oauth2.sdk.auth.ClientSecretBasic; +import com.nimbusds.oauth2.sdk.auth.Secret; +import com.nimbusds.oauth2.sdk.id.ClientID; +import com.nimbusds.openid.connect.sdk.OIDCTokenResponseParser; +import java.io.IOException; +import java.net.URI; +import java.util.Objects; +import net.minidev.json.JSONObject; +import org.opengroup.osdu.notification.config.OpenIDProviderConfig; + +public class OpenIDTokenProvider { + + private static final OpenIDProviderConfig openIDProviderConfig = OpenIDProviderConfig.Instance(); + private static final String ID_TOKEN = "id_token"; + private final AuthorizationGrant clientGrant = new ClientCredentialsGrant(); + private final URI tokenEndpointURI; + private final Scope scope; + private final ClientAuthentication opsClientAuthentication; + private final ClientAuthentication adminClientAuthentication; + private final ClientAuthentication editorClientAuthentication; + private final ClientAuthentication noAccessClientAuthentication; + + public OpenIDTokenProvider() { + this.tokenEndpointURI = openIDProviderConfig.getProviderMetadata().getTokenEndpointURI(); + this.scope = new Scope(openIDProviderConfig.getScopes()); + this.opsClientAuthentication = + new ClientSecretBasic( + new ClientID(openIDProviderConfig.getOpsClientId()), + new Secret(openIDProviderConfig.getOpsClientSecret()) + ); + this.adminClientAuthentication = + new ClientSecretBasic( + new ClientID(openIDProviderConfig.getAdminClientId()), + new Secret(openIDProviderConfig.getAdminClientSecret()) + ); + this.editorClientAuthentication = + new ClientSecretBasic( + new ClientID(openIDProviderConfig.getEditorClientId()), + new Secret(openIDProviderConfig.getEditorClientSecret()) + ); + this.noAccessClientAuthentication = + new ClientSecretBasic( + new ClientID(openIDProviderConfig.getNoAccessClientId()), + new Secret(openIDProviderConfig.getNoAccessClientSecret()) + ); + } + + public String getOpsAccessToken() { + try { + TokenRequest request = + new TokenRequest(this.tokenEndpointURI, this.opsClientAuthentication, this.clientGrant, + this.scope); + return requestToken(request); + } catch (ParseException | IOException e) { + throw new RuntimeException( + "Unable get credentials from TEST_DE_OPS_OPENID_PROVIDER_CLIENT_ID variables", e); + } + } + + public String getAdminAccessToken() { + try { + TokenRequest request = + new TokenRequest(this.tokenEndpointURI, this.adminClientAuthentication, this.clientGrant, + this.scope); + return requestToken(request); + } catch (ParseException | IOException e) { + throw new RuntimeException( + "Unable get credentials from TEST_DE_ADMIN_OPENID_PROVIDER_CLIENT_ID variables", e); + } + } + + public String getEditorAccessToken() { + try { + TokenRequest request = + new TokenRequest(this.tokenEndpointURI, this.editorClientAuthentication, this.clientGrant, + this.scope); + return requestToken(request); + } catch (ParseException | IOException e) { + throw new RuntimeException( + "Unable get credentials from TEST_DE_EDITOR_OPENID_PROVIDER_CLIENT_ID variables", e); + } + } + + public String getNoAccessToken() { + try { + TokenRequest request = + new TokenRequest(this.tokenEndpointURI, this.noAccessClientAuthentication, + this.clientGrant, this.scope); + return requestToken(request); + } catch (ParseException | IOException e) { + throw new RuntimeException( + "Unable get credentials from TEST_NO_ACCESS_OPENID_PROVIDER_CLIENT_ID variables", e); + } + } + + private String requestToken(TokenRequest tokenRequest) throws ParseException, IOException { + + TokenResponse parse = OIDCTokenResponseParser.parse(tokenRequest.toHTTPRequest().send()); + + if (!parse.indicatesSuccess()) { + throw new RuntimeException("Unable get credentials variables"); + } + + JSONObject jsonObject = parse.toSuccessResponse().toJSONObject(); + String idTokenValue = jsonObject.getAsString(ID_TOKEN); + if (Objects.isNull(idTokenValue) || idTokenValue.isEmpty()) { + throw new RuntimeException("Unable get credentials variables"); + } + return idTokenValue; + } + +} diff --git a/testing/notification-test-anthos/src/test/resources/logback-test.xml b/testing/notification-test-anthos/src/test/resources/logback-test.xml new file mode 100644 index 0000000000000000000000000000000000000000..22c6175d45f368b69c4006deb9ebf3ff5084579a --- /dev/null +++ b/testing/notification-test-anthos/src/test/resources/logback-test.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration> + <include resource="org/springframework/boot/logging/logback/defaults.xml"/> + <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> +</configuration> diff --git a/testing/notification-test-aws/pom.xml b/testing/notification-test-aws/pom.xml index 83323ddec9a86ba584ab8a332160a7732f8657f9..41a6497a66486fa123ca6cdc99b561ebb2fa3150 100644 --- a/testing/notification-test-aws/pom.xml +++ b/testing/notification-test-aws/pom.xml @@ -21,13 +21,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification-testing</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-test-aws</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <name>notification-test-aws</name> <description>AWS Integration tests for Notification Service</description> <packaging>jar</packaging> @@ -54,7 +54,7 @@ <dependency> <groupId>org.opengroup.osdu.notification</groupId> <artifactId>notification-test-core</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.opengroup.osdu</groupId> diff --git a/testing/notification-test-azure/pom.xml b/testing/notification-test-azure/pom.xml index 024a39e408b5e465921a7aa63da3ffe74f54630b..27062c156aaa5283a97ea16a15ffd498b64c6cbe 100644 --- a/testing/notification-test-azure/pom.xml +++ b/testing/notification-test-azure/pom.xml @@ -21,13 +21,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification-testing</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-test-azure</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <name>notification-test-azure</name> <description>Integration tests Azure for notification</description> <packaging>jar</packaging> @@ -42,7 +42,7 @@ <dependency> <groupId>org.opengroup.osdu.notification</groupId> <artifactId>notification-test-core</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> </dependency> <dependency> diff --git a/testing/notification-test-core/pom.xml b/testing/notification-test-core/pom.xml index 0a4e23c2438154a4da3aefc08eb678488355d063..4486ef88fde5c0c3f7c3192f79cbcdeb548ebf68 100644 --- a/testing/notification-test-core/pom.xml +++ b/testing/notification-test-core/pom.xml @@ -21,13 +21,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification-testing</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu.notification</groupId> <artifactId>notification-test-core</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <name>notification-test-core</name> <description>Integration tests core for notification</description> <packaging>jar</packaging> diff --git a/testing/notification-test-gcp/pom.xml b/testing/notification-test-gcp/pom.xml index 7fcade27117a59ce485f78b4462d0116cda860f5..ef2cdf2d327e18ead70c5cda13f33678938169ba 100644 --- a/testing/notification-test-gcp/pom.xml +++ b/testing/notification-test-gcp/pom.xml @@ -21,12 +21,12 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification-testing</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>notification-test-gcp</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <name>notification-test-gcp</name> <description>Integration tests GCP for notification</description> <packaging>jar</packaging> @@ -41,7 +41,7 @@ <dependency> <groupId>org.opengroup.osdu.notification</groupId> <artifactId>notification-test-core</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.opengroup.osdu</groupId> diff --git a/testing/notification-test-ibm/pom.xml b/testing/notification-test-ibm/pom.xml index 881b86b41ead47a7d05be32f04e069caf0fd97ad..89772c311648b9242b992d8c97d0a28f1d641f15 100644 --- a/testing/notification-test-ibm/pom.xml +++ b/testing/notification-test-ibm/pom.xml @@ -18,13 +18,13 @@ <parent> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification-testing</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.opengroup.osdu</groupId> <artifactId>notification-test-ibm</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <name>notification-test-ibm</name> <description>Integration tests IBM for notification</description> <packaging>jar</packaging> @@ -33,7 +33,7 @@ <java.version>8</java.version> <maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.source>${java.version}</maven.compiler.source> - <os-core-lib-ibm.version>0.14.0</os-core-lib-ibm.version> + <os-core-lib-ibm.version>0.15.2</os-core-lib-ibm.version> </properties> <dependencies> @@ -45,7 +45,7 @@ <dependency> <groupId>org.opengroup.osdu.notification</groupId> <artifactId>notification-test-core</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.opengroup.osdu</groupId> diff --git a/testing/pom.xml b/testing/pom.xml index afeb418f8de6d6e93e2e8984d6d3336fbd14a4bd..d3a3bdaa79d807f2e6fad852deb27a361bfb958e 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -18,7 +18,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.opengroup.osdu</groupId> <artifactId>os-notification-testing</artifactId> - <version>0.15.0-SNAPSHOT</version> + <version>0.16.0-SNAPSHOT</version> <description>Root Notification Service project</description> <packaging>pom</packaging> @@ -35,6 +35,7 @@ <module>notification-test-gcp</module> <module>notification-test-aws</module> <module>notification-test-ibm</module> + <module>notification-test-anthos</module> </modules> <repositories>