Skip to content

Configuration Properties

Philip Helger edited this page Feb 28, 2026 · 49 revisions

Configuration Properties

All properties are located in the file application.properties which resides in src/main/resources of the phoss-ap-webapp module.

All configuration properties are resolved according to the rules described in https://github.com/phax/ph-commons/wiki/ph-config

Table of Contents

General Configuration

  • global.debug: Enable or disable overall debug mode. Enables additional checks that should not be active in production (e.g. verbose logging, slower validation). Default is false.
  • global.production: Enable or disable overall production mode. When false, certain production-only functionality may be disabled. Default is false.
  • global.nostartupinfo: Set to true to suppress the startup information banner. Default is false.
  • global.datapath: The path where all relevant data files are stored (e.g. keystores, dumps, logs). Should be an absolute path in production (e.g. /var/phoss-ap/data).

Peppol Configuration

  • peppol.stage: The Peppol network stage. Either test or prod. Determines which PKI certificates and SML endpoints are used.
  • peppol.seatid: The Peppol Seat ID of this AP (e.g. POP000000). Used in reporting and MLS processing.
  • peppol.owner.countrycode: The 2-letter country code of the AP operator. Used as C2 or C3 country in reporting context.

AS4 Keystore and Truststore

These properties configure the cryptographic material used by phase4 for AS4 message signing, encryption, and certificate validation.

AP Keystore (signing and decryption)

  • org.apache.wss4j.crypto.merlin.keystore.type: Keystore type. Either JKS or PKCS12. Default is JKS.
  • org.apache.wss4j.crypto.merlin.keystore.file: Path to the keystore file containing the AP certificate and private key.
  • org.apache.wss4j.crypto.merlin.keystore.password: Password for the keystore.
  • org.apache.wss4j.crypto.merlin.keystore.alias: Alias of the key entry within the keystore.
  • org.apache.wss4j.crypto.merlin.keystore.private.password: Password for the private key entry.

AP Truststore (validating remote AP certificates)

  • org.apache.wss4j.crypto.merlin.truststore.type: Truststore type. Either JKS or PKCS12. Default is PKCS12.
  • org.apache.wss4j.crypto.merlin.truststore.file: Path to the truststore file for validating incoming AS4 message signatures.
  • org.apache.wss4j.crypto.merlin.truststore.password: Password for the truststore.

SMP Client Configuration

These properties configure the SMP client used for outbound SMP lookups (to resolve receiver AP endpoints).

  • smpclient.truststore.type: Truststore type for SMP client TLS connections. Either JKS or PKCS12. Default is PKCS12.
  • smpclient.truststore.path: Path to the truststore file for SMP client connections.
  • smpclient.truststore.password: Password for the SMP client truststore.

Database Configuration

PostgreSQL is the required database. The database schema is managed automatically via Flyway.

JDBC configuration properties are defined by JdbcConfigurationConfig from ph-db. All properties use the prefix jdbc..

  • jdbc.database-type: The target database type. Must be PostgreSQL.
  • jdbc.driver: The JDBC driver class. For PostgreSQL use org.postgresql.Driver.
  • jdbc.url: The JDBC URL of the database. Example: jdbc:postgresql://localhost:5432/phossap.
  • jdbc.user: The database user.
  • jdbc.password: The password of the database user.
  • jdbc.schema: The database schema to use. Default is public.
  • jdbc.execution-time-warning.enabled: Enable or disable logging of long-running JDBC transactions. Default is true.
  • jdbc.execution-time-warning.ms: Threshold in milliseconds for the long-running JDBC transaction warning. Default is 1000.
  • jdbc.debug.connections: Enable or disable debug logging of JDBC connection lifecycle (open/close). Default is false.
  • jdbc.debug.transactions: Enable or disable debug logging of JDBC transactions (begin/commit/rollback). Default is false.
  • jdbc.debug.sql: Enable or disable debug logging of executed SQL statements. Default is false.

Connection Pooling

  • jdbc.pooling.max-connections: Maximum number of active connections in the pool. Default is 8.
  • jdbc.pooling.max-wait.millis: Maximum milliseconds to wait for a connection from the pool before throwing an exception. Default is 10000.
  • jdbc.pooling.between-evictions-runs.millis: Milliseconds between runs of the idle connection evictor. Default is 300000.
  • jdbc.pooling.min-evictable-idle.millis: Minimum idle time in milliseconds before a connection is eligible for eviction. Default is 1800000.
  • jdbc.pooling.remove-abandoned-timeout.millis: Timeout in milliseconds before an abandoned connection can be removed. Default is 300000.

Flyway

Configuration properties for Flyway database migrations, as defined by FlywayConfigurationBuilderConfig from ph-db. All properties use the prefix flyway. and fall back to the main JDBC properties if not explicitly set.

  • flyway.enabled: Enable or disable Flyway database migrations on startup. Default is true.
  • flyway.jdbc.url: Optional separate JDBC URL for Flyway migrations. Falls back to jdbc.url if not set.
  • flyway.jdbc.user: Optional separate database user for Flyway. Falls back to jdbc.user if not set.
  • flyway.jdbc.password: Optional separate database password for Flyway. Falls back to jdbc.password if not set.
  • flyway.jdbc.schema-create: Whether Flyway should attempt to create the database schema. Default is false.
  • flyway.baseline.version: The Flyway baseline version (integer). Used when baselining an existing database. Default is 0.

API Configuration

  • phase4.endpoint.address: The public AS4 endpoint URL of this AP (e.g. https://ap.example.com/as4). Used by phase4 for endpoint comparison and in reporting.
  • phase4.api.requiredtoken: The API token required for authenticating REST API calls (sent via X-Token header). If empty or not set, API authentication is disabled.

Sending Configuration

  • peppol.sending.enabled: Enable or disable outbound AS4 sending. Set to false to operate as a receive-only AP. Default is true.

Receiving Configuration

  • peppol.receiving.enabled: Enable or disable inbound AS4 receiving. Set to false to operate as a send-only AP. Default is true.

Forwarding Configuration

  • forwarding.mode: The forwarding mode to use for delivering received documents to the Receiver Backend. One of: http_post_async, http_post_sync, s3_link, sftp. This is configured per AP instance — exactly one mode per deployment.

HTTP POST Forwarding

Applicable when forwarding.mode is http_post_async or http_post_sync.

  • forwarding.http.endpoint: The URL of the Receiver Backend endpoint to POST the SBD to.

The HTTP client used for forwarding is configured via HttpClientSettingsConfig from ph-web with the prefix forwarding.. All properties below are optional and have sensible defaults.

Timeouts

  • forwarding.http.timeout.connect.millis (or .seconds, .minutes, .hours): Connect timeout for the HTTP POST.
  • forwarding.http.timeout.response.millis (or .seconds, .minutes, .hours): Response/read timeout for the HTTP POST.
  • forwarding.http.timeout.connectionrequest.millis (or .seconds, .minutes, .hours): Timeout for obtaining a connection from the pool.

Retry

  • forwarding.http.retry.count: Number of HTTP-level retries (integer, >= 0). Not set by default.
  • forwarding.http.retry.interval.millis (or .seconds, .minutes, .hours): Interval between HTTP-level retries.
  • forwarding.http.retry.always: Whether to retry on all failures (boolean). Default is the HttpClient default.

Proxy

  • forwarding.http.proxy.enabled: Enable a separate HTTP proxy for forwarding requests. Default is false.
  • forwarding.http.proxy.host: Proxy hostname.
  • forwarding.http.proxy.port: Proxy port (integer).
  • forwarding.http.proxy.username: Proxy authentication username.
  • forwarding.http.proxy.password: Proxy authentication password.
  • forwarding.http.proxy.nonProxyHosts: Pipe-separated list of hosts that bypass the proxy.

TLS

  • forwarding.http.tls.checks.disabled: Disable all TLS checks (hostname + certificate). Default is false. Security risk — use only for testing.
  • forwarding.http.tls.hostname-check.disabled: Disable TLS hostname verification only. Default is false.
  • forwarding.http.tls.certificate-check.disabled: Disable TLS certificate verification only. Default is false.

Miscellaneous

  • forwarding.http.useragent: Custom User-Agent header for forwarding requests.
  • forwarding.http.follow-redirects: Whether to follow HTTP redirects. Default is the HttpClient default.
  • forwarding.http.keep-alive: Whether to use HTTP keep-alive connections. Default is the HttpClient default.
  • forwarding.http.dnsclientcache.use: Whether to use the DNS client cache.
  • forwarding.http.protocol-upgrade.enabled: Enable HTTP/2 protocol upgrade. Default is the HttpClient default.

S3 Forwarding

Applicable when forwarding.mode is s3_link.

  • forwarding.s3.bucket: The S3 bucket name where received SBDs are stored.
  • forwarding.s3.region: The AWS region of the S3 bucket (e.g. eu-central-1).
  • forwarding.s3.access-key-id: AWS access key ID for S3 access. Optional if using IAM roles.
  • forwarding.s3.secret-access-key: AWS secret access key for S3 access. Optional if using IAM roles.
  • forwarding.s3.key-prefix: Optional prefix (folder path) for S3 object keys.

SFTP Forwarding

Applicable when forwarding.mode is sftp. Host connection properties follow the SftpSettingsHost model from ph-oton (createFromConfig()) using the prefix forwarding.sftp..

  • forwarding.sftp.host: The hostname or IP address of the SFTP server.
  • forwarding.sftp.port: The port of the SFTP server. Default is 22.
  • forwarding.sftp.connectiontimeoutms: Connection timeout in milliseconds. Default is defined by ISftpSettingsHost.DEFAULT_CONNECTION_TIMEOUT_MS.
  • forwarding.sftp.user: The username for SFTP authentication.
  • forwarding.sftp.password: The password for SFTP authentication. Either this or a key pair must be provided.
  • forwarding.sftp.keypair.privatekeypath: Path to the private key file for key-based authentication.
  • forwarding.sftp.keypair.publickeypath: Path to the public key file for key-based authentication.
  • forwarding.sftp.keypair.passphrase: Optional passphrase for the key pair.
  • forwarding.sftp.knownhostspath: Path to the SSH known_hosts file for host key verification. Optional — if not set, host key checking may be skipped.
  • forwarding.sftp.maxconnections: Maximum number of parallel SFTP connections. Default is defined by ISftpSettingsHost.DEFAULT_MAX_CONNECTIONS.
  • forwarding.sftp.directory: The remote directory on the SFTP server where SBDs are uploaded.

Retry Configuration

Retry behavior is defined via customizable Java interfaces. The following properties configure the default retry strategy.

  • retry.sending.max-attempts: Maximum number of AS4 sending attempts for outbound transactions before marking as permanently failed. Default is 3.
  • retry.sending.initial-backoff.ms: Initial backoff interval in milliseconds between sending retries. Default is 60000 (1 minute).
  • retry.sending.backoff-multiplier: Multiplier applied to the backoff interval after each failed attempt (exponential backoff). Default is 2.0.
  • retry.sending.max-backoff.ms: Maximum backoff interval in milliseconds. Default is 3600000 (1 hour).
  • retry.forwarding.max-attempts: Maximum number of forwarding attempts for inbound transactions before marking as permanently failed. Default is 3.
  • retry.forwarding.initial-backoff.ms: Initial backoff interval in milliseconds between forwarding retries. Default is 60000 (1 minute).
  • retry.forwarding.backoff-multiplier: Multiplier applied to the backoff interval after each failed forwarding attempt. Default is 2.0.
  • retry.forwarding.max-backoff.ms: Maximum backoff interval in milliseconds for forwarding retries. Default is 3600000 (1 hour).
  • retry.scheduler.interval.ms: Interval in milliseconds at which the retry scheduler checks for transactions eligible for retry. Default is 60000 (1 minute). Safe to enable on all instances — uses SKIP LOCKED for work distribution.

Circuit Breaker

Per-C3 circuit breaker for outbound AS4 sending. Implemented in-memory using Failsafe. See Retry and Resilience Patterns for details.

  • circuit-breaker.failure-threshold: Number of consecutive failures to a C3 endpoint before the circuit breaker opens. Default is 5.
  • circuit-breaker.open-duration.ms: Duration in milliseconds the circuit breaker stays open before transitioning to half-open. Default is 60000 (1 minute).
  • circuit-breaker.half-open-max-attempts: Number of probe attempts allowed through in half-open state to test if the C3 endpoint has recovered. Default is 1.

Verification Configuration

  • verification.outbound.enabled: Enable or disable optional verification of outbound documents before AS4 sending. Default is false.
  • verification.inbound.enabled: Enable or disable optional verification of inbound documents before forwarding. Default is false.

The actual verification logic is provided via the pluggable IDocumentVerifier SPI. These properties only control whether the verification step is invoked.

MLS Configuration

  • mls.type: The MLS sending strategy for this AP instance (as C3). Either FAILURE_ONLY or ALWAYS_SEND. Default is ALWAYS_SEND. This value is captured per inbound transaction at reception time.

Reporting Configuration

  • peppol.reporting.senderid: The Peppol Participant ID used as the sender of Peppol Reporting messages (TSR/EUSR).
  • peppol.reporting.scheduled: Enable or disable scheduled automatic Peppol Reporting submission. Default is true. In a multi-instance deployment, only the reporting leader instance should have this set to true (see reporting.leader.enabled).
  • reporting.leader.enabled: Controls whether this instance acts as the reporting leader. When true, this instance is responsible for submitting Peppol reports on schedule. In a multi-instance deployment, exactly one instance should have this set to true. Default is false.
  • peppol.reporting.schedule.day-of-month: Day of the month on which reporting is submitted (1-31). Default is 2.
  • peppol.reporting.schedule.hour: Hour of the day at which reporting is submitted (0-23). Default is 5.
  • peppol.reporting.schedule.minute: Minute of the hour at which reporting is submitted (0-59). Default is 0.

Duplicate Detection Configuration

  • duplicate.detection.as4.mode: Behavior when an AS4 Message ID duplicate is detected. Either reject or store_and_flag. Default is reject.
  • duplicate.detection.sbdh.mode: Behavior when an SBDH Instance Identifier duplicate is detected. Either reject or store_and_flag. Default is reject.

Archival Configuration

  • archival.scheduler.enabled: Enable or disable the periodic archival scheduler. Default is true. Safe to enable on all instances — uses SKIP LOCKED for work distribution.
  • archival.scheduler.interval.ms: Interval in milliseconds at which the archival scheduler runs. Default is 3600000 (1 hour).

Notification Configuration

Notification dispatch is handled via a generic Java interface (INotificationHandler). The following properties configure the default implementation.

  • notification.enabled: Enable or disable failure notifications. Default is true.

HTTP Proxy Configuration

These settings are needed when the AP runs behind an outbound proxy server. They affect AS4 sending, SMP lookups, CRL downloads, and reporting submission.

  • http.proxy.enabled: Enable or disable the use of an outbound HTTP proxy. Default is false.
  • http.proxy.host: Proxy host name or IP address.
  • http.proxy.port: Proxy port number.
  • http.proxy.username: Optional username for proxy authentication.
  • http.proxy.password: Optional password for proxy authentication.
  • http.proxy.nonProxyHosts: Pipe-separated list of hosts that should bypass the proxy (e.g. localhost|127.0.0.1).

Shutdown and Startup Recovery

  • shutdown.timeout.ms: Maximum time in milliseconds to wait for in-flight sending and forwarding operations to complete during graceful shutdown. After this timeout, remaining tasks are interrupted. Default is 30000 (30 seconds).
  • startup.recovery.enabled: Enable or disable stale transaction recovery at startup. When true, transactions left in transient states (sending, forwarding) from a previous unclean shutdown are reset to their retry-eligible states (failed, forward_failed) with next_retry_dt = NOW(). Default is true.

See also the Spring Boot properties server.shutdown and spring.lifecycle.timeout-per-shutdown-phase in the Spring Boot / Server Configuration section.

Logging and Diagnostics

  • phase4.dump.path: Directory path where AS4 message dumps (request/response) are stored for debugging purposes. If not set, no dumps are created. Example: /var/phoss-ap/data/phase4-dumps/.

Spring Boot / Server Configuration

Standard Spring Boot properties for configuring the embedded server.

  • server.port: The HTTP port on which the AP listens. Default is 8080.
  • server.shutdown: Shutdown mode. Set to graceful to enable graceful shutdown (stop accepting new requests, drain in-flight requests). Default is immediate.
  • spring.lifecycle.timeout-per-shutdown-phase: Maximum time Spring Boot waits for the servlet container to drain in-flight HTTP requests during graceful shutdown. Example: 30s. Default is 30s.
  • server.forward-headers-strategy: Strategy for handling forwarded headers when running behind a reverse proxy. Set to native when behind a proxy.
  • spring.servlet.multipart.max-file-size: Maximum file size for multipart uploads (document submission). Example: 100MB.
  • spring.servlet.multipart.max-request-size: Maximum request size for multipart uploads. Example: 100MB.

Clone this wiki locally