From: PatrikBuhr Date: Thu, 15 Dec 2022 09:48:48 +0000 (+0100) Subject: Uplift of PMS from ONAP X-Git-Tag: 2.5.1~2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=9fbd1ab7d3f0545354b3a71f879b1ddfc9b438a7;p=nonrtric%2Fplt%2Fa1policymanagementservice.git Uplift of PMS from ONAP Signed-off-by: PatrikBuhr Issue-ID: NONRTRIC-774 Change-Id: Iab1bee93f46be49303c32c0c033ce0921044d283 --- diff --git a/config/README b/config/README index b54a675..42e0b7b 100644 --- a/config/README +++ b/config/README @@ -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 diff --git a/config/application.yaml b/config/application.yaml index f0f5337..2bd8d83 100644 --- a/config/application.yaml +++ b/config/application.yaml @@ -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: diff --git a/config/keystore.jks b/config/keystore.jks index 48c3b33..563c67b 100644 Binary files a/config/keystore.jks and b/config/keystore.jks differ diff --git a/config/truststore.jks b/config/truststore.jks index 760261e..50a0f9e 100644 Binary files a/config/truststore.jks and b/config/truststore.jks differ diff --git a/onap/oran b/onap/oran index ca31593..c7f757e 160000 --- 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 --- a/pom.xml +++ b/pom.xml @@ -59,6 +59,7 @@ 3.7.0.1746 0.8.5 3.0.0 + 2.17.292 @@ -203,6 +204,15 @@ everit-json-schema 1.13.0 + + software.amazon.awssdk + s3 + ${software.amazon.awssdk.version} + + + io.micrometer + micrometer-registry-prometheus +