> 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). Agents can also search and read this documentation through its [MCP server](https://gitbook.com/docs/~gitbook/mcp).

# Okta の設定

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

{% hint style="warning" %}
このガイドでは、ドキュメント用の保護されたサインイン画面を設定する手順を説明します。このガイドを始める前に、まず次の手順を完了してください。 [認証済みアクセスを有効にする](https://gitbook.com/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%2Fgit-blob-15a0963cdfe65f88e06dfbd020fab67dd9a105b8%2F25_04_10_setting_up_okta_1.png?alt=media" 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%2Fgit-blob-9dba9a1d00d7ca1812b897076312520db4407876%2F25_04_10_setting_up_okta_2.png?alt=media" 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%2Fgit-blob-8576aa9b2bce6cfcafe24c004247b371857f0da5%2F25_04_10_setting_up_okta_3.png?alt=media" 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%2Fgit-blob-ea7399c8ff86c4770267835357f74144f3c10785%2F25_04_10_setting_up_okta_5.png?alt=media" 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%2Fgit-blob-77eb7d4059b6a727e86d202e5bffc3706b097a25%2F25_04_10_setting_up_okta_6.png?alt=media" alt="A GitBook screenshot showing the Okta credentials modal"><figcaption></figcaption></figure>

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

［Save］をクリックします。

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

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-1a13ba3a8c7a1948b29a62826d6d97e13a9b0a41%2F25_04_10_setting_up_okta_4.png?alt=media" alt="An Okta screenshot showing the sign-in redirect URI configuration"><figcaption></figcaption></figure>

次に、GitBook でインテグレーションのモーダルを閉じ、［サイトを管理］ボタンをクリックします。 **［オーディエンス］**&#x306B;移動して、 **［認証済みアクセス］**&#x3092;選択し、バックエンドとして Okta を選びます。次に、 **［オーディエンスを更新］**&#x3092;クリックします。サイトの画面に移動して、 **［公開］**&#x3092;クリックします。\
\
これで、Okta アプリケーションによって制御される認証済みアクセスの背後でサイトが公開されました。動作を確認するには、［アクセス］をクリックします。Okta でのサインインを求められます。これにより、Okta を使用した認証済みアクセスの背後でサイトが公開されていることを確認できます。

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

認証アクセス付きのGitBookサイトで適応型コンテンツを有効にするには、関連するユーザーデータを認証トークンのクレームとして含めるよう、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管理コンソールを開きます。
2. 「 **Security > API > Authorization Servers**.
3. GitBookサイトで使用されている認可サーバーを編集します。
4. 」に移動し、「 **Claims** 」タブで、トークンに含めるクレームを追加するルールを設定します。
5. GitBookサイトがそれらのクレームを正しく読み取り、マッピングしていることを確認してください。

クレームがGitBookに渡されるようになったら、 [コンテンツの調整](https://gitbook.com/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.
