인프라 구성
Contexa 인프라 레이어에 대한 상세 속성 참조 - 캐싱, Redis pub/sub 및 스트림, Kafka 이벤트 토픽, OpenTelemetry 관측성. 이 속성들은 분산 배포에서 Contexa가 외부 시스템과 통신하는 방식을 제어합니다.
분산 배포 활성화 (PoC / 엔터프라이즈 시연) — 분산 모드가 필요하면 contexa init --distributed 를 실행하세요. CLI 가 자동 처리합니다:
- 의존성 —
spring-kafka,redisson을 빌드 파일에 자동 추가 - 인프라 —
docker-compose.yml에 PostgreSQL + Ollama + Redis + Kafka + Zookeeper 정의 - 설정 —
application.yml의 Contexa 블록에contexa.infrastructure.mode: DISTRIBUTED+ Redis/Kafka 호스트 자동 추가
이 페이지의 속성들은 분산 모드 활성화 후 세부 튜닝에 사용합니다. 운영 배포는 Kubernetes + Helm 을 권장합니다.
Contexa 코어 속성 (요약)
최상위 ContexaProperties 클래스(접두사 contexa)는 인프라 모드, Redis, Kafka, 관측성의 마스터 스위치를 포함합니다. 이 속성들은 구성 개요 페이지에 완전히 문서화되어 있습니다. 인프라 관련 주요 항목은 다음과 같습니다:
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa (마스터) | |||
contexa.enabled |
boolean |
true |
Contexa 자동 구성 전체를 켜고 끄는 최상위 마스터 스위치입니다. false 면 모든 하위 모듈이 비활성화됩니다. |
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
Bridge 속성
BridgeProperties는 contexa.bridge에 바인딩됩니다. 외부(레거시) 인증 시스템과 Contexa 사이의 사용자/권한/위임/세션 정보를 양방향으로 매핑하는 브리지 계층을 제어합니다. SecurityContext 추출 키, 세션 attribute 후보, request attribute 키, HTTP 헤더 이름, 동기화 정책, 신뢰 프록시 목록을 정의합니다.
Bridge 핵심 토글
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.bridge.enabled | boolean | true | Bridge 계층 전체를 켜고 끄는 master switch입니다. |
contexa.bridge.populate-security-context | boolean | true | 외부 principal 정보를 Spring SecurityContext 로 채울지 여부입니다. |
동기화 (Sync)
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.bridge.sync.enabled | boolean | true | 외부 사용자 정보의 주기적 동기화를 활성화합니다. |
contexa.bridge.sync.min-refresh-interval-seconds | long | 60 | 동일 principal 에 대한 동기화 호출 최소 간격(초)입니다. throttle 역할. |
contexa.bridge.sync.synthetic-email-domain | String | shadow.contexa.local | 외부에서 이메일이 제공되지 않을 때 합성 이메일을 만들기 위한 도메인 suffix 입니다. |
신뢰 프록시 (Network)
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.bridge.network.trusted-proxy-validation-enabled | boolean | true | X-Forwarded-* 헤더를 신뢰하기 전에 reverse proxy 출처 검증을 수행할지 여부입니다. |
contexa.bridge.network.trusted-proxies | List<String> | [] (빈 목록) | 신뢰하는 reverse proxy IP 또는 CIDR 목록입니다. 비어 있으면 검증이 활성화되어도 헤더는 신뢰되지 않습니다. |
Authentication SecurityContext 키
contexa.bridge.authentication.security-context 아래의 속성으로, Authentication.SecurityContext 에 바인딩됩니다. 외부 인증 토큰의 claim/attribute 에서 표시 이름·principal 타입·인증 방식·assurance·MFA 상태·인증 시각·기타 추가 attribute 를 추출할 때 시도하는 키 목록을 정의합니다. 첫 번째 매칭 키의 값이 사용됩니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.bridge.authentication.security-context.enabled | boolean | true | SecurityContext 추출 동작을 활성화합니다. |
contexa.bridge.authentication.security-context.display-name-keys | List<String> | [displayName, name, fullName, userName, username, preferred_username] | 표시 이름 추출 시 시도하는 키 목록입니다. |
contexa.bridge.authentication.security-context.principal-type-keys | List<String> | [principalType, userType, actorType, token_use] | principal 타입(user / service / agent 등) 추출 키 목록입니다. |
contexa.bridge.authentication.security-context.authentication-type-keys | List<String> | [authenticationType, authMethod, loginMethod, method, factorType] | 인증 방식 추출 키 목록입니다. |
contexa.bridge.authentication.security-context.authentication-assurance-keys | List<String> | [authenticationAssurance, authLevel, loa, acr] | 인증 assurance 레벨(LoA/ACR) 추출 키 목록입니다. |
contexa.bridge.authentication.security-context.mfa-keys | List<String> | [mfa, mfaVerified, mfaCompleted, secondFactorVerified, amr] | MFA 완료 여부 추출 키 목록입니다. |
contexa.bridge.authentication.security-context.auth-time-keys | List<String> | [authenticationTime, authenticatedAt, loginTime, issuedAt, auth_time, iat] | 인증 시각 추출 키 목록입니다. |
contexa.bridge.authentication.security-context.attribute-keys | List<String> | [organizationId, orgId, tenantId, department, team, email, loginIp, authenticationType, authenticationAssurance, mfaVerified, mfaCompleted, authenticatedAt, loginTime, iss, aud, azp, scope, scp, amr, acr] | SecurityContext 에 보존할 추가 attribute 키 목록입니다 (20개 기본). |
Authentication Session 키
contexa.bridge.authentication.session 아래의 속성으로, 공통 Bridge.Session 에 바인딩됩니다. 외부 시스템이 HTTP 세션의 attribute 로 인증된 사용자 객체를 보관할 때, Contexa 가 어떤 attribute 이름을 시도하고, 그 객체에서 어떤 키로 principal id, 표시 이름, 권한, 인증 방식, MFA 상태, 인증 시각, 추가 attribute 를 추출할지 정의합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.bridge.authentication.session.enabled | boolean | true | HTTP 세션 기반 사용자 추출을 활성화합니다. |
contexa.bridge.authentication.session.attribute | String | "" (빈 문자열) | 사용자 객체가 들어 있는 세션 attribute 이름을 명시적으로 지정합니다. 비어 있고 auto-discover 가 true 면 후보 목록을 순회합니다. |
contexa.bridge.authentication.session.attribute-candidates | List<String> | [currentUser, authenticatedUser, sessionUser, userSession, principal, user, securityUser, authenticatedPrincipal] | auto-discover 모드에서 시도하는 세션 attribute 후보 이름 목록입니다. |
contexa.bridge.authentication.session.auto-discover | boolean | true | attribute 후보 목록을 자동 탐색할지 여부입니다. |
contexa.bridge.authentication.session.object-type-name | String | "" (빈 문자열) | 발견된 객체가 특정 클래스 이름과 일치해야 하는 경우 그 fully-qualified 이름을 지정합니다 (선택). |
contexa.bridge.authentication.session.principal-id-keys | List<String> | [userId, username, id, loginId, email] | 세션 객체에서 principal 식별자를 읽을 때 시도하는 키 목록입니다. |
contexa.bridge.authentication.session.display-name-keys | List<String> | [displayName, name, fullName, userName, preferred_username] | 표시 이름 추출 키 목록입니다. |
contexa.bridge.authentication.session.authorities-keys | List<String> | [roles, authorities, permissions, scopes] | 권한·역할·스코프 추출 키 목록입니다. |
contexa.bridge.authentication.session.authentication-type-keys | List<String> | [authenticationType, authMethod, loginMethod] | 인증 방식 추출 키 목록입니다. |
contexa.bridge.authentication.session.authentication-assurance-keys | List<String> | [authenticationAssurance, authLevel, loa] | 인증 assurance 레벨 추출 키 목록입니다. |
contexa.bridge.authentication.session.mfa-keys | List<String> | [mfa, mfaVerified, mfa_verified] | MFA 완료 여부 추출 키 목록입니다. |
contexa.bridge.authentication.session.auth-time-keys | List<String> | [authenticationTime, authenticatedAt, loginTime] | 인증 시각 추출 키 목록입니다. |
contexa.bridge.authentication.session.attribute-keys | List<String> | [department, organizationId, orgId, authMethod, loginIp, loginTime] | SecurityContext 에 보존할 추가 attribute 키 목록입니다. |
Authentication RequestAttributes 키
contexa.bridge.authentication.request-attributes 아래의 속성으로, 공통 Bridge.RequestAttributes 에 바인딩됩니다. 외부 필터가 사용자 객체를 HttpServletRequest attribute 로 보관할 때 어떤 attribute 후보를 시도할지, 그 객체에서 어떤 키로 정보를 읽을지, Contexa 가 다시 request attribute 로 노출할 때 어떤 평면 key 이름을 쓸지를 정의합니다.
탐색 / 추출 (공통 13)
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.bridge.authentication.request-attributes.enabled | boolean | true | request-attribute 기반 사용자 추출을 활성화합니다. |
contexa.bridge.authentication.request-attributes.attribute | String | "" (빈 문자열) | 사용자 객체가 들어 있는 request attribute 이름을 명시적으로 지정합니다. |
contexa.bridge.authentication.request-attributes.attribute-candidates | List<String> | [currentUser, authenticatedUser, requestUser, principal, user, authenticatedPrincipal, authUser] | auto-discover 모드에서 시도하는 request attribute 후보 이름 목록입니다. |
contexa.bridge.authentication.request-attributes.auto-discover | boolean | true | attribute 후보 목록을 자동 탐색할지 여부입니다. |
contexa.bridge.authentication.request-attributes.object-type-name | String | "" (빈 문자열) | 발견된 객체가 일치해야 하는 fully-qualified 클래스 이름(선택)입니다. |
contexa.bridge.authentication.request-attributes.principal-id-keys | List<String> | [userId, username, id, loginId, email] | principal 식별자 추출 키 목록입니다. |
contexa.bridge.authentication.request-attributes.display-name-keys | List<String> | [displayName, name, fullName, userName, preferred_username] | 표시 이름 추출 키 목록입니다. |
contexa.bridge.authentication.request-attributes.authorities-keys | List<String> | [roles, authorities, permissions, scopes] | 권한·역할·스코프 추출 키 목록입니다. |
contexa.bridge.authentication.request-attributes.authentication-type-keys | List<String> | [authenticationType, authMethod, loginMethod] | 인증 방식 추출 키 목록입니다. |
contexa.bridge.authentication.request-attributes.authentication-assurance-keys | List<String> | [authenticationAssurance, authLevel, loa] | 인증 assurance 레벨 추출 키 목록입니다. |
contexa.bridge.authentication.request-attributes.mfa-keys | List<String> | [mfa, mfaVerified, mfa_verified] | MFA 완료 여부 추출 키 목록입니다. |
contexa.bridge.authentication.request-attributes.auth-time-keys | List<String> | [authenticationTime, authenticatedAt, loginTime] | 인증 시각 추출 키 목록입니다. |
contexa.bridge.authentication.request-attributes.attribute-keys | List<String> | [department, organizationId, orgId, authMethod, loginIp, loginTime] | SecurityContext 에 보존할 추가 attribute 키 목록입니다. |
평면 인증 attribute 키 (flat-*, 8)
Contexa 가 request attribute 로 다시 평탄화해서 노출할 때 사용하는 단일 키 이름입니다. 다운스트림 컴포넌트가 이 키로 직접 읽을 수 있습니다.
| 속성 | 기본값 | 설명 |
|---|---|---|
contexa.bridge.authentication.request-attributes.flat-principal-id | ctxa.auth.principalId | principal 식별자. |
contexa.bridge.authentication.request-attributes.flat-display-name | ctxa.auth.displayName | 표시 이름. |
contexa.bridge.authentication.request-attributes.flat-authenticated | ctxa.auth.authenticated | 인증 여부 boolean. |
contexa.bridge.authentication.request-attributes.flat-authorities | ctxa.auth.authorities | 권한 목록. |
contexa.bridge.authentication.request-attributes.flat-authentication-type | ctxa.auth.type | 인증 방식. |
contexa.bridge.authentication.request-attributes.flat-authentication-assurance | ctxa.auth.assurance | 인증 assurance 레벨. |
contexa.bridge.authentication.request-attributes.flat-mfa-completed | ctxa.auth.mfaCompleted | MFA 완료 여부. |
contexa.bridge.authentication.request-attributes.flat-authentication-time | ctxa.auth.time | 인증 시각. |
Authorization 매핑 키 (7)
| 속성 | 기본값 | 설명 |
|---|---|---|
contexa.bridge.authentication.request-attributes.authorization-effect | ctxa.authz.effect | 인가 결정 effect (ALLOW/DENY). |
contexa.bridge.authentication.request-attributes.privileged | ctxa.authz.privileged | 특권 흐름 여부. |
contexa.bridge.authentication.request-attributes.policy-id | ctxa.authz.policyId | 적용된 정책 ID. |
contexa.bridge.authentication.request-attributes.policy-version | ctxa.authz.policyVersion | 정책 버전. |
contexa.bridge.authentication.request-attributes.scope-tags | ctxa.authz.scopeTags | 스코프 태그. |
contexa.bridge.authentication.request-attributes.effective-roles | ctxa.authz.roles | 유효 역할 집합. |
contexa.bridge.authentication.request-attributes.effective-authorities | ctxa.authz.authorities | 유효 권한 집합. |
Delegation 매핑 키 (11)
| 속성 | 기본값 | 설명 |
|---|---|---|
contexa.bridge.authentication.request-attributes.delegated | ctxa.delegation.enabled | 위임 활성 여부. |
contexa.bridge.authentication.request-attributes.agent-id | ctxa.delegation.agentId | 위임받은 agent ID. |
contexa.bridge.authentication.request-attributes.objective-id | ctxa.delegation.objectiveId | 위임 objective ID. |
contexa.bridge.authentication.request-attributes.objective-family | ctxa.delegation.objectiveFamily | objective 계열/타입. |
contexa.bridge.authentication.request-attributes.objective-summary | ctxa.delegation.objectiveSummary | objective 요약. |
contexa.bridge.authentication.request-attributes.allowed-operations | ctxa.delegation.allowedOperations | 허용 operation 목록. |
contexa.bridge.authentication.request-attributes.allowed-resources | ctxa.delegation.allowedResources | 허용 resource 목록. |
contexa.bridge.authentication.request-attributes.approval-required | ctxa.delegation.approvalRequired | 승인 필요 여부. |
contexa.bridge.authentication.request-attributes.privileged-export-allowed | ctxa.delegation.privilegedExportAllowed | 특권 export 허용 여부. |
contexa.bridge.authentication.request-attributes.containment-only | ctxa.delegation.containmentOnly | containment-only 제한 여부. |
contexa.bridge.authentication.request-attributes.expires-at | ctxa.delegation.expiresAt | 위임 만료 시각. |
Authentication HTTP 헤더 이름
contexa.bridge.authentication.headers 아래의 속성으로, 공통 Bridge.Headers 에 바인딩됩니다. 외부 reverse proxy 또는 게이트웨이가 인증·인가·위임 정보를 HTTP 헤더로 전달할 때 Contexa 가 어떤 헤더 이름을 읽거나 발행할지 정의합니다. 모든 헤더 이름은 변경 가능합니다.
토글
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.bridge.authentication.headers.enabled | boolean | true | HTTP 헤더 기반 추출/발행을 활성화합니다. |
인증 헤더 (8)
| 속성 | 기본값 | 설명 |
|---|---|---|
contexa.bridge.authentication.headers.principal-id | X-Contexa-Principal-Id | principal 식별자 헤더. |
contexa.bridge.authentication.headers.display-name | X-Contexa-Principal-Name | 표시 이름 헤더. |
contexa.bridge.authentication.headers.authenticated | X-Contexa-Authenticated | 인증 완료 boolean 헤더. |
contexa.bridge.authentication.headers.authorities | X-Contexa-Authorities | 권한 목록 헤더. |
contexa.bridge.authentication.headers.authentication-type | X-Contexa-Authentication-Type | 인증 방식 헤더. |
contexa.bridge.authentication.headers.authentication-assurance | X-Contexa-Authentication-Assurance | 인증 assurance 레벨 헤더. |
contexa.bridge.authentication.headers.mfa-completed | X-Contexa-Mfa-Completed | MFA 완료 여부 헤더. |
contexa.bridge.authentication.headers.authentication-time | X-Contexa-Authenticated-At | 인증 시각 헤더. |
Authorization 헤더 (7)
| 속성 | 기본값 | 설명 |
|---|---|---|
contexa.bridge.authentication.headers.authorization-effect | X-Contexa-Authz-Effect | 인가 결정 effect 헤더. |
contexa.bridge.authentication.headers.privileged | X-Contexa-Authz-Privileged | 특권 흐름 boolean 헤더. |
contexa.bridge.authentication.headers.policy-id | X-Contexa-Authz-Policy | 적용된 정책 ID 헤더. |
contexa.bridge.authentication.headers.policy-version | X-Contexa-Authz-Policy-Version | 정책 버전 헤더. |
contexa.bridge.authentication.headers.scope-tags | X-Contexa-Authz-Scope | 스코프 태그 헤더. |
contexa.bridge.authentication.headers.effective-roles | X-Contexa-Authz-Roles | 유효 역할 집합 헤더. |
contexa.bridge.authentication.headers.effective-authorities | X-Contexa-Authz-Authorities | 유효 권한 집합 헤더. |
Delegation 헤더 (11)
| 속성 | 기본값 | 설명 |
|---|---|---|
contexa.bridge.authentication.headers.delegated | X-Contexa-Delegated | 위임 활성 여부 헤더. |
contexa.bridge.authentication.headers.agent-id | X-Contexa-Agent-Id | 위임받은 agent ID 헤더. |
contexa.bridge.authentication.headers.objective-id | X-Contexa-Objective-Id | 위임 objective ID 헤더. |
contexa.bridge.authentication.headers.objective-family | X-Contexa-Objective-Family | objective 계열/타입 헤더. |
contexa.bridge.authentication.headers.objective-summary | X-Contexa-Objective-Summary | objective 요약 헤더. |
contexa.bridge.authentication.headers.allowed-operations | X-Contexa-Allowed-Operations | 허용 operation 헤더. |
contexa.bridge.authentication.headers.allowed-resources | X-Contexa-Allowed-Resources | 허용 resource 헤더. |
contexa.bridge.authentication.headers.approval-required | X-Contexa-Approval-Required | 승인 필요 여부 헤더. |
contexa.bridge.authentication.headers.privileged-export-allowed | X-Contexa-Privileged-Export-Allowed | 특권 export 허용 여부 헤더. |
contexa.bridge.authentication.headers.containment-only | X-Contexa-Containment-Only | containment-only 제한 헤더. |
contexa.bridge.authentication.headers.expires-at | X-Contexa-Delegation-Expires-At | 위임 만료 시각 헤더. |
Authorization SecurityContext 키
contexa.bridge.authorization.security-context 아래의 속성으로, Authorization.SecurityContext 에 바인딩됩니다. 외부 시스템이 Spring SecurityContext 의 Authentication 객체에 인가 결정 결과(effect, 정책 ID, 권한 등)를 attribute 로 보관할 때, Contexa 가 어떤 키를 시도해서 그 정보를 읽을지 정의합니다. 첫 번째 매칭 키의 값이 사용됩니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.bridge.authorization.security-context.enabled | boolean | true | SecurityContext 기반 인가 정보 추출을 활성화합니다. |
contexa.bridge.authorization.security-context.authorization-effect-keys | List<String> | [authorizationEffect, effect, decision, decisionEffect] | 인가 결정 effect (ALLOW/DENY) 추출 키 목록입니다. |
contexa.bridge.authorization.security-context.privileged-keys | List<String> | [privileged, isPrivileged, privilegedFlow] | 특권 흐름 boolean 추출 키 목록입니다. |
contexa.bridge.authorization.security-context.policy-id-keys | List<String> | [policyId, policy, decisionPolicy] | 적용된 정책 ID 추출 키 목록입니다. |
contexa.bridge.authorization.security-context.policy-version-keys | List<String> | [policyVersion, version] | 정책 버전 추출 키 목록입니다. |
contexa.bridge.authorization.security-context.scope-tag-keys | List<String> | [scopeTags, scopes, scope, permissionScopes, scp] | 스코프 태그 추출 키 목록입니다. |
contexa.bridge.authorization.security-context.role-keys | List<String> | [effectiveRoles, roles, roleSet, groups] | 유효 역할 집합 추출 키 목록입니다. |
contexa.bridge.authorization.security-context.authority-keys | List<String> | [effectiveAuthorities, authorities, permissions, grantedAuthorities, scope, scp] | 유효 권한 집합 추출 키 목록입니다. |
contexa.bridge.authorization.security-context.attribute-keys | List<String> | [authorizationEffect, effect, privileged, policyId, policyVersion, scopeTags, scopes, scope, scp, roles, effectiveRoles, permissions, effectiveAuthorities] | 인가 컨텍스트로 보존할 추가 attribute 키 목록입니다 (13개 기본). |
Authorization Session 키
contexa.bridge.authorization.session 아래의 속성으로, Authorization.Session 에 바인딩됩니다. 외부 시스템이 HTTP 세션 attribute 의 사용자 객체에 인가 결정 정보를 담아 둘 때 어떤 attribute 후보를 시도하고, 그 객체에서 어떤 키로 effect/정책/스코프/역할/권한을 추출할지 정의합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.bridge.authorization.session.enabled | boolean | true | 세션 기반 인가 정보 추출을 활성화합니다. |
contexa.bridge.authorization.session.attribute | String | "" (빈 문자열) | 사용자 객체가 들어 있는 세션 attribute 이름. |
contexa.bridge.authorization.session.attribute-candidates | List<String> | [currentUser, authenticatedUser, sessionUser, userSession, principal, user, securityUser, authenticatedPrincipal] | auto-discover 모드에서 시도하는 세션 attribute 후보. |
contexa.bridge.authorization.session.auto-discover | boolean | true | attribute 후보 자동 탐색 여부. |
contexa.bridge.authorization.session.object-type-name | String | "" (빈 문자열) | 발견된 객체가 일치해야 하는 클래스 이름(선택). |
contexa.bridge.authorization.session.principal-id-keys | List<String> | [userId, username, id, loginId, email] | principal 식별자 추출 키. |
contexa.bridge.authorization.session.authorization-effect-keys | List<String> | [authorizationEffect, effect, decision, decisionEffect] | 인가 effect 추출 키. |
contexa.bridge.authorization.session.privileged-keys | List<String> | [privileged, isPrivileged, privilegedFlow] | 특권 흐름 추출 키. |
contexa.bridge.authorization.session.policy-id-keys | List<String> | [policyId, policy, decisionPolicy] | 정책 ID 추출 키. |
contexa.bridge.authorization.session.policy-version-keys | List<String> | [policyVersion, version] | 정책 버전 추출 키. |
contexa.bridge.authorization.session.scope-tag-keys | List<String> | [scopeTags, scopes, scope, permissionScopes] | 스코프 태그 추출 키 (Authorization.SecurityContext 와 달리 scp 미포함). |
contexa.bridge.authorization.session.role-keys | List<String> | [effectiveRoles, roles, roleSet] | 유효 역할 집합 추출 키 (groups 미포함). |
contexa.bridge.authorization.session.authority-keys | List<String> | [effectiveAuthorities, authorities, permissions, grantedAuthorities] | 유효 권한 집합 추출 키 (scope, scp 미포함). |
contexa.bridge.authorization.session.attribute-keys | List<String> | [authorizationEffect, effect, privileged, policyId, policyVersion, scopeTags, scopes, roles, effectiveRoles, permissions, effectiveAuthorities, organizationId, orgId, tenantId, department, team] | 인가 컨텍스트로 보존할 추가 attribute 키 (16개 기본). |
Authorization RequestAttributes / Headers
Authorization 도 동일한 공통 Bridge.RequestAttributes / Bridge.Headers 클래스를 재사용합니다. 키 구조와 기본값은 위 Authentication RequestAttributes 키 · Authentication HTTP 헤더 이름 표와 100% 동일하며, prefix 만 다음과 같이 다릅니다:
contexa.bridge.authorization.request-attributes.*— 39 필드, 표 동일contexa.bridge.authorization.headers.*— 27 필드, 표 동일
같은 표를 다시 그리지 않고 prefix 만 안내하는 이유는 코드(BridgeProperties.java) 가 한 클래스를 3개 위치에서 참조하기 때문입니다 — 표 본문은 단일 진실의 출처를 유지합니다.
Delegation Session 키
contexa.bridge.delegation.session 아래의 속성으로, Delegation.Session 에 바인딩됩니다. 외부 시스템이 위임(agent delegation) 관련 정보 — agent ID, objective, 허용 operation/resource, 승인 필요, 만료 등 — 를 세션 attribute 의 사용자 객체에 담아둘 때 어떤 키를 시도할지 정의합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.bridge.delegation.session.enabled | boolean | true | 세션 기반 위임 정보 추출을 활성화합니다. |
contexa.bridge.delegation.session.attribute | String | "" (빈 문자열) | 사용자 객체가 들어 있는 세션 attribute 이름. |
contexa.bridge.delegation.session.attribute-candidates | List<String> | [currentUser, authenticatedUser, sessionUser, userSession, principal, user, securityUser, authenticatedPrincipal] | auto-discover 모드에서 시도하는 세션 attribute 후보. |
contexa.bridge.delegation.session.auto-discover | boolean | true | attribute 후보 자동 탐색 여부. (※ Delegation.Session 은 object-type-name 필드를 갖지 않습니다.) |
contexa.bridge.delegation.session.principal-id-keys | List<String> | [userId, username, id, loginId, email] | principal 식별자 추출 키. |
contexa.bridge.delegation.session.delegated-keys | List<String> | [delegated, delegationEnabled, agentDelegated] | 위임 활성 여부 추출 키. |
contexa.bridge.delegation.session.agent-id-keys | List<String> | [agentId, delegateAgentId] | agent ID 추출 키. |
contexa.bridge.delegation.session.objective-id-keys | List<String> | [objectiveId, taskPurpose, delegationObjectiveId] | 위임 objective ID 추출 키. |
contexa.bridge.delegation.session.objective-family-keys | List<String> | [objectiveFamily, objectiveType, delegationObjectiveFamily] | objective 계열/타입 추출 키. |
contexa.bridge.delegation.session.objective-summary-keys | List<String> | [objectiveSummary, taskSummary, delegationObjectiveSummary] | objective 요약 추출 키. |
contexa.bridge.delegation.session.allowed-operations-keys | List<String> | [allowedOperations, delegatedOperations, permittedOperations] | 허용 operation 목록 추출 키. |
contexa.bridge.delegation.session.allowed-resources-keys | List<String> | [allowedResources, delegatedResources, permittedResources] | 허용 resource 목록 추출 키. |
contexa.bridge.delegation.session.approval-required-keys | List<String> | [approvalRequired, requiresApproval] | 승인 필요 여부 추출 키. |
contexa.bridge.delegation.session.privileged-export-allowed-keys | List<String> | [privilegedExportAllowed, allowPrivilegedExport] | 특권 export 허용 여부 추출 키. |
contexa.bridge.delegation.session.containment-only-keys | List<String> | [containmentOnly, restrictedContainment] | containment-only 제한 여부 추출 키. |
contexa.bridge.delegation.session.expires-at-keys | List<String> | [expiresAt, delegationExpiresAt] | 위임 만료 시각 추출 키. |
contexa.bridge.delegation.session.attribute-keys | List<String> | [delegated, agentId, objectiveId, objectiveFamily, objectiveSummary, allowedOperations, allowedResources, approvalRequired, privilegedExportAllowed, containmentOnly, expiresAt, organizationId, orgId, tenantId, department, team] | 위임 컨텍스트로 보존할 추가 attribute 키 (16개 기본). |
Delegation RequestAttributes / Headers
Delegation 도 동일한 공통 Bridge.RequestAttributes / Bridge.Headers 클래스를 재사용합니다. 키 구조와 기본값은 Authentication RequestAttributes 키 · Authentication HTTP 헤더 이름 표와 100% 동일하며, prefix 만 다음과 같이 다릅니다:
contexa.bridge.delegation.request-attributes.*— 39 필드, 표 동일contexa.bridge.delegation.headers.*— 27 필드, 표 동일
보안 Kafka 속성
contexa.security.kafka 아래의 속성으로, SecurityKafkaProperties에 바인딩됩니다. Contexa 보안 이벤트 파이프라인의 Kafka 토픽 이름을 구성합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.security.kafka.topic (TopicSettings) | |||
.authorization | String | security-authorization-events | 인가 결정 이벤트 토픽. |
.authentication | String | auth-events | 인증 이벤트 토픽. |
.incident | String | security-incident-events | 보안 인시던트 이벤트 토픽. |
.threat | String | threat-indicators | 위협 지표 토픽. |
.audit | String | security-audit-events | 감사 이벤트 토픽. |
.general | String | security-events | 일반 보안 이벤트 토픽. |
.dlq | String | security-events-dlq | 실패한 이벤트 처리를 위한 dead-letter queue 토픽. |
.soar-action | String | soar-action-events | SOAR action 이벤트 토픽. |
contexa.security.kafka.dlq (DlqSettings) | |||
.max-retries | int | 3 | DLQ 처리 시 최대 재시도 횟수. |
.retry-delay-ms | int | 5000 | 재시도 간 지연(ms). |
.alert-threshold | int | 10 | DLQ 메시지가 이 임계값을 넘으면 알림. |
security:
kafka:
topic:
authorization: security-authorization-events
authentication: auth-events
incident: security-incident-events
threat: threat-indicators
audit: security-audit-events
general: security-events
dlq: security-events-dlq
soar-action: soar-action-events
dlq:
max-retries: 3
retry-delay-ms: 5000
alert-threshold: 10
관련 문서: 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
Security Plane 속성
contexa.security.plane 아래의 속성으로, SecurityPlaneProperties에 바인딩됩니다. 분산 security-plane agent, Kafka 토픽, Redis relay, 모니터링 배치, deduplication 윈도우, 비동기 보안 분석에 사용하는 LLM executor pool을 구성합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.security.plane.agent | |||
.name | String | SecurityPlaneAgent-1 | 에이전트 인스턴스 이름 |
.auto-start | boolean | true | 기동 시 자동 시작 |
.organization-id | String | default-org | 분산 배포 조직 ID |
.execution-mode | String | ASYNC | 에이전트 실행 모드 |
.auto-approve-low-risk | boolean | false | 저위험 자동 승인 여부 |
.event-timeout-ms | long | 30000 | 이벤트 처리 타임아웃 |
.max-deferred-retries | int | 3 | 지연 재시도 최대 횟수 |
contexa.security.plane.kafka | |||
.bootstrap-servers | String | localhost:9092 | Kafka bootstrap servers |
.group-id | String | security-plane-consumer | Kafka consumer group id |
.topics.contexa-security-events | String | contexa-security-events | 보안 이벤트 토픽 |
.topics.threat-indicators | String | threat-indicators | 위협 지표 토픽 |
.topics.network-events | String | network-events | 네트워크 이벤트 토픽 |
.topics.auth-events | String | auth-events | 인증 이벤트 토픽 |
contexa.security.plane.monitor | |||
.queue-size | int | 10000 | 이벤트 큐 용량 |
.batch-size | int | 8 | 모니터링 배치 크기 |
.flush-interval-ms | long | 500 | 배치 flush 간격 |
.correlation-window-minutes | int | 10 | 상관관계 윈도우 |
.dedup-window-minutes | int | 5 | 중복 제거 윈도우 |
contexa.security.plane.notifier | |||
.batch-size | int | 10 | 알림 배치 크기 |
.async-enabled | boolean | true | 비동기 알림 전송 활성화 |
.critical-threshold | double | 0.8 | 치명 알림 임계값 |
contexa.security.plane.redis | |||
.batch-size | int | 50 | Redis publish 배치 크기 |
.cache.ttl-minutes | int | 60 | Redis relay 캐시 TTL |
.channel.contexa-security-events | String | security:events | 보안 이벤트 Redis 채널 |
.channel.threat-alerts | String | security:threats | 위협 알림 Redis 채널 |
contexa.security.plane.llm-executor | |||
.core-pool-size | int | 2 | LLM 분석 코어 스레드 수 |
.max-pool-size | int | 2 | LLM 분석 최대 스레드 수 |
.queue-capacity | int | 50 | 대기 중인 LLM 작업 큐 용량 |
contexa.security.plane.deduplication | |||
.enabled | boolean | true | 중복 제거 활성화 |
.window-minutes | int | 5 | 중복 제거 윈도우 |
.cache-size | int | 10000 | 중복 제거 캐시 크기 |
security:
plane:
agent:
name: SecurityPlaneAgent-1
auto-start: true
organization-id: default-org
execution-mode: ASYNC
auto-approve-low-risk: false
event-timeout-ms: 30000
max-deferred-retries: 3
llm-executor:
core-pool-size: 2
max-pool-size: 2
queue-capacity: 50
deduplication:
enabled: true
window-minutes: 5
cache-size: 10000
관련 문서: Zero Trust 플로우, SOAR 참조
라우터 속성
contexa.security.router 아래의 속성으로, SecurityRouterProperties에 바인딩됩니다. 이벤트 라우팅 결정에 사용하는 점수 임계값을 정의합니다 (SOAR 자동화 / 차단 / 분석 신뢰도 / pass-through).
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.security.router.threshold | |||
.soar | double | 0.9 | SOAR 자동 대응 임계값 |
.block | double | 0.8 | 차단 결정 임계값 |
.analysis-confidence | double | 0.6 | 분석 결과 채택 신뢰도 임계값 |
.pass-through | double | 0.6 | pass-through 허용 임계값 |
이벤트 속성
contexa.security.event 아래의 속성으로, SecurityEventProperties에 바인딩됩니다. 이벤트 발행 게이트, 비동기 executor pool, 계층별 지연 예산, 중복 제거 캐시를 구성합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.security.event.publishing | |||
.enabled | boolean | true | 이벤트 발행 활성화 |
.exclude-uris | String | /actuator,/health,/metrics | 발행 제외 URI 목록(쉼표 구분) |
.anonymous.enabled | boolean | true | 익명 사용자 이벤트 발행 활성화 |
contexa.security.event.executor | |||
.core-pool-size | int | cores × 2 | 이벤트 처리 코어 스레드 수 |
.max-pool-size | int | cores × 4 | 최대 스레드 수 |
.queue-capacity | int | 10000 | 대기 큐 용량 |
contexa.security.event.tier | |||
.critical.max-latency-ms | int | 100 | 치명 이벤트 처리 지연 한계(ms) |
.contextual.max-latency-ms | int | 1000 | 컨텍스트 이벤트 지연 한계(ms) |
.general.max-latency-ms | int | 10000 | 일반 이벤트 지연 한계(ms) |
.general.sampling-rate | double | 0.1 | 일반 이벤트 샘플링 비율 |
contexa.security.event.deduplication | |||
.enabled | boolean | true | 중복 제거 활성화 |
.window-minutes | int | 5 | 중복 제거 윈도우(분) |
.cache-size | int | 10000 | 중복 제거 캐시 크기 |
콜드패스 속성
contexa.security.coldpath 아래의 속성으로, SecurityColdPathProperties에 바인딩됩니다. 비동기 LLM 분석 경로의 계층별 신뢰도 기준값을 정의합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.security.coldpath.confidence | |||
.layer1-base | double | 0.5 | 1계층 분석 기본 신뢰도 |
.layer2-base | double | 0.7 | 2계층 분석 기본 신뢰도 |
파이프라인 속성
contexa.security.pipeline 아래의 속성으로, SecurityPipelineProperties에 바인딩됩니다. 보안 이벤트 파이프라인의 Redis · Kafka 전송 경로를 구성합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.security.pipeline.kafka | |||
.topic | String | contexa-security-events | 파이프라인이 publish 할 Kafka 토픽 이름 |
참고: contexa.security.pipeline.redis 는 빈 marker 그룹입니다. 실제 Redis 동작은 contexa.security.plane.redis · security.zerotrust.redis 에서 구성합니다.
보안 Redis 속성
contexa.security.redis 아래의 속성으로, SecurityRedisProperties에 바인딩됩니다. Contexa 보안 이벤트의 Redis pub/sub 채널 이름, Redis stream 키, TTL, 메모리 임계값을 구성합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.security.redis.channel (ChannelSettings) | |||
.authorization | String | security:authorization:events | 인가 이벤트 pub/sub 채널. |
.authentication | String | security:events | 인증 이벤트 pub/sub 채널. |
.incident | String | security:incidents | 인시던트 pub/sub 채널. |
.threat | String | security:threats | 위협 pub/sub 채널. |
.audit | String | security:audit:events | 감사 pub/sub 채널. |
.general | String | security:events | 일반 pub/sub 채널. |
contexa.security.redis.stream (StreamSettings) | |||
.authorization | String | security:stream:authorization | 인가 Redis stream 키. |
.incident | String | security:stream:incident | 인시던트 Redis stream 키. |
.threat | String | security:stream:threat | 위협 Redis stream 키. |
.audit | String | security:stream:audit | 감사 Redis stream 키. |
.general | String | security:stream:general | 일반 Redis stream 키. |
.authentication | String | security:stream:authentication | 인증 Redis stream 키. |
.maxlen | int | 10000 | Redis stream 최대 항목 수 (XADD MAXLEN). |
contexa.security.redis.ttl (TtlSettings) | |||
.minutes | int | 60 | 이벤트 데이터의 기본 Redis TTL (분). |
contexa.security.redis.memory (MemorySettings) | |||
.max-mb | int | 1024 | Contexa 보안 이벤트가 사용 가능한 Redis 메모리 상한 (MB). |
.warning-threshold | double | 0.8 | 메모리 사용률 경고 임계값 (0.0~1.0). |
.critical-threshold | double | 0.9 | 메모리 사용률 critical 임계값 (0.0~1.0). |
스케줄러 락 속성
contexa.scheduler.lock 아래의 속성으로, ContexaSchedulerLockProperties (record) 에 바인딩됩니다. 다중 JVM 환경에서 @Scheduled + @SchedulerLock 메서드의 단일 실행을 보장하는 ShedLock auto-configuration 을 제어합니다. 단일 인스턴스 배포에서도 기본값을 유지해도 됩니다 — 락은 항상 성공하고 오버헤드는 무시 가능합니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.scheduler.lock | |||
.enabled | boolean | true | ShedLock auto-configuration 으로 LockProvider 빈 등록 여부. false 면 모든 @SchedulerLock 이 비활성화되고 각 @Scheduled 메서드는 단일 JVM 내 배타성만 보장합니다. |
.default-lock-at-most-for | Duration | 5m | 특정 스케줄러가 lockAtMostFor 를 지정하지 않을 때 적용되는 fallback 상한입니다. JVM crash 후 락이 영구히 남는 것을 방지합니다. |
.use-database-time | boolean | true | true 면 JdbcTemplateLockProvider 가 DB 의 now() 를 사용해 모든 인스턴스가 동일 시각을 봅니다. false 면 JVM 시계로 fallback (로컬 H2 테스트 단순화에 유용). |
데이터소스 속성
contexa.datasource 아래의 속성으로, ContexaDataSourceProperties 에 바인딩됩니다. Contexa 가 자체 메타데이터(정책, 사용자, 감사 로그 등)를 저장하는 데이터베이스 연결을 정의합니다. 호스트 application 의 spring.datasource 와 격리할 수 있습니다.
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
contexa.datasource | |||
.url | String | null | JDBC URL. 비어 있으면 host application 의 spring.datasource.url 을 공유합니다 (격리 정책에 따라 다름). |
.username | String | null | DB 사용자 이름. |
.password | String | null | DB 비밀번호. |
.driver-class-name | String | null | JDBC driver 클래스 이름. 비우면 URL 로부터 자동 탐지. |
contexa.datasource.isolation (Isolation) | |||
.allow-shared-application-datasource | boolean | false | 호스트 application 의 datasource 를 공유 사용을 허용합니다. 기본값은 격리 (별도 connection pool). |
.shared-application-datasource-risk-accepted | boolean | false | 공유 datasource 사용에 따른 위험을 운영자가 명시 수락했음을 표시합니다. |
.contexa-owned-application | boolean | false | 이 application 자체가 Contexa 가 운영하는 application 임을 표시 (격리 검증 우회). |
전체 구성 예제
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 Infrastructure
security:
kafka:
topic:
dlq: "security-events-dlq"
redis:
ttl:
minutes: 60
memory:
max-mb: 1024
plane:
agent:
organization-id: "default-org"
execution-mode: "ASYNC"
llm-executor:
core-pool-size: 2
max-pool-size: 2
deduplication:
enabled: true
window-minutes: 5
cache-size: 10000