penehr.configuration.2.7.0.source-code.application.yml Maven / Gradle / Ivy
# Copyright (c) 2024 vitasystems GmbH.
#
# This file is part of Project EHRbase
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ------------------------------------------------------------------------------
# General How-to:
#
# You can set all config values here or via an corresponding environment variable which is named as the property you
# want to set. Replace camel case (aB) as all upper case (AB), dashes (-) and low dashes (_) just get ignored adn words
# will be in one word. Each nesting step of properties will be separated by low dash in environment variable name.
# E.g. if you want to allow the delete all endpoints in the admin api set an environment variable like this:
# ADMINAPI_ALLOWDELETEALL=true
#
# See https://docs.spring.io/spring-boot/docs/2.5.0/reference/html/features.html#features.external-config.typesafe-configuration-properties.relaxed-binding.environment-variables
# for official documentation on this feature.
#
# Also see the documentation on externalized configuration in general:
# https://docs.spring.io/spring-boot/docs/2.5.0/reference/html/features.html#features.external-config
spring:
application:
name: ehrbase
cache:
# change to type redis if usage of redis distributed cache is intended. Also turn on management.health.redis.enabled
# if needed.
type: CAFFEINE
# the following redis properties are only used if the cache.type=redis
data:
redis:
host: localhost
port: 6379
security:
oauth2:
resourceserver:
jwt:
issuer-uri: # http://localhost:8081/auth/realms/ehrbase # Example issuer URI - or set via env var
profiles:
active: local
datasource:
driver-class-name: org.postgresql.Driver
flyway:
driver-class-name: org.postgresql.Driver
ehr-schema: ehr
ext-schema: ext
ehr-location: classpath:db/migration/ehr
ext-location: classpath:db/migration/ext
ehr-strategy: MIGRATE
ext-strategy: MIGRATE
user: ehrbase
password: ehrbase
jooq:
sql-dialect: POSTGRES
jackson:
default-property-inclusion: NON_NULL
security:
authType: BASIC
authUser: ehrbase-user
authPassword: SuperSecretPassword
authAdminUser: ehrbase-admin
authAdminPassword: EvenMoreSecretPassword
oauth2UserRole: USER
oauth2AdminRole: ADMIN
ehrbase:
aql:
pg-llj-workaround: true
rest:
aql:
# allows to control query execution using debug params
debugging-enabled: false
response:
# add an information about the running ehrbase instance to the AQL meta.generator property
generator-details-enabled: false
# include executed_aql in the AQL meta information
executed-aql-enabled: true
experimental:
tags:
enabled: false
context-path: /rest/experimental/tags
security:
# Configuration of actuator for reporting and health endpoints
management:
endpoints:
web:
# disables CSRF protection on management endpoints on base-path to use a client like curl or similar
csrf-validation-enabled: true
httpclient:
#proxy: 'localhost'
#proxyPort: 1234
cache:
template-init-on-startup: true
user-id-cache-config:
expire-after-access:
duration: 300
unit: SECONDS
external-fhir-terminology-cache-config:
expire-after-write:
duration: 300
unit: SECONDS
system:
allow-template-overwrite: false
openehr-api:
context-path: /rest/openehr
admin-api:
active: false
allowDeleteAll: false
context-path: /rest/admin
# Logging Properties
logging:
level:
org.ehcache: info
org.jooq: info
org.jooq.Constants: warn
org.springframework: info
org.springframework.security.web.DefaultSecurityFilterChain: warn
org.flywaydb.core.internal.license.VersionPrinter: warn
pattern:
console: '%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr([%X]){faint} %clr(${PID}){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wEx'
server:
# Optional custom server nodename
# nodename: 'local.test.org'
port: 8080
servlet:
contextPath: /ehrbase
tomcat:
threads:
min-spare: 200
max: 200
# Option to disable strict invariant validation.
# disable-strict-validation: true
# Configuration of actuator for reporting and health endpoints
management:
endpoints:
# Disable all endpoint by default to opt-in enabled endpoints
enabled-by-default: false
web:
base-path: '/management'
exposure:
include: 'env, health, info, metrics, prometheus'
# The access to management endpoints can be controlled
# ADMIN_ONLY - (default) endpoints are locked behind an authorization and are only available for users with the admin role
# PRIVATE - endpoints are locked behind an authorization, but are available to any role
# PUBLIC - endpoints can be accessed without an authorization
access: ADMIN_ONLY
# Per endpoint settings
endpoint:
# Env endpoint - Shows information on environment of EHRbase
env:
# Enable / disable env endpoint
enabled: false
# Health endpoint - Shows information on system status
health:
# Enable / disable health endpoint
enabled: false
# Show components in health endpoint. Can be "never", "when-authorized" or "always"
show-components: 'when-authorized'
# Show details in health endpoint. Can be "never", "when-authorized" or "always"
show-details: 'when-authorized'
# Show additional information on used systems. See https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-health-indicators for available keys
datasource:
# Enable / disable report if datasource connection could be established
enabled: true
# Info endpoint - Shows information on the application as build infor, etc.
info:
# Enable / disable info endpoint
enabled: false
# Metrics endpoint - Shows several metrics on running EHRbase
metrics:
# Enable / disable metrics endpoint
enabled: false
# Prometheus metric endpoint - Special metrics format to display in microservice observer solutions
prometheus:
metrics:
export:
enabled: true
# turn of redis per default, shall be enabled in case spring.cache.type: REDIS is used
health:
redis:
enabled: false
# External Terminology Validation Properties
validation:
external-terminology:
enabled: false
# failOnError: true
# provider:
# fhir:
# # If set it must match a spring.security.oauth2.registration.[oauth2-client] that needs to be configured
# # oauth2-client: 'fhir-terminology-client'
# # request-timeout: 30S # 30 Seconds default
# type: FHIR
# url: https://r4.ontoserver.csiro.au/fhir/
# SSL Properties (used by Spring WebClient and Apache HTTP Client)
client:
ssl:
enabled: false
# JavaMelody
javamelody:
enabled: false
# plugin configuration
plugin-manager:
plugin-dir: ./plugin_dir
plugin-config-dir: ./plugin_config_dir
enable: true
plugin-context-path: /plugin