Skip to main content

4) Decrypting Security Documents

Decrypting a security document into a regular document

API

MethodURL
POST/api/decryption

Request Body

NameRequiredTypeDescription
licenseKeyrequiredstringEnter the issued license in the integration app management menu of the SHIELDRM admin page.
srcFilePathrequiredstringOriginal security document path
dstFilePathrequiredstringDecrypted general document path
extraInfooptionaljsonInput additional information in JSON format
(Refer to the extraInfo data description table and sample data below)
decisionFactoroptionaljsonAdditional Information Input for Applying Registered Conditional Policies
(Refer to the decisionFactor 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": "과장"
}
}
decisionFactor Data Description Table
KeyRequiredTypeDescription
userIdrequiredstringUser ID of the requester for document conversion that corresponds to the members of the conditional policy
ipAddressrequiredstringUser IP requesting document conversion corresponding to the location (IP) of the conditional policy
  • Sample Data
{
"userId": "user1@socam.info",
"ipAddress": "10.10.10.100"
}

Response

NameTypeDescription
codeint0 : Success
Value other than 0: Error
messagestring"OK" : Success
Other Value Error Message

Examples

Request

  • Body
{
"licenseKey": "FEFF-0C448-B1D8-A1A9A",
"srcFilePath" : "/opt/shieldrm/data/test.xlsx",
"dstFilePath" : "/opt/shieldrm/dataout_test.xlsx",
"extraInfo": "{\"source\":{\"name\":\"EKMS\",\"from\":\"https://devekms.softcamp.co.kr\"}}",
"decisionFactor": "{\"userId\":\"user1@socam.info\",\"ipAddress\":\"10.10.10.100\"}"
}

Response

  • success
{
"code": 0,
"message" : "OK"
}
  • failure
  • SDF Container Error
  • Status code : 500 INTERNAL_SERVER_ERROR
{
"code": 50001,
"message": "/opt/shieldrm/data/test.pptx (No such file or directory)"
}
  • SDF Container Module (SCSL) Error
  • Status code : 500 INTERNAL_SERVER_ERROR
{
"code": -61,
"message" : "EXCEPTION error"
}
[토큰 검증 실패]
{
"code": 50001,
"message": "{\"code\":40101,\"message\":\"Invalid token\",\"detail\":\"invalid_token\"}"
}

[KMS 연결 실패]
{
"code": 50001,
"message": "An unexpected error has occurred in the internal system",
"detail": "I/O error on GET request for \"https://devkms.softcamp.co.kr:8080/drm/7FDKQsEK-QVGKyXA2-fx1LxIzy-SNIre0s9/key/0000003\": Connect to devkms.softcamp.co.kr:8080 [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:8080 [devkms.softcamp.co.kr/10.14.10.171] failed: Connection timed out: connect"
}

[KMS 키조회 실패]
{
"code": 40013,
"message": "Key not found in the keyVault",
"detail": "keyId : DDTCODE601"
}
  • SKMS Module (SCKE) Error
  • Status code : 500 INTERNAL_SERVER_ERROR
{
"code": 40003,
"message": "Failed create header",
"detail": "4020"
}

Summary of SKMS API and SCSL functions called internally by the API

Call OrderAPI and Function Names
1SKMS JWT Issuance API Call: /api/oauth/token
2SKMS Header Key Retrieval API Call: /api/docu/headerKey
3SCSL decryption function call: CloudAPIDecrypt()
4Header Key Retrieval API Call: /api/docu/headerKey
5SCSL header information retrieval function call: dsGetFullHeaderEx()
6Unified Log Transmission API Call: /log/container-linker