Search by

iamdigitalservices / onelogin-module-saml2-antireplay

pitbulk

There is no license information available for the latest version (1.0.1) of this package.

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

Statistics

Installs: 332

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2026-11-29 23:08 UTC

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:

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).