iamdigitalservices / onelogin-module-saml2-antireplay
Extension of onelogin-module-saml2 or onelogin-module-saml2-extend that adds support to prevent Replay Attacks. Implemented by Sixto Martin
Package info
github.com/pitbulk/magento-saml-antireplay
Type:magento2-module
pkg:composer/iamdigitalservices/onelogin-module-saml2-antireplay
Requires
- php: ~5.6.0|~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0|~8.0.0|~8.1.0|~8.2.0|~8.3.0|~8.4.0|~8.5.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-30 01:08:03 UTC
README
SAML Extension for Magento2 which adds support to prevent Replay Attacks
Every SAMLResponse accepted by the SAML extension has its Assertion ID stored; an Assertion ID that was already processed is rejected, so a captured SAMLResponse can not be posted again (replay). It covers the customer SSO and, with the onelogin-module-saml2-extend extension, the admin SSO.
Compatible with PHP 7.3 to 8.5 (tested with Magento 2.4.9 and PHP 8.5).
It requires any of the following magento extensions:
- https://commercemarketplace.adobe.com/sixtomartin-onelogin-module-saml2.html (requires version >= 1.11.0)
- https://commercemarketplace.adobe.com/sixtomartin-onelogin-module-saml2-extend.html (requires version >= 1.11.0)
In order to install it via composer, execute:
composer require iamdigitalservices/onelogin-module-saml2-antireplay
Then execute:
php bin/magento cache:clean
php bin/magento module:enable Pitbulk_Antireplay
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Time to time, execute the Magento CLI command to truncate the table that stores the Assertion IDs with:
php bin/magento antireplay:clean-assertions
An assertion is only valid for a few minutes, so instead of removing all of them, code can remove only the old ones with Pitbulk\Antireplay\Api\AssertionRepositoryInterface::deleteExpired($maxAgeSeconds) (one day by default).