Skip to content

Add XML configuration guidance to authorizeRequests deprecation warning#19267

Open
s-chan-o wants to merge 1 commit into
spring-projects:6.5.xfrom
s-chan-o:fix/17259-xml-authorizeRequests-deprecation-warning
Open

Add XML configuration guidance to authorizeRequests deprecation warning#19267
s-chan-o wants to merge 1 commit into
spring-projects:6.5.xfrom
s-chan-o:fix/17259-xml-authorizeRequests-deprecation-warning

Conversation

@s-chan-o
Copy link
Copy Markdown

@s-chan-o s-chan-o commented Jun 4, 2026

Problem

When using XML configuration with <intercept-url>, Spring Security internally registers a FilterSecurityInterceptor, which triggers the authorizeRequests deprecation warning in DefaultFilterChainValidator. However, the previous warning message provided no actionable guidance for XML users:

Usage of authorizeRequests is deprecated. Please use authorizeHttpRequests in the configuration

XML users cannot directly replace <intercept-url> with authorizeHttpRequests() — they need to add use-authorization-manager="true" to their <http> element. Without this guidance, the warning is confusing and leaves XML users with no clear path forward.

Fix

Added XML-specific guidance to the deprecation warning message:

Usage of authorizeRequests is deprecated. Please use authorizeHttpRequests in the configuration.
If you are using XML configuration with <intercept-url>, add use-authorization-manager="true" to your <http> element.

Testing

Added validateWhenOnlyFilterSecurityInterceptorThenWarnWithXmlGuidance() to DefaultFilterChainValidatorTests to verify the updated warning message.

Closes gh-17259

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 4, 2026
When using XML configuration with <intercept-url>, Spring Security
internally registers a FilterSecurityInterceptor, which triggers
the authorizeRequests deprecation warning. However, the warning
message previously provided no actionable guidance for XML users.

This commit adds a note to the deprecation warning indicating that
XML users should add use-authorization-manager="true" to their
<http> element to migrate to the modern authorization model.

Closes spring-projectsgh-17259

Signed-off-by: seungchan <s24041@gsm.hs.kr>
@s-chan-o s-chan-o force-pushed the fix/17259-xml-authorizeRequests-deprecation-warning branch from 3f87240 to fb95239 Compare June 4, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants