실시간 탐지 시나리오 조회
지정한 실시간 탐지 시나리오를 조회합니다. 전체 시나리오 목록은 실시간 탐지 시나리오 목록 조회 API로 확인할 수 있습니다.
필요 권한
사용자 이상의 계정으로 이용할 수 있습니다.
HTTP 요청
GET /api/sonar/stream-rules/:guid
cURL 예시
curl -H "Authorization: Bearer <API_KEY>" \
https://HOSTNAME/api/sonar/stream-rules/3b05608f-8dd0-4218-9d6d-391515b6280d
요청 매개변수
경로 매개변수
| 키 | 타입 | 설명 | 비고 |
|---|---|---|---|
| guid | 문자열 | 실시간 탐지 시나리오 GUID | 36자 |
정상 응답
{
"rule": {
"priority": "HIGH",
"guid": "3b05608f-8dd0-4218-9d6d-391515b6280d",
"name": "알려진 봇넷 대역 접속",
"description": "알려진 봇넷 IP 대역으로의 아웃바운드 접속을 탐지합니다.",
"msg": "알려진 봇넷 대역 접속: $dst_ip",
"enabled": true,
"category_guid": "aedc65d6-25ee-4d9e-9040-e21ebe823f8d",
"category_name": "명령 및 제어",
"schema_code": "session",
"schema_name": "세션",
"source_type": "LOGGER",
"logger_guids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
"commands": [
{
"template_id": 3,
"field_name": "dst_ip",
"args": { "subnet": "697393b6-aecf-4e9d-a32c-8724cd8f067e" },
"query": "matchnet field=dst_ip guid=697393b6-aecf-4e9d-a32c-8724cd8f067e verify=f",
"invert": false,
"ordinal": 1
}
],
"query_string": "matchnet field=dst_ip guid=697393b6-aecf-4e9d-a32c-8724cd8f067e verify=f",
"address_group_guid": null,
"address_field": null,
"ticket_repo_guid": null,
"ticket_assignee_guid": null,
"ticket_assignee_guids": [],
"ticket_assignee_names": [],
"ticket_suppress_interval": 3600,
"event_suppress_interval": 0,
"suppress_key": null,
"blacklist_expire_minute": null,
"keep_alive": false,
"audit_category_guid": [],
"audit_category_name": null,
"reviewer_guid": null,
"reviewer_name": null,
"auditor_guid": null,
"auditor_name": null,
"audit_days": null,
"employee_key_field": null,
"user_note": null,
"alarm_group_guid": null,
"alarm_group_name": null,
"field_order": null,
"user_guid": "ffaf431b-653a-4329-8f83-913cbb00342d",
"user_name": "관리자",
"app_code": null,
"app_built_in": false,
"created": "2024-05-10 14:23:15+0900",
"updated": "2024-05-10 14:23:15+0900"
}
}
- rule (맵): 실시간 탐지 시나리오. 지정한 시나리오가 없으면
null.- priority (문자열): 중요도.
LOW,MEDIUM,HIGH중 하나. - guid (문자열): 실시간 탐지 시나리오 GUID
- name (문자열): 실시간 탐지 시나리오 이름
- description (문자열): 실시간 탐지 시나리오 설명
- msg (문자열): 메시지 템플릿.
$field형식의 매크로를 사용하여 필드 값을 메시지에 반영할 수 있음. - enabled (불리언): 탐지 활성화 여부
- category_guid (문자열): 탐지 시나리오 분류 GUID
- category_name (문자열): 탐지 시나리오 분류 이름
- schema_code (문자열): 정규화 스키마 식별자
- schema_name (문자열): 정규화 스키마 이름
- source_type (문자열): 탐지 대상.
LOGGER,LOGGER_MODEL중 하나. - logger_guids (문자열 배열): 수집기 GUID 목록.
source_type이LOGGER인 경우 반환됨. - logger_model_guids (문자열 배열): 수집기 모델 GUID 목록.
source_type이LOGGER_MODEL인 경우 반환됨. - commands (배열): 실시간 탐지 시나리오 명령어 목록
- template_id (32비트 정수): 실시간 탐지 명령어 템플릿 ID
- field_name (문자열): 대상 필드 이름
- args (맵): 인자 키/값 쌍
- query (문자열): 인자가 반영된 쿼리 문자열
- invert (불리언):
true인 경우NOT조건 - ordinal (32비트 정수): 순서
- query_string (문자열): 실시간 탐지 쿼리 문자열
- address_group_guid (문자열): 주소 그룹 GUID
- address_field (문자열): 주소 그룹에 등록할 대상 필드
- ticket_repo_guid (문자열): 티켓 분류 GUID
- ticket_assignee_guid (문자열): 티켓 할당자 GUID
- ticket_assignee_guids (문자열 배열): 티켓 할당자 GUID 목록
- ticket_assignee_names (문자열 배열): 티켓 할당자 성명 목록
- ticket_suppress_interval (32비트 정수): 중복 티켓 축약 기간 (초 단위)
- event_suppress_interval (32비트 정수): 중복 이벤트 제거 기간 (초 단위)
- suppress_key (문자열): 중복 기준 필드.
$field형식으로 지정된 매크로를 해당 필드 값으로 대체하여 이벤트 컨텍스트 키로 사용함. - blacklist_expire_minute (32비트 정수): 주소 그룹 등록 시 차단 기간 (분 단위)
- keep_alive (불리언):
true인 경우 축약 타이머 유지.false인 경우 축약 타이머 초기화.Note축약 타이머 유지 시 티켓을 완료 처리하더라도 만료 시간에 도달할 때까지 이벤트가 기존 티켓에 병합됩니다.
- audit_category_guid (문자열): 소명 분류 GUID. 소명 분류를 지정하지 않은 경우 빈 배열(
[])이 반환됨. - audit_category_name (문자열): 소명 분류 이름
- reviewer_guid (문자열): 소명 1차 검토자 계정 GUID
- reviewer_name (문자열): 소명 1차 검토자 성명
- auditor_guid (문자열): 소명 확인 계정의 GUID. 미지정 시 부서장 전결.
- auditor_name (문자열): 소명 확인 계정의 성명. 미지정 시 부서장 전결.
- audit_days (32비트 정수): 소명 제출 마감 시한 (일 단위)
- employee_key_field (문자열): 사번 필드 이름. 통상 정규화된 필드인
emp_key를 사용함. - user_note (문자열): 시나리오 요약 정보
- alarm_group_guid (문자열): 알람 그룹 GUID
- alarm_group_name (문자열): 알람 그룹 이름
- field_order (문자열): 근거 자료 출력 시 필드 순서. 쉼표로 구분된 필드 이름 목록.
- user_guid (문자열): 시나리오를 생성한 사용자 GUID
- user_name (문자열): 시나리오를 생성한 사용자 성명
- app_code (문자열): 시나리오가 속한 앱 코드
- app_built_in (불리언): 내장 앱 시나리오 여부
- created (문자열): 생성일시 (
yyyy-MM-dd HH:mm:ssZ형식) - updated (문자열): 수정일시 (
yyyy-MM-dd HH:mm:ssZ형식)
- priority (문자열): 중요도.
오류 응답
지정한 시나리오가 존재하지 않는 경우
HTTP 상태 코드 200 응답
{
"rule": null
}
식별자가 GUID 형식이 아닌 경우
HTTP 상태 코드 400 응답
{
"error_code": "invalid-param-type",
"error_msg": "guid should be guid type."
}