You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/plugins/sso.mdx
+135Lines changed: 135 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -707,6 +707,115 @@ mapping: {
707
707
}
708
708
```
709
709
710
+
## SAML Security
711
+
712
+
The SSO plugin includes optional security features to protect against common SAML vulnerabilities.
713
+
714
+
### AuthnRequest / InResponseTo Validation
715
+
716
+
You can enable InResponseTo validation for SP-initiated SAML flows. When enabled, the plugin tracks AuthnRequest IDs and validates the `InResponseTo` attribute in SAML responses. This prevents:
717
+
718
+
-**Unsolicited responses**: Responses not triggered by a legitimate login request
719
+
-**Replay attacks**: Reusing old SAML responses
720
+
-**Cross-provider injection**: Responses meant for a different provider
721
+
722
+
<Callouttype="info">
723
+
This feature is **opt-in** to ensure backward compatibility. Enable it explicitly for enhanced security.
724
+
</Callout>
725
+
726
+
#### Enabling Validation (Single Instance)
727
+
728
+
For single-instance deployments, enable validation with the built-in in-memory store:
// Custom TTL for AuthnRequest validity (default: 5 minutes)
743
+
requestTTL: 10*60*1000, // 10 minutes
744
+
},
745
+
}),
746
+
],
747
+
});
748
+
```
749
+
750
+
#### Options
751
+
752
+
| Option | Type | Default | Description |
753
+
|--------|------|---------|-------------|
754
+
|`enableInResponseToValidation`|`boolean`|`false`| Enable InResponseTo validation for SP-initiated flows. |
755
+
|`allowIdpInitiated`|`boolean`|`true`| Allow IdP-initiated SSO (responses without InResponseTo). Set to `false` for stricter security. Only applies when validation is enabled. |
756
+
|`requestTTL`|`number`|`300000` (5 min) | Time-to-live for AuthnRequest records in milliseconds. Requests older than this will be rejected. |
757
+
|`authnRequestStore`|`AuthnRequestStore`| In-memory | Custom store implementation. Providing a custom store automatically enables validation. |
758
+
759
+
#### Multi-Instance Deployments (Production)
760
+
761
+
<Callouttype="warning">
762
+
For multi-instance deployments (load-balanced servers, serverless, etc.), you **must** provide a shared store like Redis. The default in-memory store only works for single-instance deployments.
763
+
</Callout>
764
+
765
+
Providing a custom `authnRequestStore` automatically enables InResponseTo validation:
0 commit comments