
Configuring SAML Login with Spring Security: metadata-location and Relying Party Setup
I鈥檝e configured SAML SSO for 30+ Spring Boot applications. The setup looks simple in docs, but production always throws curveballs - certificate mismatches, signature validation failures, attribute mapping issues. Here鈥檚 what actually works. Visual Overview: sequenceDiagram participant User participant SP as Service Provider participant IdP as Identity Provider User->>SP: 1. Access Protected Resource SP->>User: 2. Redirect to IdP (SAML Request) User->>IdP: 3. SAML AuthnRequest IdP->>User: 4. Login Page User->>IdP: 5. Authenticate IdP->>User: 6. SAML Response (Assertion) User->>SP: 7. POST SAML Response SP->>SP: 8. Validate Assertion SP->>User: 9. Grant Access Clone the companion repo: Get the full working source code with Docker Compose (Keycloak as IdP), multi-IdP config, custom attribute mapping, and integration tests: github.com/IAMDevBox/spring-security-saml-example ...


