diff --git a/mii-process-feasibility/README.md b/mii-process-feasibility/README.md index 57d559e..e658411 100644 --- a/mii-process-feasibility/README.md +++ b/mii-process-feasibility/README.md @@ -104,31 +104,31 @@ Besides the [common DSF settings controlled by different environment variables][ **All of them share the same prefix `DE_MEDIZININFORMATIK_INITIATIVE_FEASIBILITY_DSF_PROCESS_`:** -| EnvVar | Description | Default | -|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| -| CLIENT_STORE_PROXY_HOST | Forward proxy host. | `null` | -| CLIENT_STORE_PROXY_PORT | Forward proxy port. | `` | -| CLIENT_STORE_PROXY_USERNAME | Username for a forward proxy if it requires one. | `null` | -| CLIENT_STORE_PROXY_PASSWORD | Password for a forward proxy if it requires one. | `null` | -| CLIENT_STORE_AUTH_BEARER_TOKEN | Bearer token used for authentication against a client target. Do not prefix this with `Bearer `! | `null` | -| CLIENT_STORE_AUTH_BASIC_USERNAME | Username for basic authentication against a FHIR server client target. | `null` | -| CLIENT_STORE_AUTH_BASIC_PASSWORD | Password for basic authentication against a FHIR server client target. | `null` | -| CLIENT_STORE_TIMEOUT_CONNECT | Timeout for establishing a connection to a FHIR server client target in `ms`. | `2000` | -| CLIENT_STORE_TIMEOUT_CONNECT_REQUEST | Timeout for requesting a connection to a FHIR server client target in `ms`. | `20000` | -| CLIENT_STORE_TIMEOUT_SOCKET | Timeout for blocking a read / write network operation to a FHIR server without failing in `ms`. | `20000` | -| CLIENT_STORE_TRUST_STORE_PATH | Path to a trust store used for connecting to a FHIR server. Necessary when using self-signed certificates. | `null` | -| CLIENT_STORE_TRUST_STORE_PASSWORD | Password for opening the trust store used for connecting to a FHIR server. | `null` | -| CLIENT_STORE_KEY_STORE_PATH | Path to a key store used for authenticating against a FHIR server or proxy using a client certificate. | `null` | -| CLIENT_STORE_KEY_STORE_PASSWORD | Password for opening the key store used for authenticating against a FHIR server or proxy. | `null` | -| CLIENT_STORE_BASE_URL | Base URL to a FHIR server or proxy for feasibility evaluation. This can also be the base URL of a reverse proxy if used. Only required if evaluation strategy is set to `cql`. | `` | -| CLIENT_FLARE_BASE_URL | Base URL to a FLARE instance. Only required if evaluation strategy is set to `structured-query`. | `` | -| CLIENT_FLARE_TIMEOUT_CONNECT | Timeout for establishing a connection to a FLARE client target in `ms`. | `2000` | -| EVALUATION_STRATEGY | Defines whether the feasibility shall be evaluated using `cql` or `structured-query`. Using the latter requires a FLARE instance. | `cql` | -| EVALUATION_OBFUSCATE | Defines whether the feasibility evaluation result shall be obfuscated. | `true` | -| EVALUATION_OBFUSCATION_SENSITIVITY | Sets the sensitivity of the Laplace distribution function used for obfuscating the result. | `1.0` | -| EVALUATION_OBFUSCATION_EPSILON | Sets the epsilon value of the Laplace distribution function used for obfuscating the result. | `0.5` | -| RATE_LIMIT_COUNT | Sets the hard limit for the maximum allowed number of requests during the configured rate limit interval after no further requests will be processed | `999` | -| RATE_LIMIT_INTERVAL_DURATION | Sets the size of the time window used for calculating the request rate. The value is required to be given in the [ISO 8601 format][10] (e.g. "PT1H30M10S"). | `PT1H` | +| EnvVar | Description | Default | +|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------| +| CLIENT_STORE_PROXY_HOST | Forward proxy host. | `null` | +| CLIENT_STORE_PROXY_PORT | Forward proxy port. | `` | +| CLIENT_STORE_PROXY_USERNAME | Username for a forward proxy if it requires one. | `null` | +| CLIENT_STORE_PROXY_PASSWORD | Password for a forward proxy if it requires one. | `null` | +| CLIENT_STORE_AUTH_BEARER_TOKEN | Bearer token used for authentication against a client target. Do not prefix this with `Bearer `! | `null` | +| CLIENT_STORE_AUTH_BASIC_USERNAME | Username for basic authentication against a FHIR server client target. | `null` | +| CLIENT_STORE_AUTH_BASIC_PASSWORD | Password for basic authentication against a FHIR server client target. | `null` | +| CLIENT_STORE_TIMEOUT_CONNECT | Timeout for establishing a connection to a FHIR server client target in `ms`. | `2000` | +| CLIENT_STORE_TIMEOUT_CONNECT_REQUEST | Timeout for requesting a connection to a FHIR server client target in `ms`. | `20000` | +| CLIENT_STORE_TIMEOUT_SOCKET | Timeout for blocking a read / write network operation to a FHIR server without failing in `ms`. | `300000` | +| CLIENT_STORE_TRUST_STORE_PATH | Path to a trust store used for connecting to a FHIR server. Necessary when using self-signed certificates. | `null` | +| CLIENT_STORE_TRUST_STORE_PASSWORD | Password for opening the trust store used for connecting to a FHIR server. | `null` | +| CLIENT_STORE_KEY_STORE_PATH | Path to a key store used for authenticating against a FHIR server or proxy using a client certificate. | `null` | +| CLIENT_STORE_KEY_STORE_PASSWORD | Password for opening the key store used for authenticating against a FHIR server or proxy. | `null` | +| CLIENT_STORE_BASE_URL | Base URL to a FHIR server or proxy for feasibility evaluation. This can also be the base URL of a reverse proxy if used. Only required if evaluation strategy is set to `cql`. | `` | +| CLIENT_FLARE_BASE_URL | Base URL to a FLARE instance. Only required if evaluation strategy is set to `structured-query`. | `` | +| CLIENT_FLARE_TIMEOUT_CONNECT | Timeout for establishing a connection to a FLARE client target in `ms`. | `300000` | +| EVALUATION_STRATEGY | Defines whether the feasibility shall be evaluated using `cql` or `structured-query`. Using the latter requires a FLARE instance. | `cql` | +| EVALUATION_OBFUSCATE | Defines whether the feasibility evaluation result shall be obfuscated. | `true` | +| EVALUATION_OBFUSCATION_SENSITIVITY | Sets the sensitivity of the Laplace distribution function used for obfuscating the result. | `1.0` | +| EVALUATION_OBFUSCATION_EPSILON | Sets the epsilon value of the Laplace distribution function used for obfuscating the result. | `0.5` | +| RATE_LIMIT_COUNT | Sets the hard limit for the maximum allowed number of requests during the configured rate limit interval after no further requests will be processed | `999` | +| RATE_LIMIT_INTERVAL_DURATION | Sets the size of the time window used for calculating the request rate. The value is required to be given in the [ISO 8601 format][10] (e.g. "PT1H30M10S"). | `PT1H` | ## Compatibility diff --git a/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/client/flare/FlareWebserviceClientSpringConfig.java b/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/client/flare/FlareWebserviceClientSpringConfig.java index 9a8cb5b..f964eac 100644 --- a/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/client/flare/FlareWebserviceClientSpringConfig.java +++ b/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/client/flare/FlareWebserviceClientSpringConfig.java @@ -37,6 +37,7 @@ import static ca.uhn.fhir.rest.api.Constants.HEADER_AUTHORIZATION; import static ca.uhn.fhir.rest.api.Constants.HEADER_AUTHORIZATION_VALPREFIX_BEARER; import static com.google.common.base.Strings.isNullOrEmpty; +import static de.medizininformatik_initiative.process.feasibility.variables.ConstantsFeasibility.CLIENT_TIMEOUT_DEFAULT; import static java.lang.String.format; @Configuration @@ -46,7 +47,7 @@ public class FlareWebserviceClientSpringConfig { @Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.flare.base_url:}") private String flareBaseUrl; - @Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.flare.timeout.connect:2000}") + @Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.flare.timeout.connect:" + CLIENT_TIMEOUT_DEFAULT + "}") private int connectTimeout; @Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.store.proxy.host:#{null}}") diff --git a/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/client/store/StoreClientSpringConfig.java b/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/client/store/StoreClientSpringConfig.java index c9a995c..2a885a3 100644 --- a/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/client/store/StoreClientSpringConfig.java +++ b/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/client/store/StoreClientSpringConfig.java @@ -15,6 +15,8 @@ import javax.net.ssl.SSLContext; +import static de.medizininformatik_initiative.process.feasibility.variables.ConstantsFeasibility.CLIENT_TIMEOUT_DEFAULT; + @Configuration @Import(BaseConfig.class) public class StoreClientSpringConfig { @@ -46,7 +48,7 @@ public class StoreClientSpringConfig { @Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.store.timeout.connect_request:20000}") private Integer connectRequestTimeout; - @Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.store.timeout.socket:20000}") + @Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.store.timeout.socket:" + CLIENT_TIMEOUT_DEFAULT + "}") private Integer socketTimeout; @Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.store.base_url:}") diff --git a/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/variables/ConstantsFeasibility.java b/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/variables/ConstantsFeasibility.java index eb62fe7..28514b5 100644 --- a/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/variables/ConstantsFeasibility.java +++ b/mii-process-feasibility/src/main/java/de/medizininformatik_initiative/process/feasibility/variables/ConstantsFeasibility.java @@ -30,4 +30,6 @@ public interface ConstantsFeasibility { Date MEASURE_REPORT_PERIOD_START = new LocalDate(1900, 1, 1).toDate(); Date MEASURE_REPORT_PERIOD_END = new LocalDate(2100, 1, 1).toDate(); + + int CLIENT_TIMEOUT_DEFAULT = 300000; }