Skip to main content

20) Extracting Headers for DS Encryption

Extracting headers to be used for encryption with DS headers

API

MethodURL
POST/api/internal/encryption/header/extract

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)
srcFilePathrequiredstringPath to the security document for header extraction

Response

NameTypeDescription
codeint0 : Success
Value other than 0: Error
docuKeystringDocuKey created with a user key used for plaintext document encryption
encHeaderInfostringDS 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"
}