File size: 4,921 Bytes
9373c61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5cfe5c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# DALab Policy Engine Service Configuration

# Updated to use the DALab infrastructure



spring.application.name=da-policyengine



# Server Configuration

server.port=8080

server.servlet.context-path=/api/v1/policyengine



# Database Configuration - using infrastructure PostgreSQL

spring.datasource.url=jdbc:postgresql://localhost:5432/da_policyengine

spring.datasource.username=da_policyengine_user

spring.datasource.password=da_policyengine_pass

spring.datasource.driver-class-name=org.postgresql.Driver



# Connection Pool Configuration

spring.datasource.hikari.maximum-pool-size=10

spring.datasource.hikari.minimum-idle=2

spring.datasource.hikari.connection-timeout=30000

spring.datasource.hikari.idle-timeout=600000

spring.datasource.hikari.max-lifetime=1800000



# JPA Configuration

spring.jpa.hibernate.ddl-auto=update

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

spring.jpa.properties.hibernate.default_schema=da_policyengine_schema

spring.jpa.properties.hibernate.jdbc.time_zone=UTC

spring.jpa.properties.hibernate.format_sql=true

spring.jpa.show-sql=false



# Kafka Configuration - using infrastructure Kafka

spring.kafka.bootstrap-servers=localhost:9092

spring.kafka.consumer.group-id=${spring.application.name}

spring.kafka.consumer.auto-offset-reset=earliest

spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer

spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer

spring.kafka.consumer.properties.spring.json.trusted.packages=com.dalab.*

spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer

spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer

spring.kafka.producer.retries=3

spring.kafka.producer.acks=all



# Security Configuration - using infrastructure Keycloak

spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8180/realms/dalab

spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:8180/realms/dalab/protocol/openid-connect/certs



# Management/Actuator Configuration

management.endpoints.web.exposure.include=health,info,metrics,prometheus

management.endpoint.health.show-details=when-authorized

management.metrics.export.prometheus.enabled=true



# Logging Configuration

logging.level.com.dalab=DEBUG

logging.level.org.springframework.kafka=INFO

logging.level.org.springframework.security=INFO

logging.level.org.hibernate.SQL=DEBUG

logging.pattern.console=%d{HH:mm:ss.SSS} [%thread] %-5level [%logger{36}] - %msg%n



# DALab Specific Configuration

dalab.service.name=Policy Engine Service

dalab.service.version=1.0.0

dalab.service.description=Policy evaluation and enforcement engine



# Common entities database connection (for da-protos entities)

dalab.common-db.url=jdbc:postgresql://localhost:5432/dalab_common

dalab.common-db.username=da_policyengine_user

dalab.common-db.password=da_policyengine_pass



# Kafka topics

dalab.kafka.topics.asset-changes=dalab.assets.changes

dalab.kafka.topics.policy-actions=dalab.policies.actions

dalab.kafka.topics.policy-evaluations=dalab.policies.evaluations



# Custom application properties for Kafka topics

app.kafka.topic.asset-change-event=dalab.assets.changes

app.kafka.topic.policy-action-event=dalab.policies.actions



# Easy Rules Configuration

easy.rules.skipOnFirstAppliedRule=false

easy.rules.skipOnFirstFailedRule=false

easy.rules.rulePriorityThreshold=1



# CORS Configuration

dalab.security.allowed-origins=http://localhost:3000,http://localhost:4200



# JWT Claims Configuration

dalab.security.jwt.claims.user-id=sub

dalab.security.jwt.claims.username=preferred_username

dalab.security.jwt.claims.roles=realm_access.roles



# OpenAPI Documentation

springdoc.api-docs.path=/api/v1/policyengine/api-docs

springdoc.swagger-ui.path=/swagger-ui.html

springdoc.swagger-ui.operationsSorter=alpha

springdoc.swagger-ui.tagsSorter=alpha

springdoc.show-actuator=true



# Event Center Configuration

dalab.event-center.enabled=true

dalab.event-center.max-events-per-stream=100

dalab.event-center.analytics-cache-duration=300

dalab.event-center.notification-retry-attempts=3

dalab.event-center.notification-timeout-ms=5000



# Event Center Kafka Topics

dalab.kafka.topics.event-stream=dalab.events.stream

dalab.kafka.topics.event-notifications=dalab.events.notifications

dalab.kafka.topics.event-analytics=dalab.events.analytics



# WebSocket Configuration for Event Streaming

spring.websocket.enabled=true

dalab.websocket.event-stream-endpoint=/ws/events

dalab.websocket.allowed-origins=http://localhost:3000,http://localhost:4200



# Event Center Source Services

dalab.event-center.source-services=da-catalog,da-discovery,da-compliance,da-policyengine,da-reporting,da-governance,da-lifecycle,da-classification,da-lineage