SAML Assertion Consumer Service (ACS): configure and validate the response endpoint
Set the public ACS URL and binding, validate SAML response targeting and correlation, and troubleshoot proxy or multi-endpoint mismatches.
SAML Assertion Consumer Service (ACS): configure and validate the response endpoint
A SAML Assertion Consumer Service (ACS) is the Service Provider (SP) protocol endpoint that receives an Identity Provider (IdP) SAML Response. Register the correct public URL and binding in metadata, then validate the response destination, bearer recipient, and request correlation before creating a local session. A public ACS URL does not make received XML safe to accept as a login.
Configure the ACS
Declare AssertionConsumerService under the SP metadata SPSSODescriptor. It can include Location, Binding, and index or isDefault for selecting among endpoints. Exchange metadata with the IdP and agree which endpoint it will use. HTTP-POST is common for browser SSO, but select a binding both parties support and register.
Use an HTTPS public URL that matches the deployed external scheme, host, port, and path. Behind a reverse proxy, ensure metadata uses the external URL, not an internal address.
Keep endpoint binding consistent with the response transport.
If there are multiple ACS endpoints, configure default/index explicitly. Accept a request's `AssertionConsumerServiceURL` or index only when it selects a registered endpoint.
Separate test and production endpoint URLs and entity IDs.
Validate a response at the ACS
Compare the actual request URL with registered metadata. If `Response.Destination` is present, validate it under the selected profile.
Validate the IdP issuer and response/assertion signatures using preconfigured trust keys and profile rules. Do not trust an arbitrary certificate supplied inside the response.
For bearer confirmation, require `SubjectConfirmationData.Recipient` to match the ACS URL that received the response, and check `NotOnOrAfter` with the allowed clock skew.
For SP-initiated SSO, match `InResponseTo` to the stored `AuthnRequest` for this browser transaction. For unsolicited IdP-initiated responses, follow the profile rule: `InResponseTo` must be absent, and assess the added risk and controls separately.
Confirm the assertion audience includes the SP entity ID. Store used Response/Assertion IDs and reject replays.
Create an RP session only from the validated result. Map NameID and attributes under the IdP–SP agreement; do not automatically redirect to an arbitrary XML URL or `RelayState` value.
Proxy and multiple-endpoint failures
| Symptom | Check |
|---|---|
| IdP gets 404 when posting | ACS Location, external path rewrite, and HTTP-POST versus other binding |
| Recipient/Destination mismatch | External HTTPS URL versus internally calculated HTTP URL, port/path, trailing slash |
| IdP selects unexpected ACS | index, isDefault, request ACS URL/index, cached metadata |
| Test response reaches production URL | Separation of environment entity IDs, certificates, endpoints, and IdP connections |
| Duplicate responses are accepted | Shared replay cache for Response/Assertion IDs across app instances |
Do not disable Recipient, audience, or signature checks to fix an address mismatch. Compare the actual delivered URL on both sides and update metadata through the approved exchange process.
Safe verification plan
In a test SP and IdP, verify a normal SP-initiated login, a response to an unregistered URL, wrong Recipient, expired response, mismatched request ID, and duplicate Response ID. Confirm that only expected cases create a session. Also verify the public URL behind the proxy/load balancer. This is a proposed plan, not a test result. Do not log real user assertions.
References
[OASIS SAML V2.0 Profiles, §4.1 Web Browser SSO](https://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf)
[OASIS SAML V2.0 Metadata](https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf)
[OASIS SAML V2.0 Core](https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf)