스프링 시큐리티/스프링 시큐리티 주요 아키텍처 이해

이 글은 정수원님의 Infrean 강의를 학습한 내용을 정리하여 작성합니다. 인증 관리자: AuthenticationManager AuthenticatonProvider 목록 중에서 인증 처리 요건에 맞는 AuthenticationProvicer를 찾아 인증처리를 위임한다. 만약 사용자가 Form 인증 방식으로 로그인 했을 경우 ProviderManager가 Authentication 객체를 받은 뒤 Form 인증 방식을 처리 할 수 있는 Dao AuthenticationProvider에게 전달해 인증 처리를 위임한다. Form 인증이 아닌 RememberMe 인증 방식으로 로그인 한 경우 RememberMe AuthenticationProvider에게 인증 처리를 위임한다. 만약 사용자가 Oauth 인..
이 글은 정수원님의 Infrean 강의를 학습한 내용을 정리하여 작성합니다. 인증 흐름 이해 - AuthenticationFlow 클라이언트가 로그인을 요청한다. UsernamePasswordAuthenticationFilter (form 인증 방식에서 작동)가 사용자의 로그인 요청 정보를 받아 Authentication 객체를 생성한다. 사용자가 로그인 시 입력한 아이디, 패스워드 정보를 Authentication 객체에 담는다. AuthenticationManager 클래스에게 인증 처리를 맡긴다. 이때 생성한 Authentication 객체를 함께 전달한다. AuthenticationManager는 Authentication을 받는다. AuthenticationManager는 다음 작업을 수행한다...
이 글은 정수원님의 Infrean 강의를 학습한 내용을 정리하여 작성합니다. 인증 저장소 필터 - SecurityContextPersistenceFilter SecurityContext 객체의 생성, 저장, 조회 익명 사용자 새로운 SecurityContext 객체를 생성해 SecurityContextHolder에 저장 AnonymousAuthenticationFilter에서 AnonymousAuthenticationToken 객체를 SecurityContext에 저장 인증 시 새로운 SecurityContext 객체를 생성해 SecurityContextHolder에 저장 UsernamePasswordAuthenticationFilter에서 인증 성공 후 SecurityContext에 UsernamePa..
이 글은 정수원님의 Infrean 강의를 학습한 내용을 정리하여 작성합니다. 인증 저장소 - SecurityContextHolder, SecurityContext SecurityContext Authentication 객체가 저장되는 보관소로 필요 시 언제든 Authentication 객체를 꺼내어 쓸 수 있도록 제공되는 클래스이다. ThreadLocal에 저장되어 아무 곳에서나 참조가 가능하도록 설계한다. 인증이 완료된면 HttpSession에 저장되어 어플리케이션 전반에 걸쳐 전역적인 참조가 가능하다. SecurityContextHolder SecurityContext 객체 저장 방식 MODE_THREADLOCAL 스레드당 SecurityContext 객체를 할당, 기본값 MODE_INHERITABL..
개발자가 될 사람
'스프링 시큐리티/스프링 시큐리티 주요 아키텍처 이해' 카테고리의 글 목록 (2 Page)