> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeper-connection-manager/jp/vault-integration/static-tokens.md).

# 静的トークン

コネクションマネージャーとボルトの連携を使用した静的フィールド検索

<figure><img src="https://4041518992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7s6LQJaKa1G17O787JG%2Fuploads%2FhSvObhft75qAv4rsTZAz%2Fimage.png?alt=media&#x26;token=a99678dc-f717-46d1-bb2d-61a667683552" alt=""><figcaption></figcaption></figure>

## 静的トークン

コネクションマネージャーでは、共有フォルダ内に格納されたKeeperボルトレコードの特定フィールドを参照する静的なカスタムトークンを設定できます。これらの静的トークンは、プラットフォームのインストールメソッドに応じて、Docker Composeで、または直接guacamoleの設定ファイルで指定する必要があります。通常は、動的トークンでの連携をお勧めします。

### **Dockerの自動インストールメソッド**

Docker自動インストールメソッドを使用してKeeperコネクションマネージャーをインストールした場合、自動生成されたDocker Composeファイルを変更して静的トークンを定義する必要があります。

rootとして、 `/etc/kcm-setup/docker-compose.yml` ファイルを編集します。

「guacamole」dockerイメージの下の「environment」 (環境) セクションを編集します。複数行にわたるカスタムトークンの定義が含まれた `KSM_TOKEN_MAPPING` という環境変数を挿入します。以下の例では、Keeperボルトの共有フォルダ内の特定のフィールドに3つのカスタムトークンがあります。トークンの構文は、[Keeper表記法](/keeperpam/jp/secrets-manager/about/keeper-notation.md)を使用しています。

{% code overflow="wrap" lineNumbers="true" %}

```
    guacamole:
        image: xxx
        restart: unless-stopped
        volumes:
            - common-storage:/var/lib/guacamole
        environment:
            ACCEPT_EULA: "Y"
            GUACD_HOSTNAME: "guacd"
            MYSQL_HOSTNAME: "db"
            MYSQL_DATABASE: "guacamole_db"
            MYSQL_USERNAME: "guacamole_user"
            MYSQL_PASSWORD: "xxxxxxx"
            KSM_CONFIG: "xxxxxxx"
            KSM_TOKEN_MAPPING: |
                MY_CUSTOM_SECRET: keeper://cps2OgKHpFQ8Ye30L9587w/field/password
                MY_OTHER_CUSTOM_SECRET: keeper://sS6jDVv0HoM0yGMU4OaOAw/file/linuxssoconnect.pem
                RDP_INITIAL_PROGRAM: keeper://cps2OgKHpFQ8Ye30L9587w/custom_field/program
```

{% endcode %}

ファイルの変更を保存したら、コンテナを更新します。

```
$ sudo ./kcm-setup.run upgrade
```

### Docker Composeのインストールメソッド

`docker-compose.yml` ファイルを編集します。「guacamole」dockerイメージと環境変数を定義する「environment」セクションを探します。

複数行にわたるカスタムトークンの定義が含まれた `KSM_TOKEN_MAPPING` という環境変数を挿入します。以下の例では、Keeperボルトの共有フォルダ内の特定のフィールドに3つのカスタムトークンがあります。トークンの構文は、[Keeper表記法](/keeperpam/jp/secrets-manager/about/keeper-notation.md)を使用しています。

{% code overflow="wrap" lineNumbers="true" %}

```
    guacamole:
        image: xxx
        environment:
            ACCEPT_EULA: "Y"
            GUACD_HOSTNAME: "guacd"
            MYSQL_HOSTNAME: "db"
            MYSQL_DATABASE: "guacamole_db"
            MYSQL_USERNAME: "guacamole_user"
            MYSQL_PASSWORD: "xxxxxxx"
            KSM_CONFIG: "xxx"
            KSM_TOKEN_MAPPING: |
                MY_CUSTOM_SECRET: keeper://cps2OgKHpFQ8Ye30L9587w/field/password
                MY_OTHER_CUSTOM_SECRET: keeper://sS6jDVv0HoM0yGMU4OaOAw/file/linuxssoconnect.pem
                RDP_INITIAL_PROGRAM: keeper://cps2OgKHpFQ8Ye30L9587w/custom_field/program
```

{% endcode %}

ファイルの変更を保存したら、コンテナを更新します。

```
sudo su
docker-compose up -d
```

### カスタムトークンの使用方法

カスタムトークンを使用する場合、レコードは自由に設定できます。マッピングファイルでKeeper表記法を使用して、指定した任意のフィールドを識別できます。

これで、トークンは、コネクションマネージャーのパラメータ画面内で `${_XXX_}` 形式で使用できるようになります。以下は、使用例です。

<figure><img src="https://4041518992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7s6LQJaKa1G17O787JG%2Fuploads%2FXEFHinR9pXBIRGDJJQM1%2Fimage.png?alt=media&#x26;token=2dcfda1f-07a4-41be-be45-204d9567b11b" alt=""><figcaption><p>カスタムトークンの例</p></figcaption></figure>

<figure><img src="https://4041518992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7s6LQJaKa1G17O787JG%2Fuploads%2F43IdX4xmU0B0ldG8BAAN%2Fimage.png?alt=media&#x26;token=cfa81fb2-3459-4442-9b5e-790f927786fa" alt=""><figcaption><p>カスタムトークンの例</p></figcaption></figure>

{% hint style="info" %}
レコードは、シークレットマネージャーアプリケーションがアクセスできる共有フォルダ内にあることが必要です。
{% endhint %}


---

# 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://docs.keeper.io/keeper-connection-manager/jp/vault-integration/static-tokens.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.
