Understanding SAML Binding Methods
SAML supports multiple binding methods to transfer messages between IdP and SP. This page outlines the differences between the major types and when to use each.
๐ What is a Binding?
A binding in SAML refers to the transport mechanism used to send SAML messages like requests and responses between parties, typically over HTTP.
Common Types
- ๐ HTTP-Redirect: Encodes the message in the URL query string via a GET request.
- ๐ HTTP-POST: Sends the message in a form field via POST.
- ๐ HTTP-Artifact: Sends only a reference ID, then retrieves the actual message via a separate back-channel request.
๐ HTTP-Redirect Binding
Often used for sending SAMLRequest or LogoutRequest. It is lightweight but has limitations due to URL length.
Features & Considerations
- โ ๏ธ Sends data as a GET request in the URL query string.
- โ ๏ธ Message is Deflate-compressed and Base64-encoded.
- โ ๏ธ URL length limitations can cause issues with large messages.
- โ ๏ธ Digital signatures are included as query parameters.
๐ฎ HTTP-POST Binding
The most common method, used for larger messages and SAML Responses. Relies on HTML form submissions.
Features & Considerations
- โ Message is sent in an HTML form via POST.
- โ Base64-encoded SAML data goes in a hidden form field.
- โ No significant size limit; suitable for signed responses.
- โ Requires JavaScript auto-submit to trigger POST.
๐งฉ HTTP-Artifact Binding
The Artifact method only sends a reference (artifact) via the browser, and the full message is retrieved later using back-channel communication.
Features & Usage
- ๐ Browser sends a short โartifactโ ID to the SP.
- ๐ SP uses SOAP-based ArtifactResolve to get the full assertion from the IdP.
- ๐ Offers better control over message delivery but is more complex.
- ๐ Used in high-security environments that require strict transmission control.
๐ Comparison & Use Cases
Summary Table
- ๐ Redirect: Lightweight and simple; good for SAMLRequest.
- ๐ POST: Most commonly used for SAMLResponse and signed data.
- ๐ Artifact: Highly secure but complex to implement (requires SOAP support).