GNX Identity-to-Execution Logic Engine · Enterprise Review Document
GNX Identity-to-Execution Logic Engine — Incident Response Runbook
1. 문서 목적
본 문서는 GNX Identity-to-Execution Logic Engine에서 보안 사고, 운영 장애, 세션 오남용, replay 공격, 관리자 키 노출, DB 무결성 의심 상황이 발생했을 때의 대응 절차를 정의한다.
본 엔진은 IAM 대체재가 아니라 기존 IAM, API Gateway, AI Agent Runtime, 통신·금융 보안 시스템 앞단 또는 후단에 결합되는 execution evidence gate다.
계약서상 정의는 다음과 같다.
입력·신원·표시상태·세션증거·실행권한을 하나의 검증 가능한 증거 체인으로 묶어, 조건 없는 실행을 fail-closed 방식으로 차단하는 실행통제 엔진.
2. 사고 등급
| 등급 | 기준 | 예시 |
|---|---|---|
| SEV-1 | 비밀값 노출, 관리자 키 노출, DB 변조, 실행 우회 의심 | .env.production 노출, admin_private_key.pem 노출, audit chain 변조 |
| SEV-2 | 공격 시도 또는 제한적 영향 | replay 급증, brute force, admin challenge 반복 실패 |
| SEV-3 | 탐지성 이벤트 또는 낮은 위험 | scanner probe, old policy endpoint 접근, public vault probe |
3. 핵심 보호 자산
| 자산 | 설명 | 사고 시 우선 조치 |
|---|---|---|
| .env.production | HMAC, cookie, audit, DB secret 포함 | 즉시 접근 차단, secret rotation |
| admin_private_key.pem | 관리자 signed challenge 서명 키 | 즉시 폐기 및 재발급 |
| PostgreSQL gnx_i2e | WNS, Bident, Display, Execution, Audit chain 저장 | snapshot, dump, 무결성 점검 |
| Redis | session, nonce, one-time handle, rate limit 저장 | session/handle 무효화 |
| audit hash chain | receipt, prev_hash, event_hash | 외부 보존, 변조 여부 검토 |
| executionHandle | one-time opaque 실행권한 | TTL 확인, 재사용 차단 확인 |
4. 즉시 공통 대응 절차
사고 의심 시 먼저 다음 순서로 진행한다.
1. 현재 시각 기록
2. gnx-i2e 상태 확인
3. Nginx 상태 확인
4. 최근 journal 보존
5. PostgreSQL audit chain export
6. Redis active key count 확인
7. 의심 IP, user agent hash, receipt 기록
8. 필요 시 admin surface 제한
9. Security Acceptance Test 재실행
10. 대응 로그 작성
5. 현재 상태 확인 명령
명령:
systemctl is-active postgresql
systemctl is-active redis-server
systemctl is-active gnx-i2e
systemctl is-active nginx
포트 확인:
sudo ss -lntp | grep 3300
공개 API 확인:
curl -sS https://api.logicnoid.co.kr/health/ready | jq
필수 확인값:
- ok:true
- state:READY
- db:READY
- redis:READY
- publicVaultEnabled:false
- rawAdminTokenReturned:false
- rawTunnelTicketReturned:false
6. 로그 보존
명령:
sudo journalctl -u gnx-i2e --since "24 hours ago" --no-pager -l > /tmp/gnx-i2e-journal-24h.log
sudo journalctl -u nginx --since "24 hours ago" --no-pager -l > /tmp/nginx-journal-24h.log
보존 대상:
- gnx-i2e journal
- nginx access/error log
- PostgreSQL log
- Security acceptance output
- admin signed challenge output
- 관련 receipt와 audit event
7. Audit Chain Export
명령:
DBPWD="$(grep '^GNX_PG_PASSWORD=' /opt/gnx/identity2execution/.env.production | cut -d= -f2-)"
PGPASSWORD="$DBPWD" psql -h 127.0.0.1 -U gnx_i2e -d gnx_i2e -t -A <<'SQL' > /tmp/i2e-audit-chain-incident.jsonl
SELECT row_to_json(t)
FROM (
SELECT chain_index, receipt, event_type, subject_hash, target_hash, gate_state,
evidence_hash, prev_hash, event_hash, created_at
FROM i2e_audit_chain
ORDER BY chain_index
) t;
SQL
검증:
wc -l /tmp/i2e-audit-chain-incident.jsonl
8. Public Vault Probe 대응
증상:
- /v1/vault/representative-token 접근 증가
- /v1/admin/vault/issue 접근 증가
- /v1/admin/vault/issue-token 접근 증가
정상 기대값:
- HTTP 410
- reason: PUBLIC_VAULT_REMOVED
- rawAdminTokenReturned:false
조치:
1. Nginx access log에서 source IP 확인
2. Redis rate limit 이벤트 확인
3. 필요 시 WAF 또는 Nginx 차단 rule 추가
4. Security Acceptance Test 재실행
9. Admin Private Key 노출 대응
증상:
- admin_private_key.pem 노출 의심
- 알 수 없는 ADMIN_SESSION_BOUND 발생
- admin audit event에 의심 remote_hash 기록
조치:
1. admin surface 일시 제한
2. 기존 admin session 무효화
3. 새 admin keypair 생성
4. GNX_ADMIN_PUBLIC_KEY_PEM_BASE64 교체
5. gnx-i2e 재시작
6. admin signed challenge test 재실행
7. admin audit recent 확인
Redis admin session 무효화 명령:
redis-cli KEYS 'admin:session:*' | xargs -r redis-cli DEL
검증:
cd /opt/gnx/identity2execution/engine
GNX_TEST_BASE="https://api.logicnoid.co.kr" ./tests/admin/admin-signed-challenge-test.sh
PASS 기준:
ADMIN_SIGNED_CHALLENGE_PASS
10. Bident Session 노출 대응
증상:
- 비정상 실행 authorize 시도
- 동일 user/session 기반 요청 급증
- 의심 user agent 또는 remote hash 반복
조치:
1. Redis Bident session 삭제
2. execution handle 삭제
3. execution nonce 상태 확인
4. security acceptance test 재실행
명령:
redis-cli KEYS 'bident:session:*' | xargs -r redis-cli DEL
redis-cli KEYS 'execution:handle:*' | xargs -r redis-cli DEL
검증:
cd /opt/gnx/identity2execution/engine
GNX_TEST_BASE="https://api.logicnoid.co.kr" ./tests/security/security-acceptance.sh
PASS 기준:
SECURITY_ACCEPTANCE_PASS
11. Execution Replay 급증 대응
증상:
- EXECUTION_NONCE_REPLAY_REJECTED 증가
- EXECUTION_HANDLE_NOT_FOUND_OR_USED 증가
- 동일 target 또는 audience 기반 반복 요청
조치:
1. rate limit 상태 확인
2. 의심 IP 차단
3. WAF rule 강화
4. execution nonce와 handle key 수 확인
5. audit chain에서 관련 receipt 확인
Redis 확인:
redis-cli KEYS 'execution:nonce:*' | wc -l
redis-cli KEYS 'execution:handle:*' | wc -l
12. DB 무결성 의심 대응
증상:
- audit chain prev_hash 불연속
- event_hash 포맷 이상
- 알 수 없는 receipt 생성
- DB 접근 로그 이상
조치:
1. gnx-i2e 상태 기록
2. EBS snapshot 생성
3. PostgreSQL dump 생성
4. audit chain export
5. Evidence Verification CLI로 chain-file 검증
6. 무결성 불확실 시 운영 중지 검토
7. known-good backup 기준 복구 계획 수립
주의:
실제 백업 파일 없이 pg_restore를 실행하지 않는다.
placeholder 경로로 복구 명령을 실행하지 않는다.
운영 인스턴스에서 리허설 없이 restore하지 않는다.
13. Secret 노출 대응
노출 대상:
- GNX_MASTER_SECRET
- GNX_COOKIE_SECRET
- GNX_AUDIT_SECRET
- GNX_ATTESTATION_SECRET
- GNX_ADMIN_CHALLENGE_SECRET
- GNX_PG_PASSWORD
조치 원칙:
1. 영향 범위 판단
2. 기존 session 및 handle 무효화
3. secret rotation 계획 수립
4. DB anchor 및 audit 검증 영향 분석
5. 고객 영향 여부 판단
6. incident report 작성
14. 고객 통지 기준
다음 중 하나라도 해당하면 고객 또는 평가 대상 기관에 통지 검토한다.
- 고객 관련 execution evidence 노출 가능성
- execution authorize 우회 의심
- audit chain 무결성 불확실
- admin session compromise
- DB compromise
- secret compromise
- WNS evidence 위조 가능성
15. 사고 후 검증
사고 조치 후 반드시 실행한다.
Security Acceptance:
cd /opt/gnx/identity2execution/engine
GNX_TEST_BASE="https://api.logicnoid.co.kr" ./tests/security/security-acceptance.sh
Admin Signed Challenge:
cd /opt/gnx/identity2execution/engine
GNX_TEST_BASE="https://api.logicnoid.co.kr" ./tests/admin/admin-signed-challenge-test.sh
Health:
curl -sS https://api.logicnoid.co.kr/health/ready | jq
PASS 기준:
- SECURITY_ACCEPTANCE_PASS
- ADMIN_SIGNED_CHALLENGE_PASS
- health/ready ok:true
- publicVaultEnabled:false
- rawAdminTokenReturned:false
- rawTunnelTicketReturned:false
16. 금지 사항
사고 대응 중 다음을 금지한다.
- 원인 확인 전 로그 삭제
- 실제 백업 파일 없이 pg_restore 실행
- placeholder 경로 사용
- public vault 임시 부활
- gnxceo fallback 또는 임시 password 도입
- raw admin token 응답
- raw tunnelTicket 응답
- 감사 체인 임의 수정
- 검증 전 production-ready 완료 선언