mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
3cefb01d71 moved PHP sessions to Redis by pointing session.save_path at
redis-central. SuiteCRM's own core_services.yaml wraps a
NativeFileSessionHandler around '%session.save_path%', and that handler
forces session.save_handler back to files and treats the Redis URL as a
directory ("is_dir(): Unable to find the wrapper "tcp""). Symfony's session
was empty on every request, so every POST /api/graphql answered 403
"Invalid CSRF token", the SPA logged the user out right after the SAML login
and the biber logout spec failed with "session was lost before the logout
attempt" (SuiteCRM#0 on PR #869, reproduced on main locally).
core_services.yaml is imported after every extension service file, so the
core handler cannot be redefined there. An extension packages file now
points framework.session at our own handler and storage factory, which wrap
PHP's built-in SessionHandler and therefore use phpredis from php.ini, with
its locking, for Symfony and the legacy app alike.
The entrypoint rebuilds the prod cache when an extension config is newer
than it, so an existing installation picks the wiring up instead of keeping
the compiled container.
Verified with a local compose deploy of variant 0: on main the SAML logout
spec failed with the 403 sequence above; after a mode=update redeploy the
cache was rebuilt, all three SAML specs passed, and the prod log shows no
tcp-wrapper warning or CSRF failure after the rebuild.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
30 lines
949 B
YAML
30 lines
949 B
YAML
---
|
|
framework:
|
|
session:
|
|
storage_factory_id: infinito.session.storage.factory.php_handler
|
|
handler_id: infinito.session.handler.php_handler
|
|
|
|
services:
|
|
infinito.session.handler.php_native:
|
|
class: SessionHandler
|
|
|
|
infinito.session.metadata_bag:
|
|
class: Symfony\Component\HttpFoundation\Session\Storage\MetadataBag
|
|
arguments:
|
|
- "%session.metadata.storage_key%"
|
|
- "%session.metadata.update_threshold%"
|
|
|
|
infinito.session.handler.php_handler:
|
|
class: App\Security\Session\LegacyBridgeSessionHandler
|
|
arguments:
|
|
- "@infinito.session.handler.php_native"
|
|
- "@App\\Engine\\LegacyHandler\\DefaultLegacyHandler"
|
|
|
|
infinito.session.storage.factory.php_handler:
|
|
class: App\Security\Session\LegacyBridgeSessionStorageFactory
|
|
arguments:
|
|
- "@App\\Engine\\LegacyHandler\\DefaultLegacyHandler"
|
|
- "@infinito.session.handler.php_handler"
|
|
- "@infinito.session.metadata_bag"
|
|
- "false"
|