Skip to main content

6) SDF Container의 상태 점검

SDF Container의 상태 점검

API

MethodURL
GET/api/healthCheck/{licenseKey}

URI Parameters

NameInRequiredTypeDescription
licenseKeypathrequiredstringSHIELDRM 관리자 페이지의 연동 앱 관리 메뉴에서 발급 받은 라이선스

Response

NameTypeDescription
codeint최종 성공 여부 (0 : 성공)
healthCheckobjSKMS 동작 여부
licenseCheckobj/string라이선스 존재 여부
keyCheckobj/string필수 키 존재 여부
azureInfoCheckobj/stringSKMS 환경변수(AZURE_INFO) 및 OpenID 존재 여부
azureInfoValidCheckobj/stringazureInfoCheck의 정보가 유효한지 체크
   resultstring각 체크별 성공/실패 여부
   errorstring실패 시 상세 에러 메시지

Examples

Response

  • 성공
{
"code": 0,
"healthCheck": {
"result": "success",
"SKMS_API_URL": "http://127.0.0.1:8080"
},
"licenseCheck": {
"result": "success",
"companyId": "3CJ55MSE-xLO7Sxt4-qUBKzbcs-XP2cgGEq",
"systemDomain": "test.com"
},
"keyCheck": {
"result": "success",
"customHeaderKey": "AVdos*******************",
"dsHeaderKey": "UngyY*******************",
"dsKeyEncryptionKey": "CwI3F*******************",
"masterKey": "UldoZ*******************"
},
"azureInfoCheck": {
"result": "success",
"appId": "7e82e*******************************",
"appSecret": "LBd8Q***********************************",
"azureTenantId": "4d615*******************************"
},
"azureInfoValidCheck": {
"result": "success"
}
}
  • 실패
  • healthCheck 실패
{
"code": -1,
"healthCheck": {
"result": "failed",
"error": "I/O error on GET request for \"http://127.0.0.1:8180/api/healthCheck.do\": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect"
},
"licenseCheck": "failed",
"keyCheck": "failed",
"azureInfoCheck": "failed",
"azureInfoValidCheck": "failed"
}
  • licenseCheck 실패
{
"code": -1,
"healthCheck": {
"result": "success",
"SKMS_API_URL": "http://127.0.0.1:8080"
},
"licenseCheck": {
"result": "failed",
"error": "{\"code\":40108,\"message\":\"Unavailable License\",\"detail\":\"[ 246D-7AAF3-E2FA-DF7B8 ] is not available.\"}" // 미사용 라이선스
// "error": "{\"code\":40107,\"message\":\"No matching license found\",\"detail\":\"License skms_connector_info information is empty.\"}" // 존재하지 않는 라이선스
},
"keyCheck": "failed",
"azureInfoCheck": "failed",
"azureInfoValidCheck": "failed"
}
  • keyCheck 실패
{
"code": -1,
"healthCheck": {
"result": "success",
"SKMS_API_URL": "http://127.0.0.1:8080"
},
"licenseCheck": {
"result": "success",
"companyId": "7FDKQsEK-QVGKyXA2-fx1LxIzy-SNIre0s9",
"systemDomain": "http://test.com"
},
"keyCheck": {
"result": "failed",
"error": "{\"code\":40110,\"message\":\"HeaderKey is Empty\",\"detail\":\"I/O error on GET request for \\\"https://devkms.softcamp.co.kr:444/drm/7FDKQsEK-QVGKyXA2-fx1LxIzy-SNIre0s9/key/DDTCODE_CHK\\\": Connect to devkms.softcamp.co.kr:444 [devkms.softcamp.co.kr/10.14.10.171] failed: Connection timed out: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to devkms.softcamp.co.kr:444 [devkms.softcamp.co.kr/10.14.10.171] failed: Connection timed out: connect\"}" // 키볼트 연결 실패
// "error": "{\"code\":40110,\"message\":\"HeaderKey is Empty\",\"detail\":\"HeaderKey is Empty\"}" // 헤더키 없음
// "error": "{\"code\":40111,\"message\":\"EncryptionKey is Empty\",\"detail\":\"DS_KEY_ENCRYPTION_KEY is Empty\"}" // dsKeyEncryptionKey 없음
// "error": "500 : \"{\"code\":50001,\"message\":\"An unexpected error has occurred in the internal system\",\"detail\":\"JSONArray[0] is not a JSONObject.\"}\"" // 마스터키 없음
},
"azureInfoCheck": "failed",
"azureInfoValidCheck": "failed"
}
  • azureInfoCheck 실패
{
"code": -1,
"healthCheck": {
"result": "success",
"SKMS_API_URL": "http://127.0.0.1:8080"
},
"licenseCheck": {
"result": "success",
"companyId": "7FDKQsEK-QVGKyXA2-fx1LxIzy-SNIre0s9",
"systemDomain": "http://test.com"
},
"keyCheck": {
"result": "success",
"customHeaderKey": "AVdos*******************",
"dsHeaderKey": "UngyY*******************",
"dsKeyEncryptionKey": "CwI3F*******************",
"masterKey": "UldoZ*******************"
},
"azureInfoCheck": {
"result": "failed",
"error": "400 : \"{\"code\":40011,\"message\":\"Unable to AzureInfo\",\"detail\":\"AzureInfo is incorrect\"}\"" // AZURE_INFO 없음
// "error": "400 : \"{\"code\":40011,\"message\":\"Unable to AzureInfo\",\"detail\":\"OpenidTenant is Empty\"}\"" // OpenidTenant 없음
// "error": "500 : \"{\"code\":50001,\"message\":\"An unexpected error has occurred in the internal system\",\"detail\":\"I/O error on GET request for \\\"https://devlogin.softcamp.co.kr:444/SCCloudOAuthService/uFhoVIZI-wni6zwDS-E6xGXPqT-m2ms8GWh/company/getCompanyInfo\\\": Connect to devlogin.softcamp.co.kr:444 [devlogin.softcamp.co.kr/10.14.10.163] failed: Connection timed out: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to devlogin.softcamp.co.kr:444 [devlogin.softcamp.co.kr/10.14.10.163] failed: Connection timed out: connect\"}\"" // SHIELD ID 연결 실패
},
"azureInfoValidCheck": "failed"
}
  • azureInfoValidCheck 실패
{
"code": -1,
"healthCheck": {
"result": "success",
"SKMS_API_URL": "http://127.0.0.1:8080"
},
"licenseCheck": {
"result": "success",
"companyId": "eM6JucXm-1MNaDnZr-d51UJULP-hL8ouPxo",
"systemDomain": "http://test.com"
},
"keyCheck": {
"result": "success",
"customHeaderKey": "AVdos*******************",
"dsHeaderKey": "AVdos*******************",
"dsKeyEncryptionKey": "CwI3F*******************",
"masterKey": "UldoZ*******************"
},
"azureInfoCheck": {
"result": "success",
"appId": "7e82e*******************************",
"appSecret": "LBd8Q***********************************",
"azureTenantId": "4d615*******************************"
},
"azureInfoValidCheck": {
"result": "failed",
"error": "com.microsoft.informationprotection.internal.gen.Error: NoAuthTokenError: Client application failed to provide authentication token for HTTP request., CorrelationId=200476a9-aba3-4bb6-a174-5389a1a24aca, CorrelationId.Description=PolicyProfile"
}
}

[테스트 예시]

  1. 테스트할 서비스의 SDF Container pod 접속
    : kubectl -n dev exec --stdin --tty cloud-ssevtr-service-6b9b76587b-jkjwn -c cloud-containerlinker-service -- sh

ekms_master_appRegi

  1. curl 설치 여부 확인
    : curl --version

ekms_master_appRegi

  1. 상태 점검 API 호출 (라이선스 변경 필요)
    : curl http://127.0.0.1:8181/api/healthCheck/EFB4-19136-DB9E-201B9

3.1 모두 성공
ekms_master_appRegi
3.2 keyCheck 실패
ekms_master_appRegi