Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions content/nic/configuration/policy-resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@ The API Key auth policy configures NGINX to authorize client requests based on t

The feature is implemented using NGINX [ngx_http_auth_request_module](http://nginx.org/en/docs/http/ngx_http_auth_request_module.html) and [NGINX JavaScript (NJS)](https://nginx.org/en/docs/njs/).

Subrequests may not function as expected and may cause issues when the `APIKey` policy and a `WAF` policy are applied together on the same route.

{{< /call-out >}}

The policies' API keys are securely stored using SHA-256 hashing. When a client sends an API Key, it is hashed by NJS and then compared to the hashed API Key in the NGINX config.
Expand Down Expand Up @@ -723,6 +725,8 @@ jwt:

This feature is implemented using the NGINX Plus directive [auth_jwt_key_request](http://nginx.org/en/docs/http/ngx_http_auth_jwt_module.html#auth_jwt_key_request) under [ngx_http_auth_jwt_module](https://nginx.org/en/docs/http/ngx_http_auth_jwt_module.html).

Subrequests may not function as expected and may cause issues when fetching JWKs from a remote URI (`jwksURI`) in a `JWT` policy and a `WAF` policy are applied together on the same route.

{{< /call-out >}}

{{% table %}}
Expand Down Expand Up @@ -955,6 +959,12 @@ In this example NGINX Ingress Controller will use the configuration from the fir

The ExternalAuth policy configures NGINX to authenticate client requests using an external authentication server. You can use this policy with services such as [oauth2-proxy](https://oauth2-proxy.github.io/oauth2-proxy/) or any custom authentication service that supports the `auth_request` pattern.

{{< call-out class="note" >}}

Subrequests may not function as expected and may cause issues when the `ExternalAuth` policy and a `WAF` policy are applied together on the same route.

{{< /call-out >}}

When a client sends a request, NGINX makes an internal subrequest to the external authentication service. If the service returns a `2xx` response, the original request is forwarded to the upstream. If it returns `401` or `403`, access is denied. If `authSigninURI` is configured, unauthenticated clients are redirected to a sign-in page.

For example, the following policy configures external authentication using an HTTP Basic Auth backend service:
Expand Down Expand Up @@ -1025,6 +1035,12 @@ This feature is disabled by default. To enable it, set the [enable-oidc]({{< ref

{{< /call-out >}}

{{< call-out class="note" >}}

Subrequests may not function as expected and may cause issues when the `OIDC` policy and a `WAF` policy are applied together on the same route.

{{< /call-out >}}

The OIDC policy configures NGINX Plus as a relying party for OpenID Connect authentication.

For example, the following policy will use the client ID `nginx-plus` and the client secret `oidc-secret` to authenticate with the OpenID Connect provider `https://idp.example.com`:
Expand Down Expand Up @@ -1111,6 +1127,12 @@ In this example NGINX Ingress Controller will use the configuration from the fir

The cache policy configures proxy caching, which improves performance by storing and serving cached responses to clients without having to proxy every request to upstream servers.

{{< call-out class="note" >}}

Subrequests may not function as expected and may cause issues when `cacheBackgroundUpdate` in a `Cache` policy and a `WAF` policy are applied together on the same route.

{{< /call-out >}}

For example, the following policy creates a cache zone named "my-cache" with 10MB memory allocation and caches all GET response codes for 30 seconds:

```yaml
Expand Down Expand Up @@ -1268,6 +1290,12 @@ A VirtualServer/VirtualServerRoute can reference multiple CORS policies. However

{{< call-out class="note" >}} The feature is implemented using the NGINX Plus [F5 WAF for NGINX module]({{< ref "/waf/" >}}). {{< /call-out >}}

{{< call-out class="note" >}}

Policies that rely on NGINX subrequests (such as `ExternalAuth`, `APIKey`, `JWT` with remote JWKS fetching, `OIDC`, or `Cache` with `cacheBackgroundUpdate`) and a `WAF` policy may not function as expected and may cause issues when applied together on the same route.

{{< /call-out >}}

The WAF policy configures NGINX Plus to secure client requests using F5 WAF for NGINX policies.

For example, the following policy will enable the referenced APPolicy. You can configure multiple APLogConfs with log destinations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ NGINX Ingress Controller has global configuration parameters that match those in

F5 WAF for NGINX v5 can be enabled and configured for custom resources only(VirtualServer, VirtualServerRoute). You need to create a Policy Custom Resource referencing a policy bundle, then add it to the VirtualServer/VirtualServerRoute definition. Additional detail can be found in the [Policy Resource documentation]({{< ref "/nic/configuration/policy-resource.md#waf" >}}).

{{< call-out class="note" >}}

Policies that rely on NGINX subrequests (such as `ExternalAuth`, `APIKey`, `JWT` with remote JWKS fetching, `OIDC`, or `Cache` with `cacheBackgroundUpdate`) and F5 WAF for NGINX may not function as expected and may cause issues when applied together on the same route.

{{< /call-out >}}

---

## F5 WAF for NGINX Bundles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ When you set NGINX Ingress Controller to use debug mode, the setting also applie

When using NGINX Ingress Controller with the F5 WAF for NGINX module, the following issues have been reported. The occurrence of these issues is commonly related to a higher number of Ingress Resources with App Protect being enabled in a cluster.

### Subrequests compatibility

Policies that rely on NGINX subrequests (such as `ExternalAuth`, `APIKey`, `JWT` with remote JWKS fetching, `OIDC`, or `Cache` with `cacheBackgroundUpdate`) and F5 WAF for NGINX may not function as expected and may cause issues when applied together on the same route.

When you make a change that requires NGINX to apply a new configuration, NGINX Ingress Controller reloads NGINX automatically. Without the F5 WAF for NGINX module enabled, usual reload times are around 150ms. If F5 WAF for NGINX module is enabled and is being used by any number of Ingress Resources, these reloads might take a few seconds instead.

### NGINX configuration drift
Expand Down
6 changes: 6 additions & 0 deletions content/nic/integrations/app-protect-waf/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ F5 WAF for NGINX can be enabled and configured for custom resources (VirtualServ
- For custom resources, you need to create a Policy Custom Resource referencing the `APPolicy` custom resource or bundle, then add it to the VirtualServer definition. Additional detail can be found in the [Policy Resource documentation]({{< ref "/nic/configuration/policy-resource.md#waf" >}}).
- For Ingress resources, apply the [`app-protect` annotations]({{< ref "/nic/configuration/ingress-resources/advanced-configuration-with-annotations.md#app-protect" >}}) to each desired resource.

{{< call-out class="note" >}}

Policies that rely on NGINX subrequests (such as `ExternalAuth`, `APIKey`, `JWT` with remote JWKS fetching, `OIDC`, or `Cache` with `cacheBackgroundUpdate`) and F5 WAF for NGINX may not function as expected and may cause issues when applied together on the same route.

{{< /call-out >}}

## F5 WAF for NGINX Policies {#waf-policies}

F5 WAF for NGINX Policies can be created for VirtualServer, VirtualServerRoute, or Ingress resources by creating an `APPolicy` [custom resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/). There are some caveats:
Expand Down
2 changes: 2 additions & 0 deletions content/nic/tutorials/oidc-custom-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ This guide will walk through how to customize and configure this default impleme

{{< call-out class="note" >}}This guide only works with F5 NGINX Ingress Controller version 5.3.0 or above. Please make sure you are using a compatible version before proceeding.{{< /call-out >}}

{{< call-out class="note" >}}Subrequests may not function as expected and may cause issues when OIDC configurations that rely on subrequests and a `WAF` policy are applied together on the same route.{{< /call-out >}}

This guide assumes that you have an F5 NGINX Ingress Controller deployed. If not, please follow the installation steps using either the [Manifest]({{< ref "/nic/install/manifests.md" >}}) or [Helm]({{< ref "/nic/install/helm.md" >}}) approach.

To customize the NGINX OpenID Connect Reference implementation, you will need to:
Expand Down
Loading