SpringSecurity

보안

[Spring Security in action] OAuth 2 실습해보기

이 블로그는 개인의 공부 목적으로 작성된 블로그입니다. 왜곡된 정보가 포함되어 있을 수 있습니다. 실습환경: spring boot 3.xx 권한 부여 서버는 github의 OAuth app을 활용 클라이언트와 권한 부여 서버간의 연결 구현 https://docs.spring.io/spring-security/reference/servlet/oauth2/index.html OAuth2 :: Spring Security To get started, add the spring-security-oauth2-client dependency to your project. When using Spring Boot, add the following starter: OAuth2 Client with Spring Boot..

보안

[Spring Security in action] CSRF 보호 및 CORS 적용

CSRF Spring Security에서는 기본적으로 POST 요청에 대해서 거부하도록 설정되어 있다. CSRF 공격으로 부터 예방하기 위해서 인데 POST 요청을 혀용하는 방법으로 GET 요청시 반환되는 토큰을 헤더에 넣어 보내면 POST 요청을 허용하는 방식이다. (기본적으로 데이터가 변경되기 전에 데이터를 조회 또는 view를 렌더링해야한다는 조건이 포함되는 것이다) public class CsrfTokenLogger implements Filter { private Logger logger= Logger.getLogger(CsrfToken.class.getName()); @Override public void doFilter(ServletRequest request, ServletResponse ..

보안

[Spring Security in action] SecurityContext

이 블로그는 개인의 공부 목적으로 작성된 블로그입니다. 왜곡된 정보가 포함되어 있을 수 있습니다. SecurityContext https://docs.spring.io/spring-security/reference/servlet/authentication/architecture.html Servlet Authentication Architecture :: Spring Security ProviderManager is the most commonly used implementation of AuthenticationManager. ProviderManager delegates to a List of AuthenticationProvider instances. Each AuthenticationProvide..

bluesparrow
'SpringSecurity' 태그의 글 목록