> 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/keeperpam/jp/secrets-manager/integrations/teller.md).

# Teller

![](/files/jjZSxLaDyBRstbaIkqbT)

## 機能 <a href="#features" id="features"></a>

* [Teller](https://github.com/tellerops/teller)環境内でKeeperボルトからシークレットを取得
* Tellerでシークレット認証情報を環境変数として設定

{% hint style="info" %}
Keeperシークレットマネージャーの機能一覧については、[概要](/keeperpam/jp/secrets-manager/overview.md)をご参照ください。
{% endhint %}

## 前提条件 <a href="#prerequisites" id="prerequisites"></a>

本ページでは、シークレットマネージャーとTellerの連携について取り扱います。本連携を利用するには、以下が必要です。

* Keeperシークレットマネージャーへのアクセス（[クイックスタートガイド](/keeperpam/jp/secrets-manager/quick-start-guide.md)をご参照ください）
  * Keeperのサブスクリプションでシークレットマネージャーアドオンが有効になっていること
  * シークレットマネージャーポリシーが有効なロールに所属していること
* シークレットが共有されているKeeper[シークレットマネージャーアプリケーション](/keeperpam/jp/secrets-manager/about/terminology.md#application)
  * アプリケーションの作成手順については、[クイックスタートガイド](https://docs.keeper.io/keeperpam/jp/secrets-manager/integrations/pages/-MeRAVfQmDBzKQBC0f_c#2.-create-an-application)をご参照ください
* 初期化済みのKeeper[シークレットマネージャー構成](/keeperpam/jp/secrets-manager/about/secrets-manager-configuration.md)
  * Teller連携ではBase64形式の構成を使用

## 設定 <a href="#setup" id="setup"></a>

### シークレットマネージャー構成の取得 <a href="#getting-a-secrets-manager-configuration" id="getting-a-secrets-manager-configuration"></a>

Keeperコマンダーでアプリケーションに新しいクライアントを追加し、構成をBase64文字列として初期化します。この文字列は「Initialized Config:」ラベルの後に表示される長いハッシュテキストです。

```
My Vault> sm client add --app MyApp --config-init b64

Successfully generated Client Device
====================================

Initialized Config: eyJob3N0bmFtZSI6ICJr....OUk1ZTV1V2toRucXRsaWxqUT0ifQ==
IP Lock: Enabled
Token Expires On: 2021-10-19 15:31:31
App Access Expires on: Never
```

この値を**KSM\_CONFIG**という名前の環境変数に割り当てます。

### Teller構成の作成 <a href="#creating-a-teller-configuration" id="creating-a-teller-configuration"></a>

TellerはKeeperボルトから変数を取得し、現在の作業セッションに反映されます。安全かつ効率的に作業できます。

Tellerにはtellerfileが必要です。リポジトリ内の `.teller.yml`、または `teller -c your-conf.yml` で指定するファイルです。 `teller new` を実行してウィザードに従い、プロバイダを選択すると `.teller.yml` が生成されます。

あるいは、以下の最小限のテンプレートを使用できます。

```yaml
project: project_name
opts:
  stage: development

providers:
  # 構成: KSM_CONFIG=base64_config
  # またはファイルパス: KSM_CONFIG_FILE=ksm_config.json
  keeper_secretsmanager:
    # 1件のレコードから複数のキーと値のペアを取得
    # 空でないフィールドはすべてラベルでマッピング
    # 空の場合はフィールドタイプでマッピングし、重複には1,2,...,Nの接尾辞を付与
    env_sync:
      path: [recordUID]

    # Keeper表記法で個別のフィールド値を選択
    # ../about/keeper-notation.md をご参照ください
    env:
      USER:
        path: [recordUID]/field/login
      PSWD:
        path: [recordUID]/field/password
```

## コマンドラインから実行 <a href="#running-from-command-line" id="running-from-command-line"></a>

現在のディレクトリの `.teller.yml`、または `teller -c your-conf.yml` で指定したファイルを使用して、以下のようにプロセスを実行できます。

```bash
$ teller run node src/server.js
Service is up.
Loaded configuration: Mailgun, SMTP
Port: 5050
```

## GitHub Actionの使用 <a href="#using-a-github-action" id="using-a-github-action"></a>

Tellerのステップを追加します。

```yaml
# Tellerステップをセットアップ
- name: Setup Teller
  uses: spectralops/setup-teller@v2
- name: Run a Teller task (show, scan, run, etc.)
  run: teller run [args]
```

以下の例ではデフォルトの構成ファイル `.teller.yml` を使用しています。`run` コマンドで `teller -c your-conf.yml` によりカスタムファイルを指定することもできます。

```yaml
name: run with teller
on:
  push:
    branches:
      - master
      - main
  pull_request:

jobs:
  build:
    name: Build your code
    runs-on: ubuntu-latest

    steps:
      - name: Clone repo
        uses: actions/checkout@master

      # Tellerをセットアップ
      - name: Setup Teller
        uses: spectralops/setup-teller@v2

      - name: Run a Teller task (show, scan, run, etc.)
        run: teller run npm run build
```


---

# 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 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/keeperpam/jp/secrets-manager/integrations/teller.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.
