Skip to content

Commit

Permalink
feat: add batch check configuration vars (#905)
Browse files Browse the repository at this point in the history
  • Loading branch information
justincoh authored Dec 2, 2024
1 parent c764746 commit fb7c011
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/content/getting-started/perform-check.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Perform a Check
sidebar_position: 4
toc_max_heading_level: 4
slug: /getting-started/perform-check
description: Checking if a user is authorized to perform an action on a resource
---
Expand Down Expand Up @@ -207,6 +208,18 @@ To check whether user `user:anne` has multiple relationships `writer` and `reade

The result will include an `allowed` field for each authorization check that will return `true` if the relationship exists and `false` if the relationship does not exist.

#### Configuring Batch Check
BatchCheck has two available configuration options:

1. Limit the number of checks allowed in a single BatchCheck request.
* Environment variable: `OPENFGA_MAX_CHECKS_PER_BATCH_CHECK`
* Command line flag: `--max-checks-per-batch-check`
* If more items are received in a single request than allowed by this limit, the API will return an error.

2. Limit the number of Checks which can be resolved concurrently
* Environment variable: `OPENFGA_MAX_CONCURRENT_CHECKS_PER_BATCH_CHECK`
* Command line flag: `--max-concurrent-checks-per-batch-check`

## Related Sections

<RelatedSection
Expand Down
1 change: 1 addition & 0 deletions docs/content/getting-started/production-best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ The following table enumerates the server's concurrency specific settings:
| --max-concurrent-reads-for-check | OPENFGA_MAX_CONCURRENT_READS_FOR_CHECK | maxConcurrentReadsForCheck |
| --resolve-node-limit | OPENFGA_RESOLVE_NODE_LIMIT | resolveNodeLimit |
| --resolve-node-breadth-limit | OPENFGA_RESOLVE_NODE_BREADTH_LIMIT | resolveNodeBreadthLimit |
| --max-concurrent-checks-per-batch-check | OPENFGA_MAX_CONCURRENT_CHECKS_PER_BATCH_CHECK | maxConcurrentChecksPerBatchCheck |


Determining the right values for these settings will be based on a variety of factors including, but not limited to, the database specific deployment topology, the FGA model(s) involved, and the relationship tuples in the system. However, here are some high-level guidelines:
Expand Down

0 comments on commit fb7c011

Please sign in to comment.