Log all incoming HTTP requests to NCMP with Authorization Header
[cps.git] / integration-test / src / test / resources / application.yml
1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2023-2024 Nordix Foundation.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #        http://www.apache.org/licenses/LICENSE-2.0
9 #  Unless required by applicable law or agreed to in writing, software
10 #  distributed under the License is distributed on an "AS IS" BASIS,
11 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #  See the License for the specific language governing permissions and
13 #  limitations under the License.
14 #
15 #  SPDX-License-Identifier: Apache-2.0
16 #  ============LICENSE_END=========================================================
17
18 rest:
19   api:
20     cps-base-path: /cps/api
21     ncmp-base-path: /ncmp
22     ncmp-inventory-base-path: /ncmpInventory
23
24 spring:
25   main:
26     banner-mode: off
27
28   application:
29     name: cps-integration-test
30
31   jpa:
32     properties:
33       hibernate.enable_lazy_load_no_trans: true
34       hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
35       hibernate.format_sql: false
36       hibernate.show_sql: false
37       # Please ensure these values match those used in cps-application/src/main/resources/application.yml
38       hibernate.id.new_generator_mappings: true
39       hibernate.jdbc.batch_size: 100
40
41   datasource:
42     url: ${DB_URL}
43     username: ${DB_USERNAME}
44     password: ${DB_PASSWORD}
45     driverClassName: org.postgresql.Driver
46     initialization-mode: always
47     hikari:
48       minimumIdle: 5
49       maximumPoolSize: 80
50       idleTimeout: 60000
51       connectionTimeout: 120000
52       leakDetectionThreshold: 30000
53       pool-name: CpsDatabasePool
54
55   cache:
56     type: caffeine
57     cache-names: yangSchema
58     caffeine:
59       spec: maximumSize=10000,expireAfterAccess=10m
60
61   liquibase:
62     change-log: classpath:changelog/changelog-master.yaml
63
64   servlet:
65     multipart:
66       enabled: true
67       max-file-size: 100MB
68       max-request-size: 100MB
69
70   kafka:
71     bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092}
72     security:
73       protocol: PLAINTEXT
74     producer:
75       value-serializer: io.cloudevents.kafka.CloudEventSerializer
76       client-id: cps-core
77     consumer:
78       group-id: ${NCMP_CONSUMER_GROUP_ID:ncmp-group}
79       key-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
80       value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
81       properties:
82         spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer
83         spring.deserializer.value.delegate.class: io.cloudevents.kafka.CloudEventDeserializer
84         spring.json.use.type.headers: false
85
86   jackson:
87     default-property-inclusion: NON_NULL
88     serialization:
89       FAIL_ON_EMPTY_BEANS: false
90
91   sql:
92     init:
93       mode: ALWAYS
94
95 app:
96   ncmp:
97     async-m2m:
98       topic: ${NCMP_ASYNC_M2M_TOPIC:ncmp-async-m2m}
99     avc:
100       subscription-topic: ${NCMP_CM_AVC_SUBSCRIPTION:subscription}
101       subscription-forward-topic-prefix: ${NCMP_FORWARD_CM_AVC_SUBSCRIPTION:ncmp-dmi-cm-avc-subscription-}
102       subscription-response-topic: ${NCMP_RESPONSE_CM_AVC_SUBSCRIPTION:dmi-ncmp-cm-avc-subscription}
103       subscription-outcome-topic: ${NCMP_OUTCOME_CM_AVC_SUBSCRIPTION:subscription-response}
104       cm-events-topic: ${NCMP_CM_EVENTS_TOPIC:cm-events}
105   lcm:
106     events:
107       topic: ${LCM_EVENTS_TOPIC:ncmp-events}
108   dmi:
109     cm-events:
110       topic: ${DMI_CM_EVENTS_TOPIC:dmi-cm-events}
111     device-heartbeat:
112       topic: ${DMI_DEVICE_HEARTBEAT_TOPIC:dmi-device-heartbeat}
113
114 notification:
115   enabled: false
116   async:
117     executor:
118       core-pool-size: 2
119       max-pool-size: 10
120       queue-capacity: 500
121       wait-for-tasks-to-complete-on-shutdown: true
122       thread-name-prefix: Async-
123       time-out-value-in-ms: 2000
124
125 springdoc:
126   swagger-ui:
127     disable-swagger-default-url: true
128     urlsPrimaryName: cps-core
129     urls:
130       - name: cps-core
131         url: /api-docs/cps-core/openapi.yaml
132       - name: cps-ncmp
133         url: /api-docs/cps-ncmp/openapi.yaml
134       - name: cps-ncmp-inventory
135         url: /api-docs/cps-ncmp/openapi-inventory.yaml
136
137 security:
138   # comma-separated uri patterns which do not require authorization
139   permit-uri: /actuator/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**,/v3/api-docs/**
140   auth:
141     username: cps
142     password: cpsr0cks!
143
144 # Actuator
145 management:
146   endpoints:
147     web:
148       exposure:
149         include: info,health,loggers,prometheus
150   endpoint:
151     health:
152       show-details: always
153       # kubernetes probes: liveness and readiness
154       probes:
155         enabled: false
156
157 logging:
158   format: text
159   level:
160     org:
161       springframework: INFO
162       onap:
163         cps: INFO
164
165 ncmp:
166   dmi:
167     httpclient:
168       connectionTimeoutInSeconds: 180
169       maximumConnectionsPerRoute: 50
170       maximumConnectionsTotal: 100
171       idleConnectionEvictionThresholdInSeconds: 5
172     auth:
173       username: dmi
174       password: dmi
175       enabled: false
176     api:
177       base-path: dmi
178
179   timers:
180     advised-modules-sync:
181       sleep-time-ms: 100000
182     locked-modules-sync:
183       sleep-time-ms: 300000
184     cm-handle-data-sync:
185       sleep-time-ms: 30000
186     subscription-forwarding:
187       dmi-response-timeout-ms: 30000
188     model-loader:
189       retry-time-ms: 1000
190     trust-level:
191       dmi-availability-watchdog-ms: 30000
192
193   modules-sync-watchdog:
194     async-executor:
195       parallelism-level: 1
196
197   model-loader:
198     maximum-attempt-count: 20
199
200   servlet:
201     multipart:
202       enabled: true
203       max-file-size: 100MB
204       max-request-size: 100MB
205
206   jackson:
207     default-property-inclusion: NON_NULL
208     serialization:
209       FAIL_ON_EMPTY_BEANS: false
210
211   sql:
212     init:
213       mode: ALWAYS
214
215 hazelcast:
216   cluster-name: cps-and-ncmp-test-caches
217   mode:
218     kubernetes:
219       enabled: false
220       service-name: cps-and-ncmp-service