spring-projects / spring-projects/spring-security

Classes not cached in CDS/AOT becaue of "Failed verification"

Open
#17,989 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.