funnelchat20/platform-gate
A lightweight Laravel package for platform-level gating, letting you restrict access to routes, features, or resources based on the requesting platform. Simple to configure and drop into existing apps, it suits multi-platform projects needing clear access boundaries.
What shipped. v0.7.1 is a patch release of funnelchat20/platform-gate, the Laravel package that implements the edge-trust boundary (TrustEdge) — validating the X-Funnelchat-Edge shared secret sent by the Worker in front of each domain. It closes finding Medium S1 from the 13-10 communities audit under the api-abierta initiative: the edge secret was reaching Sentry.
Architecture fit. The package sits where a Laravel package normally sits (service provider + bootstrap component), but this release confirms the trust boundary is process-global, not request-scoped. Because library logs inside TrustEdge are emitted before Laravel's request object is wired, Sentry's PHP SDK builds early events from PHP globals — so the fix is to scrub $_SERVER and $_ENV directly. That is a deliberate, defensible trade-off, but it is a workaround for an ordering problem rather than a clean boundary. Any other consumer reading superglobals before TrustEdge runs (APM agents, custom error handlers, other middleware registered earlier) remains outside the guarantee.
Integration feasibility. High. No config and no code changes: bump 0.7.0 → 0.7.1 or run composer update funnelchat20/platform-gate on ^0.7. Domains upgrade in any order; there is no cross-service contract change because the Worker still sends the same header. Teams on 0.6 follow the 0.6 guide but land on 0.7.1.
Technical risk. The important point for a TPM is that this release alone does not close S1:
getallheaders() and cannot be deleted from PHP. Each domain must add a Sentry before_send that strips X-Funnelchat-Edge. That is per-domain, manual configuration — the most likely place for this fix to silently regress.TrustEdge construction to the first request, once per process. That is safer, but it changes when operators see the error and how many copies appear (one per worker process).$_ENV depends on variables_order; getenv() is not mentioned. Edge cases worth confirming rather than assuming.Key questions.
before_send snippet (Laravel/Sentry SDK version-specific), or do we own writing it per domain?LOG_STACK channels beyond sentry (stderr, Papertrail, CloudWatch)?TrustEdge scrub $_SERVER under all SAPIs we run, and what is the test matrix?Stack fit. Standard Composer dependency on a Laravel app; no migrations, no .env keys, no route or middleware registration changes in this release. It is a low-ceremony upgrade that fits an existing CI pipeline as a dependency bump plus regression suite.
Migration path.
^0.7 and composer update. Deploy.Compatibility. Two caveats drive the plan: (a) PHP-FPM requires the domain-side before_send — the package cannot finish the job; (b) the Sentry SDK's before_send signature is version-dependent, so the scrubber must be written against the SDK version each domain actually runs. If we run Octane, confirm env/secret reload behaviour after rotation.
Sequencing (recommended).
composer update), any order.before_send scrubber per domain, ideally as one shared, version-pinned config package so it cannot drift.HTTP_X_FUNNELCHAT_EDGE appears in Sentry, stderr, or any LOG_STACK channel.Maintenance. Patch-level upkeep is trivial, but post-release maintenance is not: the before_send scrubber is bespoke per domain and will rot silently as Sentry SDKs are upgraded. Treat it as config-as-code with a test, not a one-off edit.
Support. On-call needs two runbook entries: (1) edge config errors now appear on the first request per process, so a burst of identical lines right after a deploy is expected, not a new incident; (2) a missing or broken before_send produces no error at all — it just leaks. The release notes are Spanish-only; ensure the runbook and the "El borde" doc are readable by whoever is on call.
Scaling. Scrubbing cost is negligible. Log volume for misconfiguration scales linearly with worker count (once per process) — a misconfigured 20-worker pool yields 20 near-identical entries per deploy, which is acceptable but should be filtered or deduplicated in Sentry to avoid alert noise. The before_send runs on every event, so keep it cheap and side-effect free.
Failure modes.
before_send forgotten → secret still in Sentry. Highest-probability failure.Ramp-up. Application developers: effectively zero — a version bump and a passing test suite. The real ramp-up sits with the security/Sentry owner: roughly a day per domain to write, review, and verify the before_send scrubber the first time, dropping to minutes once a shared snippet exists. Budget that effort explicitly; it is the difference between a closed audit finding and a reopened one.
How can I help you explore Laravel packages today?