What does the SAMLart value in the SAML HTTP-Artifact binding contain, and how is the real message fetched?
answer
- a reference, not the message
- the browser carries a handle only
- two bytes of type, two of index
- SourceID and MessageHandle, twenty bytes each
- ArtifactResolve over the back channel
basics
~20 sSAMLart carries a short base64 reference, not the message: a TypeCode, an EndpointIndex, a 20-byte SourceID and a 20-byte MessageHandle. The recipient redeems it by sending ArtifactResolve to the issuer over a back channel and receiving ArtifactResponse.
solid answer
~40 sOn `urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact` the browser carries only a handle. The `SAMLart` parameter — a query parameter or a form control — holds `B64(TypeCode EndpointIndex RemainingArtifact)`. For type `urn:oasis:names:tc:SAML:2.0:artifact-04`, `TypeCode := 0x0004`, the `EndpointIndex` selects which of the issuer's artifact resolution endpoints to call, and `RemainingArtifact` is a 20-byte `SourceID` — the SHA-1 of the issuer's identification URL — followed by a 20-byte `MessageHandle` drawn from a strong random sequence of at least 16 bytes. The recipient decodes it, locates the issuer, and sends a `<samlp:ArtifactResolve>` over the synchronous SOAP binding; the issuer answers with an `<ArtifactResponse>` wrapping the real message. The message therefore never passes through the browser at all.
code
pseudocode · 7 linesSAML_artifact := B64(TypeCode EndpointIndex RemainingArtifact)
TypeCode = 0x0004 // 2 bytes, urn:...:SAML:2.0:artifact-04
EndpointIndex = 0x0000 // 2 bytes, which resolution endpoint
RemainingArtifact = SourceID MessageHandle
SourceID = 20 bytes // SHA-1 of the issuer's identification URL
MessageHandle = 20 bytes // from a strong random sequence, >= 16 bytesgo deeper
Recognise SAMLart on a URL and know it is a reference, not the message. Something else must fetch the real document before anything can be validated.
Name the four parts of the handle and describe the resolution exchange: ArtifactResolve out over a direct connection, ArtifactResponse back wrapping the real message.
Show you can place the failure: the front channel completed, the browser has nothing to show, and the fault is a back-channel connection, a firewall rule or an already-redeemed handle.
The trade is whether keeping messages out of the user agent is worth an availability dependency on a direct connection between organisations you do not jointly operate.
## A reference instead of a document The HTTP-POST and HTTP-Redirect bindings both put the whole SAML message into the user agent. The HTTP-Artifact binding, `urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact`, does not. It hands the browser a short, opaque handle called an **artifact**, carried in a parameter named `SAMLart` — as a query parameter when the sender redirects, or as a form control when it posts. The recipient then goes and collects the actual message itself, over a direct connection the browser plays no part in. That single change of shape is what the binding is for. The message is never exposed to the user agent, never logged by an intermediary that records URLs, and never subject to a length ceiling, because the thing on the wire in front of the user is a fixed-size handle. ## What is inside the artifact The artifact's structure is defined as: ``` SAML_artifact := B64(TypeCode EndpointIndex RemainingArtifact) ``` For the type this branch cares about, `urn:oasis:names:tc:SAML:2.0:artifact-04`: - **`TypeCode := 0x0004`**, two bytes, naming the artifact format so the recipient knows how to read the rest. - **`EndpointIndex`**, two bytes, selecting which of the issuer's artifact resolution endpoints the recipient should call. A party that publishes several endpoints distinguishes them this way. - **`RemainingArtifact`**, which for this type is two 20-byte fields: - **`SourceID`** — the SHA-1 of the issuer's identification URL. It identifies *who* to ask, without spelling out a URL in the handle. - **`MessageHandle`** — 20 bytes taken from a cryptographically strong random sequence of at least 16 bytes. It identifies *which* message to ask for, and being unguessable is the whole of its security value. So the handle answers two questions and carries no content: which party holds the message, and which message it is. ## Redeeming it The recipient decodes the artifact, resolves `SourceID` and `EndpointIndex` to the issuer's artifact resolution endpoint, and sends a `<samlp:ArtifactResolve>` containing the artifact. That exchange runs on the synchronous SOAP binding, `urn:oasis:names:tc:SAML:2.0:bindings:SOAP` — a direct server-to-server request, not something the browser mediates. The issuer replies with an `<ArtifactResponse>` that wraps the real protocol message. Two consequences follow immediately: 1. **The back channel authenticates the parties to each other directly.** The requester is talking to the issuer's endpoint over its own connection, rather than believing something a browser handed it. 2. **An artifact is single-use.** An issuer that has resolved one does not resolve it again, so a URL captured from a browser's history or a proxy log redeems nothing when replayed. ## What it buys and what it costs | | HTTP-POST | HTTP-Artifact | |---|---|---| | What the browser carries | the whole base64 message | a fixed-size handle | | Round trips | one | two — the front-channel hop plus the resolution exchange | | Exposure to intermediaries | the message passes through the user agent | only the handle does | | Requires direct reachability | no | yes — the recipient must reach the issuer's endpoint | | Length pressure | none in practice | none | The cost is concentrated in that fourth row. HTTP-POST and HTTP-Redirect work between two parties that have no network path to each other at all, which is precisely why the Web Browser SSO profile leans on them. HTTP-Artifact needs an outbound connection from the recipient to the issuer, which means firewall rules, a reachable endpoint on both sides of an organisational boundary, and an availability dependency: if the resolution endpoint is down, the login fails at a point where the front channel already looked successful. ## Where it still appears It is the least-used of the three browser-facing bindings, and a candidate who has never met it is not deficient. It turns up where an organisation has decided the message must not traverse the user agent, where an intermediary logs full URLs and that is unacceptable, or where an existing integration predates a decision to standardise on POST. Recognising `SAMLart` on a URL and knowing that a second, invisible exchange must follow is the level of familiarity the material genuinely demands. The diagnostic signature is distinctive: the front channel completes, the user's browser lands on the recipient, and then the login fails with nothing in the browser to look at — because the failure happened on a connection the browser never saw.
- What does HTTP-Artifact give you that HTTP-POST does not?The message never passes through the user agent, so it is not exposed to the browser or to anything that logs URLs, and the recipient collects it over a direct connection to the issuer rather than trusting what a browser delivered.
- When can this binding not be used at all?When the recipient cannot open a direct connection to the issuer's artifact resolution endpoint — a closed partner network, no outbound path, no mutually reachable address. The front-channel bindings exist precisely because that situation is normal between organisations.
- What does the EndpointIndex select, and why is it in the artifact?It names which of the issuer's artifact resolution endpoints to send `<samlp:ArtifactResolve>` to, in two bytes. Putting it in the handle lets a party operate several endpoints while the handle itself stays fixed-size and opaque.
The browser carries a locker number rather than the drawing. The recipient reads the number, walks to the issuer's counter itself, and collects the document over a route the courier never sees.
saying these in an interview costs you the question
- Says the artifact is the assertion in a shortened form
- Thinks artifact resolution happens through the user's browser
- Believes a captured artifact URL can be replayed repeatedly
- Assumes artifact works wherever POST works
- Treats the random handle alone as identifying the issuer