Security > Security Advisor > API 가이드

Security Advisor Public API를 설명합니다.

공통 준비 사항

API 사용을 위해서는 API 엔드포인트와 토큰이 필요합니다.

API 엔드포인트

리전 엔드포인트
모든 리전 https://security-advisor.api.gov-nhncloudservice.com

인증 및 권한

Seucirty Advisor는 API 인증/인가를 받기 위해 NHN Cloud 토큰을 이용합니다. User Access Key 토큰을 확인하여 인증 토큰 사용에 필요한 정보를 확인합니다.

Security Advisor API를 사용하려면 Appkey가 필요합니다. Appkey는 API 호출 시 요청 URL에 포함하여 특정 리소스를 가리키고 식별하는 데 사용됩니다. Appkey 확인 및 사용에 대한 자세한 내용은 Appkey를 참고하세요.

API 사용 공통 정보

API 요청 공통 정보

API를 사용하려면 다음과 같은 정보가 필요합니다.

  • 토큰 발급 이후 API 헤더에 토큰 정보를 포함시킵니다.
이름 종류 형식 필수 설명
x-nhn-authorization Header String O 토큰
  • 서비스 Appkey
    • Security Advisor 콘솔의 오른쪽 상단 URL & Appkey 메뉴 또는 프로젝트 관리의 이용 중인 서비스에서 확인할 수 있습니다.
    • 서비스 URL Path에 Appkey가 포함됩니다.

API 응답 공통 정보

  • API 요청에 대한 응답으로 아래와 같이 응답 코드를 반환할 수 있습니다.
    • 200 OK
    • 400 Bad Reuqest
    • 404 Not Found
    • 405 Method Not Allowed
    • 500 Internal Server Error
  • 모든 응답 코드는 공통의 Response body를 포함합니다.
    • 공통 Response body
이름 타입 설명
header Object
header.isSuccessful Boolean true: 정상
false: 오류
header.resultCode Integer 1: 정상
그 외: 오류
header.resultMessage String "SUCCESS": 정상
그 외: 오류 원인 메시지
  • 공통 Response body 외 자세한 응답 결과는 응답 본문 헤더를 참고합니다.

[주의] API 응답 가이드에 명시되지 않은 필드가 나타날 수 있습니다. 이런 필드는 NHN Cloud 내부 용도로 사용되며 사전 공지 없이 변경될 수 있으므로 사용하지 않습니다.

Security Advisor

최종 점검 날짜 조회

최종 점검 날짜를 조회합니다.

GET "/advisor/v1.0/appKey/{appKey}/last_inspection_date"
요청

이 API는 요청 본문을 요구하지 않습니다.

이름 구분 타입 필수 설명
appKey URL String O 서비스 Appkey
응답
이름 타입 필수 설명
latestInspectionTime String O 최종 점검 날짜(datetime)
예시

{
    "header": {
        "resultCode": 1,
        "resultMessage": "Request success",
        "isSuccessful": true
    },
    "body": {
        "latestInspectionTime": "2025-03-11T16:00:32+09:00"
    }
}

자동 점검 설정 조회

관리자가 설정한 자동 점걸 설정 값을 조회합니다.

GET "/advisor/v1.0/appKey/{appKey}/setting"

요청

이 API는 요청 본문을 요구하지 않습니다.

이름 구분 타입 필수 설명
appKey URL String O 서비스 Appkey

응답

이름 타입 필수 설명
emails Array O 점검 완료 시 완료 메일을
수신할 이메일 주소 목록
isEnableAutoInspect Boolean O 자동 점검 설정 여부
(해당 값이 false면 나머지 설정 무시)
inspectionList Array X 자동 점검 진행 시 선택한 항목
inspectionCycle Object X 점검 주기 설정
inspectionCycle.isWeek Boolean X 주 단위 선택 여부
inspectionCycle.time String(hh:mm) X 점검 진행 시간(00:00)
inspectionCycle.day Integer X 점검 진행 요일(일요일이 1부터 시작)
isWhole Boolean X 전체 점검 선택 여부
예시

{
    "header": {
        "resultCode": 1,
        "resultMessage": "Request success",
        "isSuccessful": true
    },
    "body": {
        "emails": ["nhncloud@nhn.com"],
        "isEnableAutoInspect": true,
        "inspectionList": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9
        ],
        "inspectionCycle": {
            "isWeek": true,
            "time": "00:00",
            "day": 2
        },
        "isWhole": false
    }
}

마지막 점검 결과 요약 조회

마지막 점검 결과에 대한 요약 정보를 조회합니다.

GET "/advisor/v1.0/appKey/{appKey}/inspection_results?region={region}&lang={lang}"

요청

이 API는 요청 본문을 요구하지 않습니다.

이름 구분 타입 필수 설명
appKey URL String O 서비스 Appkey
region Query String O 리전 코드(KR1: 판교, KR2: 평촌,
JP1: 일본, US1: 미국)
lang Query String O 언어 코드(KO: 한글, EN: 영어, JA: 일본어)

응답

이름 타입 필수 설명
ruleNo Integer O 점검 항목 번호
status String O 점검 결과(critical: 위험, warning: 주의, interest: 관심, good: 양호)
inspectRange String O 점검 대상 범위(PROJECT: 프로젝트, ORG: 조직)
inspectContent String O 점검 대상 제목
detectionCount Integer O 탐지 개수
exceptionCount Integer O 예외 개수
inspectTime String O 점검 시간(datetime)
예시

{
    "header": {
        "resultCode": 1,
        "resultMessage": "Request success",
        "isSuccessful": true
    },
    "body": [
        {
            "ruleNo": 10,
            "status": "good",
            "inspectRange": "PROJECT",
            "inspectContent": "Security Groups 점검",
            "detectionCount": 0,
            "exceptionCount": 0,
            "inspectTime": "2023-06-12T19:53:35+09:00"
        },
        {
            "ruleNo": 11,
            "status": "good",
            "inspectRange": "PROJECT",
            "inspectContent": "Database Security Groups 점검",
            "detectionCount": 0,
            "exceptionCount": 0,
            "inspectTime": "2023-06-12T19:53:35+09:00"
        },
        {
            "ruleNo": 1,
            "status": "critical",
            "inspectRange": "ORG",
            "inspectContent": "IAM 로그인 실패 보안 점검",
            "detectionCount": 1,
            "exceptionCount": 0,
            "inspectTime": "2025-03-11T16:00:42+09:00"
        },
        {
            "ruleNo": 2,
            "status": "critical",
            "inspectRange": "ORG",
            "inspectContent": "IAM 로그인 세션 시간 점검",
            "detectionCount": 1,
            "exceptionCount": 0,
            "inspectTime": "2025-03-11T16:00:42+09:00"
        },
        {
            "ruleNo": 3,
            "status": "critical",
            "inspectRange": "ORG",
            "inspectContent": "IAM 로그인 세션 수 점검",
            "detectionCount": 1,
            "exceptionCount": 0,
            "inspectTime": "2025-03-11T16:00:42+09:00"
        },
        {
            "ruleNo": 4,
            "status": "good",
            "inspectRange": "ORG",
            "inspectContent": "프로젝트 멤버의 미사용 IAM 계정 점검",
            "detectionCount": 0,
            "exceptionCount": 0,
            "inspectTime": "2025-03-11T16:00:43+09:00"
        },
        {
            "ruleNo": 5,
            "status": "good",
            "inspectRange": "ORG",
            "inspectContent": "프로젝트의 IAM 계정 사용 여부 점검",
            "detectionCount": 0,
            "exceptionCount": 0,
            "inspectTime": "2025-03-11T16:00:43+09:00"
        },
        {
            "ruleNo": 6,
            "status": "critical",
            "inspectRange": "ORG",
            "inspectContent": "프로젝트 멤버 회원 계정의 2차 인증 설정 점검",
            "detectionCount": 1,
            "exceptionCount": 0,
            "inspectTime": "2025-03-11T16:00:43+09:00"
        },
        {
            "ruleNo": 7,
            "status": "critical",
            "inspectRange": "ORG",
            "inspectContent": "프로젝트 멤버 IAM 계정의 2차 인증 설정 점검",
            "detectionCount": 1,
            "exceptionCount": 0,
            "inspectTime": "2025-03-11T16:00:43+09:00"
        },
        {
            "ruleNo": 8,
            "status": "good",
            "inspectRange": "ORG",
            "inspectContent": "IAM 콘솔 도메인 설정 점검",
            "detectionCount": 0,
            "exceptionCount": 0,
            "inspectTime": "2025-03-11T16:00:43+09:00"
        },
        {
            "ruleNo": 9,
            "status": "critical",
            "inspectRange": "ORG",
            "inspectContent": "IAM 콘솔의 IP ACL 설정 점검",
            "detectionCount": 1,
            "exceptionCount": 0,
            "inspectTime": "2025-03-11T16:00:43+09:00"
        },
        {
            "ruleNo": 12,
            "inspectRange": "PROJECT",
            "inspectContent": "RDS 접근제어 점검",
            "detectionCount": 0,
            "exceptionCount": 0
        },
        {
            "ruleNo": 13,
            "inspectRange": "PROJECT",
            "inspectContent": "NCR 이미지 취약점 점검 설정 점검",
            "detectionCount": 0,
            "exceptionCount": 0
        }
    ]
}
TOP