Uplift of PMS from ONAP 57/10157/2
authorPatrikBuhr <patrik.buhr@est.tech>
Thu, 15 Dec 2022 09:48:48 +0000 (10:48 +0100)
committerPatrikBuhr <patrik.buhr@est.tech>
Thu, 15 Dec 2022 13:13:14 +0000 (14:13 +0100)
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Issue-ID: NONRTRIC-774
Change-Id: Iab1bee93f46be49303c32c0c033ce0921044d283

config/README
config/application.yaml
config/keystore.jks
config/truststore.jks
onap/oran
pom.xml

index b54a675..42e0b7b 100644 (file)
@@ -3,13 +3,15 @@ The keystore.jks and truststore.jks files are created by using the following com
 1) Create a CA certificate and a private key:
 
 openssl genrsa -des3 -out CA-key.pem 2048
-openssl req -new -key CA-key.pem -x509 -days 1000 -out CA-cert.pem 
+openssl req -new -key CA-key.pem -x509 -days 3600 -out CA-cert.pem
 
 2) Create a keystore with a private key entry that is signed by the CA:
 
+Note: the "your name" must be "localhost" for the unittest to work.
+
 keytool -genkeypair -alias policy_agent -keyalg RSA -keysize 2048 -keystore keystore.jks -validity 3650 -storepass policy_agent
 keytool -certreq -alias policy_agent -file request.csr -keystore keystore.jks -ext san=dns:your.domain.com -storepass policy_agent
-openssl x509 -req -days 365 -in request.csr -CA CA-cert.pem -CAkey CA-key.pem -CAcreateserial -out ca_signed-cert.pem
+openssl x509 -req -days 3650 -in request.csr -CA CA-cert.pem -CAkey CA-key.pem -CAcreateserial -out ca_signed-cert.pem
 keytool -importcert -alias ca_cert -file CA-cert.pem -keystore keystore.jks -trustcacerts -storepass policy_agent
 keytool -importcert -alias policy_agent -file ca_signed-cert.pem -keystore keystore.jks -trustcacerts -storepass policy_agent
 
index f0f5337..2bd8d83 100644 (file)
@@ -41,8 +41,11 @@ logging:
     org.springframework: ERROR
     org.springframework.data: ERROR
     org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+    org.springframework.web.servlet.DispatcherServlet: INFO
     org.onap.ccsdk.oran.a1policymanagementservice: INFO
-    # org.onap.ccsdk.oran.a1policymanagementservice.tasks: TRACE
+  pattern:
+    console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%thread] %logger{20} - %msg%n"
+    file: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] [%thread] %logger{20} - %msg%n"
   file:
     name: /var/log/policy-agent/application.log
 server:
@@ -74,7 +77,7 @@ app:
     http.proxy-host:
     http.proxy-port: 0
     http.proxy-type: HTTP
-  # path where the service can store data
+  # path where the service can store data. This parameter is not relevant if S3 Object store is configured.
   vardata-directory: /var/policy-management-service
   # the config-file-schema-path referres to a location in the jar file. If this property is empty or missing,
   # no schema validation will be executed.
@@ -82,3 +85,9 @@ app:
   # A file containing an authorization token, which shall be inserted in each HTTP header (authorization).
   # If the file name is empty, no authorization token is sent.
   auth-token-file:
+  # S3 object store usage is enabled by defining the bucket to use. This will override the vardata-directory parameter.
+  s3:
+    endpointOverride: http://localhost:9000
+    accessKeyId: minio
+    secretAccessKey: miniostorage
+    bucket:
index 48c3b33..563c67b 100644 (file)
Binary files a/config/keystore.jks and b/config/keystore.jks differ
index 760261e..50a0f9e 100644 (file)
Binary files a/config/truststore.jks and b/config/truststore.jks differ
index ca31593..c7f757e 160000 (submodule)
--- a/onap/oran
+++ b/onap/oran
@@ -1 +1 @@
-Subproject commit ca315932268e1c5da6a12201db4cfaef35df69bb
+Subproject commit c7f757e98066775ed2fdeb67f3d31777e8430624
diff --git a/pom.xml b/pom.xml
index 44a985b..37871fe 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -59,6 +59,7 @@
         <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
         <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
         <exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
+        <software.amazon.awssdk.version>2.17.292</software.amazon.awssdk.version>
     </properties>
     <dependencies>
         <dependency>
             <artifactId>everit-json-schema</artifactId>
             <version>1.13.0</version>
         </dependency>
+        <dependency>
+            <groupId>software.amazon.awssdk</groupId>
+            <artifactId>s3</artifactId>
+            <version>${software.amazon.awssdk.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.micrometer</groupId>
+            <artifactId>micrometer-registry-prometheus</artifactId>
+        </dependency>
     </dependencies>
     <build>
         <plugins>