웹훅 인증 우회 로그 추가
eapim-admin CI / build (push) Has been cancelled

This commit is contained in:
eastargh
2026-08-31 11:12:24 +09:00
parent 927ef830ac
commit a1d2058bca
2 changed files with 15 additions and 2 deletions
@@ -245,6 +245,12 @@ public class WebhookService {
Exception lastException = null; Exception lastException = null;
for (int attempt = 0; attempt <= retryCount; attempt++) { for (int attempt = 0; attempt <= retryCount; attempt++) {
try { try {
if (attempt == 0) {
// 배포 반영 확인용: HttpComponentsClientHttpRequestFactory 여야 SSL 우회 RestTemplate 사용 중.
// SimpleClientHttpRequestFactory 로 찍히면 기본 new RestTemplate() 이 주입된 것 → PKIX 원인.
log.info("[Webhook] POST 시도 - url: {}, requestFactory: {}", proxyUrl,
restTemplate.getRequestFactory().getClass().getSimpleName());
}
if (attempt > 0) { if (attempt > 0) {
long delayMs = (long) retryTime * attempt; long delayMs = (long) retryTime * attempt;
log.info("[Webhook] 재시도 {}/{} - url: {}, delay: {}ms", attempt, retryCount, proxyUrl, delayMs); log.info("[Webhook] 재시도 {}/{} - url: {}, delay: {}ms", attempt, retryCount, proxyUrl, delayMs);
@@ -13,6 +13,9 @@ import org.springframework.web.client.RestTemplate;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Configuration @Configuration
public class RestTemplateConfiguration { public class RestTemplateConfiguration {
@@ -36,20 +39,24 @@ public class RestTemplateConfiguration {
.setMaxConnPerRoute(20) .setMaxConnPerRoute(20)
.build(); .build();
// 배포 반영 확인용: 이 줄이 기동 로그에 없으면 수정 전 클래스가 떠 있는 것.
log.info("[RestTemplateConfiguration] httpClient 생성: SSL 인증서 체인/호스트명 검증 비활성화(TrustAllStrategy+NoopHostnameVerifier) 적용");
return httpClient; return httpClient;
} }
@Bean @Bean
public HttpComponentsClientHttpRequestFactory factory(HttpClient httpClient) { public HttpComponentsClientHttpRequestFactory factory(HttpClient httpClient) {
HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(); HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
factory.setHttpClient(httpClient); factory.setHttpClient(httpClient);
return factory; return factory;
} }
@Bean @Bean
public RestTemplate restTemplate(HttpComponentsClientHttpRequestFactory factory) { public RestTemplate restTemplate(HttpComponentsClientHttpRequestFactory factory) {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
restTemplate.setRequestFactory(factory); restTemplate.setRequestFactory(factory);
log.info("[RestTemplateConfiguration] RestTemplate 빈 생성: requestFactory={}", factory.getClass().getSimpleName());
return restTemplate; return restTemplate;
} }