機械翻訳について

HMACシグネチャ検証

Oracle Integrationフローを呼び出すための受信リクエストのHMACベースのデジタル・シグネチャの検証をサポートするには、HMAC_SIGNATURE_VALIDATION管理対象セキュリティ・ポリシーを使用します。 接続定義に必要なセキュリティ・ポリシーをカスタマイズできます。

概要

HMACポリシーは、受信リクエストのHMACシグネチャ部分を検証します。 セキュリティ・ポリシーは、ポリシーで定義されたHMAC検証関数(JQ)に基づいて、HTTPクライアントによって送信されたシグネチャを検証します。

このセキュリティ・ポリシーは、clientIdentifierに指定されているクライアントID値をアサートし、clientIDがServiceInvokerロールに関連付けられていることを確認します。

HMACシグネチャ検証ポリシーをドキュメントに追加するには、使用可能な認証スキーム・テンプレートを使用します。 「新規接続定義の実装」を参照してください。

ノート:

このポリシーを使用して、単一のリクエストで複数のシグネチャを検証できます。

セキュリティ・プロパティ

このセキュリティ・ポリシーを使用する接続定義は、securityPropertiesセクションで次のプロパティを定義します。 「接続プロパティおよびサンプル・コード」を参照してください。

name, displayName, shortDescription列およびdescription列の値は、アダプタ定義ドキュメントにセキュリティ・ポリシーを挿入したときに表示されるデフォルト値を示します。 これらの値は、必要に応じて更新できます。

name displayName shortDescription description データ型 必須 推奨事項

signatureString

Signing String(s)/Content(s) that are signed

Example: ${ .request.body}

JQ Expression or Flow indicating how build signatureString.

In case of more than 1 signature output should be ArrayNode for all signing strings.

String

はい

"hidden":true

signature

Request Signature Location(s)

Example: ${.request.headers."x-signature"}

JQ Expression or Flow to extract signature(s) from request

In case of more than 1 signature output should be ArrayNode for all signatures.

String

はい

"hidden":true

secret

Shared Secret

secrets

Shared Secret

(Password)

If multiple signatures,

This can either be comma separated or only one same password for all signatures.

パスワード

はい

"hidden":false

signatureAlgorithm

signature

Algorithm

Signing Algorithm

Example: HMACSHA256

One of the following:

HMACSHA256: HMAC Signature with SHA-256

HMACSHA384: HMAC Signature with SHA-384

HMACSHA512: HMAC Signature with SHA-512

CHOICE

はい

"hidden":true

timestampValidator

Timestamp Validation Strategy

Example:

${.request.headers.ts < now()}

Optional, JQ Expression or Flow to validate message timestamp/expiry

String

いいえ

"hidden":true

clientIdentifier

This ID will be used to authorize after signature validation. ID must belong to valid client application in OIC IAM domain. It Must have ServiceInvoker Application Role assigned

Example:

741abdd2ca2ddddd055670cfa856bfv

This ID will be used to authorize after signature validation.

ID must belong to valid client application in OIC IAM domain.

It Must have ServiceInvoker Application Role assigned

String

はい

"hidden":false

サンプル・コード: デジタル・シグネチャ検証(HMAC)

 "securityPolicies": [
     {  
        "type": "managed",
        "policy": "HMAC_SIGNATURE_VALIDATION",
        "description": "Validates HMAC Signature",
        "displayName": "HMAC SIGNATURE VALIDATION",
        "scope": "TRIGGER",
        "securityProperties": [
           {
               "name": "signature",
               "hidden": true,
               "required": true,
               "default": "${connectivity::hexDecode(.request.headers.digest)}"
           },
           {
               "name": "signatureString",
               "displayName": "Request Signature Location",
               "hidden": true,
               "required": true,
               "default": "${.request.body}"
           },
           {
               "name": "signatureAlgorithm",
               "displayName": "Request Signature Location",
               "hidden": true,
               "required": true,
               "default": "HMACSHA256"
           },
           {
               "name": "secret",
               "displayName": "Shared Secret",
               "hidden": false,
               "required": true
           },
           {
               "name": "timestampValidator",
               "displayName": "Timestamp Validation",
               "hidden": true,
               "required": true,
               "default": ""
           },
            
       ]
      }
   ]