Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cerbos/cerbos-sdk-javascript
JavaScript SDK for authorization via Cerbos
https://github.com/cerbos/cerbos-sdk-javascript
authorization browser cerbos javascript node typescript
Last synced: about 18 hours ago
JSON representation
JavaScript SDK for authorization via Cerbos
- Host: GitHub
- URL: https://github.com/cerbos/cerbos-sdk-javascript
- Owner: cerbos
- License: apache-2.0
- Created: 2021-07-16T09:38:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T09:12:44.000Z (11 days ago)
- Last Synced: 2024-10-28T17:58:36.315Z (11 days ago)
- Topics: authorization, browser, cerbos, javascript, node, typescript
- Language: TypeScript
- Homepage: https://cerbos.dev
- Size: 6.55 MB
- Stars: 72
- Watchers: 14
- Forks: 10
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Cerbos JavaScript SDK
[Cerbos](https://cerbos.dev) helps you super-charge your authorization implementation by writing context-aware access control policies for your application resources.
Author access rules using an intuitive YAML configuration language, use your Git-ops infrastructure to test and deploy them, and make simple API requests to the Cerbos policy decision point (PDP) server to evaluate the policies and make dynamic access decisions.The Cerbos JavaScript SDK makes it easy to interact with the Cerbos PDP from your Node.js and browser-based applications.
## Packages
For server-side Node.js applications, the [@cerbos/grpc](/packages/grpc/README.md) package provides a client ([`GRPC`](/docs/grpc.grpc.md)) for interacting with the Cerbos PDP service over gRPC.
For browser-based applications, the [@cerbos/http](/packages/http/README.md) package provides a client ([`HTTP`](/docs/http.http.md)) for interacting with the Cerbos PDP service over HTTP.
You can make also authorization decisions on-device or at the edge without network access to a Cerbos PDP service using [embedded PDPs](https://docs.cerbos.dev/cerbos-hub/decision-points-embedded) generated by [Cerbos Hub](https://hub.cerbos.cloud).
The [@cerbos/embedded](/packages/embedded/README.md) package provides a client ([`Embedded`](/docs/embedded.embedded.md)) for interacting with embedded PDPs.All clients extend the base [`Client`](/docs/core.client.md) class from [@cerbos/core](/packages/core/README.md), so they can be used interchangeably in isomorphic applications.
In React applications, you can use the [@cerbos/react](/packages/react/README.md) package to use an [`HTTP`](/docs/http.http.md) or [`Embedded`](/docs/embedded.embedded.md) client in your components via hooks.
To instrument the clients with [OpenTelemetry](http://opentelemetry.io), use the [@cerbos/opentelemetry](/packages/opentelemetry/README.md) package.
To load Cerbos policies from YAML or JSON files, use the [@cerbos/files](/packages/files/README.md) package.
## Further reading
- [API reference](/docs/index.md)
- [Cerbos documentation](https://docs.cerbos.dev)## Get help
- [Join the Cerbos community on Slack](http://go.cerbos.io/slack)
- [Email us at [email protected]](mailto:[email protected])