> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/site-audience/authenticated-access/setting-up-okta.md).

# Okta の設定

ドキュメント閲覧者向けに Okta のログイン画面を設定します

{% hint style="warning" %}
このガイドでは、ドキュメント用の保護されたサインイン画面を設定する手順を説明します。このガイドを進める前に、まず次のプロセスを完了していることを確認してください。 [認証済みアクセスを有効にする](/docs/documentation/ja-gitbook-documentation/publish/site-audience/authenticated-access/enabling-authenticated-access.md).
{% endhint %}

Okta を使用して認証アクセス付きの GitBook サイトをセットアップする手順は、次のとおりです:

{% stepper %}
{% step %}
**新しい Okta アプリケーションを作成する**

Okta ダッシュボードから Okta アプリケーションを作成します。
{% endstep %}

{% step %}
**Okta インテグレーションをインストールして設定する**

Okta インテグレーションをインストールし、必要な設定を追加します。
{% endstep %}

{% step %}
**適応型コンテンツ用に Okta を設定する（任意）**

GitBook の適応型コンテンツで動作するように Okta を設定します。
{% endstep %}
{% endstepper %}

### 新しい Okta アプリケーションを作成する

まず、Okta プラットフォーム（管理者版）にサインインし、左側のサイドバーにある Applications ボタンをクリックして、新しいアプリ統合を作成します（または既存のものを使用します）。

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2F8roQ3QDR5zsyFh2FoQS4%2FScreen%20Shot%202023-10-30%20at%201.32.55%20PM.png?alt=media&amp;token=dc46f9f6-ec54-456f-ba7b-397477089e1a" alt="An Okta screenshot showing the create app integration screen"><figcaption></figcaption></figure>

Create App Integration をクリックし、サインイン方法として OIDC - OpenID Connect を選択します。その後、アプリケーションタイプとして Web Application を選択します。

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FqgFHYo6HOUGF8dUTFEJM%2FScreen%20Shot%202023-10-30%20at%201.39.15%20PM.png?alt=media&amp;token=0ac8e337-6082-4a28-b3df-33fa4e33dc0d" alt="An Okta screenshot showing the integration setup"><figcaption></figcaption></figure>

適切な名前を付け、そのページ上の他の設定は変更しないでください。割り当てについては、適切なチェックボックスを選択します。Save をクリックします。

次の画面で、Client ID と Client Secret をコピーします。右上のドロップダウンをクリックして、メールアドレスのすぐ下にある Okta Domain をコピーします。

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FJQWvrITuUlno737DbQKM%2FScreen%20Shot%202023-10-30%20at%204.52.14%20PM.png?alt=media&amp;token=82a63cfd-a1e6-4666-b132-30fc98e95c22" alt="An Okta screenshot showing where to copy client credentials"><figcaption></figcaption></figure>

Okta インテグレーションを設定するために、これらの値が必要になります。

### Okta インテグレーションをインストールして設定する

公開したいサイトの Integrations タブに移動し、Okta インテグレーションを見つけます。

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FeFArORtsvAcvgwbDZNce%2FScreen%20Shot%202024-12-13%20at%203.21.30%20PM.png?alt=media&amp;token=199acbf6-3100-49af-886e-d2d09445f978" alt="A GitBook screenshot showing the site settings page"><figcaption></figcaption></figure>

サイトにインテグレーションをインストールします。

サイトへのインストール後、Client ID、Okta Domain、および Client Secret の入力を求める画面が表示されます。

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FHrwQ0ASv1tD6kTZPVLMY%2FScreen%20Shot%202024-12-13%20at%203.34.37%20PM.png?alt=media&amp;token=0844c1db-14b8-415c-8d51-33d4618e900e" alt="A GitBook screenshot showing the Okta credentials modal"><figcaption></figcaption></figure>

Client ID、Okta Domain（ `https://`のプレフィックスがある場合は削除）および Client Secret には、Okta ダッシュボードからコピーした値を貼り付けます。

Save をクリックします。

モーダルに表示されている URL をコピーし、Okta の Sign-In redirect URI として入力します（下のスクリーンショットのとおりです）。Save を押します。

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FpPZlqJlE6koyHrWhSp8i%2FScreen%20Shot%202024-01-14%20at%207.55.08%20PM.png?alt=media&amp;token=99abc690-c82b-4974-9b5a-7ba6fbd11ed2" alt="An Okta screenshot showing the sign-in redirect URI configuration"><figcaption></figcaption></figure>

次に、GitBook でインテグレーションのモーダルを閉じ、Manage site ボタンをクリックします。に移動し **対象**, を選択し **認証アクセス**, バックエンドとして Okta を選択します。その後、 **対象を更新**。サイトの画面に移動して **公開**をクリックします。\
\
サイトは現在、Auth0 アプリケーションによって制御される認証アクセスの背後で公開されています。試すには、Visit をクリックします。Okta でのサインインを求められ、Auth0 を使用した認証アクセスの背後でサイトが公開されていることが確認できます。

### 適応型コンテンツ用に Okta を設定する（任意）

認証アクセス付きの GitBook サイトで Adaptive Content を有効にするには、認証トークンに関連するユーザーデータをクレームとして含めるように Okta アプリケーションを設定する必要があります。

クレームは、GitBook に送信されるトークンに埋め込まれたキーと値のペアです。これらのクレームは、ユーザーの役割、プラン、所在地、またはその他の識別属性に基づいて、ドキュメントを動的に調整するために使用できます。

Okta は複数種類のクレームをサポートしています:

* **標準クレーム**\
  これは、 `email`, `name`のような一般的なクレームや、 `groups`) を含みます。これらはデフォルトで含まれている場合がありますが、一貫して利用できるようにするには、トークン設定に明示的に追加する必要があることがよくあります。
* **カスタム クレーム**\
  Okta では、 [カスタムユーザー属性](https://help.okta.com/en-us/content/topics/users-groups-profiles/usgp-add-custom-user-attributes.htm) または式ベースのロジックを使用してカスタムクレームを定義できます。これにより、プランの階層、アカウント ID、内部チームフラグのような、非常に特定的な値を渡すことができます。
* **クレームとしてのグループ**\
  Okta のグループをクレームとして渡すこともできます。これは、「エンタープライズユーザー」や「ベータテスター」のような対象セグメントを定義する際に特に便利です。これらは、認可サーバーのクレーム設定でフィルタリングおよびマッピングできます。

Okta でクレームを追加またはカスタマイズするには:

1. Okta Admin Console を開きます。
2. に移動します **Security > API > Authorization Servers**.
3. GitBook サイトで使用している認可サーバーを編集します。
4. の下の **Claims** タブで、必要なクレームをトークンに含めるルールを追加します。
5. GitBook サイトがそれらのクレームを正しく読み取り、マッピングしていることを確認してください。

クレームが GitBook に渡されるようになったら、 [コンテンツの適応](/docs/documentation/ja-gitbook-documentation/publish/adaptive-content/adapting-your-content.md) の手順に従って、どのコンテンツを誰に表示するかを定義します。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/site-audience/authenticated-access/setting-up-okta.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
