From 959381e25bd6c108355d05065bdeb58e5d793f41 Mon Sep 17 00:00:00 2001 From: Ro'e Katz Date: Mon, 8 May 2023 20:13:39 +0300 Subject: [PATCH] Docs: Add periodic_update_interval to data-sources.mdx --- .../running-opal/run-opal-server/data-sources.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/docs/getting-started/running-opal/run-opal-server/data-sources.mdx b/documentation/docs/getting-started/running-opal/run-opal-server/data-sources.mdx index e7afc069..a195686c 100644 --- a/documentation/docs/getting-started/running-opal/run-opal-server/data-sources.mdx +++ b/documentation/docs/getting-started/running-opal/run-opal-server/data-sources.mdx @@ -43,10 +43,10 @@ Let's break down this example value (check the [schema](https://github.com/permi Each object in `entries` (schema: [DataSourceEntry](https://github.com/permitio/opal/blob/master/packages/opal-common/opal_common/schemas/data.py#L8)) is a **directive** that tells OPAL client to fetch the data and place it in OPA cache using the [Data API](https://www.openpolicyagent.org/docs/latest/rest-api/#data-api). - **From where to fetch:** we tell OPAL client to fetch data from the [Permit.io API](https://api.permit.io/redoc) (specifically, from the `policy-config` endpoint). -- **how to fetch (optional):** we can direct the client to use a specific configuration when fetching the data, for example here we tell the client to use a specific HTTP Authorization header with a bearer token in order to authenticate to the API. +- **How to fetch (optional):** we can direct the client to use a specific configuration when fetching the data, for example here we tell the client to use a specific HTTP Authorization header with a bearer token in order to authenticate to the API. - **Where to place the data in OPA cache:** although not specified, this entry uses the default of `/` which means at the root of OPA document hierarchy. You can specify another path with `dst_path` (check the [schema](https://github.com/permitio/opal/blob/master/packages/opal-common/opal_common/schemas/data.py#L8)). - **Which clients should fetch:** the entry would be processed only by clients subscribed to one of the specified topics. (If unspecified, the default `policy_data` topic would be used). - +- **How often to fetch:** entry that has the `periodic_update_interval` value would be periodically pushed to clients with that interval (in secs), so they can keep refetching the most updated data from specified source. #### Encoding this value in an environment variable: You can use the python method of `json.dumps()` to get a one line string: