spring-projects / spring-projects/spring-security
Classes not cached in CDS/AOT becaue of "Failed verification"
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Describe the bug
I am currently trying out class caching via CDS/AOT not with Java 25 and I stumbled over some warnings regarding Spring Security:
[13.777s][warning][cds] Preload Warning: Verification failed for org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer$JwtConfigurer
[13.786s][warning][cds] Preload Warning: Verification failed for org.springframework.security.config.annotation.web.configurers.oauth2.client.OAuth2ClientConfigurer
[13.786s][warning][cds] Preload Warning: Verification failed for org.springframework.security.config.annotation.web.configurers.oauth2.client.OAuth2LoginConfigurer
[13.787s][warning][cds] Preload Warning: Verification failed for org.springframework.security.config.annotation.web.configurers.saml2.Saml2MetadataConfigurer
[13.787s][warning][cds] Preload Warning: Verification failed for org.springframework.security.config.annotation.web.configurers.saml2.Saml2LogoutConfigurer
[13.787s][warning][cds] Preload Warning: Verification failed for org.springframework.security.config.annotation.web.configurers.saml2.Saml2LoginConfigurer
[13.806s][warning][cds] Preload Warning: Verification failed for org.springframework.security.config.annotation.authentication.configurers.ldap.LdapAuthenticationProviderConfigurer
…
[14.469s][warning][cds] Skipping org/springframework/security/config/annotation/web/configurers/saml2/Saml2MetadataConfigurer: Failed verification
[14.470s][warning][cds] Skipping org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurer: Failed verification
[14.473s][warning][cds] Skipping org/springframework/security/config/annotation/web/configurers/oauth2/server/resource/OAuth2ResourceServerConfigurer$JwtConfigurer: Failed verification
[14.477s][warning][cds] Skipping org/springframework/security/config/annotation/web/configurers/saml2/Saml2LogoutConfigurer: Failed verification
[14.477s][warning][cds] Skipping org/springframework/security/config/annotation/web/configurers/saml2/Saml2LoginConfigurer: Failed verification
[14.479s][warning][cds] Skipping org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2ClientConfigurer: Failed verification
[14.482s][warning][cds] Skipping org/springframework/security/config/annotation/authentication/configurers/ldap/LdapAuthenticationProviderConfigurer: Failed verification
To be honest I have no clue where this comes from, Google didn't bring up any usable result for me. I just assume that it would be beneficial for the cache if all classes would be loaded. What sticks out is that these are all Configurer classes.
To Reproduce
In an application using spring-security try to create a CDS cache according to the docs. If that isn't enough I have to check how to add spring-security to the Pet Clinic.
Expected behavior
No warnings during cache creation
Sample
No sample yet
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Spring Boot CDS/AOT documentation linked in the issue and reproduce the warnings in an application using Spring Security. Compare the listed Configurer classes during cache creation, then identify why verification fails and confirm the fix by creating the cache without those warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- build-system, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100