# TOTPを使用した2FA

Keeperコネクションマネージャーでは、第2の認証要素としてTOTPがサポートされており、TOTP標準で生成された認証コードを使用して登録ユーザーの本人確認を行います。

## Docker環境変数

TOTPを有効化するには、`docker-compose.yml`ファイル内の`guacamole`サービスの`environment`セクションに以下の行を追加してください。`EXTENSIONS: totp` の行は必須で、それ以外はオプションとなります。

```
TOTP_ISSUER: "KCM"
TOTP_DIGITS: "6"
TOTP_PERIOD: "30"
TOTP_MODE: "sha1"
EXTENSIONS: "totp"
```

例

```
        environment:
            ACCEPT_EULA: "Y"
            GUACD_HOSTNAME: "guacd"
            MYSQL_HOSTNAME: "db"
            MYSQL_DATABASE: "guacamole_db"
            MYSQL_USERNAME: "guacamole_user"
            MYSQL_PASSWORD: "XXXXXXXXX"
            KSM_CONFIG: ""
            TOTP_ISSUER: "KCM"
            TOTP_DIGITS: "6"
            TOTP_PERIOD: "30"
            TOTP_MODE: "sha1"
            EXTENSIONS: "totp"
```

Keeper コネクションマネージャー (KCM) では、環境変数を使用して TOTP をサポートするように `keeper/guacamole` イメージを設定できます。ドキュメントに記載されている `TOTP_*` 変数をご参照ください。

## TOTP と SAML / OIDC の併用

KeeperコネクションマネージャーはSAMLとOIDC認証の使用に加え、TOTPを利用した2FA (二要素認証) を併用することも可能です。TOTPがSAMLと共に設定されている場合、ユーザーはIDプロバイダで認証した後に2FAの入力を求められます。


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/keeper-connection-manager/jp/authentication/using-totp-for-multi-factor-authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
