

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# API 認証と SDK 認証の認可モデル
<a name="authentication-flows-public-server-side"></a>

ユーザープール認証を使用してアプリケーション開発を始める場合は、アプリケーションタイプに適した API 認可モデルを決める必要があります。認可モデルとは、Amazon Cognito ユーザープール API および SDK 統合の認証コンポーネントを使用してリクエストを行うための認証を提供するシステムです。Amazon Cognito には、IAM 認可、パブリック、トークン認可の 3 つの承認モデルがあります。

IAM で認可されたリクエストの場合、認可は、リクエストの `Authorization` ヘッダーにある一連の AWS IAM 認証情報による署名から取得されます。サーバー側のアプリケーションの場合、この方法は IAM 認可を使用して認証オペレーションを保護します。パブリック (認証されていない) 認証リクエストでは、認可は必要ありません。これは、ユーザーに配布されるクライアント側のアプリケーションに適しています。トークンで認可されたオペレーションは、通常、パブリックオペレーションと組み合わせて実装され、認可は、リクエストの `Authorization` ヘッダーに含まれるセッショントークンまたはアクセストークンから取得されます。Amazon Cognito 認証では、通常、2 つ以上の API オペレーションを順番に実装する必要があり、使用する API オペレーションはアプリケーションの特性によって異なります。アプリケーションがユーザーに配布されるパブリッククライアントでは、サインインのリクエストに認可を必要としないパブリックオペレーションを使用します。トークンで認可されたオペレーションは、パブリックアプリケーションでユーザーのセッションを続行します。アプリケーションロジックがリモートシステムでホストされているサーバー側のクライアントでは、サインインリクエストの IAM 認可を使用して認証オペレーションを保護します。以下の API オペレーションペアとそれに対応する SDK メソッドは、使用可能な認可モデルに対応しています。

各パブリック認証オペレーションには、[UpdateUserAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserAttributes.html) や [AdminUpdateUserAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUpdateUserAttributes.html) など、サーバー側に同等の形式があります。クライアント側のオペレーションはユーザーが開始し、確認を必要としますが、サーバー側のオペレーションでは、変更がユーザープール管理者によってコミットされたと見なし、変更がすぐに有効になります。この例では、Amazon Cognito からユーザーに確認コードを記載したメッセージを送信し、ユーザーのアクセストークンで [VerifyUserAttribute](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerifyUserAttribute.html) リクエストによるコードの送信を許可します。サーバー側のアプリケーションは、任意の属性の値を即座に設定できますが、サインインに E メールアドレスと電話番号を使用する場合、これらの値の変更には[特別な考慮事項が適用](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUpdateUserAttributes.html#CognitoUserPools-AdminUpdateUserAttributes-request-UserAttributes)されます。

API 認証を比較し、API オペレーションと認可モデルの詳細なリストを確認するには、「[API、OIDC、マネージドログインページの認証についての理解](#user-pools-API-operations)」を参照してください。

------
#### [ Client-side (public) authentication ]

以下は、クライアント側のアプリケーションでの一般的なリクエストのシーケンスです。

1. パブリック [InitiateAuth](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html) オペレーションは、ユーザー名とパスワードなどのプライマリ認証情報を送信します。

1. トークンで認可された [RespondToAuthChallenge](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RespondToAuthChallenge.html) オペレーションは、`InitiateAuth` レスポンスからの*セッション*トークンと、MFA などのチャレンジに対する回答を送信します。セッショントークン認可は、まだ完了していない認証サイクルの一部であるリクエストを示します。

1. トークンで認可された [ConfirmDevice](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ConfirmDevice.html) オペレーションは、*アクセス*トークンを送信し、記憶されたデバイスをユーザーのプロファイルに追加する書き込みオペレーションを実行します。アクセストークン認可は、ユーザーが認証を完了した後のセルフサービスオペレーションに対するリクエストを示します。

詳細については、「[クライアント側の認証オプション](#amazon-cognito-user-pools-client-side-authentication-flow)」および「[API、OIDC、マネージドログインページの認証についての理解](#user-pools-API-operations)」を参照してください。

------
#### [ Server-side authentication ]

以下は、サーバー側のオペレーションからの一般的なリクエストのシーケンスです。各リクエストには、アプリケーションサーバーに発行された IAM マシン認証情報で署名された [AWS Signature Version 4](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html) の認可ヘッダーがあります。

1. [AdminInitiateAuth](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html) オペレーションは、ユーザー名とパスワードなどのプライマリ認証情報を送信します。

1. [AdminRespondToAuthChallenge](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminRespondToAuthChallenge.html) オペレーションは、MFA などのチャレンジに対する回答を送信します。

1. [AdminUpdateDeviceStatus](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUpdateDeviceStatus.html) オペレーションは、`AdminInitiateAuth` [レスポンス](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html#API_AdminInitiateAuth_ResponseSyntax)のデバイスキーを記憶済みとして設定します。

詳細については、「[サーバー側の認証オプション](#amazon-cognito-user-pools-server-side-authentication-flow)」および「[API、OIDC、マネージドログインページの認証についての理解](#user-pools-API-operations)」を参照してください。

------

認証が失敗するか、Amazon Cognito がユーザーにトークンを発行するまで、ユーザーは連続してチャレンジに回答して認証を進めます。カスタム認証フローをサポートするために、さまざまなチャレンジを含むプロセスで Amazon Cognito でこれらの手順を繰り返すことができます。

**Topics**
+ [サーバー側の認証オプション](#amazon-cognito-user-pools-server-side-authentication-flow)
+ [クライアント側の認証オプション](#amazon-cognito-user-pools-client-side-authentication-flow)
+ [API、OIDC、マネージドログインページの認証についての理解](#user-pools-API-operations)
+ [認可モデル別にグループ化された API オペレーションのリスト](#user-pool-apis-auth-unauth)

## サーバー側の認証オプション
<a name="amazon-cognito-user-pools-server-side-authentication-flow"></a>

ウェブアプリケーションなどの*サーバー側*のアプリケーションは、ブラウザや SSH セッションなどのリモートディスプレイアプリケーションでクライアントがロードする認証をリモートサーバーに実装します。サーバー側のアプリケーションには通常、以下の特性があります。
+ Java、Ruby、Node.js などの言語でサーバーにインストールされたアプリケーションに組み込まれています。
+ ユーザープールの[アプリケーションクライアント](user-pool-settings-client-apps.md)に接続します。アプリケーションクライアントは、*秘密クライアント*と呼ばれるクライアントシークレットを持つ場合があります。
+  AWS 認証情報にアクセスできます。
+ 認証のために[マネージドログイン](cognito-user-pools-managed-login.md)を呼び出すか、 AWS SDK を使用してユーザープール API で IAM で認可されたオペレーションを使用します。
+ 内部のユーザーにサービスを提供するだけでなく、一般のユーザーにサービスを提供する場合もあります。

ユーザープール API を使用したサーバー側のオペレーションでは、パスワード、ワンタイムパスワード、またはパスキーを主要なサインイン要素として使用できます。サーバー側のアプリでのユーザープール認証は、クライアント側のアプリでの認証に似ています。次の点が異なります。
+ サーバー側のアプリケーションは [AdminInitiateAuth](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html) API リクエストを行います。このオペレーションには、 `cognito-idp:AdminInitiateAuth`および を含むアクセス許可を持つ AWS 認証情報が必要です`cognito-idp:AdminRespondToAuthChallenge`。オペレーションは、必要なチャレンジまたは認証結果を返します。
+ アプリケーションはチャレンジを受信すると、[AdminRespondToAuthChallenge](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminRespondToAuthChallenge.html) API リクエストを行います。`AdminRespondToAuthChallenge` API オペレーションには AWS 認証情報も必要です。

 AWS 認証情報を使用した Amazon Cognito API リクエストの署名の詳細については、 *AWS 全般のリファレンス*[の署名バージョン 4 の署名プロセス](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)を参照してください。

`AdminInitiateAuth` からのレスポンス `ChallengeParameters` では、`USER_ID_FOR_SRP` 属性 (存在する場合) に、ユーザーのエイリアス (E メールアドレスや電話番号など) ではなく、実際のユーザー名が含まれています。`AdminRespondToAuthChallenge` への呼び出しの `ChallengeResponses` では、このユーザー名を `USERNAME` パラメータで渡す必要があります。

**注記**  
バックエンド管理者実装は、管理者認証フローを使用しているため、フローは記憶されたデバイスをサポートしていません。デバイス追跡が有効にしている場合、管理者認証は成功しますが、アクセストークンの更新に関する呼び出しはいずれも失敗します。

## クライアント側の認証オプション
<a name="amazon-cognito-user-pools-client-side-authentication-flow"></a>

モバイルアプリやその他の*クライアント側*のアプリケーションタイプは、ユーザーのデバイスにインストールされ、認証とユーザーインターフェイスのロジックをローカルで実行します。一般的に、以下の特性があります。
+ React native、Flutter、Swift などの言語で構築され、ユーザーデバイスにデプロイされます。
+ *パブリッククライアント*と呼ばれる、クライアントシークレットを持たないユーザープールの[アプリケーションクライアント](user-pool-settings-client-apps.md)に接続します。
+ IAM 認可の API リクエストを許可する AWS 認証情報にアクセスすることはできません。
+ 認証のために[マネージドログイン](cognito-user-pools-managed-login.md)を呼び出すか、 AWS SDK を使用してユーザープール API でパブリックオペレーションとトークン認可オペレーションを使用します。
+ 一般のユーザーにサービスを提供しており、誰でもサインアップしてサインインできます。

ユーザープール API を使用したクライアント側のオペレーションでは、パスワード、ワンタイムパスワード、またはパスキーを主要なサインイン要素として使用できます。[AWS Amplify](https://docs.amplify.aws/javascript/start/getting-started/) または [AWS SDK](https://aws.amazon.com/developer/tools/) で作成したユーザークライアント側のアプリケーションの場合、以下の手順で動作します。

1. ユーザーがアプリにユーザー名とパスワードを入力します。

1. アプリケーションが、ユーザーのユーザー名と SRP (Secure Remote Password) 詳細を使用して、`InitiateAuth` オペレーションを呼び出します。

   この API オペレーションは、認証のパラメータを返します。
**注記**  
アプリは、 AWS SDK に組み込まれている Amazon Cognito SRP 機能を使用して SRP の詳細を生成します。

1. アプリが `RespondToAuthChallenge` 操作を呼び出します。呼び出しが成功すると、Amazon Cognito からユーザーのトークンが返され、認証フローが完了します。

   Amazon Cognito に必要なチャレンジが別に存在する場合は、`RespondToAuthChallenge` を呼び出してもトークンは返されません。代わりに、呼び出しによってセッションが返されます。

1. `RespondToAuthChallenge` からセッションが返された場合、アプリは `RespondToAuthChallenge` を再度呼び出します。今回の呼び出しには、セッションとチャレンジのレスポンス (MFA コードなど) が使用されます。

## API、OIDC、マネージドログインページの認証についての理解
<a name="user-pools-API-operations"></a>

Amazon Cognito ユーザープールは、いくつかの認証テクノロジーの組み合わせです。ユーザープールは、外部 ID プロバイダー (IdP) に依拠しているパーティであり、OpenID Connect (OIDC) SDK を使用して認証を実装するアプリケーションの IdP です。 AWS SDK JSON ウェブトークン (JWT) の発行者として、OIDC 認証に類似した認証を (ただし、SDK の一部である API メソッドで) 提供します。また、アプリケーションへの安全なエントリポイントにもなります。

サインアップ、サインイン、ユーザープール内のユーザー管理を行うには、2 つのオプションがあります。

1. *マネージドログインページ*とクラシックの*ホストされた UI* には、[マネージドログインのユーザーインタラクティブエンドポイント](managed-login-endpoints.md)と、IdP および依拠しているパーティのロールを処理する[フェデレーションエンドポイント](federation-endpoints.md)が含まれています。これらは、ユーザープールの[ドメインを選択すると](cognito-user-pools-assign-domain.md) Amazon Cognito がアクティブ化するパブリックウェブページのパッケージを構成します。サインアップ、サインイン、パスワード管理、多要素認証 (MFA) のページなど、Amazon Cognito ユーザープールの認証および認可機能をすぐに使い始めるには、マネージドログインの組み込みユーザーインターフェイスを使用します。

   その他のユーザープールエンドポイントを使うと、サードパーティーの ID プロバイダー (IdP) を使った認証が容易になります。行われるサービスには以下が含まれます。

   1. IdPs からの認証済みクレーム用のサービスプロバイダーのコールバックエンドポイント (`saml2/idpresponse` や `oauth2/idpresponse` など)。Amazon Cognito がアプリと IdP の間の中間サービスプロバイダー (SP) である場合、コールバックエンドポイントはサービスを表します。

   1. 環境に関する情報を提供するエンドポイント (`oauth2/userInfo` や `/.well-known/jwks.json` など)。アプリケーションは、OIDC または OAuth 2.0 デベロッパーライブラリを使用してトークンを検証したり、ユーザープロファイルデータを取得したりするときに、これらのエンドポイントを使用します。

1. [Amazon Cognito ユーザープール API](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/Welcome.html) は、ウェブアプリやモバイルアプリが独自のカスタムフロントエンドでサインイン情報を収集した後で、ユーザーを認証する一連のツールです。ユーザープール API 認証では、次の JSON ウェブトークンが生成されます。

   1. ユーザーからの検証可能な属性クレームを含む ID トークン。

   1. [AWS サービスエンドポイント](https://docs.aws.amazon.com/general/latest/gr/cognito_identity.html)に対する、トークンで認可された API リクエストを作成することをユーザーに許可するアクセストークン。
**注記**  
デフォルトでは、ユーザープール API 認証のアクセストークンには `aws.cognito.signin.user.admin` スコープのみが含まれます。サードパーティー API へのリクエストを認可するなど、スコープを追加したアクセストークンを生成するには、ユーザープールエンドポイントで認証中にスコープをリクエストするか、[トークン生成前の Lambda トリガー](user-pool-lambda-pre-token-generation.md)でカスタムスコープを追加します。アクセストークンのカスタマイズにより、 AWS 請求書にコストがかかります。

   1. 新しい ID トークンとアクセストークンのリクエストを承認し、ユーザー ID とアクセスコントロールのプロパティを更新する更新トークン。

通常はユーザープールのエンドポイントを使用してサインインするフェデレーションユーザーを、プロファイルがユーザープールに対して*ローカル*であるユーザーとリンクできます。ローカルユーザーは、外部 IdP を介したフェデレーションなしに、ユーザープールディレクトリにのみ存在します。[AdminLinkProviderForUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminLinkProviderForUser.html) API リクエストでフェデレーティッド ID をローカルユーザーにリンクすると、そのユーザーはユーザープール API でサインインできます。詳細については、「[フェデレーションユーザーを既存のユーザープロファイルにリンクする](cognito-user-pools-identity-federation-consolidate-users.md)」を参照してください。

Amazon Cognito ユーザープール API には 2 つの用途があります。

1. Amazon Cognito ユーザープールリソースを作成して設定します。たとえば、ユーザープールの作成、 AWS Lambda トリガーの追加、マネージドログインページをホストするユーザープールドメインの設定を行うことができます。

1. ローカルユーザーおよびリンクされたユーザーのサインアップ、サインイン、その他のユーザーオペレーションを実行します。

**Amazon Cognito ユーザープール API を使用したシナリオ例**

1. ユーザーは、アプリで作成した [Create an account] (アカウントを作成) ボタンを選択します。E メールアドレスとパスワードを入力します。

1. アプリケーションは [SignUp](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SignUp.html) API リクエストを送信し、ユーザープールに新しいユーザーを作成します。

1. アプリケーションは、ユーザーに E メールの確認コードを求めます。ユーザーは、E メールメッセージで受け取ったコードを入力します。

1. アプリは、ユーザーの確認コードを含む [ConfirmSignUp](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ConfirmSignUp.html) API リクエストを送信します。

1. アプリケーションは、ユーザーにユーザー名とパスワードの入力を求め、情報を入力します。

1. アプリは [InitiateAuth](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html) API リクエストを送信し、ID トークン、アクセストークン、更新トークンを保存します。アプリは OIDC ライブラリを呼び出して、ユーザーのトークンを管理し、そのユーザーの永続セッションを維持します。

Amazon Cognito ユーザープール API では、IdP を介してフェデレートするユーザーをサインインすることはできません。これらのユーザーは、ユーザープールのエンドポイントを使用して認証する必要があります。マネージドログインを含むユーザープールエンドポイントの詳細については、「[ユーザープールのエンドポイントとマネージドログインのリファレンス](cognito-userpools-server-contract-reference.md)」を参照してください。

フェデレーションユーザーは、マネージドログインから開始して IdP を選択することも、マネージドログインをスキップしてユーザーを IdP に直接送信してサインインさせることもできます。[認可エンドポイント](authorization-endpoint.md) への API リクエストに IdP パラメータが含まれている場合、Amazon Cognito はユーザーを IdP サインインページにそのままリダイレクトします。

**マネージドログインページを使用したシナリオ例**

1. ユーザーは、アプリで作成した [Create an account] (アカウントを作成) ボタンを選択します。

1. マネージドログインでは、デベロッパーの認証情報を登録したソーシャル ID プロバイダーのリストをユーザーに提示します。ユーザーは Apple を選択します。

1. アプリは、プロバイダー名 `SignInWithApple` で [認可エンドポイント](authorization-endpoint.md) へのリクエストを開始します。

1. ユーザーのブラウザで Apple 認証ページが開きます。ユーザーはサインインし、Amazon Cognitoにプロファイル情報の読み取りを許可することを選択します。

1. Amazon Cognito は Apple アクセストークンを確認し、ユーザーの Apple プロファイルを照会します。

1. ユーザーは Amazon Cognito 認可コードをアプリケーションに提示します。

1. アプリケーション内の OIDC ライブラリは、認証コードを[トークンエンドポイント](token-endpoint.md)と交換し、ユーザープールから発行された ID トークン、アクセストークン、更新トークンを保存します。アプリケーションは、OIDC ライブラリを使用してユーザーのトークンを管理し、ユーザーの永続的なセッションを維持します。

ユーザープール API とマネージドログインページは、このガイド全体で説明しているさまざまなシナリオをサポートしています。次のセクションでは、ユーザープール API がサインアップ、サインイン、およびリソース管理の要件をサポートするクラスにさらにどのように分類されるかを見ていきます。

## 認可モデル別にグループ化された API オペレーションのリスト
<a name="user-pool-apis-auth-unauth"></a>

Amazon Cognito ユーザープール API は、リソース管理インターフェイスとユーザー向け認証および認可インターフェイスの両方であり、運用に続く承認モデルを組み合わせます。API オペレーションによっては、IAM 認証情報、アクセストークン、セッショントークン、クライアントシークレット、またはこれらの組み合わせを使用して認可を行う必要がある場合があります。多くのユーザー認証および認可操作では、リクエストの認証済みバージョンと認証されていないバージョンを選択できます。認証されていない操作は、モバイルアプリなど、ユーザーに配布するアプリのセキュリティ上のベストプラクティスです。コードにシークレットを含める必要はありません。

IAM ポリシーでは、[IAM で認可された管理オペレーション](#user-pool-apis-auth-unauth-sigv4-management) と [IAM で認可されたユーザーオペレーション](#user-pool-apis-auth-unauth-sigv4-user) にのみアクセス許可を割り当てることができます。

### IAM で認可された管理オペレーション
<a name="user-pool-apis-auth-unauth-sigv4-management"></a>

IAM で認可された管理オペレーションでは、 AWS マネジメントコンソールで行う場合と同様に、ユーザープールとアプリケーションクライアントの設定を変更および表示します。

例えば、[UpdateUserPool](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html) API リクエストでユーザープールを変更するには、リソースを更新するための AWS 認証情報と IAM アクセス許可を提示する必要があります。

 AWS Command Line Interface (AWS CLI) または AWS SDK でこれらのリクエストを承認するには、リクエストに IAM 認証情報を追加する環境変数またはクライアント設定を使用して環境を設定します。詳細については、『』の[AWS 「認証情報 AWS を使用した ](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys)へのアクセス」を参照してください*AWS 全般のリファレンス*。Amazon Cognito ユーザープール API の[サービスエンドポイント](https://docs.aws.amazon.com/general/latest/gr/cognito_identity.html)にリクエストを直接送信することもできます。リクエストのヘッダーに埋め込む AWS 認証情報を使用して、これらのリクエストを承認または*署名*する必要があります。詳細については、[AWS 「 API リクエストの署名](https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html)」を参照してください。


| IAM で認可された管理オペレーション | 
| --- |
| [AddCustomAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AddCustomAttributes.html) | 
| [CreateGroup](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateGroup.html) | 
| [CreateIdentityProvider](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateIdentityProvider.html) | 
| [CreateResourceServer](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateResourceServer.html) | 
| [CreateUserImportJob](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserImportJob.html) | 
| [CreateUserPool](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPool.html) | 
| [CreateUserPoolClient](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPoolClient.html) | 
| [CreateUserPoolDomain](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateUserPoolDomain.html) | 
| [DeleteGroup](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteGroup.html) | 
| [DeleteIdentityProvider](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteIdentityProvider.html) | 
| [DeleteResourceServer](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteResourceServer.html) | 
| [DeleteUserPool](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteUserPool.html) | 
| [DeleteUserPoolClient](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteUserPoolClient.html) | 
| [DeleteUserPoolDomain](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteUserPoolDomain.html) | 
| [DescribeIdentityProvider](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeIdentityProvider.html) | 
| [DescribeResourceServer](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeResourceServer.html) | 
| [DescribeRiskConfiguration](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeRiskConfiguration.html) | 
| [DescribeUserImportJob](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserImportJob.html) | 
| [DescribeUserPool](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html) | 
| [DescribeUserPoolClient](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPoolClient.html) | 
| [DescribeUserPoolDomain](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPoolDomain.html) | 
| [GetCSVHeader](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetCSVHeader.html) | 
| [GetGroup](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetGroup.html) | 
| [GetIdentityProviderByIdentifier](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetIdentityProviderByIdentifier.html) | 
| [GetSigningCertificate](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetSigningCertificate.html) | 
| [GetUICustomization](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUICustomization.html) | 
| [GetUserPoolMfaConfig](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUserPoolMfaConfig.html) | 
| [ListGroups](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListGroups.html) | 
| [ListIdentityProviders](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListIdentityProviders.html) | 
| [ListResourceServers](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListResourceServers.html) | 
| [ListTagsForResource](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListTagsForResource.html) | 
| [ListUserImportJobs](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUserImportJobs.html) | 
| [ListUserPoolClients](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUserPoolClients.html) | 
| [ListUserPools](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUserPools.html) | 
| [ListUsers](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUsers.html) | 
| [ListUsersInGroup](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUsersInGroup.html) | 
| [SetRiskConfiguration](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetRiskConfiguration.html) | 
| [SetUICustomization](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUICustomization.html) | 
| [SetUserPoolMfaConfig](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserPoolMfaConfig.html) | 
| [StartUserImportJob](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_StartUserImportJob.html) | 
| [StopUserImportJob](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_StopUserImportJob.html) | 
| [TagResource](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_TagResource.html) | 
| [UntagResource](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UntagResource.html) | 
| [UpdateGroup](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateGroup.html) | 
| [UpdateIdentityProvider](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateIdentityProvider.html) | 
| [UpdateResourceServer](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateResourceServer.html) | 
| [UpdateUserPool](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPool.html) | 
| [UpdateUserPoolClient](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPoolClient.html) | 
| [UpdateUserPoolDomain](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPoolDomain.html) | 

### IAM で認可されたユーザーオペレーション
<a name="user-pool-apis-auth-unauth-sigv4-user"></a>

IAM で認可されたユーザーオペレーションは、ユーザーのサインアップ、サインイン、認証情報の管理、変更、表示を行います。

例えば、ウェブフロントエンドをバックアップするサーバー側のアプリケーション層を設定できます。これは、Amazon Cognito リソースへの特権アクセスで信頼する OAuth 機密クライアントです。ユーザーをアプリに登録するには、サーバーで [AdminCreateUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminCreateUser.html) API リクエストに AWS 認証情報を含めることができます。OAuth クライアントタイプの詳細については、「*The OAuth 2.0 Authorization Framework*」の「[Client Types](https://www.rfc-editor.org/rfc/rfc6749#section-2.1)」を参照してください。

 AWS CLI または AWS SDK でこれらのリクエストを認可するには、環境変数またはリクエストに IAM 認証情報を追加するクライアント設定を使用してサーバー側のアプリケーション環境を設定します。詳細については、『』の[AWS 「認証情報 AWS を使用した へのアクセス](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys)」を参照してください*AWS 全般のリファレンス*。Amazon Cognito ユーザープール API の[サービスエンドポイント](https://docs.aws.amazon.com/general/latest/gr/cognito_identity.html)にリクエストを直接送信することもできます。リクエストのヘッダーに埋め込む AWS 認証情報を使用して、これらのリクエストを承認または*署名*する必要があります。詳細については、[AWS 「 API リクエストの署名](https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html)」を参照してください。

アプリケーションクライアントにクライアントシークレットがある場合は、IAM 認証情報と、オペレーションによっては、`AuthParameters` で `SecretHash` パラメータまたは `SECRET_HASH` 値の両方を指定する必要があります。詳細については、「[シークレットハッシュ 値の計算](signing-up-users-in-your-app.md#cognito-user-pools-computing-secret-hash)」を参照してください。


| IAM で認可されたユーザーオペレーション | 
| --- |
| [AdminAddUserToGroup](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminAddUserToGroup.html) | 
| [AdminConfirmSignUp](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminConfirmSignUp.html) | 
| [AdminCreateUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminCreateUser.html) | 
| [AdminDeleteUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminDeleteUser.html) | 
| [AdminDeleteUserAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminDeleteUserAttributes.html) | 
| [AdminDisableProviderForUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminDisableProviderForUser.html) | 
| [AdminDisableUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminDisableUser.html) | 
| [AdminEnableUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminEnableUser.html) | 
| [AdminForgetDevice](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminForgetDevice.html) | 
| [AdminGetDevice](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminGetDevice.html) | 
| [AdminGetUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminGetUser.html) | 
| [AdminInitiateAuth](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html) | 
| [AdminLinkProviderForUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminLinkProviderForUser.html) | 
| [AdminListDevices](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListDevices.html) | 
| [AdminListGroupsForUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListGroupsForUser.html) | 
| [AdminListUserAuthEvents](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminListUserAuthEvents.html) | 
| [AdminRemoveUserFromGroup](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminRemoveUserFromGroup.html) | 
| [AdminResetUserPassword](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminResetUserPassword.html) | 
| [AdminRespondToAuthChallenge](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminRespondToAuthChallenge.html) | 
| [AdminSetUserMFAPreference](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminSetUserMFAPreference.html) | 
| [AdminSetUserPassword](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminSetUserPassword.html) | 
| [AdminSetUserSettings](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminSetUserSettings.html) | 
| [AdminUpdateAuthEventFeedback](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUpdateAuthEventFeedback.html) | 
| [AdminUpdateDeviceStatus](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUpdateDeviceStatus.html) | 
| [AdminUpdateUserAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUpdateUserAttributes.html) | 
| [AdminUserGlobalSignOut](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUserGlobalSignOut.html) | 

### 認証されていないユーザーオペレーション
<a name="user-pool-apis-auth-unauth-unauth"></a>

認証されていないユーザーオペレーションでは、ユーザーのサインアップ、サインイン、およびパスワードのリセットが開始されます。インターネット上の誰でもがアプリケーションにサインアップしてサインインできるようにする場合は、認証されていない API オペレーション、または*パブリック* API オペレーションを使用します。

例えば、アプリケーションにユーザーを登録するには、シークレットへの特権アクセスを提供しない OAuth パブリッククライアントを配布できます。このユーザーは、認証されていない API オペレーション [SignUp](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SignUp.html) で登録できます。

 AWS SDK で開発したパブリッククライアントでこれらのリクエストを送信するには、認証情報を設定する必要はありません。また、Amazon Cognito ユーザープール API の[サービスエンドポイント](https://docs.aws.amazon.com/general/latest/gr/cognito_identity.html)に、追加の認可なしでリクエストを直接送信することもできます。

アプリケーションクライアントにクライアントシークレットがある場合は、オペレーションによっては、`AuthParameters` で `SecretHash` パラメータまたは `SECRET_HASH` 値を指定する必要があります。詳細については、「[シークレットハッシュ 値の計算](signing-up-users-in-your-app.md#cognito-user-pools-computing-secret-hash)」を参照してください。


| 認証されていないユーザーオペレーション | 
| --- |
| [SignUp](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SignUp.html) | 
| [ConfirmSignUp](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ConfirmSignUp.html) | 
| [ResendConfirmationCode](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ResendConfirmationCode.html) | 
| [ForgotPassword](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ForgotPassword.html) | 
| [ConfirmForgotPassword](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ConfirmForgotPassword.html) | 
| [InitiateAuth](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html) | 

### トークン認証によるユーザーオペレーション
<a name="user-pool-apis-auth-unauth-token-auth"></a>

トークン認証によるユーザーオペレーションは、ユーザーがサインインしたか、サインインプロセスを開始した後に、ユーザーのサインアウト、認証情報の管理、変更、表示を行います。アプリケーション内でシークレットを配布しない場合や、ユーザー自身の認証情報でリクエストを認可する場合は、トークン認可による API オペレーションを使用してください。ユーザーがサインインを完了した場合、ユーザーのトークン認可された API リクエストをアクセストークンで認可する必要があります。ユーザーがサインインプロセス中である場合は、Amazon Cognito が前のリクエストへのレスポンスで返したセッショントークンを使用して、トークン認可による API リクエストを認可する必要があります。

例えば、パブリッククライアントでは、書き込みアクセスをユーザー自身のプロファイルのみに制限する方法でユーザーのプロファイルを更新する場合があります。この更新を行うには、クライアントが [UpdateUserAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserAttributes.html) API リクエストにユーザーのアクセストークンを含めることができます。

 AWS SDK で開発したパブリッククライアントでこれらのリクエストを送信するには、認証情報を設定する必要はありません。リクエストには `AccessToken` または `Session` パラメータを含めてください。Amazon Cognito ユーザープール API の[サービスエンドポイント](https://docs.aws.amazon.com/general/latest/gr/cognito_identity.html)にリクエストを直接送信することもできます。サービスエンドポイントへのリクエストを承認するには、リクエストの POST 本文にアクセストークンまたはセッショントークンを含めます。

トークン認証オペレーションの API リクエストに署名するには、アクセストークンをリクエストの `Authorization` ヘッダーとして `Bearer <Base64-encoded access token>` 形式で含めます。


| トークン認証によるユーザーオペレーション | AccessToken | Session | 
| --- |--- |--- |
| [RespondToAuthChallenge](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RespondToAuthChallenge.html) |  | ✓ | 
| [ChangePassword](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ChangePassword.html) | ✓ |  | 
| [GetUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUser.html) | ✓ |  | 
| [StartWebAuthnRegistration](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_StartWebAuthnRegistration.html) | ✓ |  | 
| [CompleteWebAuthnRegistration](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CompleteWebAuthnRegistration.html) | ✓ |  | 
| [DeleteWebAuthnCredential](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteWebAuthnCredential.html) | ✓ |  | 
| [ListWebAuthnCredentials](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListWebAuthnCredentials.html) | ✓ |  | 
| [UpdateUserAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserAttributes.html) | ✓ |  | 
| [DeleteUserAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteUserAttributes.html) | ✓ |  | 
| [DeleteUser](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteUser.html) | ✓ |  | 
| [ConfirmDevice](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ConfirmDevice.html) | ✓ |  | 
| [ForgetDevice](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ForgetDevice.html) | ✓ |  | 
| [GetDevice](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetDevice.html) | ✓ |  | 
| [ListDevices](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListDevices.html) | ✓ |  | 
| [UpdateDeviceStatus](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateDeviceStatus.html) | ✓ |  | 
| [GetUserAttributeVerificationCode](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUserAttributeVerificationCode.html) | ✓ |  | 
| [VerifyUserAttribute](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerifyUserAttribute.html) | ✓ |  | 
| [SetUserSettings](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserSettings.html) | ✓ |  | 
| [SetUserMFAPreference](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserMFAPreference.html) | ✓ |  | 
| [GlobalSignOut](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GlobalSignOut.html) | ✓ |  | 
| [UpdateAuthEventFeedback](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateAuthEventFeedback.html) |  | ✓ | 
| [AssociateSoftwareToken](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AssociateSoftwareToken.html) | ✓ | ✓ | 
| [VerifySoftwareToken](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerifySoftwareToken.html) | ✓ | ✓ | 
| [RevokeToken](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RevokeToken.html)¹ |  |  | 
| [GetTokensFromRefreshToken](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetTokensFromRefreshToken.html)¹ |  |  | 

¹ `RevokeToken` と `GetTokensFromRefreshToken` は、更新トークンを認証パラメータとして受け取ります。更新トークンは、認証トークンとして、またターゲットリソースとして機能します。