1. Authentication 구조
- 인증 토큰(Authentication)을 제공하는 필터들
- UsernamePasswordAuthenticationFilter : 폼 로그인 -> UsernamePasswordAuthenticationToken
- RememberMeAuthenticationFilter : remember-me 쿠키 로그인 -> RememberMeAuthenticationToken
- AnonymousAuthenticationFilter : 로그인하지 않았다는 것을 인증함 -> AnonymousAuthenticationToken
- SecurityContextPersistenceFilter : 기존 로그인을 유지함(기본적으로 session 을 이용함)
- BearerTokenAuthenticationFilter : JWT 로그인
- BasicAuthenticationFilter : ajax 로그인 -> UsernamePasswordAuthenticationToken
- OAuth2LoginAuthenticationFilter : 소셜 로그인 -> OAuth2LoginAuthenticationToken, OAuth2AuthenticationToken
- OpenIDAuthenticationFilter : OpenID 로그인
- Saml2WebSsoAuthenticationFilter : SAML2 로그인
- ... 기타
- Authentication 을 제공(Provide) 하는 인증제공자는 여러개가 동시에 존재할 수 있고, 인증 방식에 따라 ProviderManager 도 복수로 존재할 수 있습니다.
2. Authentication 메커니즘
Authentication의 구현하고 있는 객체들은 Token들을 가지고 있다.
Authentication는 인증된 결과만 저장하는 것이 아닌, 인증을 하기 위한 정보와 인증을 받기 위한 정보가 동시에 존재.
인증 제공자(AuthenticationProvider)
Provider가 Authentication의 credentials를 인증을 하고 결과를 prinicpal를 담아 객체를 전달한다.
여러 인증 대상과 방식이 존재함으로 Provider도 여러개가 존재한다.
'Spring > 1-5. Spring Security' 카테고리의 다른 글
6) DaoAuthenticationManager와 UserDetailsService 사 (0) | 2023.06.11 |
---|---|
5) BasicAuthenticationFilter를 사용하여 토큰 인증 (0) | 2023.06.08 |
4) Form Login과 Logout Filter (0) | 2023.06.04 |
2. Spring Security의 Filter (0) | 2023.06.04 |
1. Spring Security 개념 (0) | 2023.06.04 |