| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
- github
- Session Fixation Protection
- 15686
- 자바
- amazon-ecr-login
- Java
- Spring Authorization Server
- RequiredArgsConstructor
- 12100
- Value annotation
- 14891
- 1916
- 17144
- 프로그래머스
- Spring
- aws-mysql-jdbc
- 백준
- 14889
- HttpRequestMethodNotSupportedException
- SpringCloudConfig
- 1260
- github actions
- Spring Security
- tailsamplingprocessor
- AWS
- ConcurrentSessionControlAuthenticationStrategy
- openTelemetry
- self-hosted runners
- RestControllerAdvice
- Session Registry
- Today
- Total
목록Spring (9)
한울이
1. 문제상황 spring security 를 사용하여 인증 인가 시스템을 구현해 놓은 프로젝트에서 로그인을 하던중 'creationTime key must not be null' 이라는 error 가 발생 2. 프로젝트 설정 상태 Spring security, RedisIndexedSessionRepository 사용 중 3. 해결 과정 검색 구글링을 통해 error 가 발생한 원인을 찾아보던 중 비슷한 이슈가 발생한 사례를 찾음 https://github.com/spring-projects/spring-session/issues/2021 Allow Customizing Redis Session Mapper · Issue #2021 · spring-projects/spring-session Descri..
1. 문제상황 - Spring authorization server 를 사용해서 oauth2 provider 서버를 구성한 후 access token 을 발급 받아 봤는데 local 과 개발환경에서 oidc token 의 claim 값이 다른 현상 발견 (sid, auth_time) 2. debugging - 목적: local 에서 테스트 했을 땐 oidc token claim에 sid, auth_time 값이 있고 개발환경 서버에서 oidc token 을 발급 받았을 땐 왜 claim 값에 sid, auth_time 값이 없는지 ? - OAuth2AuthorizationCodeAuthenticationProvider - JwtGenerator Spring authorization server 에서는 s..
1. 문제상황 조건 똑같은 계정으로 로그인 시도 하는 부하테스트 spring security maximum session 10으로 설정 부하 테스트 도중 session을 expire 시킬 수 없다는 log 가 찍힘 2. debugging spring security 는 ConcurrentSessionControlAuthenticationStrategy 에서 동일한 유저의 maximunm session 을 처리함 session registry를 통해 모든 session을 가져온 후 maximum session count 확인 (SpringSessionBackedSessionRegistry 사용중) 만약 설정한 maximum session count 를 초과하면 가장 오래된 session을 만료시킴 (spr..
lombok에서 제공하는 @RequiredArgsConstructor 를 사용해서 bean들을 생성자 주입을 하고있었다. 그러던 중 @Qualifier 를 사용해서 어떤 bean을 주입해야하는지 명시해야 할 상황이 생겼다. 그런데 NoUniqueBeanDefinitionException이 발생하면서 @Qualifier로 지정한 bean을 주입하지 못하는 상황이 발생했다. 알고보니 lombok이 제공하는 @RequiredArgsConstructor는 애노테이션 까지 함께 포함해서 생성자를 만들지는 않는다고 한다. 그래서 @RequiredArgsConstructor를 사용하지 않고 생성자를 직접 만들어서 주입을 하거나 lombok.config를 수정해야 했다. 참조 https://www.inflearn.co..
회사에서 업무를 하다가 HttpRequestMethodNotSupportedException 에 대한 처리를 해야 하는 상황이 생겨서RestControllerAdvice를 사용하여 exception을 handling 하고 있는 곳에 추가해서 처리하려고 했다. 예시 그런데 내가 정의한 ExceptionHandler 에서 exception이 처리되지않고DefaultHandlerExceptionResolver에서 exception이 처리되었다. 알고 보니 basePackageClasses = BaseController.class 부분이 문제였다. 참조 https://stackoverflow.com/questions/56459170/spring-controlleradvice-fail-to-override-han..
회사에서 자주 조회하는 정보를 캐시(redis 사용)에 저장해서 쓰려고 Cacheable annotation 을 사용하였다. Cacheable를 적용시킨 메소드를 호출하고 redis를 확인했는데 캐싱이 되지않고 있었다. 로그를 보니 condition에서 계속 실패해서 캐싱을 하지않았다. document를 찾아보니 결과값(#result)을 caching 조건에 사용하려면 condition 파라미터 말고 unless 파라미터를 사용해야 한다는 것을 알았다.