Class PolicyConfig
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.waas.model.PolicyConfig
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20181116") public final class PolicyConfig extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
The configuration details for the WAAS policy.
Note: Objects should always be created or deserialized using thePolicyConfig.Builder
. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of thePolicyConfig.Builder
, which maintain a set of all explicitly set fields calledPolicyConfig.Builder.__explicitlySet__
. ThehashCode()
andequals(Object)
methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PolicyConfig.Builder
static class
PolicyConfig.CipherGroup
The set cipher group for the configured TLS protocol.static class
PolicyConfig.ClientAddressHeader
Specifies an HTTP header name which is treated as the connecting client’s IP address.static class
PolicyConfig.TlsProtocols
-
Constructor Summary
Constructors Constructor Description PolicyConfig(String certificateId, Boolean isHttpsEnabled, Boolean isHttpsForced, List<PolicyConfig.TlsProtocols> tlsProtocols, Boolean isOriginCompressionEnabled, Boolean isBehindCdn, PolicyConfig.ClientAddressHeader clientAddressHeader, Boolean isCacheControlRespected, Boolean isResponseBufferingEnabled, PolicyConfig.CipherGroup cipherGroup, LoadBalancingMethod loadBalancingMethod, List<String> websocketPathPrefixes, Boolean isSniEnabled, HealthCheck healthChecks)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PolicyConfig.Builder
builder()
Create a new builder.boolean
equals(Object o)
String
getCertificateId()
The OCID of the SSL certificate to use if HTTPS is supported.PolicyConfig.CipherGroup
getCipherGroup()
The set cipher group for the configured TLS protocol.PolicyConfig.ClientAddressHeader
getClientAddressHeader()
Specifies an HTTP header name which is treated as the connecting client’s IP address.HealthCheck
getHealthChecks()
Boolean
getIsBehindCdn()
Enabling isBehindCdn allows for the collection of IP addresses from client requests if the WAF is connected to a CDN.Boolean
getIsCacheControlRespected()
Enable or disable automatic content caching based on the response cache-control header.Boolean
getIsHttpsEnabled()
Enable or disable HTTPS support.Boolean
getIsHttpsForced()
Force HTTP to HTTPS redirection.Boolean
getIsOriginCompressionEnabled()
Enable or disable GZIP compression of origin responses.Boolean
getIsResponseBufferingEnabled()
Enable or disable buffering of responses from the origin.Boolean
getIsSniEnabled()
SNI stands for Server Name Indication and is an extension of the TLS protocol.LoadBalancingMethod
getLoadBalancingMethod()
An object that represents a load balancing method and its properties.List<PolicyConfig.TlsProtocols>
getTlsProtocols()
A list of allowed TLS protocols.List<String>
getWebsocketPathPrefixes()
ModSecurity is not capable to inspect WebSockets.int
hashCode()
PolicyConfig.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
PolicyConfig
@Deprecated @ConstructorProperties({"certificateId","isHttpsEnabled","isHttpsForced","tlsProtocols","isOriginCompressionEnabled","isBehindCdn","clientAddressHeader","isCacheControlRespected","isResponseBufferingEnabled","cipherGroup","loadBalancingMethod","websocketPathPrefixes","isSniEnabled","healthChecks"}) public PolicyConfig(String certificateId, Boolean isHttpsEnabled, Boolean isHttpsForced, List<PolicyConfig.TlsProtocols> tlsProtocols, Boolean isOriginCompressionEnabled, Boolean isBehindCdn, PolicyConfig.ClientAddressHeader clientAddressHeader, Boolean isCacheControlRespected, Boolean isResponseBufferingEnabled, PolicyConfig.CipherGroup cipherGroup, LoadBalancingMethod loadBalancingMethod, List<String> websocketPathPrefixes, Boolean isSniEnabled, HealthCheck healthChecks)
Deprecated.
-
-
Method Detail
-
builder
public static PolicyConfig.Builder builder()
Create a new builder.
-
toBuilder
public PolicyConfig.Builder toBuilder()
-
getCertificateId
public String getCertificateId()
The OCID of the SSL certificate to use if HTTPS is supported.- Returns:
- the value
-
getIsHttpsEnabled
public Boolean getIsHttpsEnabled()
Enable or disable HTTPS support.If true, a certificateId is required. If unspecified, defaults to false.
- Returns:
- the value
-
getIsHttpsForced
public Boolean getIsHttpsForced()
Force HTTP to HTTPS redirection.If unspecified, defaults to false.
- Returns:
- the value
-
getTlsProtocols
public List<PolicyConfig.TlsProtocols> getTlsProtocols()
A list of allowed TLS protocols.Only applicable when HTTPS support is enabled. The TLS protocol is negotiated while the request is connecting and the most recent protocol supported by both the edge node and client browser will be selected. If no such version exists, the connection will be aborted. - TLS_V1: corresponds to TLS 1.0 specification.
- **TLS_V1_1:** corresponds to TLS 1.1 specification.
- **TLS_V1_2:** corresponds to TLS 1.2 specification.
- **TLS_V1_3:** corresponds to TLS 1.3 specification.
Enabled TLS protocols must go in a row. For example if TLS_v1_1 and TLS_V1_3 are enabled, TLS_V1_2 must be enabled too.
- Returns:
- the value
-
getIsOriginCompressionEnabled
public Boolean getIsOriginCompressionEnabled()
Enable or disable GZIP compression of origin responses.If enabled, the header Accept-Encoding: gzip is sent to origin, otherwise, the empty Accept-Encoding: header is used.
- Returns:
- the value
-
getIsBehindCdn
public Boolean getIsBehindCdn()
Enabling isBehindCdn allows for the collection of IP addresses from client requests if the WAF is connected to a CDN.- Returns:
- the value
-
getClientAddressHeader
public PolicyConfig.ClientAddressHeader getClientAddressHeader()
Specifies an HTTP header name which is treated as the connecting client’s IP address.Applicable only if isBehindCdn is enabled.
The edge node reads this header and its value and sets the client IP address as specified. It does not create the header if the header is not present in the request. If the header is not present, the connecting IP address will be used as the client's true IP address. It uses the last IP address in the header's value as the true IP address.
Example: X-Client-Ip: 11.1.1.1, 13.3.3.3
In the case of multiple headers with the same name, only the first header will be used. It is assumed that CDN sets the correct client IP address to prevent spoofing.
- **X_FORWARDED_FOR:** Corresponds to X-Forwarded-For header name.
- **X_CLIENT_IP:** Corresponds to X-Client-Ip header name.
- **X_REAL_IP:** Corresponds to X-Real-Ip header name.
- **CLIENT_IP:** Corresponds to Client-Ip header name.
- **TRUE_CLIENT_IP:** Corresponds to True-Client-Ip header name.
- Returns:
- the value
-
getIsCacheControlRespected
public Boolean getIsCacheControlRespected()
Enable or disable automatic content caching based on the response cache-control header.This feature enables the origin to act as a proxy cache. Caching is usually defined using cache-control header. For example cache-control: max-age=120 means that the returned resource is valid for 120 seconds. Caching rules will overwrite this setting.
- Returns:
- the value
-
getIsResponseBufferingEnabled
public Boolean getIsResponseBufferingEnabled()
Enable or disable buffering of responses from the origin.Buffering improves overall stability in case of network issues, but slightly increases Time To First Byte.
- Returns:
- the value
-
getCipherGroup
public PolicyConfig.CipherGroup getCipherGroup()
The set cipher group for the configured TLS protocol.This sets the configuration for the TLS connections between clients and edge nodes only. - DEFAULT: Cipher group supports TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3 protocols. It has the following ciphers enabled: ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:!DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
- Returns:
- the value
-
getLoadBalancingMethod
public LoadBalancingMethod getLoadBalancingMethod()
An object that represents a load balancing method and its properties.- Returns:
- the value
-
getWebsocketPathPrefixes
public List<String> getWebsocketPathPrefixes()
ModSecurity is not capable to inspect WebSockets.Therefore paths specified here have WAF disabled if Connection request header from the client has the value Upgrade (case insensitive matching) and Upgrade request header has the value websocket (case insensitive matching). Paths matches if the concatenation of request URL path and query starts with the contents of the one of websocketPathPrefixes array value. In All other cases challenges, like JSC, HIC and etc., remain active.
- Returns:
- the value
-
getIsSniEnabled
public Boolean getIsSniEnabled()
SNI stands for Server Name Indication and is an extension of the TLS protocol.It indicates which hostname is being contacted by the browser at the beginning of the ‘handshake’-process. This allows a server to connect multiple SSL Certificates to one IP address and port.
- Returns:
- the value
-
getHealthChecks
public HealthCheck getHealthChecks()
-
toString
public String toString()
- Overrides:
toString
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.- Parameters:
includeByteArrayContents
- true to include the full contents of byte arrays- Returns:
- string representation
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
-