On this page (6)
Why Shibboleth SAML and CAS callbacks trigger WAF false positives
Shibboleth Service Provider (SP) logins return from the campus Identity Provider (IdP) via a browser HTTP POST to /Shibboleth.sso/SAML2/POST containing a signed, Base64-encoded SAMLResponse XML payload. When that assertion includes campus group memberships, eduPerson affiliations, and XML signatures, the POST body routinely crosses 8 KB and contains tokens that trigger generic signature rules.
Apereo CAS uses redirect-based ticket validation on paths such as /cas/login or application callback URLs carrying ?ticket=ST-... and ?service=https://... query parameters. A strict Remote File Inclusion (RFI) rule sees a full https:// URL inside a query string and flags it as a possible attack.
Neither failure looks like a network outage in basic uptime monitors, because the homepage still returns HTTP 200. Only authenticated users hit the 403 wall after leaving the IdP.
Shibboleth and CAS failure points on CloudFront + AWS WAF
Mapping the specific SSO endpoints and headers up front eliminates guesswork during cutover.
| SSO surface | Typical failure trigger | Safe CloudFront + WAF setting |
|---|---|---|
| /Shibboleth.sso/SAML2/POST | SizeRestrictions_BODY (>8 KB SAMLResponse) or CrossSiteScripting_BODY | Disable caching; verify in Count mode and scope a path exception if flagged |
| /Shibboleth.sso/Logout, /Shibboleth.sso/SLO/* | SizeRestrictions_QUERYSTRING or GenericRFI_QUERYARGUMENTS | Bypass cache, forward query strings and session cookies, and test logout flow in Count mode |
| CAS callback (?ticket=ST-...&service=...) | GenericRFI_QUERYARGUMENTS or cached redirect responses | Forward full query strings and cookies with TTL 0; scope RFI query rule only on verified callback paths |
| 8:55 a.m. class-change login bursts | Per-IP rate limits hitting shared eduroam or dorm NAT IPs | Base rate-limit thresholds on observed campus peak traffic rather than low default caps |
CloudFront cache and header forwarding checklist for SSO
Even with a perfectly tuned WAF, a misconfigured CloudFront behavior can break SSO before the request ever reaches your application. SSO callback and login paths must never serve cached responses or strip session cookies.
Ensure CloudFront forwards the Host header (so Shibboleth SP validates the Assertion Consumer Service URL against the public hostname rather than an internal origin name), forwards all session cookies (_shibsession_*, MOD_AUTH_CAS, or CMS session cookies), and passes complete query strings to the origin with caching disabled on login and callback paths.
Verify that X-Forwarded-Proto is honored by Apache, Nginx, or your application server so Shibboleth and CAS generate https:// callback URLs rather than http:// redirects that the IdP rejects.
Count-first validation before promoting rules to Block
Never switch AWS Managed Rules directly to Block on a campus site before observing real Shibboleth or CAS logins. On WAF Cybersecurity, baseline rule groups start in Count mode for 24 hours so students, faculty, and staff authenticate normally while matches are recorded.
After the count window, the WAF Cybersecurity Advisor classifies each rule group as Promote, Hold, or Needs allowlist with path-level evidence. It does not auto-block: a human reviews any flagged /Shibboleth.sso/* or CAS callback path, applies a scoped path exception if needed, and clicks Promote. Any rule can revert to Count in one click if an IAM change later expands SAML assertion attributes.
Protecting identity privacy in edge logs
SSO traffic carries sensitive tokens: CAS service tickets in query strings, signed SAML assertions in POST bodies, and authenticated session cookies in headers. Logging raw requests creates unnecessary privacy and FERPA review risk.
WAF Cybersecurity strips and redacts query strings, request bodies, Cookie headers, and Authorization headers at the edge before WAF logs are stored in S3, and S3 security logs expire automatically after 30 days.
FAQ
Does putting CloudFront and AWS WAF in front of Shibboleth require sharing IdP signing keys?
No. CloudFront terminates public HTTPS TLS using an ACM certificate for your website hostname, while SAML assertions remain cryptographically signed between your campus IdP and your Service Provider.
Why does /Shibboleth.sso/SAML2/POST fail with HTTP 403 after enabling AWS WAF?
Signed Base64 SAML assertions frequently exceed the 8 KB body limit in SizeRestrictions_BODY or match CrossSiteScripting_BODY inside AWSManagedRulesCommonRuleSet. Starting in Count mode catches this cleanly so you can scope an exception to the ACS path.
Can CloudFront accidentally cache a CAS login redirect or ticket?
Yes, if query strings or Set-Cookie headers are ignored by the cache policy. Login and SSO callback paths should bypass cache with TTL 0 and forward Host, Cookie, and QueryString values.
What if a campus IdP adds new SAML attributes months later and starts tripping a rule?
You can revert any rule group from Block back to Count in one click from the dashboard without waiting on support, add the narrow exception, and promote again.