0.18.4 • Published 8 months ago

@cerbos/grpc v0.18.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

@cerbos/grpc

npm

Client library for interacting with the Cerbos policy decision point service over gRPC from server-side Node.js applications.

Prerequisites

  • Cerbos 0.16+
  • Node.js 18+

Installation

$ npm install @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"],
    attr: { tier: "PREMIUM" },
  },
  resource: {
    kind: "document",
    id: "1",
    attr: { owner: "user@example.com" },
  },
  action: "view",
}); // => true

For more details, see the GRPC class documentation.

Further reading

Get help

0.18.4

8 months ago

0.18.3

10 months ago

0.18.1

1 year ago

0.18.2

11 months ago

0.18.0

1 year ago

0.17.1

1 year ago

0.17.0

1 year ago

0.16.0

1 year ago

0.15.0

1 year ago

0.14.1

2 years ago

0.12.0

2 years ago

0.13.0

2 years ago

0.14.0

2 years ago

0.11.0

2 years ago

0.10.0

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.9.0

2 years ago

0.8.2

2 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago