Servlet Authentication Architecture :: Spring Security
이용되는 주요 인터페이스들은 다음과 같다.
<aside>
SecurityContextHolder - The SecurityContextHolder
is where Spring Security stores the details of who is authenticated. - 인증받은 사용자들의 상태 관리를 위한 저장소
SecurityContext - is obtained from the SecurityContextHolder
and contains the Authentication
of the currently authenticated user. - 현재 인증된 사용자의 인증정보를 담고 있다. 컨텍스트라 불리는건 멀티쓰레딩 환경을 염두에 둔 것임.
Authentication - Can be the input to AuthenticationManager
to provide the credentials a user has provided to authenticate or the current user from the SecurityContext
. - 인증 정보를 래핑한 객체, 인증이 필요한 순간에 매니저객체에 전달되어 사용될 수 있음.
GrantedAuthority - An authority that is granted to the principal on the Authentication
(i.e. roles, scopes, etc.) - 인증된 사용자에게 부여된 권한들을 래핑한 객체
AuthenticationManager - the API that defines how Spring Security’s Filters perform authentication. - 스프링 시큐리티의 필터들이 인증이라는 기능을 수행하기 위해 정의된 로직들이 담긴 API로, 개발자가 사용할 수도 있음.
ProviderManager - the most common implementation of AuthenticationManager
. -위의 인증 매니저의 가장 대표적인 구현체
AuthenticationProvider - used by ProviderManager
to perform a specific type of authentication. - 위의 ProviderManager가 여러 인증 방식을 지원하기 위해 전략패턴을 사용하는데, 이때 각각의 전략을 제공하는 객체
Request Credentials with AuthenticationEntryPoint
- used for requesting credentials from a client (i.e. redirecting to a log in page, sending a WWW-Authenticate
response, etc.) - 클라이언트가 자격증명(credentials)를 위해 사용하는 객체.. (잘 모르겠다.)
AbstractAuthenticationProcessingFilter - a base Filter
used for authentication. This also gives a good idea of the high level flow of authentication and how pieces work together. - 인증에 사용하는 가장 기본적인 필터
</aside>
스프링 시큐리티의 인증시스템에서 가장 핵심이 되는 객체이다. 내부에 SecurityContext
를 담고 있다.