20) Extracting Headers for DS Encryption
Extracting headers to be used for encryption with DS headers
API
| Method | URL |
|---|---|
| POST | /api/internal/encryption/header/extract |
Request Header
| Name | Required | Description |
|---|---|---|
| Authorization | required | User authentication method, JWT value Authorization: Bearer {JWT}Note: The JWT value is issued through the authentication/authorization service. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| companyId | required | string | Company ID using the target document (used when retrieving key data by company) |
| srcFilePath | required | string | Path to the security document for header extraction |
Response
| Name | Type | Description |
|---|---|---|
| code | int | 0 : Success Value other than 0: Error |
| docuKey | string | DocuKey created with a user key used for plaintext document encryption |
| encHeaderInfo | string | DS Header Information of Security Document (base64Encode) |
Examples
Request
- Body
{
"companyId": "7FDKQsEK-QVGKyXA2-fx1LxIzy-SNIre0s9",
"srcFilePath": "/opt/shieldrm/data/test.xlsx"
}
Response
- success
{
"code": 0,
"docuKey" : "UdEOPB2vjsrd0rB9d93blQ==",
"encHeaderInfo" : "eyJlbmNyeXB0ZWQiOnRydWUsImZpbGUiOnsicGF0aCI6IkQ6XF....(생략)....."
}
Response
- failure
[일반 문서인 경우]
{
"code": -36,
"message": "Source file is not an encrypted file"
}
[SKMS 실패]
{
"code": 40004,
"message": "Failed extract header",
"detail": "1"
}
[SCSL 실패]
{
"code": -61,
"message": "EXCEPTION error"
}