Advisory MCP: OS 보안 조치의 Oracle/OGG/RAC 충돌 분석 및 권고 목적: 1. 충돌 여부를 사전에 분석 2. 어떤 지점에서 어떤 위험이 발생할 수 있는지 설명 3. 운영자가 선택할 수 있는 해결 방법 제시 역할: 분석 + 권고 (실행 × 차단 × 자동 적용 ×) - 충돌 분석 결과 → 근거 자료로만 제공 - 최종 판단 → Claude(분석), Operator(선택)가 내림
MCP의 목적:
✅ MCP가 하는 것 (분석과 권고):
✓ 기술 분석 (OS 조치 vs DB 환경의 충돌 점 식별)
✓ 위험도 평가 (HIGH/MEDIUM/LOW)
✓ 영향 범위 설명 (어느 컴포넌트가 영향받는가)
✓ 대안 제시 (해결 방법 2-3개)
✓ 근거 자료 제공 (선행 조건, 실행 순서, 롤백)
❌ MCP가 절대 하지 않는 것 (실행/차단/자동 적용):
✗ 실행 (selinux --set enforcing 같은 OS 변경)
✗ 차단 ("이 조치를 차단합니다" 같은 결정)
✗ 자동 적용 ("자동으로 진행합니다")
✗ 강제 (자동 승인/거절)
✗ 최종 판단 ("이 방식을 사용하세요")
MCP → 분석 + 권고 (근거 자료 제공)
Claude → 분석 + 판단 (MCP 결과 기반 의사결정 근거 제공)
Operator → 최종 선택 (MCP + Claude 정보 기반 선택)
kshield → 실행 (Operator 선택 이행)
OS 보안 조치 → MCP 분석 → 근거 자료 제공
↓
Claude (종합 분석)
↓
Operator (최종 선택)
↓
kshield (실행)
MCP는 이 흐름에서 근거 자료 제공만 담당합니다.
Step 1: 충돌 지점 식별
각 planned_action에 대해:
├─ measure_id 확인 (어떤 OS 조치인가)
├─ DB 환경과의 충돌 분석 (Oracle_DB, RAC, OGG)
├─ 위험도 평가 (HIGH/MEDIUM/LOW 수치 평가)
└─ 영향받는 컴포넌트 식별 (어디가 영향받는가)
Step 2: 위험 설명
각 충돌에 대해 root_cause_explanation (150-300 단어):
├─ 메커니즘 설명 (기술적으로 무엇이 일어나는가)
├─ 충돌 지점 (어디에서 충돌하는가)
└─ 결과 (어떤 장애가 발생하는가)
Step 3: 대안 제시
각 충돌에 대해 2-3개 대안:
├─ implementation_method (구현 방식)
├─ pros (장점)
├─ cons (단점)
├─ effort_level (노력도: LOW/MEDIUM/HIGH)
└─ estimated_downtime (예상 다운타임)
Step 4: 실행 정보 제공
선택된 방식을 실행하기 위한 정보:
├─ prerequisites (선행 조건)
├─ application_order (실행 순서)
├─ verification (검증 방법)
└─ rollback_plan (문제 발생 시 복구)
MCP는 Plan 단계에서 생성된 planned_actions.json을 입력으로 받습니다:
{
"planned_actions": [
{
"action_id": "ACT_001",
"measure_id": "ENABLE_SELINUX",
"measure_name": "SELinux Enforcement",
"target_system": "oracle-rac-node-1",
"description": "SELinux를 enforcing 모드로 설정"
}
]
}
MCP는 근거 자료로만 사용될 수 있는 분석 결과를 제공합니다:
{
"measure_id": "ENABLE_SELINUX",
"conflict_risk_level": "HIGH",
"target_component": ["Oracle_RAC", "Oracle_GoldenGate"],
"root_cause_explanation": {
"mechanism": "SELinux MAC enforces unconfined_t context, blocking process capabilities...",
"impact": "RAC inter-node communication on ports 7203/7809-7810 blocked...",
"failure_result": "Cluster membership lost, instance crash..."
},
"operator_recommendations": [
{
"option_number": 1,
"implementation_method": "Custom SELinux policy for Oracle RAC",
"pros": ["Maintains enforcing mode", "Maximum security"],
"cons": ["Requires SELinux expert", "2-3 days development"],
"effort_level": "HIGH",
"estimated_downtime": "2-4 hours per node"
},
{
"option_number": 2,
"implementation_method": "Permissive mode (temporary)",
"pros": ["Simple implementation", "Immediate cluster formation"],
"cons": ["Reduced security", "Permissive temporary only"],
"effort_level": "LOW",
"estimated_downtime": "5-10 minutes"
}
],
"operator_approval_required": true,
"prerequisites": [
"Full database backup completed",
"RAC cluster quorum verified"
],
"application_order": [
"1. Stop all databases",
"2. Apply configuration",
"3. Reboot nodes"
],
"rollback_plan": {
"trigger": "If cluster formation fails",
"steps": [
"Disable SELinux enforcement",
"Reboot",
"Verify cluster restoration"
]
}
}
중요: 이 Output은 정보와 권고만 포함합니다.
✅ 허용: read, analyze, parse
❌ 금지: write, modify, execute, sudo
✅ Output: JSON, analysis results
❌ 변경: OS settings, DB parameters, service control
MCP 분석:
└─ conflict_risk_level: "HIGH" (8.6/10)
└─ operator_recommendations: 3개 대안
└─ operator_approval_required: true
Claude 판단:
└─ Conditional: manual_approval (수동 검토 필요)
Operator 선택:
└─ APPROVE_WITH_ALTERNATIVE (Option 2: Permissive mode)
kshield 실행:
├─ Operator 승인 확인 ✓
├─ Prerequisites 확인 ✓
├─ 선택된 대안(Option 2) 실행
└─ 오류 시 rollback_plan 실행
MCP 분석:
└─ conflict_risk_level: "LOW" (1.5/10)
└─ operator_approval_required: false
Claude 판단:
└─ Conditional: auto_approve (수동 검토 불필요)
Operator 선택:
└─ 자동 승인
kshield 실행:
├─ Operator 승인 확인 ✓
├─ Prerequisites 확인 ✓
├─ 자동 실행
└─ 결과 기록
제공하는 것:
하지 않는 것:
Claude Plan Mode
├─ 조치 수집 (security_policy.json)
├─ MCP 분석 호출 (이 스킬)
├─ MCP 결과 attached to planned_actions
└─ Conditional 분기 로직
Operator Approval
├─ planned_actions 검토 (MCP 분석 포함)
├─ MCP 정보 기반 의사결정
└─ APPROVE/DEFER/REJECT 선택
kshield Execution
├─ Operator 승인 확인
├─ MCP prerequisites 확인
├─ MCP application_order 따르기
└─ 오류 시 MCP rollback_plan 실행
정보 제공자 (Information Provider):
MCP는 안전하고, 유연하며, 운영자 의사결정을 보조합니다.
각 planned_action에 대해 다음을 분석한다:
MCP 표준 형식 v1.0을 따른다. 모든 분석이 5개 필수 필드 포함:
{
"conflict_id": "CONFLICT_SELINUX_ENFORCE_RAC_001",
"conflict_risk_level": "HIGH",
"target_component": ["Oracle_RAC"],
"root_cause_explanation": "SELinux enforce mode prevents Oracle RAC inter-node communication via TCP/IP sockets. Process context unconfined_t lacks capabilities to bind cluster communication ports and access IPC shared memory segments.",
"operator_recommendations": {
"alternatives": [
{
"option_number": 1,
"implementation_method": "Create custom SELinux policy for Oracle RAC",
"pros": ["Maintains enforcement", "Maximum security"],
"cons": ["Requires expertise", "2-3 days development"],
"effort_level": "HIGH",
"estimated_downtime": "2-4 hours per node"
},
{
"option_number": 2,
"implementation_method": "Set SELinux to permissive mode",
"pros": ["Simple", "Immediate"],
"cons": ["Reduced security"],
"effort_level": "LOW",
"estimated_downtime": "5-10 minutes"
}
],
"prerequisites": [
"Backup current SELinux policy",
"Verify all RAC nodes operational",
"Full database backup"
],
"application_order": [
"1. Test in non-production cluster",
"2. Schedule maintenance",
"3. Apply rolling: Node 1 → Node 2 → Node N",
"4. Verify cluster formation"
],
"rollback_plan": "Restore SELinux policy backup if cluster fails"
},
"operator_approval_required": true
}
Planned Actions
↓
preflight-db-mcp-check (Analysis + Recommendations)
↓
MCP Standard Format (5 mandatory fields)
↓
Claude AI Reviews & Decides
↓
Execute or Modify
All outputs follow MCP Output Standard v1.0:
See: docs/MCP_OUTPUT_FORMAT_GUIDE.md
Step 1: MCP (�� ��ų)
����: �м� + �ٰ� �ڷ� ����
Input: planned_actions.json
����: ���� ���� (������ ����)
Step 2: Claude Decision Engine
����: �м� + �Ǵ� �ٰ� ����
Input: MCP �м� ���
����: ���� ���� (�ٰ� ����)
Step 3: Operator Approval
����: ���� ����
Input: MCP + Claude + Current Status
����: ��ڰ� ���� ����
Step 4: kshield Execution
����: Operator�� ������ ����
Output: execution_report.json
| �� | MCP | Claude | Operator | kshield |
|---|---|---|---|---|
| ���� | �м� + �ǰ� | �м� + �ٰ� | ���� ���� | ���� |
| ���� | ���� ���� | ���� ���� | �� | ���� ���� |