kilix/abac-bundle
A Symfony bundle for attribute-based access control (ABAC). Define policies over user, resource, and environment attributes to make fine-grained, context-aware authorization decisions, integrated with Symfony’s security system.
php-abac library and the ABAC pattern it enables. If your roadmap includes requirements like "regional managers can approve refunds over $5k only during business hours, for accounts in their territory," role checks collapse into combinatorial policy sprawl. ABAC lets you express those as policies over subject/resource/environment attributes. This package is a lens for evaluating whether you need that expressiveness or whether Laravel's Gates/Policies plus spatie/laravel-permission covers 90% of your cases.record.tenant_id == user.tenant_id and record.classification <= user.clearance") — a recurring roadmap item for B2B SaaS and regulated verticals. Worth modeling before committing to a schema.if ($user->plan === 'pro') checks.php-abac into Symfony's DI container. If you are a Laravel shop, the bundle itself is irrelevant — the transferable asset is the framework-agnostic php-abac core, which you would wire manually (service provider + config file, roughly a day of work). Treat this as competitive/pattern intelligence, not a dependency candidate.Consider it if:
php-abac.Look elsewhere if:
php-abac directly or evaluate Laravel-native options (spatie/laravel-permission for RBAC, Laravel Policies/Gates for rule-based checks, casbin/laravel-authz or spatie/laravel-permission-plus-custom-policies for hybrid models). Adopting a Symfony bundle in a Laravel codebase is a category error.To executives (one paragraph): We evaluated a small open-source component for attribute-based access control. The strategic takeaway is that our authorization needs are approaching the complexity where scattered role checks become a maintenance and audit liability — this is worth a scoped design decision, not an immediate purchase. The package itself is not a candidate: it targets Symfony, we run Laravel, and at 15 stars with no downstream dependents it carries unacceptable supply-chain risk for security-boundary code. Recommendation: keep authorization on Laravel's native Gates/Policies in the near term, and fund a short spike to determine whether we need a policy engine (in-house, php-abac core, or OPA/Cedar) before the next multi-tenant or enterprise-tier commitment.
To engineering (the actual ask): Don't add this dependency. Read the php-abac core to understand attribute resolution and policy evaluation, then run a two-day spike comparing three paths: (1) extend Laravel Gates/Policies with a small attribute-evaluation helper, (2) wire php-abac core via a service provider, (3) prototype an OPA sidecar if policy authoring by non-engineers is on the roadmap. Deliverable is a recommendation memo covering expressiveness, performance under our real permission cardinality, auditability of decisions, and operational cost. Whatever we choose, authorization logic gets an owner, tests, and a documented policy change process — the failure mode here is not picking the wrong library, it's having no deliberate decision at all.
How can I help you explore Laravel packages today?