Skip to content

Modify Service Default Configuration

Each service ships with a default set of configuration values; however, you may want or need to override these settings to suit your deployment needs. For example, the configuration service and James use a local, file-based database with default credentials. You'll likely want to use a "real" database running on a dedicated machine, such as MySQL or Postgres. The same goes for RabbitMQ, where you probably won't want to use the local RabbitMQ instance running with the guest/guest credentials.

These are ordinary Spring Boot applications, so Spring supports several ways to supply configuration. The property names and defaults below are the same for every deployment model; only the mechanism for applying an override differs:

  • Machine Deployment (Fat Jars) — place an application.yml (or application.properties) file in each service's directory, next to the jar/war.
  • Kubernetes Deployment — supply values as environment variables or mounted Secret/ConfigMap entries on each Deployment.

The following tables list some of the common application settings that you may want to customize depending on your needs. Some of these properties are not defined in the micro-service's own application.yml — they're contributed by auto-configuration classes in internal library JARs on the service's classpath, so they won't be visible just by looking at the jar's bundled config file.

Configuration Service

NameDescriptionDefault Value
spring.r2dbc.*Database connection configuration. See Spring data properties settings for full details.url: r2dbc:h2:file:///./embedded-db/nhindconfig;NON_KEYWORDS=VALUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
username: sa
password: ""
spring.sql.init.platformPlatform to use in the default schema generation script. Supported options are h2, mysql, and postgresql.h2
spring.security.user.nameThe basic auth username to access the configuration service API.admin
spring.security.user.passwordThe basic auth password to access the configuration service API. Stored in application.yml as a bcrypt hash ({bcrypt}...) — the value shown here is the decoded plaintext.d1r3ct;
direct.trustbundles.refresh.periodInterval, in milliseconds, at which a scheduled task checks all configured trust bundles for updates.3600000
direct.config.keystore.hsmpresentEnables HSM-backed (PKCS#11) protection for the keystore holding Direct signing/decryption certificates and keys. When false, the software passphrase settings below are used instead.false
direct.config.keystore.bootstrapmanagerEnables the software "bootstrapped" keystore protection manager (used when no HSM is present) to protect/encrypt the keystore and private key passphrases.false
direct.config.keystore.keyStorePassPhrasePassphrase protecting the software (non-HSM) keystore holding Direct signing/decryption certificates and keys. Change this for any real deployment.H1TBr0s!
direct.config.keystore.privateKeyPassPhrasePassphrase protecting private keys in the software (non-HSM) keystore. Change this for any real deployment.H1TCh1ckS!
direct.config.keystore.initOnStartWhether to initialize the keystore/HSM token store on application startup.true
direct.config.keystore.{keyStorePin, keyStoreType, keyStoreSourceAsString, keyStoreProviderName, keyStorePassPhraseAlias, privateKeyPassPhraseAlias}Additional PKCS#11 HSM connection settings, only used when hsmpresent=true.som3randomp!n
Luna
slot:0
com.safenetinc.luna.provider.LunaProvider
keyStorePassPhrase
privateKeyPassPhrase

Configuration UI

NameDescriptionDefault Value
direct.webservices.security.basic.user.nameBasic auth user name to access the configuration service API.admin
direct.webservices.security.basic.user.passwordBasic auth password to access the configuration service API.d1r3ct;
direct.webservices.connect.timeoutConnect timeout, in milliseconds, for the REST client used to call the configuration service API.5000
direct.webservices.response.timeoutResponse/read timeout, in milliseconds, for the REST client used to call the configuration service API.10000
direct.config.service.urlURL of the configuration service API.http://localhost:8082/
direct.configui.security.user.nameUsername to log in to the configuration UI web application.admin
direct.configui.security.user.passwordPassword to log in to the configuration UI web application.direct
direct.config.keystore.hsmpresentEnables HSM-backed (PKCS#11) protection for the keystore holding Direct signing/decryption certificates and keys. When false, the software passphrase settings below are used instead.false
direct.config.keystore.keyStorePassPhrasePassphrase protecting the software (non-HSM) keystore holding Direct signing/decryption certificates and keys. Change this for any real deployment.H1TBr0s!
direct.config.keystore.privateKeyPassPhrasePassphrase protecting private keys in the software (non-HSM) keystore. Change this for any real deployment.H1TCh1ckS!
direct.config.keystore.initOnStartWhether to initialize the keystore/HSM token store on application startup.true
direct.config.keystore.{keyStorePin, keyStoreType, keyStoreSourceAsString, keyStoreProviderName, keyStorePassPhraseAlias, privateKeyPassPhraseAlias}Additional PKCS#11 HSM connection settings, only used when hsmpresent=true.som3randomp!n
Luna
slot:0
com.safenetinc.luna.provider.LunaProvider
keyStorePassPhrase
privateKeyPassPhrase

DNS Service

NameDescriptionDefault Value
direct.webservices.security.basic.user.nameBasic auth user name to access the configuration service API.admin
direct.webservices.security.basic.user.passwordBasic auth password to access the configuration service API.d1r3ct;
direct.config.service.urlURL of the configuration service API.http://localhost:8082/
direct.dns.binding.portUDP/TCP port the DNS server listens on for incoming DNS queries. Port 53 is privileged on most systems — see the note in Launch Microservices.53
direct.dns.binding.addressLocal IP address the DNS server binds to. By default it binds to all interfaces.0.0.0.0
direct.dns.binding.maxReconnectAttemptsNumber of times the server attempts to re-bind its listener socket after an I/O failure before giving up.10
direct.dns.certPolicyNameName of a certificate policy (defined in the Configuration Service) used to filter CERT record query responses — typically used for single-use certificate deployments. When empty or unresolvable, no filtering is applied.(empty — no filtering)

Message Monitor

NameDescriptionDefault Value
spring.datasource.*Database connection configuration. See Spring data properties settings for full details.url: jdbc:derby:msgmonitor;create=true
username: nhind
password: nhind
spring.rabbitmq.*RabbitMQ connection properties. See Spring integration properties settings for full details.host: localhost
port: 5672
username: guest
password: guest
direct.msgmonitor.condition.generalConditionTimeoutTime in milliseconds the system will wait for MDN or DSN notification messages before generating an error message.3600000
direct.msgmonitor.condition.reliableConditionTimeoutTime in milliseconds the system will wait for MDN or DNS notification messages before generating an error message when the original sender invokes the "implementation guide for delivery notification."3600000
direct.msgmonitor.dupStateDAO.retensionTimeTime in days the tracking information will be stored in the system before being purged.7
direct.msgmonitor.dsnSender.useStreamsSenderWhen true, generated DSN/error notifications are published back into the message broker instead of being sent directly over SMTP. Mutually exclusive with useSMTPGatewaySender.true
direct.msgmonitor.dsnSender.useSMTPGatewaySenderWhen true, generated DSN/error notifications are sent directly via SMTP to dsnSender.gatewayURL instead of the message broker. Mutually exclusive with useStreamsSender.false
direct.msgmonitor.dsnSender.gatewayURLSMTP gateway URL used to send DSNs when useSMTPGatewaySender=true.smtp://localhost:25
direct.msgmonitor.dsnGenerator.postmasterName"From" display name used as the postmaster identity when generating DSN error messages.postmaster
direct.msgmonitor.dsnGenerator.mtaNameMTA name reported in generated DSNs.DirectProject Message Monitor
direct.msgmonitor.dsnGenerator.subjectPrefixSubject line prefix on generated DSN error messages.Not Delivered:
direct.msgmonitor.dsnGenerator.failedRecipientsTitleBody text introducing the list of recipients for whom no timely notification was received.We have not received a delivery notification in 1 hour for the following recipient(s) because the receiving system may be down or configured incorrectly:
direct.msgmonitor.dsnGenerator.errorMessageTitleTitle/heading text prepended to the error message body.(empty)
direct.msgmonitor.dsnGenerator.defaultErrorMessageDefault explanatory error text included in the generated DSN.<b>Your message most likely was not delivered.</b> Please confirm your recipient email addresses are correct. If the addresses are correct, consider a different communication method.<br/><br/>If you continue to receive this message, please have the recipient check with their system administrator and include the "Troubleshooting Information" below.
direct.msgmonitor.dsnGenerator.headerHeader template prepended to the DSN body. Supports %original_sender_tag% substitution.%original_sender_tag%,<br/>
direct.msgmonitor.dsnGenerator.footerFooter template appended to the DSN body. Supports %headers_tag% substitution.<b><u>Troubleshooting Information</u></b><br/><br/>%headers_tag%
direct.msgmonitor.recovery.retryIntervalMilliseconds between recovery attempts for the message aggregation repository after a failure.30000
direct.msgmonitor.recovery.maxRetryAttempsMaximum redelivery attempts for aggregation repository recovery. (This is the actual property name in code, including the missing "t" in "Attempts".)12
direct.msgmonitor.recovery.deadLetterUriDead-letter destination for aggregation entries that exhaust recovery retries.file:recovery/directMonitorDeadLetter
monitor.aggregatorRepository.recoveryLockIntervalSeconds an in-recovery aggregation entry is locked before being eligible for another recovery attempt. (Note: this property uses the monitor.* prefix rather than direct.msgmonitor.*.)120

SMTP/MQ Gateway

NameDescriptionDefault Value
spring.rabbitmq.*RabbitMQ connection properties. See Spring integration properties settings for full details.host: localhost
port: 5672
username: guest
password: guest
direct.smtpmqgateway.binding.portThe port that the server will listen on for incoming SMTP traffic. If you intend to make this server your primary SMTP interface to the internet, you should change this value to 25.1025
direct.smtpmqgateway.binding.hostThe local IP address that this server will bind to. By default, it will bind to all addresses.0.0.0.0
direct.smtpmqgateway.message.maxHeaderSizeThe maximum size in bytes that the MIME header may be in incoming messages.262144
direct.smtpmqgateway.message.maxMessageSizeThe maximum size in bytes allowed for incoming messages.39845888
direct.smtpmqgateway.clientwhitelist.cidrComma-separated list of CIDR blocks allowed to open SMTP connections to the listener. When unset, all client IPs are accepted.(empty — no restriction)

Security and Trust Agent

NameDescriptionDefault Value
spring.rabbitmq.*RabbitMQ connection properties. See Spring integration properties settings for full details.host: localhost
port: 5672
username: guest
password: guest
direct.webservices.security.basic.user.nameBasic auth user name to access the configuration service API.admin
direct.webservices.security.basic.user.passwordBasic auth password to access the configuration service API.d1r3ct;
direct.config.service.urlURL of the configuration service API.http://localhost:8082/
direct.msgmonitor.service.urlURL of the Message Monitor service, used to report and track tx/notification status.http://localhost:8081/
direct.gateway.xd.enabledMaster switch for XD routing. When false, all incoming mail is routed to last-mile delivery (James) regardless of the recipient address's endpoint type.true
direct.gateway.postprocess.routeLocalRecipientToGatewayFor outgoing (encrypted) mail whose recipients are also local domains, loop the message directly back into the gateway ingest stream instead of the remote-delivery/SMTP-relay path.true
direct.gateway.postprocess.ConsumeMDNProcessedSuppress an incoming MDN with disposition processed instead of forwarding it on to last-mile delivery.true
direct.gateway.remotedelivery.gateway.nameComma-separated explicit outbound SMTP relay host(s) for remote delivery. When set, bypasses DNS MX lookup entirely.(empty — falls back to DNS MX lookup)
direct.gateway.remotedelivery.gateway.portPort for the explicit outbound SMTP relay host(s) above.(empty)
direct.gateway.remotedelivery.gateway.usernameUsername for authenticating to the outbound SMTP relay.(empty — no auth)
direct.gateway.remotedelivery.gateway.passwordPassword for outbound SMTP relay authentication.(empty)
direct.gateway.remotedelivery.gateway.connectionTimeoutSMTP connection timeout, in milliseconds, for outbound relay delivery.(empty — JavaMail default)
direct.gateway.remotedelivery.gateway.supressLocalDomainsSkip remote delivery when the recipient's domain is local (the post-processor already routes those back into the gateway).true
direct.gateway.remotedelivery.dns.lookup.timeoutDNS resolver timeout, in seconds, for MX/A record lookups during outbound remote delivery.3
direct.gateway.remotedelivery.dns.lookup.retriesDNS resolver retry count for the same lookups.2
direct.gateway.remotedelivery.dns.serversComma-separated DNS server list used for outbound remote-delivery MX/A lookups.(empty — OS resolver config)
direct.gateway.certificates.dns.serversComma-separated DNS server list used for DNS-based certificate discovery (separate from the remote-delivery resolver above).(empty — OS resolver config)
direct.gateway.agent.useOutgoingPolicyForIncomingNotificationsWhether outgoing trust/security policy is also applied to incoming MDN/notification messages.true
direct.gateway.agent.rejectOnTamperReject messages whose routing headers appear tampered with, rather than only logging.false
direct.gateway.agent.jceProviderNameExplicit JCE provider name for the agent's signing/encryption/decryption operations.(empty — platform default)
direct.gateway.agent.jceSensitiveProviderNameExplicit JCE provider name for sensitive crypto operations.(empty — platform default)
direct.xd.documents.syntheticdata.classCodeSynthetic XDS classCode applied when a source document/CDA omits it during XD step processing.34133-9
direct.xd.documents.syntheticdata.confidentialityCodeSynthetic XDS confidentialityCode default.N
direct.xd.documents.syntheticdata.healthcareFacilityTypeCodeSynthetic XDS healthcareFacilityTypeCode default.Outpatient
direct.xd.documents.syntheticdata.practiceSettingCodeSynthetic XDS practiceSettingCode default.General Medicine
direct.gateway.keystore.hsmpresentEnables HSM-backed (PKCS#11) protection for the STA's signing/decryption keystore. When false, the software passphrase settings below are used instead.false
direct.gateway.keystore.keyStorePassPhrasePassphrase protecting the software (non-HSM) keystore holding the STA's signing/decryption certificates and keys. Change this for any real deployment.H1TBr0s!
direct.gateway.keystore.privateKeyPassPhrasePassphrase protecting private keys in the software (non-HSM) keystore. Change this for any real deployment.H1TCh1ckS!
direct.gateway.keystore.initOnStartWhether to initialize the keystore/HSM token store on application startup.true
direct.gateway.keystore.{keyStorePin, keyStoreType, keyStoreSourceAsString, keyStoreProviderName, keyStorePassPhraseAlias, privateKeyPassPhraseAlias}Additional PKCS#11 HSM connection settings, only used when hsmpresent=true.som3randomp!n
Luna
slot:0
com.safenetinc.luna.provider.LunaProvider
keyStorePassPhrase
privateKeyPassPhrase

James

NameDescriptionDefault Value
spring.datasource.*Database connection settings, read via this module's own @Value bindings (not Spring Boot's standard JPA/datasource auto-configuration) to generate James's JPA config at startup: url, username, password, driver-class-name, adapter, streaming.url: jdbc:derby:./var/store/derby;create=true
username: app
password: app
driver-class-name: org.apache.derby.jdbc.EmbeddedDriver
adapter: DERBY
streaming: false
spring.datasource.adapterThe OpenJPA vendor adapter identifying the database platform, used to generate the correct SQL dialect for James's JPA-backed mailbox/user stores. This must match the database platform targeted by spring.datasource.url and spring.datasource.driver-class-name — for example, if the URL/driver point at a PostgreSQL database, adapter must be set to POSTGRESQL, not left at the DERBY default. Acceptable values: DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE.DERBY
spring.rabbitmq.*RabbitMQ connection properties. See Spring integration properties settings for full details.host: localhost
port: 5672
username: guest
password: guest
direct.webservices.security.basic.user.nameBasic auth user name to access the configuration service API.admin
direct.webservices.security.basic.user.passwordBasic auth password to access the configuration service API.d1r3ct;
direct.webservices.connect.timeoutConnect timeout, in milliseconds, for the REST client used to call the configuration service API.5000
direct.webservices.response.timeoutResponse/read timeout, in milliseconds, for the REST client used to call the configuration service API.10000
direct.config.service.urlURL of the configuration service API.http://localhost:8082/
direct.james.notifications.suppressNotificationsForAddressesComma-separated recipient addresses for which MDN "dispatched" notifications and DSN bounce notifications are never generated.(empty — none suppressed)
direct.james.notifications.dispatchedMDNDelayDelay, in milliseconds, before a "dispatched" MDN is released to the outbound stream for recipients listed in delayedDispatchMDNAddresses. Can be overridden per-message via the X-Delay-Dispatched-MDN mail header (value in minutes).(empty — no delay)
direct.james.notifications.delayedDispatchMDNAddressesComma-separated addresses (matched against the generated notification's From) whose "dispatched" MDN is delayed rather than sent immediately.(empty — none delayed)
james.server.webadmin.enabledEnables the James web admin API.true
james.server.webadmin.usernameBasic auth user name to access the James web admin API.admin
james.server.webadmin.passwordBasic auth password to access the James web admin API.d1r3ct
james.server.webadmin.portThe HTTP port to access the James web admin API.8084
james.server.smtp.autoAddressesComma-separated IP/CIDR addresses permitted to relay through the SMTP protocol without authentication.(empty)
james.server.config.mailet.configFilePath to an external mailetcontainer.xml to use in place of the bundled default mailet/processor pipeline config.(empty — uses bundled config)
james.server.config.imap.configFilePath to an external imapserver.xml to use in place of the bundled default.(empty — uses bundled config)
james.server.config.pop3.configFilePath to an external pop3server.xml to use in place of the bundled default.(empty — uses bundled config)
james.server.config.smtp.configFilePath to an external smtpserver.xml to use in place of the bundled default.(empty — uses bundled config)
james.server.imap.bindThe local IP address that this server will bind to for the IMAP protocol. By default, it will bind to all addresses.0.0.0.0
james.server.imap.portThe HTTP port that the IMAP protocol will listen on for incoming connections.1143
james.server.imap.sockettlsIndicates if the initial IMAP connection is done over TLS.false
james.server.imap.starttlsIndicates if the IMAP protocol supports the upgrade option to TLS.true
james.server.imap.imapKeyStoreThe key store file used for the IMAP TLS connection./properties/keystore
james.server.imap.imapKeyStorePasswordThe password for the IMAP key store file.1kingpuff
james.server.pop3.bindThe local IP address that this server will bind to for the POP3 protocol. By default, it will bind to all addresses.0.0.0.0
james.server.pop3.portThe HTTP port that the POP3 protocol will listen on for incoming connections.1110
james.server.pop3.sockettlsIndicates if the initial POP3 connection is done over TLS.false
james.server.pop3.starttlsIndicates if the POP3 protocol supports the upgrade option to TLS.true
james.server.pop3.imapKeyStoreThe key store file used for the POP3 TLS connection./properties/keystore
james.server.pop3.imapKeyStorePasswordThe password for the POP3 key store file.1kingpuff
james.server.smtp.bindThe local IP address that this server will bind to for the SMTP protocol. By default, it will bind to all addresses.0.0.0.0
james.server.smtp.portThe HTTP port that the SMTP protocol will listen on for incoming connections.1587
james.server.smtp.sockettlsIndicates if the initial SMTP connection is done over TLS.false
james.server.smtp.starttlsIndicates if the SMTP protocol supports the upgrade option to TLS.true
james.server.smtp.imapKeyStoreThe key store file used for the SMTP TLS connection./properties/keystore
james.server.smtp.imapKeyStorePasswordThe password for the SMTP key store file.1kingpuff

XD

NameDescriptionDefault Value
spring.rabbitmq.*RabbitMQ connection properties. See Spring integration properties settings for full details.host: localhost
port: 5672
username: guest
password: guest
server.servlet.context-pathThe application context path for HTTP requests./xd
direct.webservices.security.basic.user.nameBasic auth user name to access the configuration service API. You will need to set this value.(none)
direct.webservices.security.basic.user.passwordBasic auth password to access the configuration service API. You will need to set this value.(none)
direct.webservices.connect.timeoutConnect timeout, in milliseconds, for the REST client used to call the configuration service API.5000
direct.webservices.response.timeoutResponse/read timeout, in milliseconds, for the REST client used to call the configuration service API.10000
direct.config.service.urlURL of the configuration service API.http://localhost:8082
direct.xd.usestreamsWhen true, accepted XDR document sets that need to be forwarded to SMTP recipients are sent via the message broker instead of a direct SMTP send.true