Skip to content

Commit

Permalink
fix: update the section heading case to conform to our standard (#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpq authored Sep 23, 2024
1 parent 2dabf86 commit 1c579e6
Show file tree
Hide file tree
Showing 32 changed files with 206 additions and 206 deletions.
6 changes: 3 additions & 3 deletions docs/content/getting-started/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ A default store Id and authorization model Id can also be configured:

All of the examples in this document assume the CLI is properly configured and that the Store ID is set either in an environment variable or the `~/.fga.yaml` file.

## Basic Operations
## Basic operations

The CLI commands below show you how to create a store and run your application’s most common operations, including how to write a model and write/delete/read tuples, and run queries.

Expand Down Expand Up @@ -173,7 +173,7 @@ $ fga query check user:anne viewer document:readme
}
```

## Work with Authorization Model versions
## Work with authorization model versions

<ProductName format={ProductNameFormat.ShortForm}/> models are [immutable](../getting-started/immutable-models.mdx); each time a model is written to a store, a new version of the model is created.

Expand Down Expand Up @@ -335,7 +335,7 @@ $ fga tuple read --output-format=simple-json --max-pages 0 > tuples.json
$ fga tuple delete --file tuples.json
```
## Import Stores
## Import stores
The CLI can import an [FGA Test file](../modeling/testing-models.mdx) in a store. It writes the model included and imports the tuples in the fga test file.
Expand Down
4 changes: 2 additions & 2 deletions docs/content/getting-started/configure-model.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import TabItem from '@theme/TabItem';

This article explains how to configure an <ProductConcept section="what-is-an-authorization-model" linkName="authorization model" /> for a <ProductConcept section="what-is-a-store" linkName="store" /> in an OpenFGA server.

## Before You Start
## Before you start

<Tabs groupId="languages">
<TabItem value={SupportedLanguage.JS_SDK} label={languageLabelMap.get(SupportedLanguage.JS_SDK)}>
Expand Down Expand Up @@ -83,7 +83,7 @@ This article explains how to configure an <ProductConcept section="what-is-an-au
</TabItem>
</Tabs>

## Step By Step
## Step by step

Assume that you want to configure your store with the following model.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/getting-started/create-store.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A [store](../concepts.mdx#what-is-a-store) is a OpenFGA entity that contains you

This article explains how to set up an OpenFGA store.

## Step By Step
## Step by step

<Tabs groupId="languages">
<TabItem value={SupportedLanguage.JS_SDK} label={languageLabelMap.get(SupportedLanguage.JS_SDK)}>
Expand Down
10 changes: 5 additions & 5 deletions docs/content/getting-started/framework.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import TabItem from '@theme/TabItem';

This section will illustrate how to integrate <ProductName format={ProductNameFormat.LongForm}/> within a framework, such as [Fastify](https://www.fastify.io/) or [Fiber](https://docs.gofiber.io/).

## Before You Start
## Before you start

<Tabs groupId="languages">
<TabItem value={SupportedLanguage.JS_SDK} label={languageLabelMap.get(SupportedLanguage.JS_SDK)}>
Expand All @@ -48,7 +48,7 @@ This section will illustrate how to integrate <ProductName format={ProductNameFo
</TabItem>
</Tabs>

## Step By Step
## Step by step

Assume that you want to have a web service for `document`s using one of the frameworks mentioned above. The service will authenticate users via [JWT tokens](https://auth0.com/docs/secure/tokens/json-web-tokens), which contain the user ID.

Expand All @@ -58,7 +58,7 @@ The reader should set up their own `login` method based on their OpenID connect

Assume that you want to provide a route `GET /read/{document}` to return documents depending on whether the authenticated user has access to it.

### 01. Install And Setup Framework
### 01. Install and setup framework

The first step is to install the framework.

Expand Down Expand Up @@ -142,7 +142,7 @@ func read(c *fiber.Ctx) error {
</TabItem>
</Tabs>

### 02. Authenticate And Get User ID
### 02. Authenticate and get user ID

Before we can call <ProductName format={ProductNameFormat.LongForm}/> to protect the `/read/{document}` route, we need to validate the user's JWT.

Expand Down Expand Up @@ -276,7 +276,7 @@ func read(c *fiber.Ctx) error {
</TabItem>
</Tabs>

### 03. Integrate The <ProductName format={ProductNameFormat.ShortForm}/> Check API Into The Service
### 03. Integrate the <ProductName format={ProductNameFormat.ShortForm}/> check API into the service

<Tabs groupId="languages">
<TabItem value={SupportedLanguage.JS_SDK} label={languageLabelMap.get(SupportedLanguage.JS_SDK)}>
Expand Down
8 changes: 4 additions & 4 deletions docs/content/getting-started/immutable-models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ import {

Authorization Models in <ProductName format={ProductNameFormat.ShortForm}/> are immutable, they are created once and then can no longer be deleted or modified. Each time you write an authorization model, a new version is created.

### Viewing All the Authorization Models
### Viewing all the authorization models

You can list all the authorization models for a store using the [ReadAuthorizationModels](/api/service#/Authorization%20Models/ReadAuthorizationModels) API. This endpoint returns the results sorted in reverse chronological order, as in the first model in the list is the latest model. By default, only the last 50 models are returned, but you can paginate across by passing in the appropriate `continuation_token`.

### How to Target a Particular Model
### How to target a particular model

Some endpoints relating to tuples ([Check](/api/service#/Relationship%20Queries/Check), [ListObjects](/api/service#/Relationship%20Queries/ListObjects), [ListUsers](/api/service#/Relationship%20Queries/ListUsers), [Expand](/api/service#/Relationship%20Queries/Expand), [Write](/api/service#/Relationship%20Tuples/Write)) accept an `authorization_model_id`, which we strongly recommend passing, especially in production.

In practice, you would pin the authorization model ID alongside the store ID in your configuration management system. Your services would read this value and use it in their requests to FGA. This helps you ensure that your services are using the same consistent ID across all your applications, and that rollouts can be seamless.

### Benefits of Passing in an Authorization Model ID
### Benefits of passing in an authorization model ID

Targeting a specific model ID would ensure that you don't accidentally break your authorization checks in production because a mistake was made when updating the authorization model. It would also slightly improve the latency on your check requests.

If that field is passed, evaluation and validation will happen for that particular authorization model ID. If this field is not passed, <ProductName format={ProductNameFormat.ShortForm}/> will use the last created Authorization Model for that store.

### Potential Use-cases
### Potential use-cases

Being able to target multiple versions of the authorization model enables you to progressively roll out model changes, which is something you should consider doing if the changes are significant. You could:

Expand Down
8 changes: 4 additions & 4 deletions docs/content/getting-started/perform-check.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import TabItem from '@theme/TabItem';

This section will illustrate how to perform a <ProductConcept section="what-is-a-check-request" linkName="check" /> request to determine whether a <ProductConcept section="what-is-a-user" linkName="user" /> has a certain <ProductConcept section="what-is-a-relationship" linkName="relationship" /> with an <ProductConcept section="what-is-an-object" linkName="object" />.

## Before You Start
## Before you start

<Tabs groupId="languages">

Expand Down Expand Up @@ -92,11 +92,11 @@ This section will illustrate how to perform a <ProductConcept section="what-is-a
</TabItem>
</Tabs>

## Step By Step
## Step by step

Assume that you want to check whether user `anne` has relationship `reader` with object `document:Z`

### 01. Configure the <ProductName format={ProductNameFormat.ShortForm}/> API Client
### 01. Configure the <ProductName format={ProductNameFormat.ShortForm}/> API client

Before calling the check API, you will need to configure the API client.

Expand Down Expand Up @@ -140,7 +140,7 @@ To obtain the [access token](https://auth0.com/docs/get-started/authentication-a
</TabItem>
</Tabs>

### 02. Calling Check API
### 02. Calling check API

To check whether user `user:anne` has relationship `reader` with object `document:Z`

Expand Down
8 changes: 4 additions & 4 deletions docs/content/getting-started/production-best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The following list outlines best practices for running OpenFGA in a production e
- [Set Maximum Results](#maximum-results)
- [Set Concurrency Limits](#concurrency-limits)

## Cluster Recommendations
## Cluster recommendations

We recommend:

Expand All @@ -34,7 +34,7 @@ We recommend:
3. Turn on metrics collection via the flags `--metrics-enabled` and `--datastore-metrics-enabled`. This will allow you to debug issues.
4. Turn on tracing via the flag `--trace-enabled`, but set sampling ratio to a low value, for example `--trace-sample-ratio=0.3`. This will allow you to debug issues without overwhelming the tracing server. However, keep in mind that enabling tracing comes with a slight performance cost.

## Database Recommendations
## Database recommendations

To ensure good performance for OpenFGA, it is recommended that the [database](./setup-openfga/configure-openfga.mdx#configuring-data-storage) be:
- Co-located in the same physical datacenter and network as your OpenFGA servers. This will minimize latency of database calls.
Expand All @@ -51,7 +51,7 @@ It's strongly recommended to fine-tune your server database connection settings

- If idle connections are getting reaped frequently, then consider increasing the `OPENFGA_DATASTORE_CONN_MAX_IDLE_TIME` to a large value. When in doubt, prioritize keeping connections around for longer rather than shorter, because doing so will drastically improve performance.

## Concurrency Limits
## Concurrency limits
:::note
Before modifying concurrency limits please make sure you've followed the guidance for [Database Recommendations](#database-recommendations)
:::
Expand Down Expand Up @@ -81,7 +81,7 @@ If you still see high request latencies despite the guidance above, then you may

* `OPENFGA_RESOLVE_NODE_BREADTH_LIMIT` limits the resolution breadth. It sets an upper bound on the number of in-flight resolutions that can be taking place on one or more [usersets](../concepts.mdx#what-is-a-user). A high value will allow a single query to involve more concurrent evaluations to take place and therefore more database queries and server processes, while a low value will reduce the overall number of concurrent resolutions that will be allowed and thus reduce the number of database queries and server processes.

## Maximum Results
## Maximum results

Both the ListObjects and ListUsers endpoints will continue retrieving results until one of the following conditions is met:

Expand Down
10 changes: 5 additions & 5 deletions docs/content/getting-started/setup-openfga/configure-openfga.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ openfga run \
--datastore-uri 'postgres://postgres:password@postgres:5432/postgres?sslmode=disable'
```

## Configuring Data Storage
## Configuring data storage

OpenFGA supports multiple storage engine options, including:

Expand Down Expand Up @@ -123,15 +123,15 @@ openfga run

To learn how to run in Docker, check our [Docker documentation](./docker-setup.mdx#using-sqlite).

## Configuring Authentication
## Configuring authentication

You can configure authentication in three ways:

- no authentication (default)
- pre-shared key authentication
- OIDC

### Pre-shared Key Authentication
### Pre-shared key authentication

If using **Pre-shared key authentication**, you will configure OpenFGA with one or more secret keys and your application calling OpenFGA will have to set an `Authorization: Bearer <YOUR-KEY-HERE>` header.

Expand Down Expand Up @@ -243,7 +243,7 @@ If you want to run it in docker:
docker run -p 8080:8080 -p 8081:8081 -p 3000:3000 -p 3002:3002 openfga/openfga run --profiler-enabled --profiler-addr :3002
```

## Health Check
## Health check

OpenFGA is configured with an HTTP health check endpoint `/healthz` and a gRPC health check `grpc.health.v1.Health/Check`, which is wired to datastore testing. Possible response values are
- UNKNOWN
Expand Down Expand Up @@ -273,7 +273,7 @@ grpcurl -plaintext $FGA_API_URL grpc.health.v1.Health/Check
</TabItem>
</Tabs>

## Experimental Features
## Experimental features
Various releases of OpenFGA may have experimental features that can be enabled by providing the `--experimentals` flag or the `experimentals` config.

```
Expand Down
10 changes: 5 additions & 5 deletions docs/content/getting-started/setup-openfga/docker-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import TabItem from '@theme/TabItem';

This article explains how to run your own OpenFGA server using Docker. To learn the different ways to configure OpenFGA check [Configuring OpenFGA](./configure-openfga.mdx).

## Step By Step
## Step by step

If you want to run OpenFGA locally as a Docker container, follow these steps:

Expand Down Expand Up @@ -342,7 +342,7 @@ docker-compose up

This will create a new `openfga` volume to store the SQLite database, run `openfga migrate` to configure the database and finally start the OpenFGA server.

## Pre-shared Key Authentication
## Pre-shared key authentication

To configure with pre-shared authentication and enabling TLS in http server with Docker.

Expand All @@ -357,7 +357,7 @@ docker run --name openfga --network=openfga -p 3000:3000 -p 8080:8080 -p 8081:80
--http-tls-key="/Users/myuser/key/server.key"
```

## OIDC Authentication
## OIDC authentication

To configure with OIDC authentication and enabling TLS in http server with Docker.

Expand All @@ -374,15 +374,15 @@ docker run --name openfga --network=openfga -p 3000:3000 -p 8080:8080 -p 8081:80
--http-tls-key="/Users/myuser/key/server.key"
```

## Enabling Profiling
## Enabling profiling

If you are enabling profiling, make sure you enable the corresponding port in docker. The default port is `3001`, but if you need to serve the profiler on a different port, you can do so by specifying the `--profiler-addr` flag. For example:

```sh
docker run -p 8080:8080 -p 8081:8081 -p 3000:3000 -p 3002:3002 openfga/openfga run --profiler-enabled --profiler-addr :3002
```

## Related Sections
## Related sections

<RelatedSection
description="Check the following sections for more on how to use OpenFGA."
Expand Down
4 changes: 2 additions & 2 deletions docs/content/getting-started/setup-sdk-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export FGA_MODEL_ID=YOUR_MODEL_ID # optional, can be overridden per request, lat

</Tabs>

## Using Shared Key Authentication
## Using shared key authentication

If you want to use shared key authentication, you need to generate a random string that will work as secret and set that key when building your OpenFGA server. Then, when building the client, set it as environment variable `FGA_API_TOKEN`.

Expand Down Expand Up @@ -297,7 +297,7 @@ export FGA_API_TOKEN=YOUR_API_TOKEN
</TabItem>
</Tabs>

## Using Client Credentials Flow
## Using client credentials flow

:::info Note
The OpenFGA server does not support the client credentials flow, however if you or your OpenFGA provider have implemented a client credentials wrapper on top, follow the instructions here to have the OpenFGA client handle the token exchange for you.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/getting-started/tuples-api-best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You can use any string for user and object identifiers, however you should not i
The documentation and samples uses first names and simple ids to illustrate easy-to-follow examples.
:::

## Always Specify Authorization Model ID Whenever Possible
## Always specify authorization model ID whenever possible

It is strongly recommended that authorization model ID be specified in your Relationship Queries (such as [Check](./perform-check.mdx) and [ListObjects](../interacting/relationship-queries.mdx#listobjects)) and Relationship Commands (such as [Write](./update-tuples.mdx)).

Expand Down
10 changes: 5 additions & 5 deletions docs/content/getting-started/update-tuples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import TabItem from '@theme/TabItem';

This section will illustrate how to update _<ProductConcept section="what-is-a-relationship-tuple" linkName="relationship tuples" />_.

## Before You Start
## Before you start

<Tabs groupId="languages">
<TabItem value={SupportedLanguage.JS_SDK} label={languageLabelMap.get(SupportedLanguage.JS_SDK)}>
Expand Down Expand Up @@ -85,7 +85,7 @@ This section will illustrate how to update _<ProductConcept section="what-is-a-r
</TabItem>
</Tabs>

## Step By Step
## Step by step

Assume that you want to add user `user:anne` to have relationship `reader` with object `document:Z`

Expand All @@ -97,7 +97,7 @@ Assume that you want to add user `user:anne` to have relationship `reader` with
}
```

### 01. Configure The <ProductName format={ProductNameFormat.ShortForm}/> API Client
### 01. Configure the <ProductName format={ProductNameFormat.ShortForm}/> API client

Before calling the write API, you will need to configure the API client.

Expand Down Expand Up @@ -141,7 +141,7 @@ To obtain the [access token](https://auth0.com/docs/authorization/flows/call-you
</TabItem>
</Tabs>

### 02. Calling Write API To Add New Relationship Tuples
### 02. Calling write API to add new relationship tuples

To add the relationship tuples, we can invoke the write API.

Expand All @@ -165,7 +165,7 @@ To add the relationship tuples, we can invoke the write API.
]}
/>

### 03. Calling Write API To Delete Relationship Tuples
### 03. Calling write API to delete relationship tuples

To delete relationship tuples, we can invoke the write API.

Expand Down
4 changes: 2 additions & 2 deletions docs/content/interacting/managing-group-access.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ In addition, the following concepts are important to group access management:

<ProductName format={ProductNameFormat.ShortForm}/> allows you to add users to groups and grant groups access to an object. [For more information, see User Groups.](../modeling/user-groups.mdx)

### <ProductName format={ProductNameFormat.ShortForm}/> Concepts
### <ProductName format={ProductNameFormat.ShortForm}/> concepts

- A <ProductConcept section="what-is-a-type" linkName="Type" />: a class of objects that have similar characteristics
- A <ProductConcept section="what-is-a-user" linkName="User" />: an entity in the system that can be related to an object
Expand All @@ -107,7 +107,7 @@ In addition, the following concepts are important to group access management:

## Step by step

### 01. Adding Company To The Document
### 01. Adding company to the document

The following <ProductConcept section="what-is-a-relationship-tuple" linkName="Relationship Tuple" /> assigns ever `employee` of a type `company` a `reader` relationship with a particular object of type `document`, in this case `document:planning`):

Expand Down
Loading

0 comments on commit 1c579e6

Please sign in to comment.