Download the PHP package cerbos/cerbos-sdk-php without Composer

On this page you can find all versions of the php package cerbos/cerbos-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cerbos-sdk-php

Cerbos PHP SDK

Latest Stable Version Total Downloads License

PHP client library for the Cerbos open source access control solution. This library includes gRPC client for accessing the Cerbos PDP.

Find out more about Cerbos at https://cerbos.dev and read the documentation at https://docs.cerbos.dev.

Installation

You can install the SDK via Composer. Run the following command:

Examples

Creating a gRPC client

Check a single principal and resource

Check a single principal and multiple resource & action pairs

Plan Resources API

Upgrading from v0.1.x

Newer versions of the library make use of gRPC libraries. This is in order to make the integration with Cerbos easier to manage. This change requires existing users of 0.1.x versions to perform some migration steps.

gRPC

This library requires the gRPC extension to be installed. Follow the instructions for your environment to install the extension.

Differences between SDK API v0.1.x

PHP version requirements

The minimum supported version of PHP is 8.2.

Simpler CerbosClientBuilder

CerbosClientBuilder is simpler and only expects hostname as a parameter.

Renamed ResourceAction to ResourceEntry

The ResourceAction class has been renamed to ResourceEntry.

New AttributeValue builder class

Principal and resource attributes must be created using the AttributeValue builder class.

Creating a bool value;

Creating a string value;

New CheckResourcesRequest and PlanResourcesRequest builder classes

Use the new builder classes to construct CheckResources and PlanResources requests.

Simpler CerbosClient

The checkResources and planResources methods on the CerbosClient now accepts only a CheckResourcesRequest or PlanResourcesRequest object respectively.


All versions of cerbos-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2 || ^8.3
ext-grpc Version *
ext-json Version *
google/common-protos Version ^4.5
google/protobuf Version ^v4.26
grpc/grpc Version ^1.57
ramsey/uuid Version ^4.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cerbos/cerbos-sdk-php contains the following files

Loading the files please wait ....