# SAML Replay attack

**URL:** <https://devforum.okta.com/t/saml-replay-attack/6307>\
**Category:** SAML\
**Created:** [September 18, 2019, 9:24am UTC](https://devforum.okta.com/t/saml-replay-attack/6307 "2019-09-18T09:24:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnMathew](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@JohnMathew](https://devforum.okta.com/u/JohnMathew)\
**Post date:** [September 18, 2019, 9:24am UTC](https://devforum.okta.com/t/saml-replay-attack/6307/1 "2019-09-18T09:24:42Z")

</div>

Team,

How to block **SAML Replay attack** to an OKTA integrated application.

---

<div class="post-metadata">

**Author:** ![gsvivek](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@gsvivek](https://devforum.okta.com/u/gsvivek)\
**Post date:** [September 19, 2019, 11:22am UTC](https://devforum.okta.com/t/saml-replay-attack/6307/2 "2019-09-19T11:22:26Z")

</div>

The SAML response from Okta has the IssueInstant, NotBefore and NotOnOrAfter timestamps (usually, with a difference of 5 mins). So any replay after 5 mins is automatically void, unless your app does not honor NotOnOrAfter. If you are trying to implement some custom logic to not have the SAML replayed within the 5 mins window, you can probably add a logic that checks and tracks the SessionIndex which should be unique. But I would think that’s an overkill.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 18, 2024, 12:09am UTC](https://devforum.okta.com/t/saml-replay-attack/6307/3 "2024-01-18T00:09:42Z")

</div>

Closed on January 18, 2024, 12:09am UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
