Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.3k stars 1.96k forks source link

[FEATURE REQ] Update AadWebApplicationHttpSecurityConfigurer to work with spring-security 7.x #41302

Open davidptwong opened 1 month ago

davidptwong commented 1 month ago

I am using spring-cloud-azure-starter-active-directory 5.14.0

For configuration, I used the AadWebApplicationHttpSecurityConfigurer as

https://learn.microsoft.com/en-gb/azure/developer/java/spring-framework/spring-boot-starter-for-azure-active-directory-developer-guide?tabs=SpringCloudAzure5x#tabpanel_1_SpringCloudAzure5x

spring-security had marked the apply() that accepted SecurityConfigurerAdapter was deprecated since 6.2 and will be removed in 7. https://github.com/spring-projects/spring-security/blob/e2f98dbc314af53e699d516928d4948682ec0d47/config/src/main/java/org/springframework/security/config/annotation/AbstractConfiguredSecurityBuilder.java#L122

The current version of AadWebApplicationHttpSecurityConfigurer was extends from SecurityConfigurerAdapter but the new version expect it extends from SecurityConfigure.

github-actions[bot] commented 1 month ago

@moarychan @netyyyy @rujche @saragluna

github-actions[bot] commented 1 month ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.