Add basic security to query interface
[cps/cps-temporal.git] / src / test / resources / application.yml
1 # ============LICENSE_START=======================================================
2 # Copyright (c) 2021 Bell Canada.
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 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=========================================================
18
19 server:
20     port: 8080
21
22 rest:
23     api:
24         base-path: /cps-temporal/api
25
26 spring:
27     datasource:
28         url: ${DB_URL}
29         username: ${DB_USERNAME}
30         password: ${DB_PASSWORD}
31     liquibase:
32         change-log: classpath:/db/changelog/changelog-master.xml
33     jpa:
34         open-in-view: false
35         properties:
36             hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
37             hibernate.format_sql: true
38             hibernate.generate_statistics: false
39     kafka:
40         bootstrap-servers: localhost:9092
41         security:
42             protocol: PLAINTEXT
43         consumer:
44             group-id: cps-temporal-group
45             # Configures the Spring Kafka ErrorHandlingDeserializer that delegates to the 'real' deserializers
46             # See https://docs.spring.io/spring-kafka/docs/2.5.11.RELEASE/reference/html/#error-handling-deserializer
47             # and https://www.confluent.io/blog/spring-kafka-can-your-kafka-consumers-handle-a-poison-pill/
48             key-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
49             value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
50             auto-offset-reset: earliest
51             properties:
52                 spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer
53                 spring.deserializer.value.delegate.class: org.springframework.kafka.support.serializer.JsonDeserializer
54                 spring.json.value.default.type: org.onap.cps.event.model.CpsDataUpdatedEvent
55         # Following is not cps-temporal configuration. It is configuration for the producer used for integration tests
56         producer:
57             key-serializer: org.apache.kafka.common.serialization.StringSerializer
58             value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
59
60 app:
61     listener:
62         data-updated:
63             topic: cps.cfg-state-events
64     query:
65         response:
66             max-page-size: 20
67
68 security:
69     # comma-separated uri patterns which do not require authorization
70     permit-uri: /manage/**,/swagger-ui/**,/swagger-resources/**,/swagger/openapi.yml
71     auth:
72         username: testUser
73         password: testPassword