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