Ver2.0 ๐ Spring Boot Actuator ์๋ํฌ์ธํธ ๋ณด์ ์ค์ ์๋ฒฝ ๊ฐ์ด๋ 2025 ๐

๐ Spring Boot Actuator ์๋ํฌ์ธํธ ๋ณด์ ์ค์ ์๋ฒฝ ๊ฐ์ด๋ 2025 ๐
์๋ ํ์ธ์, ๊ฐ๋ฐ์ ์ฌ๋ฌ๋ถ! ๐โโ๏ธ ์ค๋์ Spring Boot ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ชจ๋ํฐ๋ง๊ณผ ๊ด๋ฆฌ๋ฅผ ์ํ ํ์ ๋๊ตฌ์ธ Actuator์ ๋ณด์ ์ค์ ์ ๋ํด ์์๋ณผ๊ฒ์. 2025๋ ํ์ฌ Spring Boot 3.2.x ๋ฒ์ ์ ๊ธฐ์ค์ผ๋ก ์ต์ ๋ณด์ ํธ๋ ๋์ ํจ๊ป ์ดํด๋ณด๊ฒ ์ต๋๋ค!
์์ฆ ๋ณด์ ์ด์ ๋๋ฌธ์ ๋ฐค์ ๋๋ฒ๊น ํ๋ ๊ฑฐ ์ง์ง ๋ ธ์ผ์ด์ฃ ? ใ ใ ใ ์ด ๊ธ์ ํตํด Actuator ์๋ํฌ์ธํธ๋ฅผ ์ ๋๋ก ๋ณดํธํ๋ ๋ฐฉ๋ฒ์ ๋ฐฐ์๊ฐ์ธ์! ๐
๐ ๋ชฉ์ฐจ
- Spring Boot Actuator๋?
- Actuator ๋ณด์์ ์ค์์ฑ
- ๊ธฐ๋ณธ ๋ณด์ ์ค์ ๋ฐฉ๋ฒ
- ์๋ํฌ์ธํธ๋ณ ๋ณด์ ์ค์
- Spring Security์ ํตํฉํ๊ธฐ
- ์ปค์คํ ๋ณด์ ์ ์ฑ ๊ตฌํ
- ์ค์ ์์ : ๋ค์ํ ์๋๋ฆฌ์ค๋ณ ์ค์
- ๋ชจ๋ํฐ๋ง ๋๊ตฌ์์ ์ฐ๋ ๋ณด์
- ๋ณด์ ์ค์ ์ฒดํฌ๋ฆฌ์คํธ
- ๋ง๋ฌด๋ฆฌ ๋ฐ ์ถ๊ฐ ์๋ฃ
1. Spring Boot Actuator๋? ๐ค
Spring Boot Actuator๋ ์ด์ ํ๊ฒฝ์์ ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ชจ๋ํฐ๋งํ๊ณ ๊ด๋ฆฌํ ์ ์๋ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ Spring Boot์ ํ์ ํ๋ก์ ํธ์์. ์ ํ๋ฆฌ์ผ์ด์ ์ ์ํ, ๋ฉํธ๋ฆญ, ํ๊ฒฝ ์ค์ ๋ฑ ๋ค์ํ ์ ๋ณด๋ฅผ HTTP ์๋ํฌ์ธํธ๋ JMX๋ฅผ ํตํด ํ์ธํ ์ ์๊ฒ ํด์ค๋๋ค.
2025๋ ํ์ฌ Spring Boot 3.2.x ๋ฒ์ ์์๋ ๋์ฑ ๊ฐํ๋ Actuator ๊ธฐ๋ฅ๊ณผ ๋ณด์ ์ต์ ์ ์ ๊ณตํ๊ณ ์์ด์. ํนํ ์ฟ ๋ฒ๋คํฐ์ค๋ ํด๋ผ์ฐ๋ ๋ค์ดํฐ๋ธ ํ๊ฒฝ์์์ ๋ชจ๋ํฐ๋ง์ ์ํ ๊ธฐ๋ฅ๋ค์ด ๋ง์ด ์ถ๊ฐ๋์๋ต๋๋ค! ๐
๋จผ์ Actuator๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด ์์กด์ฑ์ ์ถ๊ฐํด์ผ ํด์:
// Gradle
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// Maven
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
์ฃผ์ Actuator ์๋ํฌ์ธํธ
| ์๋ํฌ์ธํธ | ์ค๋ช | ๋ณด์ ์ค์๋ |
|---|---|---|
| /actuator/health | ์ ํ๋ฆฌ์ผ์ด์ ์ํ ์ ๋ณด | ๋ฎ์ |
| /actuator/info | ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ณด | ๋ฎ์ |
| /actuator/metrics | ๋ฉํธ๋ฆญ ์ ๋ณด | ์ค๊ฐ |
| /actuator/env | ํ๊ฒฝ ์ค์ ์ ๋ณด | ๋์ |
| /actuator/loggers | ๋ก๊น ์ค์ | ์ค๊ฐ |
| /actuator/heapdump | ํ ๋คํ ์์ฑ | ๋์ |
| /actuator/shutdown | ์ ํ๋ฆฌ์ผ์ด์ ์ข ๋ฃ | ๋งค์ฐ ๋์ |
2. Actuator ๋ณด์์ ์ค์์ฑ ๐ก๏ธ
์ฌ๋ฌ๋ถ, Actuator ์๋ํฌ์ธํธ๋ ์ง์ง ๋ณด์์ ์ ๊ฒฝ ์จ์ผ ํ๋ ๋ถ๋ถ์ด์์! ์๋๊ณ ์? ใ ใ ใ ์๊ฐํด๋ณด์ธ์. ํ๊ฒฝ ๋ณ์, DB ์ ์ ์ ๋ณด, ์ฌ์ง์ด ์ ํ๋ฆฌ์ผ์ด์ ์ ์ข ๋ฃํ ์ ์๋ ๊ธฐ๋ฅ๊น์ง ์๋๋ฐ, ์ด๊ฒ ์ธ๋ถ์ ๋ ธ์ถ๋๋ฉด...? ๐ฑ
๐จ ๋ณด์ ์ํ ์์
- ๋ฏผ๊ฐ ์ ๋ณด ๋ ธ์ถ: env, configprops ์๋ํฌ์ธํธ๋ DB ๋น๋ฐ๋ฒํธ, API ํค ๋ฑ์ ๋ ธ์ถํ ์ ์์ด์.
- ์๋น์ค ์ค๋จ: shutdown ์๋ํฌ์ธํธ๋ฅผ ํตํด ์ ํ๋ฆฌ์ผ์ด์ ์ ์ข ๋ฃํ ์ ์์ด์.
- ์์คํ ์ ๋ณด ์ ์ถ: ๊ณต๊ฒฉ์๊ฐ ์์คํ ๊ตฌ์กฐ๋ฅผ ํ์ ํ๋ ๋ฐ ๋์์ด ๋ ์ ์์ด์.
- ๋ฆฌ์์ค ์๋ชจ: heapdump๋ threaddump ๊ฐ์ ์๋ํฌ์ธํธ๋ ์์คํ ๋ฆฌ์์ค๋ฅผ ๋ง์ด ์ฌ์ฉํด์.
- ๊ถํ ์์น: ์ผ๋ถ ์๋ํฌ์ธํธ๋ฅผ ํตํด ์ค์ ์ ๋ณ๊ฒฝํ๋ฉด ๊ถํ ์์น์ด ๊ฐ๋ฅํ ์ ์์ด์.
2024๋ ์๋ ์ค์ ๋ก Actuator ์๋ํฌ์ธํธ ๋ณด์ ์ค์ ๋ฏธํก์ผ๋ก ์ธํ ๋๊ท๋ชจ ๋ฐ์ดํฐ ์ ์ถ ์ฌ๊ณ ๊ฐ ์์๋ค๋ ๊ฑฐ ์๊ณ ๊ณ์ จ๋์? ํ ์ ๋ช ํํ ํฌ ํ์ฌ์์ env ์๋ํฌ์ธํธ๊ฐ ๋ ธ์ถ๋์ด DB ์ ์ ์ ๋ณด๊ฐ ์ ์ถ๋์๊ณ , ๊ฒฐ๊ตญ ๊ณ ๊ฐ ์ ๋ณด๊น์ง ํ์ทจ๋นํ๋ค๊ณ ํด์. ์ง์ง ํ์๋ฆฌ ๋๋ ์ฌ๊ฑด์ด์์ฃ ! ๐ฐ
๊ทธ๋์ ์ฌ๋ฅ๋ท์์๋ Spring Boot ๊ธฐ๋ฐ ์๋น์ค๋ฅผ ์ด์ํ ๋ Actuator ๋ณด์์ ํนํ ์ ๊ฒฝ ์ฐ๊ณ ์๋ค๊ณ ํด์. ๊ฐ๋ฐ์ ์ฌ๋ฅ ๊ฑฐ๋๊ฐ ํ๋ฐํ ํ๋ซํผ์ธ ๋งํผ, ๋ณด์์ ๋ํ ์ธ์๋ ๋์ ๊ฒ ๊ฐ์์! ๐
3. ๊ธฐ๋ณธ ๋ณด์ ์ค์ ๋ฐฉ๋ฒ ๐ง
์, ์ด์ ๋ณธ๊ฒฉ์ ์ผ๋ก Actuator ์๋ํฌ์ธํธ๋ฅผ ๋ณดํธํ๋ ๋ฐฉ๋ฒ์ ์์๋ณผ๊ฒ์! ๊ธฐ๋ณธ์ ์ธ ์ค์ ๋ถํฐ ์์ํด๋ณผ๊น์?
3.1 ์๋ํฌ์ธํธ ๋ ธ์ถ ์ ํํ๊ธฐ
๊ฐ์ฅ ๊ธฐ๋ณธ์ ์ธ ๋ฐฉ๋ฒ์ ํ์ํ ์๋ํฌ์ธํธ๋ง ๋ ธ์ถํ๋ ๊ฑฐ์์. application.properties ๋๋ application.yml ํ์ผ์์ ์ค์ ํ ์ ์์ด์.
# application.properties
# ๋ชจ๋ ์๋ํฌ์ธํธ ๋นํ์ฑํ ํ ํ์ํ ๊ฒ๋ง ํ์ฑํ
management.endpoints.web.exposure.include=health,info
management.endpoints.web.exposure.exclude=env,beans
# application.yml
management:
endpoints:
web:
exposure:
include: "health,info"
exclude: "env,beans"
2025๋ ํ์ฌ Spring Boot 3.2.x ๋ฒ์ ์์๋ ๊ธฐ๋ณธ์ ์ผ๋ก /actuator/health์ /actuator/info๋ง ๋ ธ์ถ๋๋๋ก ์ค์ ๋์ด ์์ด์. ํ์ง๋ง ๊ฐ๋ฐ ๊ณผ์ ์์ ๋ค๋ฅธ ์๋ํฌ์ธํธ๋ ํ์ํ ์ ์์ผ๋, ๊ผญ ๋ช ์์ ์ผ๋ก ์ค์ ํ๋ ์ต๊ด์ ๋ค์ด๋ ๊ฒ ์ข์์! ๐
3.2 ์๋ํฌ์ธํธ ๊ฒฝ๋ก ๋ณ๊ฒฝํ๊ธฐ
๊ธฐ๋ณธ /actuator ๊ฒฝ๋ก๋ฅผ ๋ณ๊ฒฝํ๋ฉด ์ค์บ๋ ๊ณต๊ฒฉ์ ์ด๋ ์ ๋ ๋ฐฉ์ดํ ์ ์์ด์. ๋ฌผ๋ก ์ด๊ฒ๋ง์ผ๋ก๋ ์ถฉ๋ถํ ๋ณด์์ด ๋์ง ์์ง๋ง, ๋ฐฉ์ด์ ๊น์ด๋ฅผ ๋ํ๋ ๋ฐ ๋์์ด ๋ฉ๋๋ค.
# application.properties
management.endpoints.web.base-path=/management
# application.yml
management:
endpoints:
web:
base-path: "/management"
์ด๋ ๊ฒ ์ค์ ํ๋ฉด /actuator/health ๋์ /management/health๋ก ์ ๊ทผํด์ผ ํด์. ๊ทผ๋ฐ ์ด๊ฑฐ ์ง์ง ๊ฟํ์ธ๋ฐ, ์๋ฌด๋ ์์ ๋ชปํ๋ ๋ณต์กํ ๊ฒฝ๋ก๋ก ์ค์ ํ๋ฉด ๋ ์ข์์! ใ
ใ
ใ
์๋ฅผ ๋ค์ด /super-secret-monitoring-path-no-one-will-guess ๊ฐ์ ๊ฑฐ์! ๐
๐ก ๊ฟํ
๊ฒฝ๋ก ๋ณ๊ฒฝ์ ๋ณด์์ ์ํ ์ฒซ ๋จ๊ณ์ผ ๋ฟ์ด์์. ์ด๊ฒ๋ง์ผ๋ก๋ ์ถฉ๋ถํ ๋ณด์์ด ๋์ง ์์ผ๋, ๋ฐ๋์ ์ถ๊ฐ์ ์ธ ๋ณด์ ์กฐ์น์ ํจ๊ป ์ฌ์ฉํ์ธ์!
3.3 HTTPS ์ ์ฉํ๊ธฐ
Actuator ์๋ํฌ์ธํธ์ ์ ๊ทผํ ๋๋ ๋ฐ๋์ HTTPS๋ฅผ ์ฌ์ฉํด์ผ ํด์. ํ๋ฌธ ํต์ ์ ํ๋ฉด ์ค๊ฐ์ ์ ๋ณด๊ฐ ํ์ทจ๋ ์ ์๊ฑฐ๋ ์.
# application.properties
server.ssl.key-store=classpath:keystore.p12
server.ssl.key-store-password=your-password
server.ssl.key-store-type=PKCS12
server.ssl.key-alias=tomcat
server.port=8443
2025๋ ์๋ TLS 1.3์ด ํ์ค์ด ๋์์ผ๋, ๊ฐ๋ฅํ๋ฉด TLS 1.3์ ์ฌ์ฉํ๋ ๊ฒ์ด ์ข์์. ๊ทธ๋ฆฌ๊ณ ์ธ์ฆ์๋ Let's Encrypt ๊ฐ์ ๋ฌด๋ฃ ์๋น์ค๋ฅผ ์ด์ฉํด๋ ์ถฉ๋ถํด์! ๐
4. ์๋ํฌ์ธํธ๋ณ ๋ณด์ ์ค์ ๐ฏ
๋ชจ๋ ์๋ํฌ์ธํธ๊ฐ ๊ฐ์ ์์ค์ ๋ณด์์ด ํ์ํ ๊ฑด ์๋์์. ๊ฐ ์๋ํฌ์ธํธ์ ํน์ฑ์ ๋ง๊ฒ ๋ณด์ ์์ค์ ์กฐ์ ํด ๋ณผ๊น์?
4.1 Health์ Info ์๋ํฌ์ธํธ
health์ info ์๋ํฌ์ธํธ๋ ๋ณดํต ๋ชจ๋ํฐ๋ง ์์คํ ์ด๋ ๋ก๋ ๋ฐธ๋ฐ์๊ฐ ์ ๊ทผํ๋ ๊ฒฝ์ฐ๊ฐ ๋ง์์. ์ด ์๋ํฌ์ธํธ๋ค์ ๋ฏผ๊ฐํ ์ ๋ณด๋ฅผ ํฌํจํ์ง ์๋๋ก ์ค์ ํ๊ณ , ๊ณต๊ฐํด๋ ๊ด์ฐฎ์ ๊ฒฝ์ฐ๊ฐ ๋ง์์.
# application.properties
# health ์๋ํฌ์ธํธ์์ ์์ธ ์ ๋ณด ์จ๊ธฐ๊ธฐ
management.endpoint.health.show-details=never
# ๋๋ ์ธ์ฆ๋ ์ฌ์ฉ์์๊ฒ๋ง ์์ธ ์ ๋ณด ๋ณด์ฌ์ฃผ๊ธฐ
management.endpoint.health.show-details=when-authorized
# info ์๋ํฌ์ธํธ ์ปค์คํฐ๋ง์ด์ง
info.app.name=MyAwesomeApp
info.app.version=1.0.0
info.app.description=This is my awesome Spring Boot application
๊ทผ๋ฐ health ์๋ํฌ์ธํธ๋ DB ์ฐ๊ฒฐ ์ํ ๊ฐ์ ์ ๋ณด๋ฅผ ํฌํจํ ์ ์์ผ๋, show-details ์ต์ ์ ์ ์คํ๊ฒ ์ค์ ํ๋ ๊ฒ ์ข์์! ๐
4.2 ๋ฏผ๊ฐํ ์๋ํฌ์ธํธ ๊ด๋ฆฌ
env, configprops, loggers ๊ฐ์ ์๋ํฌ์ธํธ๋ ๋งค์ฐ ๋ฏผ๊ฐํ ์ ๋ณด๋ฅผ ํฌํจํ ์ ์์ด์. ์ด๋ฐ ์๋ํฌ์ธํธ๋ ๊ฐ๋ ฅํ ์ธ์ฆ๊ณผ ๊ถํ ์ค์ ์ด ํ์ํด์.
# application.properties
# ๋ฏผ๊ฐํ ์๋ํฌ์ธํธ ๋นํ์ฑํ
management.endpoint.env.enabled=false
management.endpoint.configprops.enabled=false
# ๋๋ ํน์ ์๋ํฌ์ธํธ๋ง ํ์ฑํ
management.endpoints.enabled-by-default=false
management.endpoint.health.enabled=true
management.endpoint.info.enabled=true
2025๋ ์๋ Zero Trust ๋ณด์ ๋ชจ๋ธ์ด ๋์ธ์ธ๋ฐ์, ๊ธฐ๋ณธ์ ์ผ๋ก ๋ชจ๋ ์๋ํฌ์ธํธ๋ฅผ ๋นํ์ฑํํ๊ณ ํ์ํ ๊ฒ๋ง ๋ช ์์ ์ผ๋ก ํ์ฑํํ๋ ์ ๊ทผ ๋ฐฉ์์ด ๊ถ์ฅ๋ผ์. ์ง์ง ์ด๊ฑฐ ์ค๋ฌด์์ ์์ฒญ ์ค์ํด์! ๐ฅ
4.3 Shutdown ์๋ํฌ์ธํธ ๋ณดํธ
shutdown ์๋ํฌ์ธํธ๋ ์ ํ๋ฆฌ์ผ์ด์ ์ ์ข ๋ฃํ ์ ์๋ ๊ธฐ๋ฅ์ด์์. ์ด๊ฑด ์ ๋ง ์ํํ๋๊น ํน๋ณํ ๊ฒฝ์ฐ๊ฐ ์๋๋ฉด ํ์ฑํํ์ง ์๋ ๊ฒ ์ข์์.
# application.properties
# shutdown ์๋ํฌ์ธํธ ํ์ฑํ (ํ์ํ ๊ฒฝ์ฐ์๋ง!)
management.endpoint.shutdown.enabled=true
๋ง์ฝ ์ ๋ง ํ์ํด์ ํ์ฑํํ๋ค๋ฉด, ๋ฐ๋์ ๊ฐ๋ ฅํ ์ธ์ฆ๊ณผ ๊ถํ ์ค์ ์ ํด์ผ ํด์! ์ ๊ทธ๋ฌ๋ฉด ๋๊ตฐ๊ฐ ์ฅ๋์ผ๋ก ์๋ฒ๋ฅผ ๊บผ๋ฒ๋ฆด ์๋ ์์ด์. ใ ใ ใ ์์๋ง ํด๋ ์์ฐํ์ฃ ? ๐ฑ
5. Spring Security์ ํตํฉํ๊ธฐ ๐
Actuator ์๋ํฌ์ธํธ๋ฅผ ์ ๋๋ก ๋ณดํธํ๋ ค๋ฉด Spring Security์ ํตํฉํ๋ ๊ฒ ๊ฐ์ฅ ํจ๊ณผ์ ์ด์์. ์ด์ ๊ทธ ๋ฐฉ๋ฒ์ ์์๋ณผ๊ฒ์!
5.1 Spring Security ์์กด์ฑ ์ถ๊ฐ
// Gradle
implementation 'org.springframework.boot:spring-boot-starter-security'
// Maven
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
Spring Security๋ฅผ ์ถ๊ฐํ๋ฉด ๊ธฐ๋ณธ์ ์ผ๋ก ๋ชจ๋ ์๋ํฌ์ธํธ์ ์ธ์ฆ์ด ํ์ํ๊ฒ ๋ผ์. ๊ทผ๋ฐ ์ด๊ฑฐ ์ถ๊ฐํ์๋ง์ ์ฝ์์ ์๋์์ฑ๋ ๋น๋ฐ๋ฒํธ ๋์ค๋ ๊ฑฐ ๋ณด๊ณ ๋นํฉํ๋ ๊ธฐ์ต ๋ค๋ค ์์ผ์์ฃ ? ใ ใ ใ ๐
5.2 ๊ธฐ๋ณธ ๋ณด์ ์ค์
Spring Security ์ค์ ํด๋์ค๋ฅผ ๋ง๋ค์ด Actuator ์๋ํฌ์ธํธ์ ๋ํ ๋ณด์์ ์ค์ ํด ๋ณผ๊ฒ์.
@Configuration
@EnableWebSecurity
public class ActuatorSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.requestMatchers(EndpointRequest.to("health", "info")).permitAll()
.requestMatchers(EndpointRequest.toAnyEndpoint()).hasRole("ACTUATOR_ADMIN")
.anyRequest().authenticated()
.and()
.httpBasic();
}
@Bean
public UserDetailsService userDetailsService() {
UserDetails user = User.withDefaultPasswordEncoder()
.username("admin")
.password("securePassword123!")
.roles("ACTUATOR_ADMIN")
.build();
return new InMemoryUserDetailsManager(user);
}
}
์ ์ฝ๋๋ health์ info ์๋ํฌ์ธํธ๋ ๋ชจ๋์๊ฒ ๊ณต๊ฐํ๊ณ , ๋ค๋ฅธ ์๋ํฌ์ธํธ๋ ACTUATOR_ADMIN ์ญํ ์ ๊ฐ์ง ์ฌ์ฉ์๋ง ์ ๊ทผํ ์ ์๋๋ก ์ค์ ํ ๊ฑฐ์์.
โ ๏ธ ์ฃผ์
์ ์์ ์์ User.withDefaultPasswordEncoder()๋ ๊ฐ๋ฐ ํ๊ฒฝ์์๋ง ์ฌ์ฉํด์ผ ํด์! ์ค์ ์ด์ ํ๊ฒฝ์์๋ ๋ ์์ ํ ๋ฐฉ์์ผ๋ก ๋น๋ฐ๋ฒํธ๋ฅผ ์ํธํํด์ผ ํฉ๋๋ค.
5.3 Spring Security 5.7+ ๋ฐ Spring Boot 3.x ์ค์
2025๋ ํ์ฌ ์ต์ ๋ฒ์ ์์๋ WebSecurityConfigurerAdapter๊ฐ deprecated๋์์ด์. ๋์ SecurityFilterChain์ Bean์ผ๋ก ๋ฑ๋กํ๋ ๋ฐฉ์์ ์ฌ์ฉํด์.
@Configuration
@EnableWebSecurity
public class ActuatorSecurityConfig {
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests(authorize -> authorize
.requestMatchers(EndpointRequest.to("health", "info")).permitAll()
.requestMatchers(EndpointRequest.toAnyEndpoint()).hasRole("ACTUATOR_ADMIN")
.anyRequest().authenticated()
)
.httpBasic(withDefaults());
return http.build();
}
@Bean
public UserDetailsService userDetailsService() {
UserDetails user = User.builder()
.username("admin")
.password("{bcrypt}" + new BCryptPasswordEncoder().encode("securePassword123!"))
.roles("ACTUATOR_ADMIN")
.build();
return new InMemoryUserDetailsManager(user);
}
}
์ด ๋ฐฉ์์ด ์ต์ Spring Security์ ๊ถ์ฅ ๋ฐฉ์์ด์์. ํจ์ํ ์ธํฐํ์ด์ค๋ฅผ ํ์ฉํด์ ๋ ๊น๋ํ๊ฒ ์ค์ ํ ์ ์์ฃ ! ๐
5.4 JWT ๋๋ OAuth2๋ฅผ ์ด์ฉํ ๊ณ ๊ธ ์ธ์ฆ
์ค์ ํ๋ก๋์ ํ๊ฒฝ์์๋ Basic ์ธ์ฆ๋ณด๋ค JWT๋ OAuth2 ๊ฐ์ ํ ํฐ ๊ธฐ๋ฐ ์ธ์ฆ์ ์ฌ์ฉํ๋ ๊ฒ์ด ์ข์์.
@Configuration
@EnableWebSecurity
public class ActuatorSecurityConfig {
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests(authorize -> authorize
.requestMatchers(EndpointRequest.to("health", "info")).permitAll()
.requestMatchers(EndpointRequest.toAnyEndpoint()).hasAuthority("SCOPE_actuator.admin")
.anyRequest().authenticated()
)
.oauth2ResourceServer(oauth2 -> oauth2
.jwt(jwt -> jwt
.jwtAuthenticationConverter(jwtAuthenticationConverter())
)
);
return http.build();
}
private Converter<Jwt, ? extends AbstractAuthenticationToken> jwtAuthenticationConverter() {
JwtAuthenticationConverter converter = new JwtAuthenticationConverter();
converter.setJwtGrantedAuthoritiesConverter(jwt -> {
List<String> scopes = jwt.getClaimAsStringList("scope");
return scopes.stream()
.map(scope -> new SimpleGrantedAuthority("SCOPE_" + scope))
.collect(Collectors.toList());
});
return converter;
}
}
์ด๋ ๊ฒ JWT๋ฅผ ์ฌ์ฉํ๋ฉด ํ ํฐ ๊ธฐ๋ฐ์ผ๋ก ์ธ์ฆ์ ์ฒ๋ฆฌํ ์ ์์ด์. ํนํ ๋ง์ดํฌ๋ก์๋น์ค ์ํคํ ์ฒ์์๋ ์ด๋ฐ ๋ฐฉ์์ด ๋ ์ ํฉํด์! ๐
์ฌ๋ฅ๋ท์์๋ ์ด์ ์ ์ฌํ ๋ฐฉ์์ผ๋ก API ๋ณด์์ ๊ตฌํํ๊ณ ์๋ค๊ณ ํ๋ค์. ๊ฐ๋ฐ์ ์ฌ๋ฅ ๊ฑฐ๋ ํ๋ซํผ์ธ ๋งํผ ๋ณด์์ ์ ๊ฒฝ์ ๋ง์ด ์ฐ๋ ๊ฒ ๊ฐ์์! ๐
6. ์ปค์คํ ๋ณด์ ์ ์ฑ ๊ตฌํ ๐ ๏ธ
๋ ์ธ๋ฐํ ๋ณด์ ์ ์ด๊ฐ ํ์ํ๋ค๋ฉด ์ปค์คํ ๋ณด์ ์ ์ฑ ์ ๊ตฌํํ ์ ์์ด์. ์ด์ ๋ช ๊ฐ์ง ๊ณ ๊ธ ๊ธฐ๋ฒ์ ์์๋ณผ๊ฒ์!
6.1 IP ๊ธฐ๋ฐ ์ ๊ทผ ์ ํ
ํน์ IP ์ฃผ์๋ IP ๋ฒ์์์๋ง Actuator์ ์ ๊ทผํ ์ ์๋๋ก ์ค์ ํ ์ ์์ด์.
@Configuration
@EnableWebSecurity
public class ActuatorSecurityConfig {
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests(authorize -> authorize
.requestMatchers(EndpointRequest.toAnyEndpoint())
.access(new IpAddressAuthorizationManager("192.168.1.0/24", "10.0.0.0/8"))
.anyRequest().authenticated()
)
.httpBasic(withDefaults());
return http.build();
}
}
class IpAddressAuthorizationManager implements AuthorizationManager<RequestAuthorizationContext> {
private final List<IpAddressMatcher> ipAddressMatchers;
public IpAddressAuthorizationManager(String... ipAddresses) {
this.ipAddressMatchers = Arrays.stream(ipAddresses)
.map(IpAddressMatcher::new)
.collect(Collectors.toList());
}
@Override
public AuthorizationDecision check(Supplier<Authentication> authentication, RequestAuthorizationContext context) {
HttpServletRequest request = context.getRequest();
String remoteAddr = request.getRemoteAddr();
boolean matches = ipAddressMatchers.stream()
.anyMatch(matcher -> matcher.matches(remoteAddr));
return new AuthorizationDecision(matches);
}
}
์ด๋ ๊ฒ ํ๋ฉด ์ง์ ๋ IP ๋ฒ์์์๋ง Actuator์ ์ ๊ทผํ ์ ์์ด์. ๋ด๋ถ ๋คํธ์ํฌ๋ VPN์ ํตํด์๋ง ์ ๊ทผํ๋๋ก ์ ํํ๋ ๋ฐ ์ ์ฉํด์! ๐
6.2 ์๊ฐ ๊ธฐ๋ฐ ์ ๊ทผ ์ ํ
ํน์ ์๊ฐ๋์๋ง Actuator์ ์ ๊ทผํ ์ ์๋๋ก ์ค์ ํ ์๋ ์์ด์. ์๋ฅผ ๋ค์ด, ์ ๋ฌด ์๊ฐ์๋ง ์ ๊ทผ์ ํ์ฉํ๋ค๋ ์ง์.
@Component
public class TimeBasedAccessDecisionVoter implements AccessDecisionVoter<Object> {
@Override
public boolean supports(ConfigAttribute attribute) {
return true;
}
@Override
public boolean supports(Class<?> clazz) {
return true;
}
@Override
public int vote(Authentication authentication, Object object, Collection<ConfigAttribute> attributes) {
LocalTime now = LocalTime.now();
// ์
๋ฌด ์๊ฐ: ์ค์ 9์ ~ ์คํ 6์
if (now.isAfter(LocalTime.of(9, 0)) && now.isBefore(LocalTime.of(18, 0))) {
return ACCESS_GRANTED;
}
return ACCESS_DENIED;
}
}
์ด๋ฐ ์์ผ๋ก ์๊ฐ ๊ธฐ๋ฐ ์ ๊ทผ ์ ์ด๋ฅผ ๊ตฌํํ ์ ์์ด์. ๊ทผ๋ฐ ์ด๊ฑฐ ์ง์ง ์ค์ฉ์ ์ธ ํ์ธ๋ฐ, ์ฌ์ผ ์๊ฐ๋์๋ ์ค์ ์ค์ ๋ณ๊ฒฝ์ ๋ง์์ "์ผ๊ทผํ๋ค๊ฐ ์ค์๋ก ํ๋ก๋์ ๋ ๋ ค๋จน๋" ์ฐธ์ฌ๋ฅผ ๋ฐฉ์งํ ์ ์์ด์! ใ ใ ใ ๐
6.3 ๋ค์ค ์ธ์ฆ ์์(MFA) ์ ์ฉ
์ค์ํ Actuator ์๋ํฌ์ธํธ์๋ ๋ค์ค ์ธ์ฆ ์์(MFA)๋ฅผ ์ ์ฉํ๋ ๊ฒ์ด ์ข์์. ์๋ฅผ ๋ค์ด, ๋น๋ฐ๋ฒํธ + OTP ๊ฐ์ ๋ฐฉ์์ด์.
2025๋ ์๋ FIDO2/WebAuthn ํ์ค์ด ๋๋ฆฌ ๋ณด๊ธ๋์ด ์์ฒด ์ธ์ฆ๊น์ง ์ฝ๊ฒ ์ ์ฉํ ์ ์๊ฒ ๋์์ด์. Spring Security์์๋ ์ด๋ฅผ ์ง์ํ๋ ํ์ฅ ๋ชจ๋์ด ์๋ต๋๋ค! ๐
๐ก ๊ฟํ
๋ณด์์ ์ฌ๋ฌ ์ธต์ ๋ฐฉ์ด ์ฒด๊ณ๋ฅผ ๊ตฌ์ถํ๋ ๊ฒ์ด ์ค์ํด์. ๋จ์ผ ๋ณด์ ๋ฉ์ปค๋์ฆ์๋ง ์์กดํ์ง ๋ง๊ณ , ์ฌ๋ฌ ๋ฐฉ์์ ์กฐํฉํด์ ์ฌ์ฉํ์ธ์!
7. ์ค์ ์์ : ๋ค์ํ ์๋๋ฆฌ์ค๋ณ ์ค์ ๐ฎ
์ด์ ์ค์ ํ์ ์์ ์์ฃผ ๋ง์ฃผ์น๋ ์๋๋ฆฌ์ค๋ณ๋ก Actuator ๋ณด์ ์ค์ ์ ์์๋ณผ๊ฒ์!
7.1 ๊ฐ๋ฐ ํ๊ฒฝ ์ค์
๊ฐ๋ฐ ํ๊ฒฝ์์๋ ๋๋ฒ๊น ๊ณผ ํ ์คํธ๋ฅผ ์ํด ๋ ๋ง์ ์๋ํฌ์ธํธ๊ฐ ํ์ํ ์ ์์ด์.
# application-dev.properties
management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always
# ๊ฐ๋ฐ ํ๊ฒฝ์ฉ ๊ฐ๋จํ ๋ณด์ ์ค์
spring.security.user.name=dev
spring.security.user.password=dev-password
spring.security.user.roles=ACTUATOR_ADMIN
๊ฐ๋ฐ ํ๊ฒฝ์ด๋ผ๊ณ ๋ณด์์ ์์ ํ ๋ฌด์ํ๋ฉด ์ ๋ผ์! ์ต์ํ์ ๋ณด์ ์ค์ ์ ์ ์งํ๋ ๊ฒ์ด ์ข์์. ๊ทธ๋์ผ ์ค์๋ก ํ๋ก๋์ ํ๊ฒฝ์ ์ ์ฉ๋์ ๋ ๋์ฐธ์ฌ๋ฅผ ๋ง์ ์ ์์ด์! ๐
7.2 ํ ์คํธ ํ๊ฒฝ ์ค์
ํ ์คํธ ํ๊ฒฝ์์๋ ์ค์ ํ๋ก๋์ ๊ณผ ์ ์ฌํ ๋ณด์ ์ค์ ์ ์ ์ฉํ๋ ๊ฒ์ด ์ข์์.
# application-test.properties
management.endpoints.web.exposure.include=health,info,metrics
management.endpoint.health.show-details=when-authorized
# ํ
์คํธ ํ๊ฒฝ์ฉ ๋ณด์ ์ค์
spring.security.user.name=${TEST_ACTUATOR_USER}
spring.security.user.password=${TEST_ACTUATOR_PASSWORD}
spring.security.user.roles=ACTUATOR_ADMIN
ํ ์คํธ ํ๊ฒฝ์์๋ ํ๊ฒฝ ๋ณ์๋ฅผ ํตํด ์๊ฒฉ ์ฆ๋ช ์ ์ฃผ์ ํ๋ ๊ฒ์ด ์ข์์. ์์ค ์ฝ๋์ ํ๋์ฝ๋ฉํ๋ฉด ๋ณด์ ์ํ์ด ์๊ฑฐ๋ ์! ๐
7.3 ํ๋ก๋์ ํ๊ฒฝ ์ค์
ํ๋ก๋์ ํ๊ฒฝ์์๋ ์ต์ํ์ ํ์ํ ์๋ํฌ์ธํธ๋ง ๋ ธ์ถํ๊ณ , ๊ฐ๋ ฅํ ๋ณด์์ ์ ์ฉํด์ผ ํด์.
# application-prod.properties
management.endpoints.web.exposure.include=health,info,metrics
management.endpoint.health.show-details=never
management.endpoints.web.base-path=/management/actuator
# ํ๋ก๋์
ํ๊ฒฝ์์๋ Spring Security ์ค์ ํด๋์ค๋ฅผ ํตํด ๋ ๊ฐ๋ ฅํ ๋ณด์ ์ ์ฉ
ํ๋ก๋์ ํ๊ฒฝ์์๋ ์ ๋๋ก ๊ธฐ๋ณธ ๋น๋ฐ๋ฒํธ๋ฅผ ์ฌ์ฉํ๋ฉด ์ ๋ผ์! ๊ฐ๋ ฅํ๊ณ ๋ณต์กํ ๋น๋ฐ๋ฒํธ๋ฅผ ์ฌ์ฉํ๊ณ , ์ ๊ธฐ์ ์ผ๋ก ๋ณ๊ฒฝํ๋ ๊ฒ์ด ์ข์์. ์๋๋ฉด ์์ ํ ํฐ ๊ธฐ๋ฐ ์ธ์ฆ์ ์ฌ์ฉํ๋ ๊ฒ๋ ์ข์ ๋ฐฉ๋ฒ์ด์์! ๐ก๏ธ
7.4 ์ฟ ๋ฒ๋คํฐ์ค/ํด๋ผ์ฐ๋ ํ๊ฒฝ ์ค์
์ฟ ๋ฒ๋คํฐ์ค๋ ํด๋ผ์ฐ๋ ํ๊ฒฝ์์๋ ์๋น์ค ๋ฉ์๋ ์ธ๊ทธ๋ ์ค ๋ ๋ฒจ์์ ์ถ๊ฐ์ ์ธ ๋ณด์์ ์ ์ฉํ ์ ์์ด์.
# Kubernetes Ingress ์ค์ ์์
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: actuator-ingress
annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: "10.0.0.0/8,192.168.0.0/16"
spec:
rules:
- host: actuator.myapp.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: myapp-service
port:
number: 8080
์ฟ ๋ฒ๋คํฐ์ค ํ๊ฒฝ์์๋ ๋คํธ์ํฌ ์ ์ฑ ์ ํตํด Actuator ์๋ํฌ์ธํธ์ ๋ํ ์ ๊ทผ์ ์ ํํ ์๋ ์์ด์. ์ด๋ ๊ฒ ์ฌ๋ฌ ๊ณ์ธต์์ ๋ณด์์ ์ ์ฉํ๋ ๊ฒ์ด ์ข์์! ๐
8. ๋ชจ๋ํฐ๋ง ๋๊ตฌ์์ ์ฐ๋ ๋ณด์ ๐
Actuator๋ ๋ณดํต Prometheus, Grafana, Datadog ๊ฐ์ ๋ชจ๋ํฐ๋ง ๋๊ตฌ์ ํจ๊ป ์ฌ์ฉ๋ผ์. ์ด๋ฐ ๋๊ตฌ๋ค๊ณผ ์ฐ๋ํ ๋๋ ๋ณด์์ ์ ๊ฒฝ ์จ์ผ ํด์!
8.1 Prometheus ์ฐ๋ ์ ๋ณด์ ์ค์
Prometheus๋ metrics ์๋ํฌ์ธํธ๋ฅผ ํตํด ๋ฉํธ๋ฆญ ๋ฐ์ดํฐ๋ฅผ ์์งํด์.
# application.properties
management.endpoints.web.exposure.include=prometheus
management.metrics.export.prometheus.enabled=true
# Prometheus ์ค์ (prometheus.yml)
scrape_configs:
- job_name: 'spring-boot-app'
metrics_path: '/actuator/prometheus'
basic_auth:
username: 'prometheus'
password: 'secure-password-here'
scheme: https
tls_config:
insecure_skip_verify: false
static_configs:
- targets: ['myapp.example.com:8080']
Prometheus ์ฐ๋ ์์๋ HTTPS์ ๊ธฐ๋ณธ ์ธ์ฆ์ ์ ์ฉํ๋ ๊ฒ์ด ์ข์์. ๊ทธ๋ฆฌ๊ณ Prometheus ์๋ฒ IP๋ฅผ ํ์ดํธ๋ฆฌ์คํธ์ ์ถ๊ฐํ๋ ๊ฒ๋ ์ข์ ๋ฐฉ๋ฒ์ด์์! ๐
8.2 Grafana ์ฐ๋ ์ ๋ณด์ ์ค์
Grafana๋ ๋ณดํต Prometheus๋ฅผ ๋ฐ์ดํฐ ์์ค๋ก ์ฌ์ฉํ์ง๋ง, ์ง์ Actuator์ ์ ๊ทผํ ์๋ ์์ด์.
# Grafana ๋ฐ์ดํฐ ์์ค ์ค์
{
"name": "Spring Boot App",
"type": "prometheus",
"url": "https://prometheus.example.com",
"access": "proxy",
"basicAuth": true,
"basicAuthUser": "grafana",
"secureJsonData": {
"basicAuthPassword": "secure-password-here"
}
}
Grafana ์์ฒด์๋ ๊ฐ๋ ฅํ ์ธ์ฆ๊ณผ ๊ถํ ์ค์ ์ ์ ์ฉํด์ผ ํด์. ๋์๋ณด๋์ ๋ฏผ๊ฐํ ์ ๋ณด๊ฐ ํ์๋ ์ ์์ผ๋๊น์! ๐
8.3 Spring Boot Admin ์ฐ๋ ์ ๋ณด์ ์ค์
Spring Boot Admin์ ์ฌ๋ฌ Spring Boot ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ชจ๋ํฐ๋งํ๋ ๋๊ตฌ์์.
# Spring Boot Admin Server ์ค์
spring.boot.admin.client.url=https://admin.example.com
spring.boot.admin.client.instance.metadata.user.name=${spring.security.user.name}
spring.boot.admin.client.instance.metadata.user.password=${spring.security.user.password}
spring.boot.admin.client.username=admin-server
spring.boot.admin.client.password=secure-admin-password
# Spring Boot Admin Client ์ค์
spring.boot.admin.client.instance.name=My App
spring.boot.admin.client.instance.prefer-ip=true
Spring Boot Admin์ ์ฌ์ฉํ ๋๋ ํด๋ผ์ด์ธํธ์ ์๋ฒ ๊ฐ์ ํต์ ๋ ๋ณดํธํด์ผ ํด์. ์๋ก ๋ค๋ฅธ ์ธ์ฆ ์ ๋ณด๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ์ข์์! ๐
๐ก ๊ฟํ
๋ชจ๋ํฐ๋ง ๋๊ตฌ์ ์ฝ๊ธฐ ์ ์ฉ ๊ณ์ ์ ์ฌ์ฉํ๋ ๊ฒ์ด ์ข์์. ๊ทธ๋ฆฌ๊ณ ๋ชจ๋ํฐ๋ง ์๋ฒ๋ ๋ณ๋์ ๋ณด์ ๋คํธ์ํฌ ์์ญ์ ๋ฐฐ์นํ๋ ๊ฒ์ด ์ข์ต๋๋ค!
9. ๋ณด์ ์ค์ ์ฒดํฌ๋ฆฌ์คํธ โ
์ง๊ธ๊น์ง ๋ฐฐ์ด ๋ด์ฉ์ ๋ฐํ์ผ๋ก Actuator ๋ณด์ ์ค์ ์ฒดํฌ๋ฆฌ์คํธ๋ฅผ ๋ง๋ค์ด ๋ณผ๊ฒ์!
๐ Actuator ๋ณด์ ์ฒดํฌ๋ฆฌ์คํธ
- ํ์ํ ์๋ํฌ์ธํธ๋ง ๋
ธ์ถํ๊ธฐ
management.endpoints.web.exposure.include ์ค์ ์ ํตํด ํ์ํ ์๋ํฌ์ธํธ๋ง ๋ ธ์ถํ์ธ์.
- ๊ธฐ๋ณธ ๊ฒฝ๋ก ๋ณ๊ฒฝํ๊ธฐ
management.endpoints.web.base-path ์ค์ ์ ํตํด ๊ธฐ๋ณธ /actuator ๊ฒฝ๋ก๋ฅผ ๋ณ๊ฒฝํ์ธ์.
- HTTPS ์ ์ฉํ๊ธฐ
๋ชจ๋ Actuator ํต์ ์ HTTPS๋ฅผ ์ ์ฉํ์ธ์.
- Spring Security ์ ์ฉํ๊ธฐ
Spring Security๋ฅผ ์ฌ์ฉํ์ฌ ์ธ์ฆ ๋ฐ ๊ถํ ์ค์ ์ ์ ์ฉํ์ธ์.
- ๊ฐ๋ ฅํ ๋น๋ฐ๋ฒํธ ์ฌ์ฉํ๊ธฐ
๊ธฐ๋ณธ ๋น๋ฐ๋ฒํธ๋ฅผ ์ฌ์ฉํ์ง ๋ง๊ณ , ๊ฐ๋ ฅํ๊ณ ๋ณต์กํ ๋น๋ฐ๋ฒํธ๋ฅผ ์ฌ์ฉํ์ธ์.
- IP ๊ธฐ๋ฐ ์ ๊ทผ ์ ํ ์ ์ฉํ๊ธฐ
์ ๋ขฐํ ์ ์๋ IP ์ฃผ์์์๋ง ์ ๊ทผํ ์ ์๋๋ก ์ ํํ์ธ์.
- ๋ฏผ๊ฐํ ์ ๋ณด ์จ๊ธฐ๊ธฐ
health ์๋ํฌ์ธํธ์ ์์ธ ์ ๋ณด ํ์ ์ค์ ์ ์ ํํ์ธ์.
- shutdown ์๋ํฌ์ธํธ ๋นํ์ฑํํ๊ธฐ
ํน๋ณํ ์ด์ ๊ฐ ์๋ค๋ฉด shutdown ์๋ํฌ์ธํธ๋ ๋นํ์ฑํํ์ธ์.
- ํ๊ฒฝ๋ณ ์ค์ ๋ถ๋ฆฌํ๊ธฐ
๊ฐ๋ฐ, ํ ์คํธ, ํ๋ก๋์ ํ๊ฒฝ๋ณ๋ก ์ ์ ํ ๋ณด์ ์ค์ ์ ์ ์ฉํ์ธ์.
- ์ ๊ธฐ์ ์ธ ๋ณด์ ๊ฐ์ฌ ์ํํ๊ธฐ
์ ๊ธฐ์ ์ผ๋ก Actuator ์๋ํฌ์ธํธ์ ๋ณด์ ์ํ๋ฅผ ์ ๊ฒํ์ธ์.
์ด ์ฒดํฌ๋ฆฌ์คํธ๋ฅผ ๋ฐ๋ผ ์ค์ ํ๋ฉด Actuator ์๋ํฌ์ธํธ๋ฅผ ์์ ํ๊ฒ ๋ณดํธํ ์ ์์ด์! ํ๋๋ผ๋ ๋์น๋ฉด ๋ณด์ ์ํ์ด ๋ฐ์ํ ์ ์์ผ๋ ๊ผผ๊ผผํ๊ฒ ํ์ธํ์ธ์! ๐ก๏ธ
๋ณด์ ์ค์ ๊ฒ์ฆ ๋๊ตฌ
์ค์ ์ด ์ ๋๋ก ์ ์ฉ๋์๋์ง ํ์ธํ๊ธฐ ์ํ ๋ช ๊ฐ์ง ๋๊ตฌ๋ฅผ ์๊ฐํ ๊ฒ์.
- Spring Boot Actuator Security Audit
Spring Boot ์ ํ๋ฆฌ์ผ์ด์ ์ Actuator ๋ณด์ ์ค์ ์ ๊ฒ์ฌํ๋ ๋๊ตฌ์์.
- OWASP ZAP
์น ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ณด์ ์ทจ์ฝ์ ์ ์ค์บํ๋ ์คํ ์์ค ๋๊ตฌ์์.
- Nmap
๋คํธ์ํฌ ํฌํธ ์ค์บ์ ํตํด ์ด๋ ค ์๋ ์๋ํฌ์ธํธ๋ฅผ ํ์ธํ ์ ์์ด์.
- Burp Suite
์น ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ณด์์ ํ ์คํธํ๋ ๋๊ตฌ์์.
- Spring Security Check
Spring Security ์ค์ ์ ๊ฒ์ฌํ๋ ๋๊ตฌ์์.
์ด๋ฐ ๋๊ตฌ๋ค์ ์ฌ์ฉํด์ ์ ๊ธฐ์ ์ผ๋ก ๋ณด์ ์ํ๋ฅผ ์ ๊ฒํ๋ ๊ฒ์ด ์ข์์. ํนํ ์ค์ ๋ณ๊ฒฝ ํ์๋ ๋ฐ๋์ ๊ฒ์ฆ์ ํด๋ณด์ธ์! ๐
10. ๋ง๋ฌด๋ฆฌ ๋ฐ ์ถ๊ฐ ์๋ฃ ๐
์ง๊ธ๊น์ง Spring Boot Actuator ์๋ํฌ์ธํธ์ ๋ณด์ ์ค์ ์ ๋ํด ์์๋ดค์ด์! ๋ณด์์ ํ ๋ฒ์ ์์ฑ๋๋ ๊ฒ์ด ์๋๋ผ ์ง์์ ์ธ ๊ด๋ฆฌ์ ๊ฐ์ ์ด ํ์ํ ๊ณผ์ ์ด๋ผ๋ ๊ฒ์ ๊ธฐ์ตํ์ธ์.
์ฃผ์ ๋ด์ฉ ์์ฝ
- Actuator๋ ๊ฐ๋ ฅํ ๋ชจ๋ํฐ๋ง ๋๊ตฌ์ง๋ง, ๋ณด์์ ์ ๊ฒฝ ์จ์ผ ํด์.
- ํ์ํ ์๋ํฌ์ธํธ๋ง ๋ ธ์ถํ๊ณ , ๊ธฐ๋ณธ ๊ฒฝ๋ก๋ฅผ ๋ณ๊ฒฝํ์ธ์.
- Spring Security๋ฅผ ํตํด ์ธ์ฆ๊ณผ ๊ถํ์ ์ค์ ํ์ธ์.
- IP ๊ธฐ๋ฐ ์ ๊ทผ ์ ํ, ์๊ฐ ๊ธฐ๋ฐ ์ ๊ทผ ์ ํ ๋ฑ ๋ค์ํ ๋ณด์ ๊ธฐ๋ฒ์ ์ ์ฉํ์ธ์.
- ํ๊ฒฝ๋ณ๋ก ์ ์ ํ ๋ณด์ ์ค์ ์ ์ ์ฉํ์ธ์.
- ๋ชจ๋ํฐ๋ง ๋๊ตฌ์ ์ฐ๋ ์์๋ ๋ณด์์ ๊ณ ๋ คํ์ธ์.
- ์ ๊ธฐ์ ์ผ๋ก ๋ณด์ ์ํ๋ฅผ ์ ๊ฒํ์ธ์.
Spring Boot Actuator์ ๋ณด์ ์ค์ ์ ์ ํ๋ฆฌ์ผ์ด์ ์ ์ฒด ๋ณด์์ ์ค์ํ ๋ถ๋ถ์ด์์. ํนํ ์ด์ ํ๊ฒฝ์์๋ ๋์ฑ ์ ๊ฒฝ ์จ์ผ ํด์! ๐
์ถ๊ฐ ํ์ต ์๋ฃ
- Spring Boot ๊ณต์ ๋ฌธ์
Spring Boot Actuator์ ๋ํ ๊ฐ์ฅ ์ ํํ๊ณ ์ต์ ์ ๋ณด๋ฅผ ์ ๊ณตํด์.
- Spring Security ๊ณต์ ๋ฌธ์
Spring Security๋ฅผ ํตํ ๋ณด์ ์ค์ ์ ๋ํ ์์ธํ ์ ๋ณด๋ฅผ ์ ๊ณตํด์.
- OWASP Top 10
์น ์ ํ๋ฆฌ์ผ์ด์ ์ ์ฃผ์ ๋ณด์ ์ํ์ ๋ํ ์ ๋ณด๋ฅผ ์ ๊ณตํด์.
- Spring Boot in Action
Spring Boot์ ๋ค์ํ ๊ธฐ๋ฅ๊ณผ ํ์ฉ ๋ฐฉ๋ฒ์ ๋ฐฐ์ธ ์ ์์ด์.
- Cloud Native Spring in Action
ํด๋ผ์ฐ๋ ํ๊ฒฝ์์์ Spring Boot ์ ํ๋ฆฌ์ผ์ด์ ์ด์์ ๋ํด ๋ฐฐ์ธ ์ ์์ด์.
์ฌ๋ฅ๋ท์์๋ Spring Boot์ ๊ด๋ จ๋ ๋ค์ํ ๊ฐ๋ฐ ์ฌ๋ฅ์ ๊ฑฐ๋ํ ์ ์์ด์. ๋ณด์์ ๊ฐํ ๊ฐ๋ฐ์์ ๋์์ ๋ฐ์ ๋ ์์ ํ ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ง๋ค์ด ๋ณด์ธ์! ๐
๋ง์น๋ฉฐ
Spring Boot Actuator๋ ์ ๋ง ์ ์ฉํ ๋๊ตฌ์ง๋ง, ๋ณด์์ ์ํํ๋ฉด ํฐ ์ํ์ด ๋ ์ ์์ด์. ์ด ๊ธ์์ ๋ฐฐ์ด ๋ด์ฉ์ ๋ฐํ์ผ๋ก ์์ ํ๊ฒ Actuator๋ฅผ ํ์ฉํ์๊ธธ ๋ฐ๋๋๋ค!
ํน์ ๋ ๊ถ๊ธํ ์ ์ด ์์ผ์๋ฉด ์ธ์ ๋ ์ง ์ง๋ฌธํด ์ฃผ์ธ์. ํจ๊ป ์ฑ์ฅํ๋ ๊ฐ๋ฐ์ ์ปค๋ฎค๋ํฐ๋ฅผ ๋ง๋ค์ด ๊ฐ์! ๐
๊ทธ๋ผ ๋ค์์ ๋ ๋ค๋ฅธ ํฅ๋ฏธ๋ก์ด ์ฃผ์ ๋ก ์ฐพ์์ฌ๊ฒ์! ์๋ ํ ๊ณ์ธ์~ ๐
๊ด๋ จ ํค์๋
๋๊ธ ์์ฑ
์ด ๊ธ์ ๋ํ ์ฌ๋ฌ๋ถ์ ์๊ฐ์ ๋ค๋ ค์ฃผ์ธ์
๋ก๊ทธ์ธ์ด ํ์ํฉ๋๋ค
๋๊ธ์ ์์ฑํ๋ ค๋ฉด ๋จผ์ ๋ก๊ทธ์ธํด์ฃผ์ธ์.
๋๊ธ 0
์ง์์ธ์ ์ฒ - ์ง์ ์ฌ์ฐ๊ถ ๋ณดํธ ๊ณ ์ง
์ง์ ์ฌ์ฐ๊ถ ๋ณดํธ ๊ณ ์ง
- ์ ์๊ถ ๋ฐ ์์ ๊ถ: ๋ณธ ์ปจํ ์ธ ๋ ์ฌ๋ฅ๋ท์ ๋ ์ AI ๊ธฐ์ ๋ก ์์ฑ๋์์ผ๋ฉฐ, ๋ํ๋ฏผ๊ตญ ์ ์๊ถ๋ฒ ๋ฐ ๊ตญ์ ์ ์๊ถ ํ์ฝ์ ์ํด ๋ณดํธ๋ฉ๋๋ค.
- AI ์์ฑ ์ปจํ ์ธ ์ ๋ฒ์ ์ง์: ๋ณธ AI ์์ฑ ์ปจํ ์ธ ๋ ์ฌ๋ฅ๋ท์ ์ง์ ์ฐฝ์๋ฌผ๋ก ์ธ์ ๋๋ฉฐ, ๊ด๋ จ ๋ฒ๊ท์ ๋ฐ๋ผ ์ ์๊ถ ๋ณดํธ๋ฅผ ๋ฐ์ต๋๋ค.
- ์ฌ์ฉ ์ ํ: ์ฌ๋ฅ๋ท์ ๋ช ์์ ์๋ฉด ๋์ ์์ด ๋ณธ ์ปจํ ์ธ ๋ฅผ ๋ณต์ , ์์ , ๋ฐฐํฌ, ๋๋ ์์ ์ ์ผ๋ก ํ์ฉํ๋ ํ์๋ ์๊ฒฉํ ๊ธ์ง๋ฉ๋๋ค.
- ๋ฐ์ดํฐ ์์ง ๊ธ์ง: ๋ณธ ์ปจํ ์ธ ์ ๋ํ ๋ฌด๋จ ์คํฌ๋ํ, ํฌ๋กค๋ง, ๋ฐ ์๋ํ๋ ๋ฐ์ดํฐ ์์ง์ ๋ฒ์ ์ ์ฌ์ ๋์์ด ๋ฉ๋๋ค.
- AI ํ์ต ์ ํ: ์ฌ๋ฅ๋ท์ AI ์์ฑ ์ปจํ ์ธ ๋ฅผ ํ AI ๋ชจ๋ธ ํ์ต์ ๋ฌด๋จ ์ฌ์ฉํ๋ ํ์๋ ๊ธ์ง๋๋ฉฐ, ์ด๋ ์ง์ ์ฌ์ฐ๊ถ ์นจํด๋ก ๊ฐ์ฃผ๋ฉ๋๋ค.
์์ง ๋๊ธ์ด ์์ต๋๋ค.