# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you 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.
spring.application.name=Apache Syncope ${syncope.version} Core
spring.groovy.template.check-template-location=false
spring.main.banner-mode=log

version=${syncope.version}

server.servlet.encoding.charset=UTF-8
server.servlet.encoding.enabled=true
server.servlet.encoding.force=true

server.servlet.contextPath=/syncope
cxf.path=/rest

management.endpoints.web.exposure.include=health,info,loggers,entityCache,job
management.endpoint.health.show-details=ALWAYS
management.endpoint.env.show-values=WHEN_AUTHORIZED

spring.main.allow-bean-definition-overriding=true

server.shutdown=graceful
spring.lifecycle.timeout-per-shutdown-phase=30s

service.discovery.address=http://localhost:8080/syncope/rest/

###############
# Persistence #
###############

# acceptable values: POSTGRESQL | MYSQL | MARIADB | ORACLE
persistence.db-type=POSTGRESQL

persistence.remoteCommitProvider=sjvm

persistence.domain[0].key=Master
persistence.domain[0].jdbcDriver=org.postgresql.Driver
persistence.domain[0].jdbcURL=jdbc:postgresql://localhost:5432/syncope?stringtype=unspecified
persistence.domain[0].dbUsername=syncope
persistence.domain[0].dbPassword=syncope
persistence.domain[0].databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary
persistence.domain[0].poolMaxActive=20
persistence.domain[0].poolMinIdle=5

################
# Provisioning #
################

provisioning.asyncConnectorFacadeExecutor.poolSize=25

provisioning.propagationTaskExecutorAsyncExecutor.poolSize=25

provisioning.connIdLocation=${syncope.connid.location}

#########
# Email #
#########
spring.mail.host=none.syncope.apache.org
spring.mail.port=25
spring.mail.username=
spring.mail.password=
spring.mail.properties.mail.smtp.auth=false
spring.mail.properties.mail.smtp.starttls.enable=false

############
# Security #
############

security.adminUser=${adminUser}
security.adminPassword=${adminPassword}
security.adminPasswordAlgorithm=SSHA256

security.anonymousUser=${anonymousUser}
security.anonymousKey=${anonymousKey}

security.jwtIssuer=ApacheSyncope
security.jwsAlgorithm=HS512
security.jwsKey=${jwsKey}

# Key length drives AES algorithm variant selection:
#
# * 16 chars => AES-128
# * 24 chars => AES-192
# * 32 chars => AES-256
#
# Shorter keys will be padded to the nearest longer option available; keys > 32 will be trucated
security.aesSecretKey=${secretKey}

security.groovyBlacklist=classpath:META-INF/groovy.blacklist

# default for LDAP / RFC2307 SSHA
security.digester.saltIterations=1
security.digester.saltSizeBytes=8
security.digester.invertPositionOfPlainSaltInEncryptionResults=true
security.digester.invertPositionOfSaltInMessageBeforeDigesting=true
security.digester.useLenientSaltSizeCheck=true

#########
# Disable CGLib Proxies #
#########
spring.aop.auto=true
spring.aop.proxy-target-class=false
