From 8103cd90b48fedaa662827396045b0286f6c0b5e Mon Sep 17 00:00:00 2001 From: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:12:44 +0000 Subject: [PATCH] docs: adds documentation about provider response caching Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com> --- website/docs/externaldata.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/docs/externaldata.md b/website/docs/externaldata.md index 84e6e2aef0a..cc82685e55d 100644 --- a/website/docs/externaldata.md +++ b/website/docs/externaldata.md @@ -146,6 +146,9 @@ If there is a system error, the provider should return the system error message Example provider implementation: https://github.com/open-policy-agent/gatekeeper/blob/master/test/externaldata/dummy-provider/provider.go +#### Audit Provider Response Caching +Starting with v3.13+, Gatekeeper supports caching of responses from external data providers. It caches the response based on the `Key` and `Value` received as part of the [`ProviderResponse`](#providerresponse). By default, the cache is invalidated after 3 minutes, which is the default Time-to-Live (TTL). You can configure the TTL using the `--external-data-provider-response-cache-ttl` flag. + ## External data for Gatekeeper validating webhook External data adds a [custom OPA built-in function](https://www.openpolicyagent.org/docs/latest/extensions/#custom-built-in-functions-in-go) called `external_data` to Rego. This function is used to query external data providers.