인프라 구성
Contexa 인프라 레이어에 대한 상세 속성 참조 - 캐싱, Redis pub/sub 및 스트림, Kafka 이벤트 토픽, OpenTelemetry 관측성. 이 속성들은 분산 배포에서 Contexa가 외부 시스템과 통신하는 방식을 제어합니다.
Contexa 코어 속성 (요약)
최상위 ContexaProperties 클래스(접두사 contexa)는 인프라 모드, Redis, Kafka, 관측성의 마스터 스위치를 포함합니다. 이 속성들은 구성 개요 페이지에 완전히 문서화되어 있습니다. 인프라 관련 주요 항목은 다음과 같습니다:
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.infrastructure | |||
.mode |
enum |
STANDALONE |
STANDALONE (인메모리) 또는 DISTRIBUTED (Redis/Kafka) |
.redis.enabled |
boolean |
true |
분산 캐싱 및 pub/sub을 위한 Redis 활성화 |
.kafka.enabled |
boolean |
true |
Distributed 모드에서 이벤트 스트리밍을 위한 Kafka 활성화 |
.observability.enabled |
boolean |
true |
관측 인프라 활성화 |
.observability.open-telemetry-enabled |
boolean |
true |
분산 추적을 위한 OpenTelemetry 활성화 |
전체 ContexaProperties 참조는 구성 개요를 확인하세요.
캐시 속성
contexa.cache 아래의 속성으로, ContexaCacheProperties에 바인딩됩니다. Identity, 정책, 행동 데이터를 위해 Contexa 전반에서 사용되는 다중 계층 캐싱 하위 시스템을 제어합니다. 로컬(Caffeine), Redis, 하이브리드 캐싱 전략과 선택적 pub/sub 기반 캐시 무효화를 지원합니다.
일반 설정
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.cache | |||
.type |
CacheType |
REDIS |
LOCAL, REDIS, 또는 HYBRID (L1 로컬 + L2 Redis) |
.local.max-size |
int |
1000 |
로컬(L1) 캐시의 최대 항목 수 |
.local.default-ttl-seconds |
int |
60 |
로컬 캐시 항목의 기본 TTL (초) |
.redis.default-ttl-seconds |
int |
300 |
Redis 캐시 항목의 기본 TTL (초) |
.redis.key-prefix |
String |
contexa:cache: |
모든 Redis 캐시 키의 접두사 (네임스페이스 격리) |
.pubsub.enabled |
boolean |
true |
클러스터 노드 간 pub/sub 캐시 무효화 활성화 |
.pubsub.channel |
String |
contexa:cache:invalidation |
캐시 무효화 브로드캐스트를 위한 pub/sub 채널 |
도메인별 TTL
각 캐시 도메인은 로컬 및 Redis 계층에 대해 독립적인 TTL 값을 가질 수 있습니다. 이를 통해 세밀한 제어가 가능합니다 - 예를 들어, 자주 변경되는 정책 데이터는 짧은 TTL을 사용하고 안정적인 HCAD 기준선 데이터는 긴 TTL을 사용할 수 있습니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.cache.domains | |||
.users |
TtlConfig |
local: 3600 / redis: 3600 |
사용자 Identity 및 프로필 데이터 |
.roles |
TtlConfig |
local: 14400 / redis: 14400 |
역할 정의 및 권한 매핑 |
.permissions |
TtlConfig |
local: 28800 / redis: 28800 |
권한 부여 및 접근 제어 항목 |
.groups |
TtlConfig |
local: 14400 / redis: 14400 |
그룹 멤버십 및 계층 데이터 |
.policies |
TtlConfig |
local: 30 / redis: 300 |
XACML/ABAC 정책 정의 (짧은 로컬 TTL) |
.soar |
TtlConfig |
local: 900 / redis: 900 |
SOAR 플레이북 및 자동 응답 데이터 |
.hcad |
TtlConfig |
local: 86400 / redis: 86400 |
HCAD 행동 기준선 (장기 프로필) |
각 도메인 항목은 local-ttl-seconds 및 redis-ttl-seconds 필드를 가진 TtlConfig 객체입니다. 각 도메인을 독립적으로 재정의할 수 있습니다:
contexa:
cache:
type: HYBRID
local:
max-size: 5000
default-ttl-seconds: 120
redis:
default-ttl-seconds: 600
key-prefix: "myapp:contexa:cache:"
pubsub:
enabled: true
channel: "contexa:cache:invalidation"
domains:
users:
local-ttl-seconds: 1800
redis-ttl-seconds: 3600
policies:
local-ttl-seconds: 15
redis-ttl-seconds: 60
hcad:
local-ttl-seconds: 43200
redis-ttl-seconds: 86400
보안 Kafka 속성
security.kafka 아래의 속성으로, SecurityKafkaProperties에 바인딩됩니다. Contexa 보안 이벤트 파이프라인의 Kafka 토픽 이름을 구성합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
security.kafka | |||
.topic.dlq |
String |
security-events-dlq |
실패한 이벤트 처리를 위한 데드 레터 큐 토픽 |
security:
kafka:
topic:
dlq: "security-events-dlq"
관련 문서: Zero Trust 보안 참조 | SOAR 자동화 참조
OpenTelemetry 속성
contexa.opentelemetry 아래의 속성으로, OpenTelemetryProperties에 바인딩됩니다. 분산 추적, 메트릭 내보내기, 관측성을 위한 OpenTelemetry 통합을 구성합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.opentelemetry | |||
.enabled |
boolean |
true |
OpenTelemetry 추적 및 메트릭 내보내기 활성화 |
.service-name |
String |
contexa-core |
추적 스팬 및 메트릭 라벨의 서비스 이름 |
.exporter-endpoint |
String |
http://localhost:4317 |
OTLP 내보내기 엔드포인트 (gRPC; HTTP는 4318) |
.sampling-probability |
double |
1.0 |
샘플링 확률 (0.0-1.0); 프로덕션에서는 낮추기 |
contexa:
opentelemetry:
enabled: true
service-name: "my-application"
exporter-endpoint: "http://otel-collector.monitoring:4317"
sampling-probability: 0.1
전체 구성 예제
Redis, Kafka, 외부 OpenTelemetry 수집기를 사용하는 분산 배포를 위한 프로덕션 준비 application.yml로 모든 인프라 속성을 결합한 것입니다.
# Infrastructure configuration for Contexa distributed deployment
contexa:
enabled: true
infrastructure:
mode: DISTRIBUTED
redis:
enabled: true
kafka:
enabled: true
observability:
enabled: true
open-telemetry-enabled: true
# Multi-tier caching
cache:
type: HYBRID
local:
max-size: 5000
default-ttl-seconds: 120
redis:
default-ttl-seconds: 600
key-prefix: "contexa:cache:"
pubsub:
enabled: true
channel: "contexa:cache:invalidation"
domains:
users:
local-ttl-seconds: 1800
redis-ttl-seconds: 3600
roles:
local-ttl-seconds: 7200
redis-ttl-seconds: 14400
permissions:
local-ttl-seconds: 14400
redis-ttl-seconds: 28800
groups:
local-ttl-seconds: 7200
redis-ttl-seconds: 14400
policies:
local-ttl-seconds: 15
redis-ttl-seconds: 120
soar:
local-ttl-seconds: 900
redis-ttl-seconds: 900
hcad:
local-ttl-seconds: 86400
redis-ttl-seconds: 86400
# OpenTelemetry
opentelemetry:
enabled: true
service-name: "contexa-production"
exporter-endpoint: "http://otel-collector.monitoring:4317"
sampling-probability: 0.1
# Security event infrastructure - Kafka
security:
kafka:
topic:
dlq: "security-events-dlq"