subfission/cas
Laravel package for CAS (Central Authentication Service) single sign-on. Provides CAS authentication, middleware, user retrieval, and logout integration for Laravel apps, making it easy to add institutional SSO support.
Architecture fit. subfission/cas is a thin, idiomatic Laravel wrapper: a service provider, a Cas facade, and middleware sitting on top of the upstream phpCAS client. In shape, it matches how Laravel developers expect SSO to be packaged, so the conceptual overhead is low. The architectural weakness is what it wraps. phpCAS is a static-state, session-driven, redirect-and-exit library that assumes a single initialization per request and owns $_SESSION directly. That model is orthogonal to Laravel's request lifecycle, middleware pipeline, and exception handler. The facade hides this most of the time, but not at failure boundaries—which is exactly where auth code matters most.
Equally important: this is not a Laravel authentication guard or user provider. It authenticates a session against CAS and exposes attributes; it does not participate in Auth::attempt, password resets, remember-me tokens, or guard composition. Any application-level user record, role model, or authorization policy is the team's responsibility to build on top.
Integration feasibility. High, for the narrow case it targets: a Laravel app that must delegate login to an existing, organizational CAS server (typical in higher education and some enterprise SSO estates). Installation, config publication, and route protection are genuinely quick. The real work is downstream—attribute-to-user mapping, first-login provisioning, and reconciling CAS identity with the app's existing users table. Budget that as project scope, not as package integration.
Change in this release (v5.1.0). The release is narrow: PhpCasProxy::client() and PhpCasProxy::proxy() signatures were widened to match the corresponding phpCAS package, because the previous signatures were "overly type restricted." Three things follow. First, this is a proxy-mode–only surface—it affects applications requesting CAS proxy/service tickets to call downstream services, and is inert for teams doing plain SSO plus logout. Second, the change is corrective alignment with upstream, which implies the pinned phpCAS signature moved; the lockfile change matters more than the wrapper change and must go through dependency review with the rest of the bump. Third, widening parameter types is call-compatible for normal callers, but it moves a class of failures: inputs that previously failed fast as a TypeError inside Laravel's exception handler will now be accepted and passed through to phpCAS, where the failure mode is a redirect or an exit—i.e. the error becomes less visible, not more. Any internal fork or subclass overriding these methods must be rebased.
Technical risk. The dominant risk has been governance rather than code: the package was assessed as archived, meaning no coordinated response to upstream phpCAS advisories, no Laravel major-version compatibility work, and no maintainer to escalate to. A published release materially complicates that picture but does not resolve it—one narrow proxy-signature fix is evidence of a pulse, not evidence of a maintenance commitment, and the archived flag should be re-verified with security rather than assumed cleared. phpCAS retains a published advisory history, and the wrapper's version constraints on illuminate/* will still eventually pin the host application to an aging Laravel release unless releases continue. Secondary risks: single-maintainer bus factor, modest community (157 stars is reasonable for a niche protocol, but it means thin Stack Overflow coverage), and a low composite score reflecting health rather than function. MIT license is clean and permits forking.
Key questions for the owning team.
phpCAS version does v5.1.0 require, and does the resulting lockfile clear our vulnerability scanning baseline? What is our patch path when the next advisory lands?phpCAS static state and service-URL validation.Stack fit. Good for server-rendered Laravel applications fronted by a browser session. Poor fit for stateless APIs, SPAs, or mobile clients—CAS is a redirect-and-cookie protocol, and neither the package nor phpCAS provides token-based flows. Multi-guard applications (staff via CAS, customers via local credentials) require custom guard wiring that this package does not supply.
Migration path. Sequence: publish config → set CAS host, port, context, and protocol options → register the middleware → apply it to protected route groups → map returned attributes to local user records with first-login provisioning → replace or supplement the existing auth flow. Where a local credential system exists today, run CAS behind a feature flag on a subset of routes, preserve a break-glass local admin path, and keep the old login form live until CAS is proven in production.
Compatibility. The sharp edges are environmental rather than code-level. phpCAS issues redirects, writes to $_SESSION, and calls exit on some error paths—so it conflicts with API route groups, with output buffering tricks, and with Octane's long-lived workers. Horizontal scaling requires shared session storage (Redis or a database session driver); sticky sessions alone are fragile. Service URL construction must agree with the actual public URL after TLS termination, which is the single most common source of redirect loops in this integration.
For this release specifically: treat v5.1.0 as a dependency bump that happens to include a wrapper change. The wrapper diff is two signatures; the phpCAS constraint and any transitive movement in the lockfile are the substantive part and must be reviewed and scanned as such. If we have already forked the package, rebase the fork onto v5.1.0 deliberately and re-run the fork's smoke tests, or record an explicit decision to skip the release as not applicable to our usage.
Sequencing.
phpCAS version, plus confirmation of the repository's current maintenance status—before engineering spend.Maintenance. Assume we own it until a documented support policy says otherwise. The package surface is small enough that forking into an internal namespace remains a realistic, low-cost mitigation and the single highest-value action to de-risk adoption. A release landing is mildly encouraging and worth citing in the risk record, but it should not by itself change the staffing decision: someone must still track phpCAS upstream advisories and Laravel compatibility independently, and that ownership needs a name attached. Note also that a small maintainer responding to an upstream signature change is a different signal from a maintainer committing to Laravel major-version support—only the latter protects us in 12–18 months.
Support. There is no contractual upstream support. Internal documentation is mandatory: the CAS server contract, service URL conventions, config values, the adopted version and fork baseline, and the escalation path. Tribal knowledge here is a liability during incident response.
Scaling. Session-based, so per-request CAS traffic is avoided and the design scales acceptably—provided sessions are shared and the CAS server has capacity for login bursts. The CAS server becomes a hard availability dependency at login time; established sessions survive an outage, which bounds the blast radius but makes cold-start traffic after an outage a synchronization point worth load-testing.
Failure modes to instrument and alert on.
X-Forwarded-* / TLS termination mismatch → infinite redirect or ticket validation rejection. Most frequent misconfiguration.phpCAS calling exit outside Laravel's exception handler → silent failures that never reach logs. Add explicit logging around the auth path. The v5.1.0 type widening slightly increases exposure here for proxy-mode callers, since malformed arguments now reach phpCAS instead of failing fast at the wrapper boundary.Ramp-up. Low for any Laravel developer to use the facade and middleware—an afternoon. Moderate to debug: CAS ticket validation and service-URL encoding require reading the protocol, not just the package. The underestimated effort is not the package at all; it is user provisioning, attribute mapping, and session topology, which typically dwarf integration time.
Recommendation. Viable for a constrained case—an existing CAS estate, a session-based Laravel app, and a team willing to fork and own the wrapper. v5.1.0 does not change the recommendation: it is a targeted proxy-mode signature fix that improves upstream alignment but does not constitute a maintenance guarantee, and it is a no-op for SSO-only consumers. Keep the archived/maintenance question in front of security and architecture as an explicit accepted risk with a named owner and a fork plan, refreshed with the current repository status rather than the status quoted here. If CAS is not a hard organizational mandate, evaluate OIDC/SAML alternatives before committing.
How can I help you explore Laravel packages today?