メインコンテンツまでスキップ

4) セキュリティ文書の復号化

セキュリティ文書を一般文書に復号化

API

MethodURL
POST/api/internal/decryption

Request Header

NameRequiredDescription
Authorizationrequiredユーザー認証手段、JWT値
Authorization: Bearer {JWT}
参考 : JWT値は認証/認可サービスを通じて発行されます。

Request Body

NameRequiredTypeDescription
companyIdrequiredstring対象文書を使用する会社ID(会社別キー データ照会時に使用)
srcFilePathrequiredstring元のセキュリティ文書のパス
dstFilePathrequiredstring復号化された一般文書のパス
extraInfooptionalstringJSON形式の追加情報入力(下記のextraInfoデータ説明表およびサンプルデータを参照)
extraInfo データ説明表
KeyRequiredTypeDescription
sourcerequiredjson
namerequiredstring呼び出しシステム名
fromrequiredstring呼び出しシステムURL
userjson
idstringユーザーID
namestringユーザー名
departstringユーザー全体部門 (上位グループ/中位グループ/下位グループ)
dutystringユーザー職名
  • サンプルデータ
{
"source": {
"name": "EKMS",
"from": "https://devekms.softcamp.co.kr"
},
"user": {
"id": "ekmsTest@softcamp.co.kr",
"name": "ekmsTest",
"depart": "임직원/연구소/개발실/개발1팀",
"duty": "과장"
}
}

Response

NameTypeDescription
codeint0 : 成功
0以外の値 : エラー
messagestring"OK" : 成功
その他の値 エラーメッセージ

Examples

Request

  • Body
{
"companyId": "gNzvLhk8-cVXfQ41A-FSfFVW0m-w4yc4M00",
"srcFilePath" : "/opt/shieldrm/data/test.xlsx",
"dstFilePath" : "/opt/shieldrm/dataout_test.xlsx",
"extraInfo": "{\"source\":{\"name\":\"EKMS\",\"from\":\"https://devekms.softcamp.co.kr\"}}"
}

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"
}
[토큰 검증 실패]
{
"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および関数名
1SKMS ヘッダーキー照会 API 呼び出し : /api/docu/headerKey
2SCSL 復号化関数の呼び出し : CloudAPIDecrypt()
3ヘッダーキー照会 API 呼び出し : /api/docu/headerKey
4SCSL ヘッダー情報取得関数呼び出し : dsGetFullHeaderEx()
5統合ログ送信API呼び出し : /log/container-linker