The OpenFGA provider enables you to manage OpenFGA stores, authorization models, and relationship tuples with Pulumi. OpenFGA is a fine-grained, relationship-based authorization system inspired by Google Zanzibar. This provider is dynamically bridged from the Terraform OpenFGA Provider.
Installation#
Install the OpenFGA provider package using your preferred package manager:
Configuration#
The provider supports two authentication modes: a pre-shared API token, or OAuth 2.0 client credentials.
API Token#
Or via environment variables:
OAuth Client Credentials#
Equivalent environment variables: FGA_CLIENT_ID, FGA_CLIENT_SECRET, FGA_API_TOKEN_ISSUER, FGA_API_AUDIENCE, FGA_API_SCOPES.
Self-Hosted OpenFGA#
For a self-hosted OpenFGA server, point apiUrl at the deployment and supply the matching auth credentials:
Quick Start#
Key Resources#
Store#
A logical container for an authorization model and its relationship tuples.
Authorization Model#
The schema describing the object types, relations, and rewrite rules. Use getAuthorizationModelDocument to author the model in DSL form and convert it to canonical JSON.
Relationship Tuple#
A single fact in the form (user, relation, object). Optionally pinned to a specific authorization model.
Read-Side Data Sources#
The provider exposes data sources for offline checks against an authorization model without writing to the store: getCheckQuery, getListObjectsQuery, getListUsersQuery, plus lookups for stores, models, and tuples (getStore, getAuthorizationModel, getRelationshipTuple, etc.).