PrivateCA 개요
    • PDF

    PrivateCA 개요

    • PDF

    기사 요약

    개요

    PrivateCA API는 RESTful 형태로 제공됩니다. PrivateCA Rest API를 호출하기 위해서는 API Gateway와 Sub Account 인증을 수행해야 합니다.
    API Gateway를 통한 API 호출은 API Gateway 설명서를 참조하세요. API 요청 메시지는 아래와 같이 구성됩니다.

    요청 구성

    Header
      x-ncp-apigw-timestamp:{Timestamp}
      x-ncp-iam-access-key:{Sub Account Access Key}
      x-ncp-apigw-signature-v2:{API Gateway Signature}
      Content-Type:application/json
    Body
    
    URL
      https://privateca.apigw.gov-ntruss.com/api/v1/{caTag}/{url}
    

    예시

    요청 예시

    curl -i -s -X GET \
    -H "x-ncp-apigw-timestamp:1598425115345" \
    -H "x-ncp-iam-access-key:3A03131E1348C83101" \
    -H "x-ncp-apigw-signature-v2:FkL1mw12345678DRu9R50tdGSyc/uQ/oTw=" \
    -H "Content-Type:application/json" \
    'https://privateca.apigw.gov-ntruss.com/api/v1/ca/4b0bbe37-eeea93b8'
    

    응답 예시

    {
        "code": "SUCCESS",
        "msg": "Success",
        "data": {
            "caInfo": {
                "signingCount": 0,
                "caType": "PRIVATE_ROOT",
                "caId": 1,
                "statusUpdateDate": null,
                "destroyDate": null,
                "alias": "portal_root_ca",
                "memo": "company portal root ca",
                "urlInfo": {
                    "ocsp": [],
                    "crl": [
                        "https://privateca.apigw.gov-ntruss.com/ext/4b0bbe37-eeea93b8/crl"
                    ],
                    "ca": [
                        "https://privateca.apigw.gov-ntruss.com/ext/4b0bbe37-eeea93b8/ca"
                    ]
                },
                "caTag": "4b0bbe37-eeea93b8",
                "rgstDate": 1597122400000,
                "status": "ACTIVE"
            },
            "caCertInfo": {
                "commonName": "*.portal.com",
                "country": "KR",
                "issuerName": "*.portal.com",
                "notAfterDate": 1912482399000,
                "publicKeyAlgorithm": "RSA",
                "notBeforeDate": 1597122370000,
                "locality": "Seoul",
                "stateProvince": "Gangnam gu",
                "organizationUnit": "Service Develop Unit",
                "certPem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
                "chainPem": "",
                "signatureAlgorithm": "SHA256withRSA",
                "serialNo": "2a:8e:c7:3b:f3:2b:50:f3:fd:e5:4f:23:b6:3a:ee:50:63:1a:fd:77",
                "caCertId": 1,
                "organization": "my company"
            }
        }
    }
    

    오류 코드

    응답 코드응답 메시지
    FORBIDDEN"Forbidden"
    INTERNAL_SERVER_ERROR"Server internal error"
    UNPROCESSABLE_ENTITY"Invalid status"
    INVALID_REQUEST"Invalid request"
    UNAUTHORIZED"Unauthorized"
    NOT_FOUND"Not found"
    INVALID_STATUS"Invalid status"

    이 문서가 도움이 되었습니까?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.