限定使用アクセス トークン
制限付きアクセス トークンは、リクエストのなりすましやリプレイ攻撃から保護され、メールが送信されたユーザーによって確実に実行されます。保護を実現するために、リクエスト パラメータに一意のトークン パラメータを追加し、アクションが呼び出されたときにそれを検証します。
トークン パラメータは、特定のアクションと特定のユーザーに対してのみ使用できるキーとして生成する必要があります。リクエストされたアクションを実行する前に、トークンが有効であり、ユーザーに対して生成したトークンと一致していることを確認する必要があります。トークンが一致した場合、アクションを実行できます。トークンは今後のリクエストで無効になります。
アクセス トークンは、HttpActionHandler の url
プロパティの一部としてユーザーに送信する必要があります。たとえば、アプリケーションが http://www.example.com/approve?requestId=123
で承認リクエストを処理する場合は、追加の accessToken
パラメータを追加して、http://www.example.com/approve?requestId=123&accessToken=xyz
に送信されるリクエストをリッスンすることを検討してください。
requestId=123
と accessToken=xyz
の組み合わせは事前に生成する必要があるものであり、accessToken
が requestId
から推測されないようにします。requestId=123
が accessToken
の承認リクエスト、または accessToken
が xyz
でない承認リクエストは拒否されます。このリクエストが完了すると、同じ ID とアクセス トークンを持つ今後のリクエストも拒否されます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-03 UTC。
[null,null,["最終更新日 2024-09-03 UTC。"],[[["Limited-Use Access Tokens enhance security by mitigating request spoofing and replay attacks, ensuring actions are performed by the intended user."],["These tokens function as unique keys, valid for a specific action and user, verified before the action is executed and invalidated afterward."],["Access tokens are transmitted via the `url` property of the `HttpActionHandler`, requiring developers to include an `accessToken` parameter for verification."],["To ensure security, a unique combination of `requestId` and `accessToken` should be pre-generated, with any request lacking the correct token being rejected."],["Upon successful execution of a request with a valid token, subsequent requests using the same token should be denied to prevent replay attacks."]]],["The core concept is using Limited-Use Access Tokens to secure user actions. A unique token, tied to a specific action and user, is added to request parameters (e.g., in a URL). Before an action executes, the system verifies the token's validity and user association. Valid tokens are then invalidated to prevent reuse. The system should generate the access token, ensuring it's unpredictable from the request ID and reject requests with missing or invalid tokens.\n"]]