機械翻訳について

OAuth JWTユーザー・アサーション

(クライアント・アプリケーションでの)ユーザーのJWTアサーションを必要とするREST APIの呼出しをサポートするには、JWT_USER_ASSERTION_FOR_OAUTH管理対象セキュリティ・ポリシーを使用します。

概要

アプリケーションは、データ/APIへのアクセスを許可するアクセス・トークンを返す前に、JWTユーザー・アサーションを使用した認証をユーザーに要求する場合があります。 OAuth JWTユーザー・アサーション・セキュリティ・ポリシーは、クライアント(Oracle Integration)と認証サーバー(証明書の交換を含む)間の信頼できる関係を介して、アプリケーションのAPIに対する認可を取得します。

このセキュリティ・ポリシーをアダプタに追加する場合、アダプタのユーザーは、対応する認証サーバーにクライアント・アプリケーションを作成し、正しい付与タイプ(JWTアサーション)で有効化されたクライアント資格証明のセットを取得する必要があります。 このプロセスでは、認証サーバーとOracle Integrationの両方で、信頼を確立するために証明書の交換が必要になる場合もあります。

その後、アダプタ・ユーザーはアダプタ・インタフェースを利用して、Oracle Integrationから認証サーバーにJWTユーザー・アサーションを策定および送信し、特定のユーザーに必要な権限を指定できます(ユーザーが明示的に同意する必要はなく、通常はOAuth認可コード・セキュリティ・ポリシーの場合です)。 引き換えに、認証サーバーは、指定されたユーザーの権限をモデル化するアクセス・トークンを提供します。

OAuth JWTユーザー・アサーション・ポリシーをアダプタ定義ドキュメントに追加するには、使用可能な認証スキーム・テンプレートを使用します。 「新規接続定義の実装」を参照してください。

ノート:

アダプタでこのセキュリティ・ポリシーを使用する場合は、必要な認証サーバーでクライアント・アプリケーションを作成し、サーバーのJWTアサーションを策定し、jwt.io、Postman、その他のブラウザ・プラグインなどのツールでアサーションを完全にテストしてください。

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

この項では、OAuth JWTユーザー・アサーション認証スキーム・テンプレートで使用可能なセキュリティ・プロパティを示します。

ユーザー・アサーションは、アダプタ・ユーザーによってアダプタ・インタフェースでこれらのプロパティに対して入力された値を使用して形成されます。 アダプタ開発者は、(アダプタに対応する)認証サーバーのデフォルト値を入力することで、アダプタのユーザーに対するアサーション・ペイロードの策定を容易にできます。 このように、アダプタのユーザーは、audience, kid, jti, algorithm, expiration duration, scopeaccess token URLなどの一部のプロパティの値を入力する必要はありません。

通常、ユーザーは必要な認証サーバーにクライアント・アプリケーションを作成し、client_idclient_secret、およびアップロードされた証明書の別名の値を取得するだけで済みます。

アサーションを形成するために1つ以上のカスタム・プロパティを含める必要がある場合は、connectionPropertiesセクションにそれらを含めることができます。 「接続プロパティおよびサンプル・コード」を参照してください。

ノート:

アサーションで特定のユーザーを表すには、そのユーザーを表す認証サーバーによるプロパティが必要です。 通常、これはEメールIDまたはユーザーIDです。
名前 表示名 Short Description 説明 データ型 必須

oauth.access.token.uri

Access Token URI

for example: https://www.google.com/oauth/token

アクセス・トークンを取得するためのリクエストの送信先URI。

String

はい

jwt_header

JWT Header

for example:{"alg":"RSA256"}

JWTヘッダーには、キー識別子、サインインに使用されるアルゴリズムなどのJWTに関するメタデータが含まれます。

String (JSON String)

はい

jwt_payload

JWT Payload

for example: {"iss":"as12123", "sub":"nsjsas12"}

JWTペイロードには、エンティティに関する文(ユーザーなど)と、クレームと呼ばれる追加のエンティティ属性が含まれます。

String (JSON String)

はい

jwt_signing_key_alias_name

JWT Private Key Alias

for example: MSSignkey

Oracle Integration証明書に秘密キーをアップロードした後に受信した署名キー識別子。

String

はい

scope

Scope

for example: read,write.

ユーザーのかわりにアプリケーションがリクエストしている権限。

String

いいえ

jwtAccessTokenRequest

Customized Access Token Request

for example: -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=sjkdndaiwd&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer &client_assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIs&scope=read' https://<IAM-token>/oauth2/v1/token

アクセス・トークンのフェッチに使用されるHTTPリクエストのURI構文を使用して値が形成されるアクセス・トークン・リクエスト。 URI構文はcURLに似ています。

String

いいえ

サンプル・コード: OAuth JWTユーザー・アサーション(Google PubSub API)

この例では、Googleのアサーションにカスタム・プロパティ(サービス・アカウント)が必要です。 セキュリティ・ポリシー定義でJQ式を使用して、ヘッダーと本文の形式に注意してください。 一部のプロパティは、JQ式自体のポリシーによってデフォルト設定されています。

"connectionProperties": [
  {
    "name": "projectID",
    "type": "STRING",
    "displayName": "Project ID",
    "description": "Google Cloud Project ID",
    "shortDescription": "Example: xxx-xxx-657890",
    "required": true,
    "hidden": false,
    "tokenized": true,
    "scope": [
      "ACTION",
      "TRIGGER"
    ]
  },
  {
    "name": "serviceAccount",
    "type": "STRING",
    "displayName": "Service Account",
    "description": "Google Cloud Service Account",
    "shortDescription": "Example: name@<projectId>.iam.gserviceaccount.com",
    "required": true,
    "hidden": false,
    "tokenized": true,
    "scope": [
      "TRIGGER",
      "ACTION"
    ]
  },
  {
    "name": "hostName",
    "type": "STRING",
    "displayName": "HostName",
    "description": "Environment hostname with which user needs to connect",
    "shortDescription": "Example: pubsub.googleapis.com",
    "required": true,
    "hidden": true,
    "scope": [
      "ACTION",
      "TRIGGER"
    ],
    "default": "pubsub.googleapis.com"
  }
],
"securityPolicies": [
  {
    "type": "managed",
    "policy": "JWT_USER_ASSERTION_FOR_OAUTH",
    "description": "JWT User Assertion for OAuth Policy",
    "displayName": "JWT User Assertion for OAuth",
    "scope": "ACTION",
    "securityProperties": [
      {
        "name": "oauth.access.token.uri",
        "displayName": "Access token uri",
        "description": "Access token uri",
        "shortDescription": "https://oauth2.googleapis.com/token",
        "hidden": true,
        "required": true,
        "default": "https://oauth2.googleapis.com/token"
      },
      {
        "name": "jwt_header",
        "displayName": "JWT header",
        "description": "JWT header",
        "shortDescription": "{\"alg\":\"RSA256\"}",
        "hidden": true,
        "required": true,
        "default": "${{\"alg\" : \"RS256\",\"typ\": \"JWT\"}}"
      },
      {
        "name": "jwt_payload",
        "displayName": "JWT Payload",
        "description": "JWT Payload",
        "shortDescription": "{\"iss\":\"123as12\", \"sub\":\"as12123\"}",
        "hidden": true,
        "required": true,
        "default": "${{\"iss\": .connectionProperties.serviceAccount,\"sub\": .connectionProperties.serviceAccount,\"aud\": \"https://oauth2.googleapis.com/token\",\"exp\": \"\",\"iat\": \"\",\"scope\": \"https://www.googleapis.com/auth/pubsub\"}}"
      },
      {
        "name": "jwt_signing_key_alias_name",
        "displayName": "JWT Private Key Alias",
        "description": "Jwt Signing key. This is the key name of certificate uploaded in the OIC certificates page.",
        "shortDescription": "Example: MSSignkey",
        "hidden": false,
        "required": true,
        "default": ""
      },
      {
        "name": "scope",
        "displayName": "Scope",
        "description": "Scope",
        "shortDescription": "Scope",
        "hidden": true,
        "required": false,
        "default": ""
      },
      {
        "name": "jwtAccessTokenRequest",
        "displayName": "Access Token Request",
        "description": "Access Token Request",
        "shortDescription": "Example: AC1234",
        "hidden": true,
        "required": false,
        "default": ""
      }
    ]
  }
]