# This is the default configuration for Kustvakt full version
# Copy this file to data/kustvakt.conf and adjust settings

#Krill
krill.indexDir= sample-index

krill.index.commit.count = 134217000
krill.index.commit.log = log/krill.commit.log
krill.index.commit.auto = 500
krill.index.relations.max = 100
# Directory path of virtual corpora to cache
#krill.namedVC = data/vc

# LDAP
ldap.config = src/main/resources/embedded-ldap-example.conf

# Kustvakt
api.welcome.message = Welcome to KorAP API!
current.api.version = v1.0
# multiple versions comma separated
# supported.api.versions = v1.0

# server
server.port=8089
server.host=localhost

# log
log.request.enabled = false

# Cache
cache.total.results.enabled = true

# Timeout
# timeout.guest = 10000 (default)
# timeout.login = 90000 (default)


# Pipe (optional) 
# pipe.host=https://korap.ids-mannheim.de

# default foundries for specific layers
default.foundry.partOfSpeech = tt
default.foundry.lemma = tt
default.foundry.orthography = opennlp
default.foundry.dependency = malt
default.foundry.constituent = corenlp
default.foundry.morphology = marmot
default.foundry.surface = base

# Virtual corpus and queries
max.user.persistent.queries = 5
# max.token.context.size = 40
max.token.context.size.large = 50
vc.list.statistics.enabled = false

# Availability regex only support |
# It should be removed/commented when the data doesn't contain availability field.
# 
availability.regex.free = CC.*
availability.regex.public = ACA.*|QAO-NC
availability.regex.all = QAO.*

# Rate limiting for authenticated users
#
# Number of requests allowed per time period
ratelimit.refill.tokens = 60
# Time period for token refill (format: 1S, 30M, 1H, 1D)
ratelimit.refill.period = 1M
# Maximum burst capacity (tokens that can be consumed immediately)
ratelimit.burst.capacity = 60
# Maximum number of rate limit buckets to keep in memory
ratelimit.max.buckets = 10000
# Time to live for unused rate limit buckets
ratelimit.bucket.ttl = 6H

# options referring to the security module!

# OAuth 
# (see de.ids_mannheim.korap.constant.AuthenticationMethod for possible 
# oauth.password.authentication values)
oauth2.password.authentication = LDAP
# used to determine native client, currently not used
# oauth2.native.client.host = korap.ids-mannheim.de
oauth2.max.attempts = 1
# expiry in seconds (S), minutes (M), hours (H), days (D)
oauth2.access.token.expiry = 1D
oauth2.refresh.token.expiry = 90D
# default 365D
# oauth2.access.token.long.expiry = 365D
# oauth2.refresh.token.long.expiry = 365D
oauth2.authorization.code.expiry = 10M
# scopes separated by space
oauth2.default.scopes = search match_info 
oauth2.client.credentials.scopes = client_info
oauth2.initial.super.client = false

## see SecureRandom Number Generation Algorithms
## optional
# security.secure.random.algorithm=SHA1PRNG

## see MessageDigest Algorithms
## default MD5
security.md.algoritm = SHA-256  

### secure hash support: BCRYPT
security.secure.hash.algorithm=BCRYPT
security.encryption.loadFactor = 10

# DEPRECATED
# JWT
security.jwt.issuer=korap.ids-mannheim.de
security.sharedSecret=this-is-shared-secret-code-for-JWT-Signing.It-must-contains-minimum-256-bits

## token expiration (used in other authentication provider than OAuth2)
security.longTokenTTL=150D
security.tokenTTL=72H
security.shortTokenTTL=45M

# Session authentication
security.idleTimeoutDuration = 25M
security.multipleLogIn = true
security.loginAttemptNum = 3
security.authAttemptTTL = 45M