Skip to content

SAML2 autoconfiguration is not imported by @WebMvcTest #45636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gbaso opened this issue May 21, 2025 · 1 comment
Closed

SAML2 autoconfiguration is not imported by @WebMvcTest #45636

gbaso opened this issue May 21, 2025 · 1 comment
Labels
status: superseded An issue that has been superseded by another type: bug A general bug

Comments

@gbaso
Copy link

gbaso commented May 21, 2025

I have an application configured with both OIDC and SAML2 authentication. When creating a test slice with @WebMvcTest the spring security configuration for OIDC is imported, while the configuration for SAML2 is not, therefore the tests don't work as expected.

The AutoConfigureMockMvc import list has org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration, but org.springframework.boot.autoconfigure.security.saml2.Saml2RelyingPartyAutoConfiguration is missing.

minimal sample: https://github.com/gbaso/web-mvc-test-saml2

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 21, 2025
@snicoll snicoll changed the title SAML2 autoconfiguration is not imported by @WebMvcTest SAML2 autoconfiguration is not imported by @WebMvcTest May 22, 2025
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 23, 2025
@wilkinsona wilkinsona added this to the 3.4.x milestone May 23, 2025
@snicoll
Copy link
Member

snicoll commented May 25, 2025

Closing in favor of PR #45650. Thanks @nosan!

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2025
@snicoll snicoll added the status: superseded An issue that has been superseded by another label May 25, 2025
@snicoll snicoll removed this from the 3.4.x milestone May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants