Merge "Added kafka interface stub"
authorHenrik Andersson <henrik.b.andersson@est.tech>
Thu, 2 Dec 2021 14:03:16 +0000 (14:03 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Thu, 2 Dec 2021 14:03:16 +0000 (14:03 +0000)
36 files changed:
a1-policy-management-service/.gitignore [moved from policy-agent/.gitignore with 100% similarity]
a1-policy-management-service/Dockerfile [moved from policy-agent/Dockerfile with 88% similarity]
a1-policy-management-service/README.md [moved from policy-agent/README.md with 100% similarity]
a1-policy-management-service/dpo/blueprints/k8s-policy-agent.yaml [moved from policy-agent/dpo/blueprints/k8s-policy-agent.yaml with 100% similarity]
a1-policy-management-service/eclipse-formatter.xml [moved from policy-agent/eclipse-formatter.xml with 100% similarity]
a1-policy-management-service/pom.xml [moved from policy-agent/pom.xml with 100% similarity]
a1-policy-management-service/src [moved from policy-agent/src with 100% similarity]
dmaap-adaptor-java/Dockerfile
dmaap-mediator-producer/build_and_test.sh [new file with mode: 0755]
dmaap-mediator-producer/pom.xml [new file with mode: 0644]
docker-compose/.env
docker-compose/README.md
docker-compose/data/prepareIcsData.sh [moved from docker-compose/data/prepareEcsData.sh with 55% similarity]
docker-compose/data/sendMsgToMediator.sh
docker-compose/data/testdata/ICS/InfoJob.json [moved from docker-compose/data/testdata/ECS/EiJob.json with 100% similarity]
docker-compose/data/testdata/ICS/InfoProducer.json [moved from docker-compose/data/testdata/ECS/EiProducer.json with 100% similarity]
docker-compose/data/testdata/ICS/InfoType.json [moved from docker-compose/data/testdata/ECS/EiType.json with 100% similarity]
docker-compose/data/testdata/dmaap-mediator-java/flow.puml
docker-compose/dmaap-mediator-java/config/application.yaml
docker-compose/ics/docker-compose.yaml [moved from docker-compose/ecs/docker-compose.yaml with 100% similarity]
docs/api-docs.rst
docs/conf.py
docs/installation-guide.rst
docs/overview.rst
helm-manager/Dockerfile
information-coordinator-service/Dockerfile
information-coordinator-service/api/ics-api.json
information-coordinator-service/api/ics-api.yaml
information-coordinator-service/config/application.yaml
pom.xml
r-app-catalogue/Dockerfile
test/cr/Dockerfile
test/http-https-proxy/Dockerfile
test/mrstub/Dockerfile
test/prodstub/Dockerfile
test/usecases/oruclosedlooprecovery/scriptversion/app/Dockerfile

similarity index 88%
rename from policy-agent/Dockerfile
rename to a1-policy-management-service/Dockerfile
index f64eebb..3775b39 100644 (file)
@@ -34,8 +34,11 @@ ADD /config/application_configuration.json /opt/app/policy-agent/data/applicatio
 ADD /config/keystore.jks /opt/app/policy-agent/etc/cert/keystore.jks
 ADD /config/truststore.jks /opt/app/policy-agent/etc/cert/truststore.jks
 
-RUN chmod -R 777 /opt/app/policy-agent/config/
-RUN chmod -R 777 /opt/app/policy-agent/data/
+RUN groupadd -g 999 appuser && \
+    useradd -r -u 999 -g appuser appuser
+RUN chown -R appuser:appuser /opt/app/policy-agent
+RUN chown -R appuser:appuser /var/log/policy-agent
+USER appuser
 
 ADD target/${JAR} /opt/app/policy-agent/policy-agent.jar
 CMD ["java", "-jar", "/opt/app/policy-agent/policy-agent.jar"]
index b2c0c30..9843699 100644 (file)
@@ -30,14 +30,18 @@ WORKDIR /opt/app/dmaap-adaptor-service
 RUN mkdir -p /var/log/dmaap-adaptor-service
 RUN mkdir -p /opt/app/dmaap-adaptor-service/etc/cert/
 RUN mkdir -p /var/dmaap-adaptor-service
-RUN chmod -R 777 /var/dmaap-adaptor-service
 
 ADD /config/application.yaml /opt/app/dmaap-adaptor-service/config/application.yaml
 ADD /config/application_configuration.json /opt/app/dmaap-adaptor-service/data/application_configuration.json_example
 ADD /config/keystore.jks /opt/app/dmaap-adaptor-service/etc/cert/keystore.jks
 ADD /config/truststore.jks /opt/app/dmaap-adaptor-service/etc/cert/truststore.jks
 
-RUN chmod -R 777 /opt/app/dmaap-adaptor-service/config/
+
+RUN groupadd -g 999 appuser && \
+    useradd -r -u 999 -g appuser appuser
+RUN chown -R appuser:appuser /var/dmaap-adaptor-service/
+RUN chown -R appuser:appuser /opt/app/dmaap-adaptor-service/
+USER appuser
 
 ADD target/${JAR} /opt/app/dmaap-adaptor-service/dmaap-adaptor.jar
 CMD ["java", "-jar", "/opt/app/dmaap-adaptor-service/dmaap-adaptor.jar"]
diff --git a/dmaap-mediator-producer/build_and_test.sh b/dmaap-mediator-producer/build_and_test.sh
new file mode 100755 (executable)
index 0000000..397124d
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+##############################################################################
+#
+#   Copyright (C) 2021: Nordix Foundation
+#
+#   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.
+#
+##############################################################################
+
+go build
+
+go test ./...
diff --git a/dmaap-mediator-producer/pom.xml b/dmaap-mediator-producer/pom.xml
new file mode 100644 (file)
index 0000000..0de6603
--- /dev/null
@@ -0,0 +1,47 @@
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2021 Nordix Foundation.
+  ================================================================================
+  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.
+
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+<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/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>oransc.org</groupId>
+    <artifactId>dmaapmediatorproducer</artifactId>
+    <version>1.0.0</version>
+     <build>
+        <plugins>
+            <plugin>
+              <artifactId>exec-maven-plugin</artifactId>
+              <groupId>org.codehaus.mojo</groupId>
+              <executions>
+                  <execution>
+                      <id>Build Go binary</id>
+                      <phase>generate-sources</phase>
+                      <goals>
+                          <goal>exec</goal>
+                      </goals>
+                      <configuration>
+                          <executable>${basedir}/build_and_test.sh</executable>
+                      </configuration>
+                  </execution>
+              </executions>
+          </plugin>
+      </plugins>
+    </build>
+</project>
index 8c247be..abbce20 100644 (file)
@@ -35,9 +35,9 @@ CONTROL_PANEL_IMAGE_TAG="2.2.0"
 NONRTRIC_GATEWAY_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-gateway"
 NONRTRIC_GATEWAY_IMAGE_TAG="1.0.0"
 
-#ECS
-ECS_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-information-coordinator-service"
-ECS_IMAGE_TAG="1.1.0"
+#ICS
+ICS_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-information-coordinator-service"
+ICS_IMAGE_TAG="1.1.0"
 
 #CONSUMER
 CONSUMER_IMAGE_BASE="eexit/mirror-http-server"
index 7b1eee5..8fcca7e 100644 (file)
@@ -65,8 +65,8 @@ All the generated data is shown on the web page
 By default, if the containers are started up and running by docker-compose file in the same directory, just run commands:
 ./preparePmsData.sh
 
-prepareEcsData.sh
-This is to generate some data into the ECS microservice
+prepareIcsData.sh
+This is to generate some data into the ICS microservice
 
 prepareDmaapMsg.sh
 This is to generate some data into the Dmaap MR, so that PMS reads message from MR
@@ -85,4 +85,4 @@ Make sure to follow the section regarding sample data so there is data available
 
 To start all the necessary components, run the following command:
 
-docker-compose -f docker-compose.yaml -f control-panel/docker-compose.yaml -f nonrtric-gateway/docker-compose.yaml -f policy-service/docker-compose.yaml -f ecs/docker-compose.yaml -f a1-sim/docker-compose.yaml up
+docker-compose -f docker-compose.yaml -f control-panel/docker-compose.yaml -f nonrtric-gateway/docker-compose.yaml -f policy-service/docker-compose.yaml -f ics/docker-compose.yaml -f a1-sim/docker-compose.yaml up
similarity index 55%
rename from docker-compose/data/prepareEcsData.sh
rename to docker-compose/data/prepareIcsData.sh
index 21cc35b..5871776 100755 (executable)
 
 # The scripts in data/ will generate some dummy data in the running system.
 # It will create:
-# one EiProducer in ECS
-# one EiType in ECS
-# one EiJob in ECS
+# one InfoProducer in ICS
+# one InfoType in ICS
+# one InfoJob in ICS
 
 # Run command:
-# ./prepareEcsData.sh [ECS port] [http/https]
+# ./prepareIcsData.sh [ICS port] [http/https]
 
-ecs_port=${1:-8083}
+ics_port=${1:-8083}
 httpx=${4:-"http"}
 SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
 
-echo "using ecs port: "$ecs_port
+echo "using ics port: "$ics_port
 echo "using protocol: "$httpx
 echo -e "\n"
 
-echo "ECS status:"
-curl -skw " %{http_code}" $httpx://localhost:$ecs_port/status
+echo "ICS status:"
+curl -skw " %{http_code}" $httpx://localhost:$ics_port/status
 echo -e "\n"
 
-# Create EiType
-echo "Create EiType:"
-curl -X PUT -skw %{http_code} $httpx://localhost:$ecs_port/data-producer/v1/info-types/type1 -H accept:application/json -H Content-Type:application/json --data-binary @${SHELL_FOLDER}/testdata/ECS/EiType.json
+# Create InfoType
+echo "Create InfoType:"
+curl -X PUT -skw %{http_code} $httpx://localhost:$ics_port/data-producer/v1/info-types/type1 -H accept:application/json -H Content-Type:application/json --data-binary @${SHELL_FOLDER}/testdata/ICS/InfoType.json
 echo -e "\n"
 
-# Get EiTypes
-echo "Get EiTypes:"
-curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/data-producer/v1/info-types -H Content-Type:application/json | jq
+# Get InfoTypes
+echo "Get InfoTypes:"
+curl -X GET -skw %{http_code} $httpx://localhost:$ics_port/data-producer/v1/info-types -H Content-Type:application/json | jq
 echo -e "\n"
 
-# Get Individual EiType
-echo "Get Individual EiType:"
-curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/data-producer/v1/info-types/type1 -H Content-Type:application/json | jq
+# Get Individual InfoType
+echo "Get Individual InfoType:"
+curl -X GET -skw %{http_code} $httpx://localhost:$ics_port/data-producer/v1/info-types/type1 -H Content-Type:application/json | jq
 echo -e "\n"
 
-# Create EiProducer
-echo "Create EiProducer:"
-curl -X PUT -skw %{http_code} $httpx://localhost:$ecs_port/data-producer/v1/info-producers/1 -H Content-Type:application/json --data-binary @${SHELL_FOLDER}/testdata/ECS/EiProducer.json
+# Create InfoProducer
+echo "Create InfoProducer:"
+curl -X PUT -skw %{http_code} $httpx://localhost:$ics_port/data-producer/v1/info-producers/1 -H Content-Type:application/json --data-binary @${SHELL_FOLDER}/testdata/ICS/InfoProducer.json
 echo -e "\n"
 
-# Get EiProducers
-echo "Get EiProducers:"
-curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/data-producer/v1/info-producers -H Content-Type:application/json | jq
+# Get InfoProducers
+echo "Get InfoProducers:"
+curl -X GET -skw %{http_code} $httpx://localhost:$ics_port/data-producer/v1/info-producers -H Content-Type:application/json | jq
 echo -e "\n"
 
-# Get Individual EiProducer
-echo "Get Individual EiProducer:"
-curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/data-producer/v1/info-producers/1 -H Content-Type:application/json | jq
+# Get Individual InfoProducer
+echo "Get Individual InfoProducer:"
+curl -X GET -skw %{http_code} $httpx://localhost:$ics_port/data-producer/v1/info-producers/1 -H Content-Type:application/json | jq
 echo -e "\n"
 
-# Get Individual EiProducer Status
-echo "Get Individual EiProducer:"
-curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/data-producer/v1/info-producers/1/status -H Content-Type:application/json | jq
+# Get Individual InfoProducer Status
+echo "Get Individual InfoProducer:"
+curl -X GET -skw %{http_code} $httpx://localhost:$ics_port/data-producer/v1/info-producers/1/status -H Content-Type:application/json | jq
 echo -e "\n"
 
-# Create EiJob
-echo "Create EiJob Of A Certain Type type1:"
-curl -X PUT -skw %{http_code} $httpx://localhost:$ecs_port/A1-EI/v1/eijobs/job1 -H Content-Type:application/json --data-binary @${SHELL_FOLDER}/testdata/ECS/EiJob.json
+# Create InfoJob
+echo "Create InfoJob Of A Certain Type type1:"
+curl -X PUT -skw %{http_code} $httpx://localhost:$ics_port/A1-EI/v1/eijobs/job1 -H Content-Type:application/json --data-binary @${SHELL_FOLDER}/testdata/ICS/InfoJob.json
 echo -e "\n"
 
-# Get EiJobs
-echo "Get EiJobs:"
-curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/A1-EI/v1/eijobs -H Content-Type:application/json | jq
+# Get InfoJobs
+echo "Get InfoJobs:"
+curl -X GET -skw %{http_code} $httpx://localhost:$ics_port/A1-EI/v1/eijobs -H Content-Type:application/json | jq
 echo -e "\n"
 
-# Get Individual EiJob:
-echo "Get Individual EiJob:"
-curl -X GET -skw %{http_code} $httpx://localhost:$ecs_port/A1-EI/v1/eijobs/job1 -H Content-Type:application/json | jq
+# Get Individual InfoJob:
+echo "Get Individual InfoJob:"
+curl -X GET -skw %{http_code} $httpx://localhost:$ics_port/A1-EI/v1/eijobs/job1 -H Content-Type:application/json | jq
 echo -e "\n"
\ No newline at end of file
index a2f3db3..2b8eb5f 100755 (executable)
@@ -24,7 +24,7 @@
 # ./sendMsgToMediator.sh [dmaap-mr port] [http/https]
 
 SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
-bash ${SHELL_FOLDER}/prepareEcsData.sh
+bash ${SHELL_FOLDER}/prepareIcsData.sh
 
 dmaa_mr_port=${1:-3904}
 httpx=${2:-"http"}
index 5295fa6..9096720 100644 (file)
@@ -1,5 +1,5 @@
 @startuml
 dmaap_mr <- dmaap_mediator: dmaap_mediator reads msg from dmaap_mr
-dmaap_mediator -> ecs: dmaap_mediator gets jobs from ecs
+dmaap_mediator -> ics: dmaap_mediator gets jobs from ics
 dmaap_mediator -> consumer: callbackUrl, send msg to consumer
 @enduml
\ No newline at end of file
index 57fd8ce..b34d02a 100755 (executable)
@@ -46,7 +46,7 @@ app:
     http.proxy-host:
     http.proxy-port: 0
   vardata-directory: /var/dmaap-adaptor-service
-  ecs-base-url: http://ecs:8083
+  ics-base-url: http://ics:8083
   # Location of the component configuration file. The file will only be used if the Consul database is not used;
   # configuration from the Consul will override the file.
   configuration-filepath: /opt/app/dmaap-adaptor-service/data/application_configuration.json
index 51d18ee..0de1b91 100644 (file)
@@ -21,6 +21,7 @@ The core Non-RT RIC consists of several parts, with available APIs described in
 
 * The A1 Policy Management Service
 * The Information Coordinator Service
+* DMaaP Adaptor
 * The Non-RT-RIC App Catalogue
 * K8S Helm Chart LCM Manager (Initial) **<ToDo>**
 
@@ -40,7 +41,23 @@ The API is also described in Swagger-JSON and YAML:
    :header: "API name", "|swagger-icon|", "|yaml-icon|"
    :widths: 10,5,5
 
-   "A1 Enrichment Information Coordination Service API", ":download:`link <../information-coordinator-service/api/ics-api.json>`", ":download:`link <../information-coordinator-service/api/ics-api.yaml>`"
+   "A1 Information Coordination Service API", ":download:`link <../information-coordinator-service/api/ics-api.json>`", ":download:`link <../information-coordinator-service/api/ics-api.yaml>`"
+
+DMaaP Adaptor
+=============
+
+The DMaaP Adaptor provides support for push delivery of any data received from DMaap or Kafka.
+
+See `DMaaP Adaptor API <./dmaap-adaptor-api.html>`_ for full details of the API.
+
+The API is also described in Swagger-JSON and YAML:
+
+
+.. csv-table::
+   :header: "API name", "|swagger-icon|", "|yaml-icon|"
+   :widths: 10,5, 5
+
+   "DMaaP Adaptor API", ":download:`link <../dmaap-adaptor-java/api/api.json>`", ":download:`link <../dmaap-adaptor-java/api/api.yaml>`"
 
 Non-RT-RIC App Catalogue (Initial)
 ==================================
index ff5fcc9..c5e504d 100644 (file)
@@ -9,7 +9,8 @@ linkcheck_ignore = [
     'http://127.0.0.1.*',
     'https://gerrit.o-ran-sc.org.*',
     './rac-api.html', #Generated file that doesn't exist at link check.
-    './ecs-api.html' #Generated file that doesn't exist at link check.
+    './ics-api.html', #Generated file that doesn't exist at link check.
+    './dmaap-adaptor-api.html' #Generated file that doesn't exist at link check.
 ]
 
 extensions = ['sphinxcontrib.redoc', 'sphinx.ext.intersphinx',]
@@ -22,10 +23,16 @@ redoc = [
                 'embed': True,
             },
             {
-                'name': 'ECS API',
-                'page': 'ecs-api',
+                'name': 'ICS API',
+                'page': 'ics-api',
                 'spec': '../information-coordinator-service/api/ics-api.json',
                 'embed': True,
+            },
+            {
+                'name': 'DMaaP Adaptor API',
+                'page': 'dmaap-adaptor-api',
+                'spec': '../dmaap-adaptor-java/api/api.json',
+                'embed': True,
             }
         ]
 
index c19a2d4..0404192 100644 (file)
@@ -28,7 +28,7 @@ command to start the components:
 
          docker-compose -f docker-compose.yaml
            -f policy-service/docker-compose.yaml
-           -f ecs/docker-compose.yaml
+           -f ics/docker-compose.yaml
 
 Install with Helm
 +++++++++++++++++
index e816975..3577e9c 100644 (file)
@@ -29,6 +29,7 @@ These are the components that make up the Non-RT-RIC:
 * Non-RT-RIC (Kong) Service Exposure Prototyping
 * Initial Non-RT-RIC App Catalogue
 * Near-RT-RIC A1 Simulator
+* DMaap Adaptor
 
 The code base for "D" Release is in the `NONRTRIC <https://gerrit.o-ran-sc.org/r/admin/repos/nonrtric>`_, `NONRTRIC-ControlPanel <https://gerrit.o-ran-sc.org/r/admin/repos/portal/nonrtric-controlpanel>`_, and `Near-RT-RIC A1-Simulator <https://gerrit.o-ran-sc.org/r/admin/repos/sim/a1-interface>`_ , Gerrit source repositories (D Branch).
 
@@ -76,6 +77,10 @@ A1 Controller Service above A1 Controller/Adaptor that provides:
 
 See also: `A1 Policy Management Service in ONAP <https://wiki.onap.org/pages/viewpage.action?pageId=84672221>`_  
 
+
+Implementation:
+* Implemented as a Java Spring Boot application
+
 A1/SDNC Controller & A1 Adapter (Controller plugin)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Mediation point for A1 interface termination in SMO/NONRTRIC
@@ -90,8 +95,8 @@ Mediation point for A1 interface termination in SMO/NONRTRIC
 
 See also: `A1 Adapter/Controller Functions in ONAP <https://wiki.onap.org/pages/viewpage.action?pageId=84672221>`_  
   
-Information Job Coordination Service
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Information Coordination Service
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Coordinate/Register A1-EI Types, Producers, Consumers, and Jobs.
 
@@ -108,6 +113,20 @@ Coordinate/Register A1-EI Types, Producers, Consumers, and Jobs.
 * After EI-type/Producer/Consumer/Job is successfully registered delivery/flow can happen directly between A1-EI Producers (in SMO/NONRTRIC domain) and A1-EI consumers (near-RT-RICs in RAN domain)
 * *Being extended to coordinate non-A1 Information exchange between NONRTRIC Apps*
 
+
+Implementation:
+* Implemented as a Java Spring Boot application
+
+Dmaap Adapter
+~~~~~~~~~~~~~
+
+Is a generic information producer, which registeres itself as an information producer of information types (in Information Coordination Service).
+The information types are defined in a configuration file. 
+Information jobs can retrieve data from DMaap or Kafka topics and push this to data consumers (accessing the ICS API).
+
+Implementation:
+* Implemented as a Java Spring Boot application
+
 Non-RT-RIC (Spring Cloud) Service Gateway
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Support Apps to use A1 Services 
index 90164fd..d15ddc7 100644 (file)
@@ -49,4 +49,8 @@ COPY config/application.yaml .
 WORKDIR /opt/app/helm-manager
 COPY target/app.jar app.jar
 
+RUN groupadd -g 999 appuser && \
+    useradd -r -u 999 -g appuser appuser
+USER appuser
+
 CMD [ "java", "-jar", "app.jar" ]
index e9d179d..226d2ec 100644 (file)
@@ -25,7 +25,6 @@ WORKDIR /opt/app/information-coordinator-service
 RUN mkdir -p /var/log/information-coordinator-service
 RUN mkdir -p /opt/app/information-coordinator-service/etc/cert/
 RUN mkdir -p /var/information-coordinator-service
-RUN chmod -R 777 /var/information-coordinator-service
 
 EXPOSE 8083 8434
 
@@ -34,8 +33,12 @@ ADD target/${JAR} /opt/app/information-coordinator-service/information-coordinat
 ADD /config/keystore.jks /opt/app/information-coordinator-service/etc/cert/keystore.jks
 ADD /config/truststore.jks /opt/app/information-coordinator-service/etc/cert/truststore.jks
 
-
-RUN chmod -R 777 /opt/app/information-coordinator-service/config/
+RUN groupadd -g 999 appuser && \
+    useradd -r -u 999 -g appuser appuser
+RUN chown -R appuser:appuser /opt/app/information-coordinator-service
+RUN chown -R appuser:appuser /var/information-coordinator-service
+RUN chown -R appuser:appuser /var/log/information-coordinator-service
+USER appuser
 
 CMD ["java", "-jar", "/opt/app/information-coordinator-service/information-coordinator-service.jar"]
 
index 226622c..2fe3474 100644 (file)
             "description": "Void/empty ",
             "type": "object"
         },
+        "Link": {
+            "type": "object",
+            "properties": {
+                "templated": {"type": "boolean"},
+                "href": {"type": "string"}
+            }
+        },
         "consumer_type_subscription_info": {
             "description": "Information for an information type subscription",
             "type": "object",
             }],
             "tags": ["A1-EI (registration)"]
         }},
+        "/actuator/threaddump": {"get": {
+            "summary": "Actuator web endpoint 'threaddump'",
+            "operationId": "handle_2_1_3",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
         "/example_dataproducer/info_job": {"post": {
             "summary": "Callback for Information Job creation/modification",
             "requestBody": {
                 "tags": ["Data consumer"]
             }
         },
+        "/actuator/loggers": {"get": {
+            "summary": "Actuator web endpoint 'loggers'",
+            "operationId": "handle_6",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
+        "/actuator/health/**": {"get": {
+            "summary": "Actuator web endpoint 'health-path'",
+            "operationId": "handle_12",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
+        "/data-consumer/v1/info-types": {"get": {
+            "summary": "Information type identifiers",
+            "operationId": "getinfoTypeIdentifiers",
+            "responses": {"200": {
+                "description": "Information type identifiers",
+                "content": {"application/json": {"schema": {
+                    "type": "array",
+                    "items": {"type": "string"}
+                }}}
+            }},
+            "tags": ["Data consumer"]
+        }},
+        "/actuator/metrics/{requiredMetricName}": {"get": {
+            "summary": "Actuator web endpoint 'metrics-requiredMetricName'",
+            "operationId": "handle_5",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "parameters": [{
+                "schema": {"type": "string"},
+                "in": "path",
+                "name": "requiredMetricName",
+                "required": true
+            }],
+            "tags": ["Actuator"]
+        }},
+        "/actuator": {"get": {
+            "summary": "Actuator root web endpoint",
+            "operationId": "links_1",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {
+                    "additionalProperties": {
+                        "additionalProperties": {"$ref": "#/components/schemas/Link"},
+                        "type": "object"
+                    },
+                    "type": "object"
+                }}}
+            }},
+            "tags": ["Actuator"]
+        }},
+        "/data-consumer/v1/info-jobs": {"get": {
+            "summary": "Information Job identifiers",
+            "description": "query for information job identifiers",
+            "operationId": "getJobIds",
+            "responses": {
+                "200": {
+                    "description": "Information information job identifiers",
+                    "content": {"application/json": {"schema": {
+                        "type": "array",
+                        "items": {"type": "string"}
+                    }}}
+                },
+                "404": {
+                    "description": "Information type is not found",
+                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProblemDetails"}}}
+                }
+            },
+            "parameters": [
+                {
+                    "schema": {"type": "string"},
+                    "in": "query",
+                    "name": "infoTypeId",
+                    "description": "selects subscription jobs of matching information type",
+                    "required": false
+                },
+                {
+                    "schema": {"type": "string"},
+                    "in": "query",
+                    "name": "owner",
+                    "description": "selects result for one owner",
+                    "required": false
+                }
+            ],
+            "tags": ["Data consumer"]
+        }},
+        "/actuator/loggers/{name}": {
+            "post": {
+                "summary": "Actuator web endpoint 'loggers-name'",
+                "operationId": "handle_0",
+                "responses": {"200": {
+                    "description": "OK",
+                    "content": {"*/*": {"schema": {"type": "object"}}}
+                }},
+                "parameters": [{
+                    "schema": {"type": "string"},
+                    "in": "path",
+                    "name": "name",
+                    "required": true
+                }],
+                "tags": ["Actuator"]
+            },
+            "get": {
+                "summary": "Actuator web endpoint 'loggers-name'",
+                "operationId": "handle_7",
+                "responses": {"200": {
+                    "description": "OK",
+                    "content": {"*/*": {"schema": {"type": "object"}}}
+                }},
+                "parameters": [{
+                    "schema": {"type": "string"},
+                    "in": "path",
+                    "name": "name",
+                    "required": true
+                }],
+                "tags": ["Actuator"]
+            }
+        },
+        "/example_dataconsumer/info_jobs/{infoJobId}/status": {"post": {
+            "summary": "Callback for changed Information Job status",
+            "requestBody": {
+                "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EiJobStatusObject"}}},
+                "required": true
+            },
+            "description": "The primitive is implemented by the data consumer and is invoked when a Information Job status has been changed.",
+            "operationId": "jobStatusCallback",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Void"}}}
+            }},
+            "parameters": [{
+                "schema": {"type": "string"},
+                "in": "path",
+                "name": "infoJobId",
+                "required": true
+            }],
+            "tags": ["A1-EI (callbacks)"]
+        }},
+        "/A1-EI/v1/eijobs/{eiJobId}/status": {"get": {
+            "summary": "EI job status",
+            "operationId": "getEiJobStatus_1",
+            "responses": {
+                "200": {
+                    "description": "EI job status",
+                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EiJobStatusObject"}}}
+                },
+                "404": {
+                    "description": "Enrichment Information job is not found",
+                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProblemDetails"}}}
+                }
+            },
+            "parameters": [{
+                "schema": {"type": "string"},
+                "in": "path",
+                "name": "eiJobId",
+                "required": true
+            }],
+            "tags": ["A1-EI (registration)"]
+        }},
+        "/data-producer/v1/info-producers/{infoProducerId}/status": {"get": {
+            "summary": "Information producer status",
+            "operationId": "getInfoProducerStatus",
+            "responses": {
+                "200": {
+                    "description": "Information producer status",
+                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/producer_status"}}}
+                },
+                "404": {
+                    "description": "Information producer is not found",
+                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProblemDetails"}}}
+                }
+            },
+            "parameters": [{
+                "schema": {"type": "string"},
+                "in": "path",
+                "name": "infoProducerId",
+                "required": true
+            }],
+            "tags": ["Data producer (registration)"]
+        }},
+        "/data-consumer/v1/info-jobs/{infoJobId}/status": {"get": {
+            "summary": "Job status",
+            "operationId": "getEiJobStatus",
+            "responses": {
+                "200": {
+                    "description": "Information subscription job status",
+                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/consumer_job_status"}}}
+                },
+                "404": {
+                    "description": "Information subscription job is not found",
+                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProblemDetails"}}}
+                }
+            },
+            "parameters": [{
+                "schema": {"type": "string"},
+                "in": "path",
+                "name": "infoJobId",
+                "required": true
+            }],
+            "tags": ["Data consumer"]
+        }},
+        "/actuator/metrics": {"get": {
+            "summary": "Actuator web endpoint 'metrics'",
+            "operationId": "handle_4",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
+        "/actuator/info": {"get": {
+            "summary": "Actuator web endpoint 'info'",
+            "operationId": "handle_9",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
         "/example_dataproducer/health_check": {"get": {
             "summary": "Producer supervision",
             "description": "The endpoint is provided by the Information Producer and is used for supervision of the producer.",
             }},
             "tags": ["A1-EI (registration)"]
         }},
-        "/data-consumer/v1/info-types": {"get": {
-            "summary": "Information type identifiers",
-            "operationId": "getinfoTypeIdentifiers",
-            "responses": {"200": {
-                "description": "Information type identifiers",
-                "content": {"application/json": {"schema": {
-                    "type": "array",
-                    "items": {"type": "string"}
-                }}}
-            }},
-            "tags": ["Data consumer"]
-        }},
         "/data-producer/v1/info-producers/{infoProducerId}": {
             "get": {
                 "summary": "Individual Information Producer",
                 "tags": ["A1-EI (registration)"]
             }
         },
-        "/data-consumer/v1/info-jobs": {"get": {
-            "summary": "Information Job identifiers",
-            "description": "query for information job identifiers",
-            "operationId": "getJobIds",
-            "responses": {
-                "200": {
-                    "description": "Information information job identifiers",
-                    "content": {"application/json": {"schema": {
-                        "type": "array",
-                        "items": {"type": "string"}
-                    }}}
-                },
-                "404": {
-                    "description": "Information type is not found",
-                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProblemDetails"}}}
-                }
-            },
-            "parameters": [
-                {
-                    "schema": {"type": "string"},
-                    "in": "query",
-                    "name": "infoTypeId",
-                    "description": "selects subscription jobs of matching information type",
-                    "required": false
-                },
-                {
-                    "schema": {"type": "string"},
-                    "in": "query",
-                    "name": "owner",
-                    "description": "selects result for one owner",
-                    "required": false
-                }
-            ],
-            "tags": ["Data consumer"]
+        "/actuator/logfile": {"get": {
+            "summary": "Actuator web endpoint 'logfile'",
+            "operationId": "handle_8",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
         }},
         "/data-consumer/v1/info-jobs/{infoJobId}": {
             "get": {
             }],
             "tags": ["Data consumer"]
         }},
-        "/example_dataconsumer/info_jobs/{infoJobId}/status": {"post": {
-            "summary": "Callback for changed Information Job status",
-            "requestBody": {
-                "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EiJobStatusObject"}}},
-                "required": true
-            },
-            "description": "The primitive is implemented by the data consumer and is invoked when a Information Job status has been changed.",
-            "operationId": "jobStatusCallback",
+        "/actuator/health": {"get": {
+            "summary": "Actuator web endpoint 'health'",
+            "operationId": "handle_11",
             "responses": {"200": {
                 "description": "OK",
-                "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Void"}}}
+                "content": {"*/*": {"schema": {"type": "object"}}}
             }},
-            "parameters": [{
-                "schema": {"type": "string"},
-                "in": "path",
-                "name": "infoJobId",
-                "required": true
-            }],
-            "tags": ["A1-EI (callbacks)"]
+            "tags": ["Actuator"]
         }},
         "/A1-EI/v1/eijobs": {"get": {
             "summary": "EI job identifiers",
             ],
             "tags": ["A1-EI (registration)"]
         }},
-        "/A1-EI/v1/eijobs/{eiJobId}/status": {"get": {
-            "summary": "EI job status",
-            "operationId": "getEiJobStatus_1",
-            "responses": {
-                "200": {
-                    "description": "EI job status",
-                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EiJobStatusObject"}}}
-                },
-                "404": {
-                    "description": "Enrichment Information job is not found",
-                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProblemDetails"}}}
-                }
-            },
-            "parameters": [{
-                "schema": {"type": "string"},
-                "in": "path",
-                "name": "eiJobId",
-                "required": true
-            }],
-            "tags": ["A1-EI (registration)"]
-        }},
-        "/data-producer/v1/info-producers/{infoProducerId}/status": {"get": {
-            "summary": "Information producer status",
-            "operationId": "getInfoProducerStatus",
-            "responses": {
-                "200": {
-                    "description": "Information producer status",
-                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/producer_status"}}}
-                },
-                "404": {
-                    "description": "Information producer is not found",
-                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProblemDetails"}}}
-                }
-            },
-            "parameters": [{
-                "schema": {"type": "string"},
-                "in": "path",
-                "name": "infoProducerId",
-                "required": true
-            }],
-            "tags": ["Data producer (registration)"]
-        }},
         "/data-producer/v1/info-producers/{infoProducerId}/info-jobs": {"get": {
             "summary": "Information Job definitions",
             "description": "Information Job definitions for one Information Producer",
             }],
             "tags": ["Data producer (registration)"]
         }},
-        "/data-consumer/v1/info-jobs/{infoJobId}/status": {"get": {
-            "summary": "Job status",
-            "operationId": "getEiJobStatus",
-            "responses": {
-                "200": {
-                    "description": "Information subscription job status",
-                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/consumer_job_status"}}}
-                },
-                "404": {
-                    "description": "Information subscription job is not found",
-                    "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProblemDetails"}}}
-                }
-            },
-            "parameters": [{
-                "schema": {"type": "string"},
-                "in": "path",
-                "name": "infoJobId",
-                "required": true
-            }],
-            "tags": ["Data consumer"]
-        }},
         "/example_dataconsumer/info_type_status": {"post": {
             "summary": "Callback for changed Information type registration status",
             "requestBody": {
                 "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Void"}}}
             }},
             "tags": ["Data consumer (callbacks)"]
+        }},
+        "/actuator/heapdump": {"get": {
+            "summary": "Actuator web endpoint 'heapdump'",
+            "operationId": "handle_10",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
         }}
     },
     "info": {
         {
             "name": "Data consumer",
             "description": "API for data consumers"
+        },
+        {
+            "name": "Actuator",
+            "description": "Monitor and interact",
+            "externalDocs": {
+                "description": "Spring Boot Actuator Web API Documentation",
+                "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/"
+            }
         }
     ]
 }
\ No newline at end of file
index b048c1c..03de106 100644 (file)
@@ -42,6 +42,11 @@ tags:
   description: API for monitoring of the service
 - name: Data consumer
   description: API for data consumers
+- name: Actuator
+  description: Monitor and interact
+  externalDocs:
+    description: Spring Boot Actuator Web API Documentation
+    url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
 paths:
   /example_dataproducer/info_job/{infoJobId}:
     delete:
@@ -108,6 +113,19 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/ProblemDetails'
+  /actuator/threaddump:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'threaddump'
+      operationId: handle_2_1_3
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /example_dataproducer/info_job:
     post:
       tags:
@@ -325,6 +343,301 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/ProblemDetails'
+  /actuator/loggers:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'loggers'
+      operationId: handle_6
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+  /actuator/health/**:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'health-path'
+      operationId: handle_12
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+  /data-consumer/v1/info-types:
+    get:
+      tags:
+      - Data consumer
+      summary: Information type identifiers
+      operationId: getinfoTypeIdentifiers
+      responses:
+        200:
+          description: Information type identifiers
+          content:
+            application/json:
+              schema:
+                type: array
+                items:
+                  type: string
+  /actuator/metrics/{requiredMetricName}:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'metrics-requiredMetricName'
+      operationId: handle_5
+      parameters:
+      - name: requiredMetricName
+        in: path
+        required: true
+        style: simple
+        explode: false
+        schema:
+          type: string
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+  /actuator:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator root web endpoint
+      operationId: links_1
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+                additionalProperties:
+                  type: object
+                  additionalProperties:
+                    $ref: '#/components/schemas/Link'
+  /data-consumer/v1/info-jobs:
+    get:
+      tags:
+      - Data consumer
+      summary: Information Job identifiers
+      description: query for information job identifiers
+      operationId: getJobIds
+      parameters:
+      - name: infoTypeId
+        in: query
+        description: selects subscription jobs of matching information type
+        required: false
+        style: form
+        explode: true
+        schema:
+          type: string
+      - name: owner
+        in: query
+        description: selects result for one owner
+        required: false
+        style: form
+        explode: true
+        schema:
+          type: string
+      responses:
+        200:
+          description: Information information job identifiers
+          content:
+            application/json:
+              schema:
+                type: array
+                items:
+                  type: string
+        404:
+          description: Information type is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+  /actuator/loggers/{name}:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'loggers-name'
+      operationId: handle_7
+      parameters:
+      - name: name
+        in: path
+        required: true
+        style: simple
+        explode: false
+        schema:
+          type: string
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+    post:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'loggers-name'
+      operationId: handle_0
+      parameters:
+      - name: name
+        in: path
+        required: true
+        style: simple
+        explode: false
+        schema:
+          type: string
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+  /example_dataconsumer/info_jobs/{infoJobId}/status:
+    post:
+      tags:
+      - A1-EI (callbacks)
+      summary: Callback for changed Information Job status
+      description: The primitive is implemented by the data consumer and is invoked
+        when a Information Job status has been changed.
+      operationId: jobStatusCallback
+      parameters:
+      - name: infoJobId
+        in: path
+        required: true
+        style: simple
+        explode: false
+        schema:
+          type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/EiJobStatusObject'
+        required: true
+      responses:
+        200:
+          description: OK
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Void'
+  /A1-EI/v1/eijobs/{eiJobId}/status:
+    get:
+      tags:
+      - A1-EI (registration)
+      summary: EI job status
+      operationId: getEiJobStatus_1
+      parameters:
+      - name: eiJobId
+        in: path
+        required: true
+        style: simple
+        explode: false
+        schema:
+          type: string
+      responses:
+        200:
+          description: EI job status
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/EiJobStatusObject'
+        404:
+          description: Enrichment Information job is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+  /data-producer/v1/info-producers/{infoProducerId}/status:
+    get:
+      tags:
+      - Data producer (registration)
+      summary: Information producer status
+      operationId: getInfoProducerStatus
+      parameters:
+      - name: infoProducerId
+        in: path
+        required: true
+        style: simple
+        explode: false
+        schema:
+          type: string
+      responses:
+        200:
+          description: Information producer status
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/producer_status'
+        404:
+          description: Information producer is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+  /data-consumer/v1/info-jobs/{infoJobId}/status:
+    get:
+      tags:
+      - Data consumer
+      summary: Job status
+      operationId: getEiJobStatus
+      parameters:
+      - name: infoJobId
+        in: path
+        required: true
+        style: simple
+        explode: false
+        schema:
+          type: string
+      responses:
+        200:
+          description: Information subscription job status
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/consumer_job_status'
+        404:
+          description: Information subscription job is not found
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ProblemDetails'
+  /actuator/metrics:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'metrics'
+      operationId: handle_4
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+  /actuator/info:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'info'
+      operationId: handle_9
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /example_dataproducer/health_check:
     get:
       tags:
@@ -355,21 +668,6 @@ paths:
                 type: array
                 items:
                   type: string
-  /data-consumer/v1/info-types:
-    get:
-      tags:
-      - Data consumer
-      summary: Information type identifiers
-      operationId: getinfoTypeIdentifiers
-      responses:
-        200:
-          description: Information type identifiers
-          content:
-            application/json:
-              schema:
-                type: array
-                items:
-                  type: string
   /data-producer/v1/info-producers/{infoProducerId}:
     get:
       tags:
@@ -620,45 +918,19 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/ProblemDetails'
-  /data-consumer/v1/info-jobs:
+  /actuator/logfile:
     get:
       tags:
-      - Data consumer
-      summary: Information Job identifiers
-      description: query for information job identifiers
-      operationId: getJobIds
-      parameters:
-      - name: infoTypeId
-        in: query
-        description: selects subscription jobs of matching information type
-        required: false
-        style: form
-        explode: true
-        schema:
-          type: string
-      - name: owner
-        in: query
-        description: selects result for one owner
-        required: false
-        style: form
-        explode: true
-        schema:
-          type: string
+      - Actuator
+      summary: Actuator web endpoint 'logfile'
+      operationId: handle_8
       responses:
         200:
-          description: Information information job identifiers
-          content:
-            application/json:
-              schema:
-                type: array
-                items:
-                  type: string
-        404:
-          description: Information type is not found
+          description: OK
           content:
-            application/json:
+            '*/*':
               schema:
-                $ref: '#/components/schemas/ProblemDetails'
+                type: object
   /data-consumer/v1/info-jobs/{infoJobId}:
     get:
       tags:
@@ -830,35 +1102,19 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/ProblemDetails'
-  /example_dataconsumer/info_jobs/{infoJobId}/status:
-    post:
+  /actuator/health:
+    get:
       tags:
-      - A1-EI (callbacks)
-      summary: Callback for changed Information Job status
-      description: The primitive is implemented by the data consumer and is invoked
-        when a Information Job status has been changed.
-      operationId: jobStatusCallback
-      parameters:
-      - name: infoJobId
-        in: path
-        required: true
-        style: simple
-        explode: false
-        schema:
-          type: string
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/EiJobStatusObject'
-        required: true
+      - Actuator
+      summary: Actuator web endpoint 'health'
+      operationId: handle_11
       responses:
         200:
           description: OK
           content:
-            application/json:
+            '*/*':
               schema:
-                $ref: '#/components/schemas/Void'
+                type: object
   /A1-EI/v1/eijobs:
     get:
       tags:
@@ -898,60 +1154,6 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/ProblemDetails'
-  /A1-EI/v1/eijobs/{eiJobId}/status:
-    get:
-      tags:
-      - A1-EI (registration)
-      summary: EI job status
-      operationId: getEiJobStatus_1
-      parameters:
-      - name: eiJobId
-        in: path
-        required: true
-        style: simple
-        explode: false
-        schema:
-          type: string
-      responses:
-        200:
-          description: EI job status
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/EiJobStatusObject'
-        404:
-          description: Enrichment Information job is not found
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ProblemDetails'
-  /data-producer/v1/info-producers/{infoProducerId}/status:
-    get:
-      tags:
-      - Data producer (registration)
-      summary: Information producer status
-      operationId: getInfoProducerStatus
-      parameters:
-      - name: infoProducerId
-        in: path
-        required: true
-        style: simple
-        explode: false
-        schema:
-          type: string
-      responses:
-        200:
-          description: Information producer status
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/producer_status'
-        404:
-          description: Information producer is not found
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ProblemDetails'
   /data-producer/v1/info-producers/{infoProducerId}/info-jobs:
     get:
       tags:
@@ -982,33 +1184,6 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/ProblemDetails'
-  /data-consumer/v1/info-jobs/{infoJobId}/status:
-    get:
-      tags:
-      - Data consumer
-      summary: Job status
-      operationId: getEiJobStatus
-      parameters:
-      - name: infoJobId
-        in: path
-        required: true
-        style: simple
-        explode: false
-        schema:
-          type: string
-      responses:
-        200:
-          description: Information subscription job status
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/consumer_job_status'
-        404:
-          description: Information subscription job is not found
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ProblemDetails'
   /example_dataconsumer/info_type_status:
     post:
       tags:
@@ -1031,6 +1206,19 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/Void'
+  /actuator/heapdump:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'heapdump'
+      operationId: handle_10
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
 components:
   schemas:
     consumer_information_type:
@@ -1274,6 +1462,13 @@ components:
     Void:
       type: object
       description: 'Void/empty '
+    Link:
+      type: object
+      properties:
+        templated:
+          type: boolean
+        href:
+          type: string
     consumer_type_subscription_info:
       required:
       - owner
index e1a417c..72bb907 100644 (file)
@@ -5,6 +5,8 @@ spring:
     allow-bean-definition-overriding: true
   aop:
     auto: false
+springdoc:
+  show-actuator: true 
 management:
   endpoints:
     web:
diff --git a/pom.xml b/pom.xml
index d4f5500..71c6606 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
     </properties>
     <modules>
-        <module>policy-agent</module>
+        <module>a1-policy-management-service</module>
         <module>information-coordinator-service</module>
         <module>r-app-catalogue</module>
         <module>helm-manager</module>
         <module>dmaap-adaptor-java</module>
+        <module>dmaap-mediator-producer</module>
     </modules>
     <build>
         <plugins>
index cd2efc9..0f77256 100644 (file)
@@ -32,7 +32,13 @@ ADD /config/r-app-catalogue-keystore.jks /opt/app/r-app-catalogue/etc/cert/keyst
 ADD target/${JAR} /opt/app/r-app-catalogue/r-app-catalogue.jar
 
 
-RUN chmod -R 777 /opt/app/r-app-catalogue/config/
+RUN chmod -R 644 /opt/app/r-app-catalogue/config/
+
+RUN groupadd -g 999 appuser && \
+    useradd -r -u 999 -g appuser appuser
+RUN chown -R appuser:appuser /opt/app/r-app-catalogue/
+RUN chown -R appuser:appuser /var/log/r-app-catalogue/
+USER appuser
 
 CMD ["java", "-jar", "/opt/app/r-app-catalogue/r-app-catalogue.jar"]
 
index e66d30f..ad61ab3 100644 (file)
@@ -31,4 +31,8 @@ RUN pip install -r requirements.txt
 
 RUN chmod +x start.sh
 
+RUN groupadd -g 999 appuser && \
+    useradd -r -u 999 -g appuser appuser
+USER appuser
+
 CMD [ "./start.sh" ]
index d7a78ad..0d9b977 100644 (file)
@@ -13,4 +13,8 @@ COPY cert/pass .
 WORKDIR /usr/src/app
 COPY http_proxy.js .
 
+RUN groupadd -g 999 appuser && \
+    useradd -r -u 999 -g appuser appuser
+USER appuser
+
 CMD [ "node", "http_proxy.js" ]
\ No newline at end of file
index 676c77c..a5f9ea0 100644 (file)
@@ -34,4 +34,8 @@ RUN pip install -r requirements.txt
 
 RUN chmod +x start.sh
 
+RUN groupadd -g 999 appuser && \
+    useradd -r -u 999 -g appuser appuser
+USER appuser
+
 CMD [ "./start.sh" ]
\ No newline at end of file
index 4768bf9..0a027e4 100644 (file)
@@ -32,4 +32,8 @@ RUN chmod +x start.sh
 RUN apt-get update
 RUN apt-get install -y nginx=1.14.*
 
+RUN groupadd -g 999 appuser && \
+    useradd -r -u 999 -g appuser appuser
+USER appuser
+
 CMD [ "./start.sh" ]
index 4cb03c7..3c1a064 100644 (file)
@@ -29,4 +29,8 @@ RUN apt-get install iputils-ping -y
 
 RUN pip install -r requirements.txt
 
+RUN groupadd -g 999 appuser && \
+    useradd -r -u 999 -g appuser appuser
+USER appuser
+
 CMD [ "python3", "-u", "main.py" ]