CMSgov/dpc-app

View on GitHub
dpc-api/src/main/resources/application.yml

Summary

Maintainability
Test Coverage
database:
  driverClass: org.postgresql.Driver
  url: ${DATABASE_URL:-"jdbc:postgresql://db:5432/dpc_attribution"}
  user: "${ATTRIBUTION_DB_USER:-postgres}"
  password: "${ATTRIBUTION_DB_PASS:-dpc-safe}"
  initialSize: 5
  minSize: 5
  maxSize: 10
  properties:
    charSet: UTF-8
    hibernate.dialect: org.hibernate.dialect.PostgreSQL10Dialect

queuedb:
  driverClass: org.postgresql.Driver
  url: ${QUEUE_DB_URL:-"jdbc:postgresql://db:5432/dpc_queue"}
  user: "${QUEUE_DB_USER:-postgres}"
  password: "${QUEUE_DB_PASS:-dpc-safe}"
  initialSize: 5
  minSize: 5
  maxSize: 10

server:
  enableThreadNameFilter: false
  registerDefaultExceptionMappers: false
  applicationContextPath: ${APP_CONTEXT_PATH:-"/"}
  applicationConnectors:
    - type: http
      port: 3002
  adminConnectors:
    - type: http
      port: 9900
  requestLog:
    appenders:
      - type: console
        timeZone: UTC
        layout:
          type: access-json
          timestampFormat: "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
          additionalFields:
            environment: ${ENV:-"unknown_env"}
            version: ${APP_VERSION:-"unknown_version"}
            application: ${APPLICATION:-"dpc-api"}

logging:
  level: WARN
  loggers:
    "liquibase": INFO
    "gov.cms.dpc.api.resources.v1": INFO
    "gov.cms.dpc.queue.DistributedBatchQueue": DEBUG
    "org.hibernate": ERROR
    "org.hibernate.SQL": ERROR
    "gov.cms.dpc.api.auth": INFO
    "gov.cms.dpc.common.logging.filters": INFO
  appenders:
    - type: console
      timeZone: UTC
      layout:
        type: json-dpc
        timestampFormat: "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
        additionalFields:
          environment: ${ENV:-"unknown_env"}
          version: ${APP_VERSION:-"unknown_version"}
          application: ${APPLICATION:-"dpc-api"}

      # Prevent log entries from being dropped under all circumstances
      # While nice from a performance standpoint, we must ensure full audit capability of the application
      discardingThreshold: 0

jobTimeoutInSeconds: ${JOB_TIMEOUT_IN_SECONDS:-60}

# The root URL at which the application is accessible, if necessary, include the port, do not include the application version
publicURL: ${PUBLIC_URL:-"http://localhost:3002"}

authdb:
  driverClass: org.postgresql.Driver
  url: ${AUTH_DB_URL:-"jdbc:postgresql://db:5432/dpc_auth"}
  user: "${AUTH_DB_USER:-postgres}"
  password: "${AUTH_DB_PASS:-dpc-safe}"
  initialSize: 5
  minSize: 5
  maxSize: 10

lookBackExemptOrgs: ${LOOK_BACK_EXEMPT_ORGS:-["0ab352f1-2bf1-44c4-aa7a-3004a1ffef12","69c0d4d4-9c07-4fa8-9053-e10fb1608b48","c7f5247b-4c41-478c-84eb-a6e801bdb145"]}

bbclient:
  registerHealthCheck: ${BB_REGISTER_HEALTH_CHECK:-true}
  keyStore:
    type: "JKS"
    defaultPassword: "${BB_KEYSTORE_PASS:-changeit}"
    location: ${BB_KEYSTORE_LOCATION:-"/bb.keystore"}
  timeouts:
    connectionTimeout: 5000 # ms
    socketTimeout: 5000 # ms
    requestTimeout: 5000 # ms
  serverBaseUrl: ${BFD_URL}
  resourcesCount: 100 # Max number of resource that a request to BB will return before using another request
  bfdHashPepper: "${BFD_HASH_PEPPER}"
  bfdHashIter: ${BFD_HASH_ITER}

authenticationDisabled: ${AUTH_DISABLED:-false}

attributionURL: ${ATTRIBUTION_URL:-"http://localhost:3500/v1/"}
exportPath: ${EXPORT_PATH:-"/tmp"}

httpClient:
  timeout: 5s
  connectionRequestTimeout: 5s

fhir:
  validation:
    enabled: true
    schemaValidation: false
    schematronValidation: false

tokens:
  versionPolicy:
    minimumVersion: 1
    currentVersion: 2

  expirationPolicy:
    expirationOffset: 1
    expirationUnit: "YEARS"

keyPairLocation: ${BAKERY_KEYPAIR_LOCATION:-"/bakery_keypair.json"}