Download the PHP package sapl/sapl-php without Composer

On this page you can find all versions of the php package sapl/sapl-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 sapl-php

sapl-php

Policy-based authorization for PHP and Symfony. Write access control rules as external SAPL policy files and enforce them at runtime through attributes like #[PreEnforce] and #[PostEnforce]. Policies can be updated without code changes or redeployment.

How It Works

Your application marks controller actions or service methods with enforcement attributes. SAPL intercepts the call, sends an authorization subscription to the Policy Decision Point (PDP), and enforces the decision, including any obligations or advice the policy attaches.

If the PDP permits, the method runs. If not, an AccessDeniedException is thrown. If the decision carries obligations (like access logging or field redaction), they are enforced automatically through registered constraint handlers.

The subject defaults to the authenticated user, and the action and resource to the class and method name. Any attribute field overrides the default, either as a literal or as a Symfony Expression evaluated against { subject, args, request }.

What You Get

SAPL goes beyond simple permit/deny. Decisions can carry obligations that must be fulfilled, advice that should be attempted, and resource transformations that modify return values before they reach the caller. The library handles all of this transparently.

For streaming responses, #[StreamEnforce] maintains a live connection to the PDP, so access rights update in real time as policies, attributes, or the environment change. Its signalTransitions and pauseRapDuringSuspend flags express the suspend, drop, and pause behaviours. Transaction integration rolls back a database write when an obligation fails after it (enable with transactional: true).

Data-layer query rewriting narrows results at the database rather than in memory. A policy attaches a sql:queryRewriting or mongo:queryRewriting obligation, and the matching Doctrine filter rewrites the queries an enforced method issues, fail-closed and narrowing-only. Sapl\Doctrine\Orm\SaplSqlFilter covers SQL databases through the Doctrine ORM and Sapl\Doctrine\Odm\SaplBsonFilter covers MongoDB through the Doctrine ODM. The obligation is portable: the same mongo:queryRewriting policy works unchanged across the Spring, Python, NestJS, and PHP MongoDB integrations.

Getting Started

Requires PHP 8.3+, Symfony 7.3+, and a SAPL PDP of version 4.1.0 or higher.

Register the bundle and point it at your PDP:

The PDP connection is HTTP. An unauthenticated development PDP must stay on loopback; production deployments configure authentication (api-key via token, or basic auth via username and secret) and TLS.

Links

License

Apache-2.0


All versions of sapl-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
psr/log Version ^3.0
react/async Version ^4.3
react/http Version ^1.11
symfony/console Version ^7.3
symfony/expression-language Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-client Version ^7.3
symfony/security-bundle Version ^7.3
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 sapl/sapl-php contains the following files

Loading the files please wait ...