Skip to content

Documentation on Authentication and JPA #14385

Open
@Crain-32

Description

@Crain-32

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: docsAn issue in Documentation or samplestype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions