> 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/developer-sdk-library.md).

# KSM開発者用SDK

Keeperシークレットマネージャー用のサンプルコードとSDKの実装ガイド

<figure><img src="https://859776093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPL6k1aGsLiFiiJ3Y7zCl%2Fuploads%2FXeHLeUGUUetx8z9w9dee%2Fimage.png?alt=media&amp;token=a8615093-4e60-41b7-87a3-1664c1edfdc7" alt=""><figcaption></figcaption></figure>

## 概要

KeeperシークレットマネージャーSDKは、すべての主要なプログラミング言語からシークレット管理機能にシンプル・高速・効率的にアクセスできるよう特別に設計されています。

## シークレットマネージャーSDK

* [Python](/keeperpam/jp/secrets-manager/developer-sdk-library/python-sdk.md)
* [Java / Kotlin](/keeperpam/jp/secrets-manager/developer-sdk-library/java-sdk.md)
* [JavaScript](/keeperpam/jp/secrets-manager/developer-sdk-library/javascript-sdk.md)
* [.Net](/keeperpam/jp/secrets-manager/developer-sdk-library/.net-sdk.md)
* [Go](/keeperpam/jp/secrets-manager/developer-sdk-library/golang-sdk.md)
* [Ruby](/keeperpam/jp/secrets-manager/developer-sdk-library/ruby-sdk.md)
* [Rust](/keeperpam/jp/secrets-manager/developer-sdk-library/rust-sdk.md)
* [PowerShell](/keeperpam/jp/secrets-manager/integrations/powershell-plugin.md)

## 認証

シークレットマネージャーSDKは、ボルトへの認証に**ワンタイムアクセストークン**または**ローカル構成ファイル内の生成済みキー**のいずれかを使用します。 [コマンダーCLI](https://github.com/Keeper-Security/Commander)でワンタイムアクセストークンを生成するには、`secrets-manager client add` コマンドを使用します。

```bash
My Vault> secrets-manager client add --app MyApplication --unlock-ip
```

{% hint style="warning" %}
構成ファイルを初期化した後は、ワンタイムアクセストークンをコードから削除してください。
{% endhint %}

この初期化コードでは、以下のキーを含むJSON構成ファイルがデバイスのローカルストレージに作成されます。

| **キー**              | **説明**                                                                                                                                                                                                            |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hostname`          | <p>自社テナントが配置されている宛先ホスト<br></p><ul><li>keepersecurity.com</li><li>keepersecurity.eu</li><li>keepersecurity.com.au</li><li>keepersecurity.jp</li><li>keepersecurity.ca</li><li>govcloud.keepersecurity.us</li></ul> |
| `clientID`          | ハッシュ化された `clientKey` (`clientKey` はクライアントデバイスの一意の識別子)                                                                                                                                                             |
| `privateKey`        | クライアントデバイスの秘密鍵                                                                                                                                                                                                    |
| `serverPublicKeyId` | Keeperインフラストラクチャの公開鍵のID                                                                                                                                                                                           |
| `appKey`            | アプリケーションの秘密鍵                                                                                                                                                                                                      |
| `appOwnerPublicKey` | アプリケーション所有者の公開鍵                                                                                                                                                                                                   |

以下は生成された構成ファイルの例です。

{% code title="ksm-config.json" %}

```json
{
  "hostname": "keepersecurity.com",
  "clientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "privateKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "serverPublicKeyId": "10",
  "appKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "appOwnerPublicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
```

{% endcode %}

構成ファイル作成のその他の方法については、[構成ファイルのページ](/keeperpam/jp/secrets-manager/about/secrets-manager-configuration.md)をご参照ください。

### 構成ファイルの保護

Keeperでは、一般的なクラウドサービスを使用して、KSM構成ファイルを安全に暗号化・保存するための複数の方法を用意しています。

* [AWS KMS](/keeperpam/jp/secrets-manager/integrations/aws-kms.md)
* [Azure Key Vault](/keeperpam/jp/secrets-manager/integrations/azure-key-vault.md)
* [Entrust HSM](/keeperpam/jp/secrets-manager/integrations/entrust-hsm.md)
* [Google Cloud Key Management](/keeperpam/jp/secrets-manager/integrations/google-cloud-key-management-encryption.md)
* [Oracle Key Vault](/keeperpam/jp/secrets-manager/integrations/oracle-key-vault.md)

***

## スクリプトの実装

KeeperシークレットマネージャーCLIは、任意のシステムコマンドを実行するラッパー関数を提供しており、その中で使用される環境変数をKeeperのボルトから取得した値に置き換えることができます。

[Secrets Manager CLI Execコマンド](/keeperpam/jp/secrets-manager/secrets-manager-command-line-interface/exec-command.md)

## ボルトおよび管理者用SDK

ボルトおよび管理レベルでの高度な機能については、各種開発ツールへのリンクを含むボルトSDKのページをご覧ください。

[ボルトのSDK](/keeperpam/jp/secrets-manager/developer-sdk-library/vault-sdks.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://docs.keeper.io/keeperpam/jp/secrets-manager/developer-sdk-library.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.
