@cerbos/grpc
![npm](https://img.shields.io/npm/v/@cerbos/grpc?style=flat-square)
Client library for interacting with the Cerbos policy decision point over gRPC from server-side Node.js applications.
Prerequisites
Installation
$ npm install @cerbos/grpc
or
$ yarn add @cerbos/grpc
Example usage
import { GRPC } from "@cerbos/grpc";
const cerbos = new GRPC("localhost:3593", { tls: false });
await cerbos.isAllowed({
principal: { id: "user@example.com", roles: ["USER"] },
resource: { kind: "document", id: "1" },
action: "view",
});
For more details, see the GRPC
class documentation.
Further reading
Get help