# ポストローテーションスクリプト

## 概要

ポストローテーションのスクリプト (PAM スクリプト) は、ユーザー定義のソフトウェアプログラムで特権自動化タスクを実行します。スクリプトは、ボルト内の任意のPAMリソースレコードに添付できます。スクリプトが添付されているPAMレコードに応じて、Keeperゲートウェイ上、またはパスワードローテーションが発生したリモートホスト上で実行されます。

以下の表では、利用可能なすべてのPAMレコードと、添付のスクリプトが実行される場所が記載されています。

| レコードタイプ   | 添付された実行後スクリプトの実行場所        |
| --------- | ------------------------- |
| PAM構成     | ゲートウェイ                    |
| PAMマシン    | レコードで指定のマシン               |
| PAMデータベース | ゲートウェイ                    |
| PAMディレクトリ | ゲートウェイ                    |
| PAMユーザー   | ローテーションリソースのレコードタイプに応じる\* |

\*PAMユーザーレコードでローテーション設定を行うとき、対象リソースを選択します。

<figure><img src="/files/n8jGqufPPFSsXgj1bZ1A" alt="ローテーション設定" width="306"><figcaption></figcaption></figure>

このローテーションの対象は、PAM構成、PAMマシン、PAMデータベース、PAMディレクトリのいずれかになります。スクリプトの実行場所は、上記の表と同じ考え方で、その対象のレコードタイプに従います。

### PAMユーザーレコードのローテーションオプション <a href="#rotation-options-on-pam-user-records" id="rotation-options-on-pam-user-records"></a>

PAMユーザーレコードでローテーションをセットアップする際、以下の方式のいずれかを選択できます。

* 一般
* IAMユーザー
* PAMスクリプトの実行のみ

<figure><img src="/files/4xRLA1NrjhhhN3zmKnjZ" alt=""><figcaption></figcaption></figure>

「一般」または「IAMユーザー」方式が選択されている場合、Keeperはレコードに保存されている情報に基づいて、組み込み機能を使用して認証情報のローテーションを試みます。

「PAMスクリプトのみを実行」オプションが選択されている場合、Keeperはデフォルトのローテーション処理をスキップし、ゲートウェイ上で添付されたPAMスクリプトを直ちに実行します。

### 実行順序 <a href="#order-of-execution" id="order-of-execution"></a>

スクリプトは以下の順序で実行されます。

1. ユーザーレコードタイプに添付されたスクリプト
2. PAMマシン、PAMデータベース、PAM ディレクトリレコード タイプに添付されたスクリプト
3. PAM構成レコードタイプに添付されたスクリプト

レコードに複数のスクリプトが添付されている場合、スクリプトはPAMレコードに表示されている順序で実行されます。

### 一般的な使用例 <a href="#common-use-cases" id="common-use-cases"></a>

以下はKeeperのポストローテーションスクリプトで可能になる使用例となります。

* あらゆる種類の対象向けのカスタムローテーションスクリプト
* リソースへのアクセスを取り消す
* チームメンバーに通知を送信する
* パスワードの変更を他のシステムに伝播する
* その他のカスタム特権自動化タスク

### ドキュメント <a href="#documentation-included" id="documentation-included"></a>

* [入力と出力](/keeperpam/jp/privileged-access-manager/password-rotation/post-rotation-scripts/parameters.md)
* [スクリプトの添付](/keeperpam/jp/privileged-access-manager/password-rotation/post-rotation-scripts/attaching-post-rotation-scripts-to-records.md)
* [コード例](/keeperpam/jp/privileged-access-manager/password-rotation/post-rotation-scripts/code-examples.md)


---

# 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/keeperpam/jp/privileged-access-manager/password-rotation/post-rotation-scripts.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.
