ae/oneloginsaml-bundle
Symfony bundle wrapping OneLogin’s PHP SAML toolkit to add SAML 2.0 SSO/SLO to your app. Configure IdP/SP metadata via YAML, expose ACS/logout/metadata endpoints, and integrate with Symfony security firewalls for authentication flows.
onelogin/php-saml library, ensuring compatibility with standard SAML 2.0 protocols. This aligns well with Symfony-based applications requiring Identity Provider (IdP) integration (e.g., OneLogin, Okta, Azure AD).symfony/console, symfony/http-foundation), but Laravel lacks native bundle support. A wrapper or facade layer would be required to abstract Symfony-specific components (e.g., AppKernel, YAML config).onelogin/php-saml (PHP 7.2+ compatible) is mature but requires PHP extensions (openssl, curl, mbstring).HttpFoundation, DependencyInjection) can be polyfilled in Laravel via symfony/http-client or symfony/dependency-injection..env) would simplify adoption.routing.yml vs. Laravel’s routes/web.php. SAML endpoints (ACS, SLO) would need manual route registration.EventDispatcherInterface) is absent in Laravel. A custom event bus or laravel-events package could bridge this gap.shibboleth/sp or onelogin/php-saml directly with a Laravel wrapper.Container/EventDispatcher integrate with Laravel’s ServiceProvider/Events?onelogin/php-saml library?janitzio/laravel-saml) with lower integration risk?symfony/http-client (for HTTP bindings).symfony/dependency-injection (for config management).spatie/laravel-ignition (for error handling during SAML flows).onelogin/php-saml directly with a custom Laravel facade.janitzio/laravel-saml, league/oauth2-server).Auth::loginUsingId($samlUser)).| Symfony Component | Laravel Equivalent | Notes |
|---|---|---|
AppKernel |
ServiceProvider |
Register bundle via register() |
routing.yml |
routes/web.php |
Manual route definitions for /saml/* |
EventDispatcher |
Illuminate\Events\Dispatcher |
Use event(new \Symfony\Event\...) |
| YAML Config | .env + config/services.php |
Transform YAML to Laravel config |
onelogin/php-saml must support PHP 8.1+ (check for strict_types compatibility).session driver must support SAML’s session storage (e.g., file or database).openssl, curl).ServiceProvider wrapping onelogin/php-saml.SamlMiddleware).onelogin/php-saml for CVEs (e.g., SAML signature validation flaws). Plan quarterly updates.entityId, certificates) may change. Automate validation via CI (e.g., php-saml’s validateMetadata).composer’s platform-check to enforce PHP/Laravel version alignment.saml.auth.attempt, saml.logout.failed) using Laravel’s Log facade.x509cert in config and IdP metadata.AssertionConsumerService URL bindings (HTTP-POST vs. HTTP-Redirect).onelogin/php-saml’s debugEnable for verbose logging.onelogin/php-saml issues, engage the community via GitHub issues or OneLogin support (if using their IdP).SimpleXML or ExtXML extensions.| Failure Scenario | Impact | Mitigation Strategy |
|---|---|---|
| IdP Unavailable | Users blocked from SSO | Implement fallback auth (e.g., local DB login). |
| Certificate Expiry | SAML validation fails | Automate certificate renewal alerts. |
| Malformed SAML Response | Security vulnerability | Validate assertions server-side (e.g., spverify in onelogin/php-saml). |
| Session Timeout During SAML |
How can I help you explore Laravel packages today?