4) Decrypting Security Documents
Decrypting a security document into a regular document
API
| Method | URL |
|---|---|
| POST | /api/decryption |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| licenseKey | required | string | Enter the issued license in the integration app management menu of the SHIELDRM admin page. |
| srcFilePath | required | string | Original security document path |
| dstFilePath | required | string | Decrypted general document path |
| extraInfo | optional | json | Input additional information in JSON format (Refer to the extraInfo data description table and sample data below) |
| decisionFactor | optional | json | Additional Information Input for Applying Registered Conditional Policies (Refer to the decisionFactor data description table and sample data below) |
extraInfo Data Description Table
Key Required Type Description source required json name required string Call System Name from required string Call System URL user json id string User ID name string Username depart string All User Departments (Top Group/Middle Group/Lower Group) duty string User 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
Key Required Type Description userId required string User ID of the requester for document conversion that corresponds to the members of the conditional policy ipAddress required string User 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
| Name | Type | Description |
|---|---|---|
| code | int | 0 : Success Value other than 0: Error |
| message | string | "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"
}
- SKMS Error (https://idocs.softcamp.co.kr/sdf/SDF_Guide/log/api_skmsErrorCode)
- Status code : 500 INTERNAL_SERVER_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 Order | API and Function Names |
|---|---|
| 1 | SKMS JWT Issuance API Call: /api/oauth/token |
| 2 | SKMS Header Key Retrieval API Call: /api/docu/headerKey |
| 3 | SCSL decryption function call: CloudAPIDecrypt() |
| 4 | Header Key Retrieval API Call: /api/docu/headerKey |
| 5 | SCSL header information retrieval function call: dsGetFullHeaderEx() |
| 6 | Unified Log Transmission API Call: /log/container-linker |