Skip to content
Merged
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
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
# OpenFGA API
This project contains the definitions of [Protocol Buffers](https://developers.google.com/protocol-buffers/) used by OpenFGA.

The OpenFGA API [Protocol Buffers](https://developers.google.com/protocol-buffers/) definitions.

## About
[OpenFGA](https://openfga.dev) is an open source Fine-Grained Authorization solution inspired by [Google's Zanzibar paper](https://research.google/pubs/pub48190/). It was created by the FGA team at [Auth0/Okta](https://auth0.com) based on [Auth0 Fine-Grained Authorization (FGA)](https://fga.dev), available under [a permissive license (Apache-2)](https://github.com/openfga/rfcs/blob/main/LICENSE) and welcomes community contributions.

OpenFGA is designed to make it easy for application builders to model their permission layer, and to add and integrate fine-grained authorization into their applications. OpenFGA’s design is optimized for reliability and low latency at a high scale.

## Usage

[Buf](https://github.com/bufbuild/buf) is used to manage, package, and generate source code from the protocol buffer definitions. The API definitions
are pushed to the [`buf.build/openfga/api`](https://buf.build/openfga/api) repository in the Buf Registry.

## Building the Generated Sources
You can find various SDKs autogenerated by buf based on the protobuf definitions here: https://buf.build/openfga/api/sdks/main:protobuf

For example, to import the definitions in Go you can do so via the following command:

```shell
go get go.buf.build/openfga/go/openfga/api
```

If you are looking for the currently supported OpenFGA HTTP SDKs, you can find them here: https://github.com/openfga/sdk-generator#currently-supported-sdks

## Contributing

### Building the Generated Sources
To generate source code from the protobuf definitions contained in this project you can run the following command:

> **Note**: You must have [Buf CLI](https://docs.buf.build/installation) installed to run the following command.
Expand All @@ -17,7 +37,7 @@ The command above will generate source code in the `proto/` directory. It will a
that files requiring auto-generation after `.proto` changes have been updated. There are some cases where that git hook
may be overly strict. In those cases you can bypass it with `commit --no-verify`.

## Use the generated sources in OpenFGA
### Use the generated sources in OpenFGA

1. Generate the sources as above
2. In the `proto` directory execute the following commands:
Expand All @@ -30,7 +50,7 @@ may be overly strict. In those cases you can bypass it with `commit --no-verify`
replace github.com/openfga/api/proto => /path/to/proto
```

## Generating OpenAPI Documentation
### Generating OpenAPI Documentation
To generate the OpenAPI documentation from the protobuf sources you can run the following commands:

> **Note**: You must have [jq](https://jqlang.github.io/jq/download/) installed to run the `format` step below
Expand All @@ -45,3 +65,13 @@ Or you can just use
```bash
make
```

See [CONTRIBUTING](https://github.com/openfga/.github/blob/main/CONTRIBUTING.md).

## Author

[OpenFGA](https://github.com/openfga)

## License

This project is licensed under the Apache-2.0 license. See the [LICENSE](https://github.com/openfga/api/blob/main/LICENSE) file for more info.
Loading