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.
Download cerbos/cerbos-sdk-php
More information about cerbos/cerbos-sdk-php
Files in cerbos/cerbos-sdk-php
Package cerbos-sdk-php
Short Description PHP SDK for interacting with the Cerbos PDP
License Apache-2.0
Homepage https://github.com/cerbos/cerbos-sdk-php
Informations about the package cerbos-sdk-php
Cerbos PHP SDK
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
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