Skip to content

HttpClientConfig Since 5.0 ​

Examples ​

Basic Auth ​

yaml
baseUrl: http://rd-hds:8080/fhir
auth:
  basic:
    user: "mario"
    password: "itsame"
ssl:
  bundle: client

OAuth2 Since 5.1 ​

yaml
baseUrl: http://rd-hds:8080/fhir
auth:
  oauth2:
    registration: agent
ssl:
  bundle: client

Fields ​

Field NameTypeRequiredDefaultDescription
baseUrlStringYesServer base URL.
authAuthMethodNoNONEAuthentication configuration.
sslSSLNoSSL Configuration.
redirectsRedirectsNoFOLLOW_SAFERedirect-following policy.

Other Types ​

Redirects Since 5.7 ​

Controls whether HTTP redirects (3xx) are followed for this connection.

ValueBehaviour
FOLLOW_SAFEFollow redirects (e.g. an HDS behind a reverse proxy answering 307), but refuse HTTPS→HTTP downgrades. Default.
ALWAYS_FOLLOWFollow all redirects, including HTTPS→HTTP downgrades. A downgrade exposes credentials and data over plaintext, so only use this for a trusted cross-scheme upstream.
DONT_FOLLOWDo not follow redirects.

A redirect that is not followed (every 3xx under DONT_FOLLOW, or an HTTPS→HTTP downgrade / unfollowed POST 307/308 under the follow modes) is turned into an error instead of passing through as an empty-bodied success — the failure mode that otherwise produces a silently empty transfer. Because a redirect is deterministic, it is treated as terminal and is not retried. Use DONT_FOLLOW to fail fast and force a misconfigured upstream baseUrl to be corrected so the server returns 200 directly.

AuthMethod Since 5.0 ​

Field NameTypeRequiredDefaultDescription
basicHttpClientBasicAuthNoBasic auth configuration.
oauth2HttpClientOauth2AuthNoOAuth2 configuration.
cookieTokenHttpClientCookieTokenAuthNoCookie token auth configuration.

SSL Since 5.0 ​

Field NameTypeRequiredDefaultDescription
bundleStringYesName of the spring ssl bundle to use for ssl connection. See Agent Configuration/SSL

HttpClientBasicAuth Since 5.0 ​

Field NameTypeRequiredDefaultDescription
userStringYesBasic auth username
passwordStringYesBasic auth password

HttpClientOAuth2Auth Since 5.1 ​

Field NameTypeRequiredDefaultDescription
registrationStringYesName of the registration defined in application.yaml. See Agent Configuration/OAuth2

HttpClientCookieTokenAuth Since 5.0 ​

Field NameTypeRequiredDefaultDescription
tokenStringYesCookie token auth token

References ​