Package swiss.trustbroker.config.dto
Class NetworkConfig
java.lang.Object
swiss.trustbroker.config.dto.NetworkConfig
Network configuration.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionNetworkConfig(String mobileGatewayIpRegex, String intranetNetworkName, String internetNetworkName, String networkHeader, String testNetworkHeader, String canaryMarkerName, String canaryEnabledValue, boolean tracingEnabled, String proxyUrl, int backendConnectTimeoutSec) Creates a newNetworkConfiginstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanbooleanintBackend service connect timeout in seconds.Value forcanaryMarkerName.Running on K8S supporting canary routing using cookies, a test instance.Name for the Internet network used in configurations (e.g.Name for the Intranet network used in configurations (e.g.HTTP header delivering the client network.Default proxy URL.HTTP header for simulating the client network.inthashCode()booleanisInternet(String name) booleanisIntranet(String name) booleanAllow disabling OpenTelemetry traceparent propagation to backends that might block use otherwise.voidsetBackendConnectTimeoutSec(int backendConnectTimeoutSec) Backend service connect timeout in seconds.voidsetCanaryEnabledValue(String canaryEnabledValue) Value forcanaryMarkerName.voidsetCanaryMarkerName(String canaryMarkerName) Running on K8S supporting canary routing using cookies, a test instance.voidsetInternetNetworkName(String internetNetworkName) Name for the Internet network used in configurations (e.g.voidsetIntranetNetworkName(String intranetNetworkName) Name for the Intranet network used in configurations (e.g.voidsetMobileGatewayIpRegex(String mobileGatewayIpRegex) voidsetNetworkHeader(String networkHeader) HTTP header delivering the client network.voidsetProxyUrl(String proxyUrl) Default proxy URL.voidsetTestNetworkHeader(String testNetworkHeader) HTTP header for simulating the client network.voidsetTracingEnabled(boolean tracingEnabled) Allow disabling OpenTelemetry traceparent propagation to backends that might block use otherwise.toString()
-
Constructor Details
-
NetworkConfig
public NetworkConfig() -
NetworkConfig
public NetworkConfig(String mobileGatewayIpRegex, String intranetNetworkName, String internetNetworkName, String networkHeader, String testNetworkHeader, String canaryMarkerName, String canaryEnabledValue, boolean tracingEnabled, String proxyUrl, int backendConnectTimeoutSec) Creates a newNetworkConfiginstance.- Parameters:
mobileGatewayIpRegex-intranetNetworkName- Name for the Intranet network used in configurations (e.g. INTRANET).
Set only if your network infrastructure always sets thenetworkHeader. This ensures that a request from the Internet cannot control the network.
Default: nullinternetNetworkName- Name for the Internet network used in configurations (e.g. INTERNET).
Default: nullnetworkHeader- HTTP header delivering the client network. Usually sent by load balancer.
Default: Client_Network (should be X-Client-Network)testNetworkHeader- HTTP header for simulating the client network.
Sent by test agents to test HRD rules. This is only evaluated for requests from the Intranet according tonetworkHeader.
Default: "X-Simulated-Client-NetworkcanaryMarkerName- Running on K8S supporting canary routing using cookies, a test instance.canaryEnabledValue- Value forcanaryMarkerName.tracingEnabled- Allow disabling OpenTelemetry traceparent propagation to backends that might block use otherwise.proxyUrl- Default proxy URL.backendConnectTimeoutSec- Backend service connect timeout in seconds.
Default: 30- Since:
- 1.7.0, 1.7.0, 1.7.0, 1.9.0, 1.10.0
-
-
Method Details
-
isIntranet
-
isInternet
-
builder
-
getMobileGatewayIpRegex
-
getIntranetNetworkName
Name for the Intranet network used in configurations (e.g. INTRANET).
Set only if your network infrastructure always sets thenetworkHeader. This ensures that a request from the Internet cannot control the network.
Default: null -
getInternetNetworkName
Name for the Internet network used in configurations (e.g. INTERNET).
Default: null -
getNetworkHeader
HTTP header delivering the client network. Usually sent by load balancer.
Default: Client_Network (should be X-Client-Network) -
getTestNetworkHeader
HTTP header for simulating the client network.
Sent by test agents to test HRD rules. This is only evaluated for requests from the Intranet according tonetworkHeader.
Default: "X-Simulated-Client-Network -
getCanaryMarkerName
Running on K8S supporting canary routing using cookies, a test instance.- Since:
- 1.7.0
-
getCanaryEnabledValue
Value forcanaryMarkerName.- Since:
- 1.7.0
-
isTracingEnabled
public boolean isTracingEnabled()Allow disabling OpenTelemetry traceparent propagation to backends that might block use otherwise.- Since:
- 1.7.0
-
getProxyUrl
Default proxy URL.- Since:
- 1.9.0
-
getBackendConnectTimeoutSec
public int getBackendConnectTimeoutSec()Backend service connect timeout in seconds.
Default: 30- Since:
- 1.10.0
-
setMobileGatewayIpRegex
-
setIntranetNetworkName
Name for the Intranet network used in configurations (e.g. INTRANET).
Set only if your network infrastructure always sets thenetworkHeader. This ensures that a request from the Internet cannot control the network.
Default: null -
setInternetNetworkName
Name for the Internet network used in configurations (e.g. INTERNET).
Default: null -
setNetworkHeader
HTTP header delivering the client network. Usually sent by load balancer.
Default: Client_Network (should be X-Client-Network) -
setTestNetworkHeader
HTTP header for simulating the client network.
Sent by test agents to test HRD rules. This is only evaluated for requests from the Intranet according tonetworkHeader.
Default: "X-Simulated-Client-Network -
setCanaryMarkerName
Running on K8S supporting canary routing using cookies, a test instance.- Since:
- 1.7.0
-
setCanaryEnabledValue
Value forcanaryMarkerName.- Since:
- 1.7.0
-
setTracingEnabled
public void setTracingEnabled(boolean tracingEnabled) Allow disabling OpenTelemetry traceparent propagation to backends that might block use otherwise.- Since:
- 1.7.0
-
setProxyUrl
Default proxy URL.- Since:
- 1.9.0
-
setBackendConnectTimeoutSec
public void setBackendConnectTimeoutSec(int backendConnectTimeoutSec) Backend service connect timeout in seconds.
Default: 30- Since:
- 1.10.0
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-