Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Larke Auth Laravel Package

lake/larke-auth

Larke Auth is a Laravel/PHP package that provides a lightweight authentication layer for your applications, with helpers and configuration to integrate login, registration, and access control into your project while keeping auth setup simple and customizable.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package targets the standard Laravel extension seam: a service provider, a facade/contract binding, config + migration publishing, and middleware for route-level checks. That is the right shape for a Laravel authorization layer and means integration surface is narrow and reversible.
  • Claimed ACL/RBAC/ABAC coverage is a broad mandate. In practice these libraries fall into two families: (a) a thin wrapper over a policy engine (Casbin/PHP-Casbin is the common choice in this namespace), or (b) a bespoke table-driven implementation. The distinction is the single most important thing to establish — (a) inherits a battle-tested evaluation engine with an unproven wrapper; (b) means you are trusting unaudited business logic for every access decision in the app.
  • Overlap risk with native Gate/Policy is real. Two authorization systems in one codebase produce divergent answers, unclear ownership, and audit gaps. Any adoption should be an explicit replacement or an explicit boundary (e.g., larke-auth only for data-scoped ABAC checks), not a coexistence.

Integration feasibility

  • Mechanically easy: composer require, publish config/migrations, define model/policy files, register middleware. A spike should land in a day.
  • Practically harder: with 1 star, 0 dependents, and no evident community documentation, the source is the specification. Budget for reading vendor code to answer basics — policy storage backend, caching, cache invalidation, wildcard semantics, deny-override behavior, and multi-tenant scoping.
  • ABAC support implies some expression evaluation (attribute matchers or an expression DSL). Confirm whether expressions are parsed safely or passed to eval/call_user_func; if user-influenced policy strings reach an evaluator, that is a code-execution surface and a hard blocker without review.

Technical risk

  • Bus factor 1. Single maintainer, no downstream users, no ecosystem. There is no signal that breakage will be noticed by anyone but you.
  • Low adoption signal. 1 star / 0 dependents / opportunity score ~0.005 means effectively zero peer review. Treat every behavior as unverified until tested in your own suite.
  • Version drift. Last release 2025-02-25 suggests recent activity, but confirm composer.json constraints against your Laravel major (10/11/12) and PHP floor. A package that lags a Laravel major is a forced-migration liability on your upgrade calendar.
  • Fail-open vs fail-closed. Undefined behavior when a policy is missing, a subject is unmatched, or the policy store is unreachable is the highest-severity unknown. It is also the easiest thing to test.

Key questions to put to the maintainer / answer from source

  1. Does this wrap PHP-Casbin or implement evaluation itself?
  2. Which Laravel and PHP versions are supported, and is there a CI matrix?
  3. What is the policy storage adapter (DB, file, Redis) and the cache-invalidation strategy?
  4. Does it integrate with or replace Laravel Gate? Can decisions be logged for shadow comparison?
  5. Is there a test suite, and what is its coverage of deny/override/wildcard cases?
  6. How are ABAC expressions evaluated, and are they sandboxed?
  7. Is multi-tenancy / scoped policies supported?
  8. Is there any stated support commitment, or is this a companion library to a CMS?

Integration Approach

Stack fit

  • Reasonable fit for a greenfield Laravel service or an internal admin/back-office where the Larke ecosystem is already in play. Poor fit for any system already invested in spatie/laravel-permission or Gate-centric policies — you would be trading a widely adopted, well-understood RBAC layer for an unvetted one to gain ABAC.
  • Only pursue if you specifically need attribute-based, data-scoped decisions that native Gate and Spatie make awkward. If RBAC is sufficient, stop here.

Migration path

  • Do not call the package directly from controllers or models. Define a thin in-house AuthorizationService contract (can(subject, action, resource, context)) and bind larke-auth behind it. This is cheap insurance and makes the package a disposable implementation detail.
  • Run in shadow mode: evaluate both the incumbent layer and larke-auth for the same requests, log disagreements, and diff for two to four weeks before flipping any enforcement.
  • Migrate ability-by-ability, lowest-blast-radius routes first (read-only views), never on a big-bang cutover.

Compatibility

  • Pin the exact version in composer.lock; do not float. Verify behavior under Octane/long-running workers, where a stale in-memory policy cache silently serves wrong decisions across requests.
  • Check migration compatibility with your DB (MySQL/Postgres) and whether published migrations are additive or assume a fresh schema.
  • Confirm behavior with multiple connections/tenants if applicable.

Sequencing

  1. Spike (1–2 days): install in a scratch branch, read the service provider and evaluator, answer the eight questions above.
  2. Gate review: if evaluation is bespoke and untested, or ABAC is eval-based, terminate.
  3. PoC (1 week): enforce on one low-risk module behind the abstraction layer, with decision logging.
  4. Shadow period (2–4 weeks): parallel evaluation, disagreement review.
  5. Decision: roll out, or fork-and-own, or drop in favor of PHP-Casbin directly / Spatie.

Operational Impact

Maintenance

  • Assume you will own this code. Apache-2.0 permits a hard fork, and with 1 star there is no realistic path to upstream fixes landing on your timeline. Budget ~5–10% of one engineer ongoing for vendored-package stewardship, and designate an owner by name.
  • Every Laravel major upgrade becomes a self-managed port until proven otherwise.

Support

  • No vendor, no community, no documented SLA. Internal escalation only. That is acceptable for an internal admin tool and unacceptable for a customer-facing authorization boundary or anything in a compliance scope.

Scaling

  • Authorization is on the hot path of nearly every request. Cost is dominated by policy lookup, not evaluation: confirm whether decisions are cached, whether the cache is warmable at boot, and whether cache entries are invalidated on policy writes or require a restart.
  • Large policy sets (thousands of rules) need indexed storage and scoped queries; a naive "load all policies, then filter" implementation will degrade non-linearly and show up as p99 latency under concurrency.
  • Memory behavior under Octane/FrankenPHP matters — long-lived workers retaining policy graphs are a slow-leak risk.

Failure modes to design against

  • Policy store unavailable: must fail closed and alert; verify this explicitly.
  • Stale cache after a role change: a revoked permission that persists is a security incident. Test revocation propagation end-to-end.
  • Schema drift: published migrations may not track upstream changes; pin and diff on upgrade.
  • Abandonment: no commits for N months means no CVE response. Add a dependency-health check to your quarterly review.
  • Silent misconfiguration: an unparseable policy file that evaluates to "allow everything" is the worst case. Add a startup assertion that a known-allow and a known-deny both behave correctly.

Ramp-up

  • Expect 1–2 weeks for a mid-level Laravel engineer to become productive: the Laravel integration idioms will be familiar, the model/policy configuration DSL will not, and documentation is likely thin or Chinese-first. Plan on writing the internal runbook yourself — model file conventions, how to add an ability, how to debug a deny, where policies live, how to flush cache.
  • Do not let this become tribal knowledge held by the one engineer who did the spike. That compounds the bus-factor-1 risk on the package into a bus-factor-1 risk on your own access control.

Recommendation: Treat as unvetted. Proceed only to a time-boxed spike, only behind an internal abstraction, and only if ABAC is a genuine requirement that native Gate and Spatie cannot meet. Default position is no-adopt.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource