본문 바로가기
카테고리 없음

3. Spring Boot Actuator와 WebLogic 통합 시 유의사항 및 베스트프랙티스

by frontier12 2025. 5. 30.


WebLogic과 Spring Boot 연동 시 /management/configprops 엔드포인트 설명
1. Spring Boot 애플리케이션에서 /management/configprops 의미
2. WebLogic 자체 경로로서의 /management/configprops는 존재하지 않음
→ 3. (세 번째) 이후 설명 요청



WebLogic 위에서 Spring Boot 기반 애플리케이션을 운용하는 경우, Spring Boot Actuator의 다양한 엔드포인트(/actuator/health, /actuator/env, /actuator/configprops 등)를 그대로 노출하게 되면 다음과 같은 보안 및 운영상의 문제가 발생할 수 있습니다.

✅ 유의사항
1. 보안 문제
• /configprops, /env, /beans 등은 내부 설정 정보를 포함하므로 보안상 민감합니다.
• WebLogic은 기본적으로 JMX 기반 접근을 사용하며, Actuator 엔드포인트는 REST 방식으로 노출되므로 별도 방어선 필요.
2. 리소스 충돌
• WebLogic이 관리하는 MBean 또는 JMX와 Actuator가 내부적으로 사용하는 지표들이 중첩될 수 있음.
• management.port가 WebLogic 기본 포트(7001 등)와 겹치지 않도록 별도 포트 설정 권장.
3. 프로파일 관리
• WebLogic 환경에서는 JVM 옵션을 통해 profile 설정을 하는 경우가 많음.
• -Dspring.profiles.active=prod 같은 방식으로 Actuator 포함 여부를 관리할 수 있음.
4. 로그와 모니터링 연동
• WebLogic의 WLDF(Oracle WebLogic Diagnostic Framework)와 Actuator의 로그 지표, 메트릭 수집이 중복되지 않도록 조정 필요.
• Prometheus 등을 붙이는 경우 Spring Actuator 메트릭만 사용하고 WebLogic 메트릭은 비활성화 권장.



✅ 실무적 베스트 프랙티스

항목 설정 비고
Actuator 엔드포인트 노출 제한 management.endpoints.web.exposure.exclude /beans, /env, /configprops 등
내부 포트 바인딩 management.server.port=8081 WebLogic 포트와 분리 운영
운영 환경 profile 구분 spring.profiles.active=prod dev와 prod 구분 필수
인증 적용 Spring Security 필수 연계 /actuator/** 인증 필요
별도 도메인 라우팅 /internal/**로 경로 맵핑 운영용 API와 구분




🔧 실무 적용 예시 (WebLogic 환경에서 Actuator 포트 분리)

# application-prod.yml
management:
  server:
    port: 8081
  endpoints:
    web:
      exposure:
        include: health, prometheus
        exclude: env, beans, configprops

@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
            .authorizeRequests()
            .antMatchers("/actuator/health", "/actuator/prometheus").permitAll()
            .antMatchers("/actuator/**").authenticated();
    }
}