Framework/SpringBoot

Framework/SpringBoot

[스프링 시큐리티] WebSecurityConfigurerAdapter deprecated 대응

WebSecurityConfigurerAdapter is deprecated Spring Security 6.0 버전 기준으로 WebSecurityConfigurerAdapter를 완전 사용할 수 없게 됐다. 기존 WebSecurityConfigurerAdapter를 상속 후에, configure 메소드를 오버라이딩 하는 방식은 deprecated 됐다. 대신 개발자가 직접 component-based security 설정을 할 수 있도록 변경되었다. 즉 커스텀 할 설정들을 @Bean으로 등록하여 사용한다. HttpSecurity 설정 // 변경된 방식 (filterChain을 사용) @Configuration public class SecurityConfiguration { @Bean public Se..

Framework/SpringBoot

[스프링 시큐리티] AuthenticationManager, AuthenticationProvider

※ 이 글은 정수원님의 스프링 시큐리티 - Spring Boot 기반으로 개발하는 Spring Security 강의를 수강하면서 학습한 내용을 정리한 글입니다. 일부 강의 내용을 인용하였으며, 문제가 될 시 인용 부분을 수정 또는 삭제하겠습니다. AuthenticationManager 인증 처리하는 filter로부터 인증처리를 지시받는 첫번째 클래스. ID와 Password를 Authentication 인증 객체에 저장하고 이 객체를 AuthenticationManager에게 전달한다. 이 인증에 대해 관리를 하게 된다. AuthenticationManager 인터페이스를 실제로 구현한 것이 ProviderManager. 이 AuthenticationManager 인터페이스를 구현하면 커스텀 Provid..

Framework/SpringBoot

[스프링 시큐리티] 필터(DelegatingFilterProxy, FilterChainProxy)

※ 이 글은 정수원님의 스프링 시큐리티 - Spring Boot 기반으로 개발하는 Spring Security 강의를 수강하면서 학습한 내용을 정리한 글입니다. 일부 강의 내용을 인용하였으며, 문제가 될 시 인용 부분을 수정 또는 삭제하겠습니다. 필터 WAS에서 실행된 요청이 오면 이 요청이 서블릿으로 들어오는데, 서블릿에 들어오기 전에 처리를 하는 것이 필터. 필터의 흐름 HTTP 요청 -> WAS -> 필터 -> 서블릿 -> 컨트롤러 필터 체인 HTTP 요청 -> WAS -> 필터 1 -> 필터 2 -> 필터 3 -> 서블릿 -> 컨트롤러 DelegatingFilterProxy 이 필터는 Servlet 스펙에 있는 기술이기 때문에 Servlet 컨테이너에서만 생성되고 실행된다. Spring의 Ioc ..

Framework/SpringBoot

[스프링 시큐리티] HttpSecurity vs WebSecurity

HttpSecurity vs WebSecurity SpringBuilder는 웹 보안을 구성하는 빌더 클래스로서 웹 보안을 구성하는 빈 객체와 설정 클래스들을 생성하는 역할을 한다. 이 빌더의 종류로는 HttpSecurity와 WebSecurity가 있다. 오늘은 이 둘에 대해서 알아보려고 한다. @Configuration @EnableWebSecurity public class CustomWebSecurityConfiguration extends WebSecurityConfigurerAdapter { @Override public void configure(WebSecurity web) throws Exception { web.ignoring() .antMatchers("/health", "/healt..

SooJae
'Framework/SpringBoot' 카테고리의 글 목록