spring-projects / spring-projects/spring-security
Documentation on Authentication and JPA
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Expected Behavior
Quick Note about JPA Caching Interactions with the Authentication Chain
Current Behavior
Nothing currently noting the interaction with the EntityManager when using defaults.
Context (This is mostly Conjecture, based on Stack Traces and a lot of break point, but the Current Behavior is currect)
As the Spring Security Filter Chain is typically one of the first filters, the OpenEntityManagerInViewFilter/OpenEntityInViewInterceptor Filters are not called yet. This means if your UserDetailsService is JPA based, any DB Entity will not be associated to the JPA Persistence Context for the rest of the request. Although this behavior is preferred, it would be good to document that the Entity is unmanaged when using defaults.
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
Review the Spring Security Filter Chain, UserDetailsService, EntityManager, OpenEntityManagerInViewFilter, and OpenEntityInViewInterceptor mentioned in the issue. Verify the described default behavior before updating the relevant authentication documentation, and consider the work complete when the Entity's managed or unmanaged state and its interaction with JPA are accurately explained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication, backend, database, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100