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

20) DS 暗号化用ヘッダー抽出

DSヘッダーを使用した暗号化時に使用されるヘッダーの抽出

API

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

Request Header

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

Request Body

NameRequiredTypeDescription
companyIdrequiredstring対象文書を使用する会社ID(会社別キー データ照会時に使用)
srcFilePathrequiredstringヘッダーを抽出するセキュリティ文書のパス

Response

NameTypeDescription
codeint0 : 成功
0以外の値 : エラー
docuKeystring平文文書暗号化に使用されるユーザーキーで作成されたDocuKey
encHeaderInfostringセキュリティ文書の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"
}