$ the-wire · showcase
Spring WS fixes interceptor fault handling, X.509 common name extraction
By RepoJournal · Filed · About Spring
Spring WS shipped two fixes today: interceptor fault decisions are now made per-interceptor, and X.509 certificates whose subject DN ends with the common name now authenticate correctly.
Spring WS's MessageDispatcher used to read the fault status of a response once before unwinding the interceptor chain, so an interceptor that changed the response had no effect on later interceptors; it now determines fault status per interceptor, fixing stale handleResponse/handleFault routing [1]. The default subjectDNRegex of DaoX509AuthoritiesPopulator changed from "CN=(.*?)," to "CN=(.*?)(?:,|$)", so certificates whose subject DN ends with the common name no longer fail with BadCredentialsException [2]. The skipValidationIfNoHeaderPresent property is now documented, clarifying what enabling it means on the server side for requests without a wsse:Security header [3]. PayloadRootUtils moved to org.springframework.ws.support, with a deprecated delegating class left in the old server-specific package [4]. Spring AI fixed a file descriptor leak in TextReader.get(), which passed resource streams to StreamUtils.copyToString without closing them; it now uses try-with-resources [5]. Spring LDAP removed the Shibboleth Repository [6], and normalized CRLF line endings to LF in the odm module [7].
Action items
- → Upgrade spring-ws to include the interceptor fault handling fix spring-projects/spring-ws [plan]
- → Update X.509 configs if relying on DaoX509AuthoritiesPopulator with trailing CN spring-projects/spring-ws [monitor]
- → Pull spring-ai fix for TextReader stream leak in ETL pipelines spring-projects/spring-ai [plan]
- → Check for references to removed Shibboleth repository in spring-ldap builds spring-projects/spring-ldap [immediate]
References
- [1] Determine whether the response is a fault for each interceptor ↗ spring-projects/spring-ws
- [2] Extract the common name when it ends the subject DN ↗ spring-projects/spring-ws
- [3] Document the effect of skipping WS-Security validation ↗ spring-projects/spring-ws
- [4] Move PayloadRootUtils to org.springframework.ws.support ↗ spring-projects/spring-ws
- [5] Close the resource stream in `TextReader` ↗ spring-projects/spring-ai
- [6] Remove Shibboleth Repository ↗ spring-projects/spring-ldap
- [7] Normalize line endings in odm module ↗ spring-projects/spring-ldap