Skip to main content

22) DS/AIP Security Document Standardization

Decrypt and normalize DS security documents / AIP encryption documents / AIP+DS dual encryption documents.

API

MethodURL
POST/api/internal/entireDecrypt

Request Header

NameRequiredDescription
AuthorizationrequiredUser authentication method, JWT value
Authorization: Bearer {JWT}
Note: The JWT value is issued through the authentication/authorization service.

Request Body

NameRequiredTypeDescription
companyIdrequiredstringCompany ID using the target document (used when retrieving key data by company)
srcFilePathrequiredstringOriginal security document path
dstFilePathrequiredstringDecrypted general document path
extraInfooptionalstringInput additional information in JSON format (refer to the extraInfo data description table and sample data below)
extraInfo Data Description Table
KeyRequiredTypeDescription
sourcerequiredjson
namerequiredstringCall System Name
fromrequiredstringCall System URL
userjson
idstringUser ID
namestringUsername
departstringAll User Departments (Top Group/Middle Group/Lower Group)
dutystringUser Job Title
  • Sample Data
{
"source": {
"name": "EKMS",
"from": "https://devekms.softcamp.co.kr"
},
"user": {
"id": "ekmsTest@softcamp.co.kr",
"name": "ekmsTest",
"depart": "임직원/연구소/개발실/개발1팀",
"duty": "과장"
}
}

Response

NameTypeDescription
codeint0 : Success
-36 : General Document
Other values: Error
messagestring"OK" : Success
"This document is not encrypted." : General Document
Other Value Error Message

Examples

Request

  • Body
{
"companyId": "gNzvLhk8-cVXfQ41A-FSfFVW0m-w4yc4M00",
"srcFilePath" : "/opt/shieldrm/data/protectEnc.xlsx",
"dstFilePath" : "/opt/shieldrm/decUnprotect.xlsx",
"extraInfo": "{\"source\":{\"name\":\"EKMS\",\"from\":\"https://devekms.softcamp.co.kr\"}}"
}

Response

  • success
{
"code": 0,
"message" : "OK"
}

[일반 문서]
{
"code": -36,
"message": "This document is not encrypted."
}
  • failure
  • SDF Container Error
  • Status code : 500 INTERNAL_SERVER_ERROR
{
"code": 50001,
"message": "/opt/shieldrm/data/protectEnc.pptx (No such file or directory)"
}

[토큰 검증 실패]
{
"code": 50001,
"message": "{\"code\":40101,\"message\":\"Invalid token\",\"detail\":\"invalid_token\"}"
}

[AIP SDK 에러]
{
"code": 60001,
"message": "com.microsoft.informationprotection.internal.gen.Error: NoAuthTokenError: Client application failed to provide authentication token for HTTP request., CorrelationId=a2d2f6b1-4265-482b-bc7d-18c88f8284bd, CorrelationId.Description=PolicyProfile"
}

[내부 서비스 에러]
{
"code": 50001,
"message": "400 : \"{\"code\":40011,\"message\":\"Unable to AzureInfo\",\"detail\":\"OpenidTenant is Empty\"}\""
}