4) セキュリティ文書の復号化
セキュリティ文書を一般文書に復号化
API
| Method | URL |
|---|---|
| POST | /api/decryption |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| licenseKey | required | string | SHIELDRM 管理者ページの連携アプリ管理メニューで発行されたライセンスを入力 |
| srcFilePath | required | string | 元のセキュリティ文書のパス |
| dstFilePath | required | string | 復号化された一般文書のパス |
| extraInfo | optional | json | JSON形式の追加情報入力 (以下のextraInfoデータ説明表およびサンプルデータを参照) |
| decisionFactor | optional | json | 登録された条件付きポリシーを適用するための追加情報の入力 (以下の decisionFactor データ説明表およびサンプルデータを参照) |
extraInfo データ説明表
Key Required Type Description source required json name required string 呼び出しシステム名 from required string 呼び出しシステムURL user json id string ユーザーID name string ユーザー名 depart string ユーザー全体部門 (上位グループ/中位グループ/下位グループ) duty string ユーザー職名
- サンプルデータ
{
"source": {
"name": "EKMS",
"from": "https://devekms.softcamp.co.kr"
},
"user": {
"id": "ekmsTest@softcamp.co.kr",
"name": "ekmsTest",
"depart": "임직원/연구소/개발실/개발1팀",
"duty": "과장"
}
}
decisionFactor データ説明表
Key Required Type Description userId required string 条件付きポリシーの構成員に該当する文書変換をリクエストしたユーザーID ipAddress required string 条件付きポリシーの位置(IP)に該当する文書変換をリクエストしたユーザーIP
- サンプル データ
{
"userId": "user1@socam.info",
"ipAddress": "10.10.10.100"
}
Response
| Name | Type | Description |
|---|---|---|
| code | int | 0 : 成功 0以外の値 : エラー |
| message | string | "OK" : 成功 その他の値 エラーメッセージ |
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
- 成功
{
"code": 0,
"message" : "OK"
}
- 失敗
- SDFコンテナエラー
- Status code : 500 INTERNAL_SERVER_ERROR
{
"code": 50001,
"message": "/opt/shieldrm/data/test.pptx (No such file or directory)"
}
- SDFコンテナモジュール(SCSL)エラー
- Status code : 500 INTERNAL_SERVER_ERROR
{
"code": -61,
"message" : "EXCEPTION error"
}
- SKMS エラー (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モジュール(SCKE)エラー
- Status code : 500 INTERNAL_SERVER_ERROR
{
"code": 40003,
"message": "Failed create header",
"detail": "4020"
}
API内部で呼び出すSKMS APIおよびSCSL関数の整理
| 呼び出し順序 | APIおよび関数名 |
|---|---|
| 1 | SKMS JWT 発行 API 呼び出し : /api/oauth/token |
| 2 | SKMS ヘッダーキー照会 API 呼び出し : /api/docu/headerKey |
| 3 | SCSL 復号化関数の呼び出し : CloudAPIDecrypt() |
| 4 | ヘッダーキー照会 API 呼び出し : /api/docu/headerKey |
| 5 | SCSL ヘッダー情報取得関数呼び出し : dsGetFullHeaderEx() |
| 6 | 統合ログ送信API呼び出し : /log/container-linker |