Security Logging Fields
[cps.git] / cps-application / src / main / resources / application.yml
index c3ceecd..263ae6b 100644 (file)
@@ -1,14 +1,37 @@
+#  ============LICENSE_START=======================================================\r
+#  Copyright (C) 2021 Pantheon.tech\r
+#  Modifications Copyright (C) 2021 Bell Canada\r
+#  Modifications Copyright (C) 2021-2022 Nordix Foundation\r
+#  ================================================================================\r
+#  Licensed under the Apache License, Version 2.0 (the "License");\r
+#  you may not use this file except in compliance with the License.\r
+#  You may obtain a copy of the License at\r
+#\r
+#        http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#  Unless required by applicable law or agreed to in writing, software\r
+#  distributed under the License is distributed on an "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#  See the License for the specific language governing permissions and\r
+#  limitations under the License.\r
+#\r
+#  SPDX-License-Identifier: Apache-2.0\r
+#  ============LICENSE_END=========================================================\r
+\r
 server:\r
     port: 8080\r
 \r
 rest:\r
     api:\r
         cps-base-path: /cps/api\r
-        xnf-base-path: /cps-nf-proxy/api\r
+        ncmp-base-path: /ncmp\r
+        ncmp-inventory-base-path: /ncmpInventory\r
 \r
 spring:\r
     main:\r
         banner-mode: "off"\r
+    application:\r
+        name: "cps-application"\r
     jpa:\r
         ddl-auto: create\r
         open-in-view: false\r
@@ -18,7 +41,7 @@ spring:
                 dialect: org.hibernate.dialect.PostgreSQLDialect\r
 \r
     datasource:\r
-        url: jdbc:postgresql://${DB_HOST}:5432/cpsdb\r
+        url: jdbc:postgresql://${DB_HOST}:${DB_PORT:5432}/cpsdb\r
         username: ${DB_USERNAME}\r
         password: ${DB_PASSWORD}\r
         driverClassName: org.postgresql.Driver\r
@@ -29,23 +52,88 @@ spring:
         cache-names: yangSchema\r
         caffeine:\r
             spec: maximumSize=10000,expireAfterAccess=10m\r
+\r
+    liquibase:\r
+        change-log: classpath:changelog/changelog-master.yaml\r
+        labels: ${LIQUIBASE_LABELS}\r
+\r
+    servlet:\r
+        multipart:\r
+            enabled: true\r
+            max-file-size: 100MB\r
+            max-request-size: 100MB\r
+\r
+    kafka:\r
+        bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092}\r
+        security:\r
+            protocol: PLAINTEXT\r
+        producer:\r
+            value-serializer: org.springframework.kafka.support.serializer.JsonSerializer\r
+            client-id: cps-core\r
+\r
+notification:\r
+    data-updated:\r
+        enabled: false\r
+        topic: ${CPS_CHANGE_EVENT_TOPIC:cps.data-updated-events}\r
+        filters:\r
+            enabled-dataspaces: ${NOTIFICATION_DATASPACE_FILTER_PATTERNS:""}\r
+    async:\r
+        enabled: false\r
+        executor:\r
+            core-pool-size: 2\r
+            max-pool-size: 10\r
+            queue-capacity: 500\r
+            wait-for-tasks-to-complete-on-shutdown: true\r
+            thread-name-prefix: Async-\r
+\r
+\r
+springdoc:\r
+    swagger-ui:\r
+        disable-swagger-default-url: true\r
+        urlsPrimaryName: cps-core\r
+        urls:\r
+            - name: cps-core\r
+              url: /api-docs/cps-core/openapi.yaml\r
+            - name: cps-ncmp\r
+              url: /api-docs/cps-ncmp/openapi.yaml\r
+            - name: cps-ncmp-inventory\r
+              url: /api-docs/cps-ncmp/openapi-inventory.yaml\r
+\r
+\r
+security:\r
+    # comma-separated uri patterns which do not require authorization\r
+    permit-uri: /manage/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**\r
+    auth:\r
+        username: ${CPS_USERNAME}\r
+        password: ${CPS_PASSWORD}\r
+\r
 # Actuator\r
 management:\r
+    server:\r
+        port: 8081\r
     endpoints:\r
         web:\r
             base-path: /manage\r
-        exposure:\r
-            include: info,health,loggers\r
+            exposure:\r
+                include: info,health,loggers,prometheus\r
     endpoint:\r
         health:\r
             show-details: always\r
             # kubernetes probes: liveness and readiness\r
             probes:\r
                 enabled: true\r
-        loggers:\r
-            enabled: true\r
 \r
 logging:\r
+    format: json\r
     level:\r
         org:\r
             springframework: INFO\r
+            onap:\r
+                cps: INFO\r
+\r
+dmi:\r
+    auth:\r
+        username: ${DMI_USERNAME}\r
+        password: ${DMI_PASSWORD}\r
+    api:\r
+        base-path: dmi\r