20) DS 암호화용 헤더 추출
DS 헤더를 사용한 암호화 시 사용될 헤더 추출
API
Method | URL |
---|---|
POST | /api/internal/encryption/header/extract |
Request Header
Name | Required | Description |
---|---|---|
Authorization | required | 사용자 인증 수단, JWT값 Authorization: Bearer {JWT} 참고 : JWT값은 인증/인가 서비스를 통해 발급 받는다. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
companyId | required | string | 대상 문 서를 사용하는 회사ID(회사 별 키 데이터 조회 시 사용) |
srcFilePath | required | string | 헤더 추출할 보안 문서 경로 |
Response
Name | Type | Description |
---|---|---|
code | int | 0 : 성공 0 이외의 값 : 에러 |
docuKey | string | 평문 문서 암호화에 사용될 유저키로 만들어진 DocuKey |
encHeaderInfo | string | 보안 문서의 DS 헤더 정보 (base64Encode) |
Examples
Request
- Body
{
"companyId": "7FDKQsEK-QVGKyXA2-fx1LxIzy-SNIre0s9",
"srcFilePath": "/opt/shieldrm/data/test.xlsx"
}
Response
- 성공
{
"code": 0,
"docuKey" : "UdEOPB2vjsrd0rB9d93blQ==",
"encHeaderInfo" : "eyJlbmNyeXB0ZWQiOnRydWUsImZpbGUiOnsicGF0aCI6IkQ6XF....(생략)....."
}
Response
- 실패
[일반 문서인 경우]
{
"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"
}