Skip to content

Commit 29264e9

Browse files
committed
Fix ISamlSigninStateStore rationale: cookies work fine in load-balanced envs, correct reasons are size limits, client exposure, and auditability
1 parent 78f029f commit 29264e9

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

astro/src/content/docs/identityserver/saml/extensibility.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,9 @@ login UI and back, the original request context (SP entity ID, ACS URL, relay st
443443
be stored somewhere durable for the duration of the interaction.
444444

445445
The default implementation stores state in a browser cookie. Override this interface to store
446-
state in a distributed cache or database. This is particularly important in load-balanced
447-
environments where the callback may be handled by a different server than the one that received
448-
the original request, or when you need longer TTLs than a cookie allows.
446+
state in a server-side store (distributed cache or database) instead. This is useful when the
447+
sign-in state is too large for a cookie (even with chunking), when you want to avoid exposing
448+
state data to the client, or when you need server-side auditability of in-flight SSO requests.
449449

450450
State is retained after a successful callback to allow browser retries (e.g., if the user
451451
navigates back). TTL-based expiry is the primary cleanup mechanism; `RemoveSigninRequestStateAsync`
@@ -464,10 +464,9 @@ public interface ISamlSigninStateStore
464464

465465
Override `ISamlSigninStateStore` when:
466466

467-
* Your deployment is load-balanced and cookie-based state is not reliably available across nodes.
468-
* You need a longer TTL for sign-in state than a browser cookie allows.
469-
* You want to store sign-in state in a centralized store (Redis, SQL, etc.) for auditability or
470-
operational visibility.
467+
* The sign-in state exceeds cookie size limits (even with chunking) for your deployment.
468+
* You prefer not to expose sign-in state to the client browser (security or compliance reasons).
469+
* You want server-side visibility into in-flight SSO requests for auditing or operational monitoring.
471470

472471
### Registration
473472

0 commit comments

Comments
 (0)