SAML IDP POST to /saml_login url returns 400 response

Issue

You have configured SAML Authentication in AEM and after logging in to the IDP you get a 400 response from AEM during the SAML POST to /saml_login or /content/saml_login (or other URL configured for the iDP to post back to).

The problem only happens when authenticating via the dispatcher enabled URL.

In the dispatcher.log, you find this text:

Filter rejects: POST

Cause

The dispatcher /filter section has to allow POST requests to */saml_login.

Resolution

Add the following rule to the dispatcher farm configuration (.any files) /filter section:

/0100 { /method "POST" /url "*/saml_login" }