Skip to content

identity and access management tooling and wrappers + helpers

License

Notifications You must be signed in to change notification settings

theopenlane/iam

Build status Quality Gate Status Go Report Card Go Reference License: Apache 2.0

Identity and Access Management (IAM)

A go library for interacting with OpenFGA - it is comprised of 2 packages, fgax and entfga.

install

You can install fgax by running the following command:

go get github.com/theopenlane/fgax@latest

fgax

This package includes helper functions used heavily in OpenLane.

For example, you can easily check for Read access of an organization using

	// create client
	fgaClient, err := fgax.Client("https://fga-host.example.com")
	if err != nil {
		return false
	}

	// create access check
	req := fgax.AccessCheck{
		SubjectID:   "user-id",
		SubjectType: "user",
		ObjectID:    "organization-id",
	}

	allow, err := fgaClient.CheckOrgReadAccess(ctx, req)
	if err != nil {
		return false
	}

entfga

See the README for details

Contributing

Please read the contributing guide.