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

Auth Log Bundle Laravel Package

spiriitlabs/auth-log-bundle

Symfony bundle for tracking authentication activity. It records login successes, failures, and logouts with context such as user, IP address, and user agent, then stores events for auditing and review through configurable persistence and a simple dashboard.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — A significant framing correction first: the package under review is spiriitlabs/auth-log-bundle, a Symfony bundle, not a Laravel package. It integrates via Symfony's bundle/DI container, event dispatcher, and configuration tree. If the target application is Laravel, this is not directly adoptable — it would require a custom bridge or a different package entirely. If the target is Symfony (or the "Laravel/PHP" framing was shorthand for "PHP framework app"), fit is good: it is a focused, single-responsibility authentication audit logger that hooks the security component's login success/failure events and persists records with resolved geolocation. The v4.0.2 release does not alter the architectural contract — it is a patch release with a reliability fix, dependency housekeeping, and CI hardening.

Integration feasibility — Low-to-moderate. Standard Composer install, bundle registration, and a config block. Persistence is pluggable but requires a schema migration for the auth-log table. Geolocation is the only materially non-trivial integration: the v4.0.2 notes confirm GeoIP2 is the recommended production choice (local MaxMind database, no network call on the login path), with API-based resolution as the fallback. The fix(location): timeout on api location change adds a bound on how long an outbound lookup can block before the record is saved — previously an unbounded stall on the authentication path, which is a genuine production risk that this release mitigates.

Technical risk —

  • Framework mismatch (highest severity if Laravel is truly the target). Nothing in this release addresses that; it remains a structural blocker, not a version issue.
  • Dependency declaration change. feat(deps): messenger and http-client as suggest moves Symfony Messenger and HttpClient into suggest. Correct direction for optionality, but any consumer that implicitly relied on those being transitively installed could see a silent degradation (no async location resolution, or a missing HTTP client at runtime) after upgrade. Must be verified against composer.json, not inferred from the changelog line.
  • Blocking I/O on the auth path. The timeout is a mitigation, not a fix. Latency budget, not correctness, is the residual risk.
  • PII / compliance. Auth logs contain IP addresses and geolocation — personal data under GDPR. Retention, access control, and lawful basis are application-level obligations this package does not enforce.
  • Static analysis newly added to CI is a positive maturity signal but implies the codebase had unanalysed surface area until now.

Key questions —

  1. Is the consuming application Symfony or Laravel? If Laravel, this evaluation terminates here pending an alternative.
  2. What Symfony and PHP version range does v4.0.2 declare, and does it cover our supported LTS?
  3. Did require → suggest demotion remove any dependency that previously installed automatically? Is this a breaking change for existing installs despite the patch version number?
  4. What is the configured/default location-lookup timeout, and is it tunable via bundle config?
  5. Storage provider: Doctrine ORM, ODM, or custom? What is the expected write volume, and is there a documented retention/pruning mechanism?
  6. Are records written synchronously on the login path, or can they be dispatched via Messenger? What happens to location resolution if the worker is down?

Integration Approach

Stack fit — Validates cleanly for Symfony 6/7 applications already using the Security component and a Doctrine-backed persistence layer. It does not fit a Laravel stack; treat any Laravel requirement as a re-evaluation trigger, not an integration task. Confirm the framework question before committing engineering time.

Migration path — Greenfield adoption: composer require, enable the bundle, publish/author the auth-log migration, configure the location provider, then backfill nothing (logs are forward-only by nature). There is no upgrade path from a prior version in scope — this is a first assessment, and v4.0.2 is a patch on v4.0.1, so no data or config migration is introduced by this release. If a competing or in-house auth logger exists, plan a parallel-run period rather than a cutover, since losing authentication audit continuity is a compliance gap.

Compatibility — Verify the declared Symfony/PHP matrix against our runtime before install. The suggest demotion means we must explicitly require symfony/http-client if using API-based lookup, and symfony/messenger if we want asynchronous persistence. Pin those explicitly in our own composer.json rather than relying on the bundle's transitive graph — that is the durable fix for the risk above. GeoIP2 requires the maxmind-db/reader library plus a licensed MaxMind database and a refresh process; budget for the licence/account step.

Sequencing —

  1. Resolve the framework question (gate).
  2. Confirm version compatibility and the require/suggest diff.
  3. Provision storage: schema, indexes on timestamp/user/IP, retention job.
  4. Configure GeoIP2 local database as primary; API lookup only as fallback with an explicit short timeout.
  5. Introduce Messenger + async handling if login-path latency is measured as unacceptable under load.
  6. Add alerting on authentication-failure spikes on top of the log stream — the bundle produces the data, not the detection.

Operational Impact

Maintenance — Actively maintained, with Dependabot-driven dependency updates, a maintainer-authored reliability fix, documentation improvements, and newly added static analysis in the same release window. That is a healthy cadence for a small package. Bus factor is the concern: a single primary maintainer and a small contributor pool means we should be prepared to fork or vendor if the project stalls. Pin versions and review changelogs; a patch-numbered release that changes dependency declarations is a reminder not to auto-merge.

Support — No commercial support; community issues only. Internal runbook must cover: enabling/disabling the bundle, changing the location provider, rotating the GeoIP database, and pruning old records. Domain-adjacent teams (security, compliance) will have opinions on retention and access — engage them before go-live, not after.

Scaling — Auth-log volume scales with login attempts, not user count, so it is comparatively modest but bursty (credential-stuffing attacks generate large failure spikes precisely when you most need the log to stay available). Watch database growth and index bloat; a retention policy is mandatory, not optional. If location resolution is synchronous, login throughput becomes coupled to lookup latency and to the GeoIP database's local read performance — async via Messenger decouples this but introduces a queue as a new dependency in the critical path.

Failure modes —

  • Location API slow or down: bounded by the new timeout, but records may be saved without location data. Acceptable degradation; ensure the schema tolerates nulls and that downstream reporting does not assume completeness.
  • Messenger worker down: queued auth-log writes accumulate and location data is delayed or lost on queue overflow. Requires queue-depth monitoring.
  • GeoIP database stale: silently degrades accuracy rather than failing loudly. Needs a scheduled refresh with a staleness alarm.
  • Database unavailable during login: depending on implementation, this can either drop the audit record or affect the login outcome. Confirm the write is non-blocking with respect to authentication success — an audit logger must never become an availability dependency for authentication.
  • Dependency demotion regression: missing HttpClient surfaces as a runtime error on first API-based lookup, likely in production rather than CI. Add an integration test that exercises the configured provider.

Ramp-up — Low for a Symfony developer: a few hours to install, configure, and validate. The real effort is not the package but the surrounding policy work — retention rules, PII handling review, GeoIP licensing, and dashboard/alerting on top of the log stream. Estimate one to two days of engineering plus a compliance review, and treat the framework-compatibility question as a hard prerequisite that can zero out the estimate.

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.
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator