# Bookkeeper server configuration
server:
  rootPath: /bookkeeper/v1
  adminContextPath: /admin

# Logging configuration
logging:
  level: ERROR
  appenders:
    - type: console
      threshold: ALL
      queueSize: 512
      target: stdout
      logFormat: "%-5p [%d{ISO8601,UTC}] %c: %m%n%rEx"
  loggers:
    "org.dataone": DEBUG
    "io.dropwizard": DEBUG
    "org.apache.http.impl.conn.PoolingHttpClientConnectionManager": ERROR
    "org.dataone.client.utils.HttpConnectionMonitorService": ERROR

# Caching policy for authenticated principals
authenticationCachePolicy: "maximumSize=1000, expireAfterAccess=10m"

# PostgreSQL database configuration
database:
  # Driver details
  driverClass: org.postgresql.Driver
  url: jdbc:postgresql://localhost:5432/bookkeeper
  # for k8s:
  # url: jdbc:postgresql://postgres.bookkeeper.svc.cluster.local:5432/bookkeeper

  # Connect with database username and password
  user: <user goes here>
  password: <password goes here>

  # JDBC driver properties
  properties:
    charSet: UTF-8

  # the maximum amount of time to wait on an empty pool before throwing an exception
  maxWaitForConnection: 1s

  # the SQL query to run when validating a connection's liveness
  validationQuery: "/* MyService Health Check */ SELECT 1"

  # the timeout before a connection validation queries fail
  validationQueryTimeout: 1s

  # the minimum number of connections to keep open
  minSize: 8

  # the maximum number of connections to keep open
  maxSize: 32

  # whether or not idle connections should be validated
  checkConnectionWhileIdle: false

  # the amount of time to sleep between runs of the idle connection validation, abandoned cleaner and idle pool resizing
  evictionInterval: 10s

  # the minimum amount of time an connection must sit idle in the pool before it is eligible for eviction
  minIdleTime: 1 minute

# DataONE Service API configuration
dataone:
  # The Coordinating Node base URL (no trailing slash)
  cnBaseUrl: "https://cn.dataone.org/cn"

  # The list of admin subjects with all CRUD permissions
  adminSubjects:
    - "CN=urn:node:CN,DC=dataone,DC=org"
    - "http://orcid.org/0000-0002-8121-2341"
    - "http://orcid.org/0000-0002-2192-403X"

  bookkeeperAdminSubjects:
    - "CN=urn:node:CN,DC=dataone,DC=org"
    - "http://orcid.org/0000-0003-0077-4738" # Matt Jones
    - "http://orcid.org/0000-0002-6513-4996" # Dave Vieglais
    - "http://orcid.org/0000-0002-8121-2341" # Christopher Jones
    - "http://orcid.org/0000-0003-2192-431X" # Lauren Walker
    - "http://orcid.org/0000-0002-1209-5268" # Jing Tao
    - "http://orcid.org/0000-0002-2192-403X" # Peter Slaughter

  # The default trial period in days
  trialDurationDays: 180