# Database type (mysql only)
DbType = mysql

# Database username
DbUserName =

# Database password
DbPassword =

# For MySQL, it has to follow the format 'host/db' (i.e. "mysql-server.example.com/fts3db")
DbConnectString =

# List of authorized VOs (separated by ;)
# Leave * to authorize any VO
AuthorizedVO = *

#List of authorized audiences for JWT authorization (separated by ;)
AuthorizedAudiences=https://wlcg.cern.ch/jwt/v1/any

#For each metadata size limit, if size_limit = 0, no limit checks are performed upon job submission
#Limit Job Metadata with specified Size Limit (default: 2048 bytes)
JobMetadataSizeLimit = 2048
#Limit File Metadata with specified Size Limit (default: 4096 bytes)
FileMetadataSizeLimit = 4096
#Limit Staging Metadata with specified Size Limit (default: 1024 bytes)
StagingMetadataSizeLimit = 1024
#Limit Archive Metadata with specified Size Limit (default: 1024 bytes)
ArchiveMetadataSizeLimit = 1024

# The alias used for the FTS endpoint
# Note: will be published in the FTS Transfers Dashboard
Alias =

# Site name running the FTS3 service
#SiteName =

# Inform the REST component whether the Optimizer service is running
#Optimizer = True

# Enable or disable monitoring messages (see fts-msg-monitoring.conf) (default false)
#MonitoringMessaging = False
# Enable or disable publishing of user DNs (recommended false)
#MonitoringPublishDN = False

# Directory where the internal FTS3 messages are written
#MessagingDirectory = /var/lib/fts3

# Interval between heartbeats (measured in seconds)
# Note: be aware of the FTS3 Server HeartBeatGraceInterval
#HeartBeatInterval = 60

# Time delta between bringonline timeout and expiration timeout
# Value must be set with a suffix: s (seconds), m (minutes), h (hours), d (days)
# No enforcement if config setting is missing
#BringOnlineAndExpirationDelta = 3d

# Enable or disable AutoSessionReuse (default false)
#AutoSessionReuse = False
# Min number of files per session reuse
#AutoSessionReuseMinFiles = 5
# Max number of files per session reuse
#AutoSessionReuseMaxFiles = 1000
# Max number of big files per session reuse
#AutoSessionReuseMaxBigFiles = 2
# File size max limit to classify file as small, expressed in bytes (default 100MB)
#AutoSessionReuseMaxSmallFileSize = 104857600
# File size max limit to classify file as big, expressed in bytes (default 1GB)
#AutoSessionReuseMaxBigFileSize = 1073741824

# OAuth2 parameters
ValidateAccessTokenOffline=True
JWKCacheSeconds=86400
TokenRefreshDaemonIntervalInSeconds=600

# List of authorized audiences (semicolon separated values)
# If not set, implicit "https://wlcg.cern.ch/jwt/v1/any" authorized audience is used
# If the token has an "aud" field, it must contain at least one of the configured values
#AuthorizedAudiences=https://wlcg.cern.ch/jwt/v1/any;https://fts3-devel.cern.ch:8446

#[providers]
#provider1 = https://wlcg.cloud.cnaf.infn.it
#provider_ClientId = <client-id>
#provider_ClientSecret = <client-secret>

# Authorization roles
# Detailed roles syntax is explained in the FTS3 documentation (Installation Guide/FTS3)
[roles]
Public = vo:transfer;all:datamanagement
production = all:config

[sqlalchemy]
pool_timeout = 10
pool_size = 10

# Logging configuration
[loggers]
keys = root, routes, fts3rest, sqlalchemy

[handlers]
keys = console, log_file

[formatters]
keys = generic

[logger_root]
level = INFO
handlers = log_file

[logger_routes]
level = INFO
handlers =
qualname = routes.middleware
# "level = DEBUG" logs the route matched and routing variables.

[logger_fts3rest]
level = INFO
handlers =
qualname = fts3rest

[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither.  (Recommended for production systems.)

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[handler_log_file]
class = logging.FileHandler
args = ('/var/log/fts3rest/fts3rest.log', 'a')
level = NOTSET
formatter = generic

[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(module)s] %(message)s
datefmt = %H:%M:%S
