TIL

Servlet Authentication Architecture

스프링 시큐리티 주요 아키텍처 컴포넌트

SecurityContextHolder

SecurityContext

Authentication

GrantedAuthority

AuthenticationManager

ProviderManager

ProviderFoundException이 발생했다는 뜻은 넘겨진 Authentication 유형을 지원하는 ProviderManager가 설정되지 않았다는 것이다.

img.png

애플리케이션에서 사용자 객체를 캐싱하는 경우 Authentication이 credential을 지워버린다면 캐시된 값으로는 더 이상 인증할 수 없다. 따라서 캐시를 사용한다면 이를 고려하여 구현해야 한다. 객체의 복사본을 만들거나 ProviderManagereraseCredentialsAfterAuthentication 프로퍼티를 비활성화시켜도 된다.

AuthenticationProvider

Request Credentials with AuthenticationEntryPoint

AbstractAuthenticationProcessingFilter