# レポート作成コマンド

## コマンド <a href="#commands" id="commands"></a>

#### Keeperコマンドリファレンス <a href="#commands-keeper-command-reference" id="commands-keeper-command-reference"></a>

対話型シェル、CLI、JSON設定ファイルのいずれでも、以下のコマンドが利用できます。各コマンドには追加のパラメータとオプションがあります。

特定のコマンドのヘルプを表示するには、以下のコマンドを実行します。

`help <command>`

**レポート作成コマンド**

| コマンド                                                                                                                                            | 説明                                        |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| [`action-report`](#action-report-command)                                                                                                       | 指定した日数内に特定の操作を実行しなかったユーザーを表示します           |
| [`aging-report`](#aging-report-command)                                                                                                         | X日以内に変更「されなかった」レコードのパスワードを特定します           |
| [`audit-log`](#audit-log-command)                                                                                                               | 企業の監査ログとイベントログをエクスポートします                  |
| [`audit-report`](#audit-report-command)                                                                                                         | 監査イベントのカスタマイズされたレポートを表示します                |
| [`compliance-report`](#compliance-report-command)                                                                                               | 全社のユーザーのボルト内のレコードに関する情報を表示します             |
| [`external-shares-report`](#external-shares-report-command)                                                                                     | 外部アカウントと共有されているレコードに関する情報を表示します           |
| [`msp-legacy-report`](#msp-legacy-report-command)                                                                                               | 管理対象企業で利用可能なライセンスに関する情報を表示します             |
| [`security-audit-report`](#security-audit-report-command)                                                                                       | 社内のユーザーごとにパスワードのセキュリティ強度のレポートを表示します       |
| [`breachwatch report`](https://docs.keeper.io/jp/keeperpam/commander-cli/command-reference/enterprise-management-commands/breachwatch-commands) | 社内の各ユーザーのBreachWatchのセキュリティスコアのレポートを表示します |
| [`shared-records-report`](#shared-records-report-command)                                                                                       | 共有レコードの情報を表示します                           |
| [`share-report`](#share-report-command)                                                                                                         | 共有レコードのレポートを表示します                         |
| [`user-report`](#user-report-command)                                                                                                           | ユーザーログインのレポートを表示します                       |
| [`risk-management`](#risk-management-command)                                                                                                   | リスク管理レポート                                 |

### **audit-logコマンド** <a href="#audit-log-command" id="audit-log-command"></a>

#### 概要 <a href="#audit-log-command-details" id="audit-log-command-details"></a>

高度なレポートおよびアラートモジュール (ARAM) からイベントデータを取得し、ローカルのKeeperコマンダー経由でSIEMプロバイダーへ送信します。連携を完全に自動化する場合は、Keeper管理コンソールのクラウドベースのSIEMエクスポートの利用をお勧めします。自動エクスポートの詳細は、[こちらのページ](https://app.gitbook.com/s/eJwa6ByNJ2qindnPknCW/event-reporting)をご参照ください。

Keeperのバックエンドサーバーから送信先エンドポイントにアクセスできない場合でも、`audit-log` コマンドを使用することで、SIEMへイベントを送信できます。また、イベントをローカルのJSONファイルとしてエクスポートする用途にも適しています。イベントのエクスポート状態はKeeperレコードに保存されるため、`audit-log` コマンドを繰り返し実行した場合でも、前回の続きから処理が行われます。

{% hint style="info" %}
`audit-log` コマンドを初めて実行する場合、Keeperの利用履歴が多い環境では処理に時間がかかることがあります。これは、最初の実行時に過去すべての履歴を対象として処理が行われるためです。
{% endhint %}

#### オプション <a href="#audit-log-command-switches" id="audit-log-command-switches"></a>

`--anonymize`

監査ログ内のメールアドレスおよびユーザー名を、対応するエンタープライズユーザーIDに置き換えて匿名化します。

対象のユーザーが削除されている場合、またはユーザーのメールアドレスが変更されている場合は、該当するエントリが「削除されたユーザー」として監査レポートに表示されます。

`--target <{splunk, sumo, syslog, syslog-port, azure-la, json}>`

エクスポート先を指定します。

* `splunk`\
  Splunk HTTPイベントコレクタにイベントをエクスポートします。
* `sumo`\
  Sumo Logic HTTPイベントコレクタにイベントをエクスポートします。
* `syslog`\
  イベントをsyslog形式でローカルファイルにエクスポートします。
* `syslog-port`\
  syslog形式のイベントをTCPポートにエクスポートします。プレーン接続とSSL接続の両方に対応しています。
* `azure-la`\
  Keeper\_CLという名前のカスタムログとしてイベントをAzure Log Analyticsにエクスポートします。
* `json`\
  イベントをJSON形式でローカルファイルにエクスポートします。

`--record <レコード名またはUID>`

現在のエクスポート状態を格納するKeeperのレコードを選択します。これには、目的のエンドポイントに接続するために必要なSplunkパラメータなどのシークレットも含まれます。

`--shared-folder-uid <共有フォルダUID>`

共有フォルダUIDによるフィルタリングを行います。設定レコード内の既存設定は上書きされ、新しい値が設定されます。

`--node-id <ノードID>`

ノードIDによるフィルタリングを行います。設定レコード内の既存設定は上書きされ、新しい値が設定されます。

`--days <日数>`

取得対象とするイベントの最大経過日数を指定します。設定レコード内の `last_event_time` の値は、この指定によって上書きされます。

**例**

{% code overflow="wrap" %}

```
audit-log --target=splunk
audit-log --record BhRRhjeL4armInSMqv2_zQ --target=json
audit-log --record=audit-log-json --target=json --days=30 --node-id=368009977790518
audit-log --shared-folder-uid=8oGAJPplH2DFUQ0obwox7Q --target=splunk --record=Splunk-Log
```

{% endcode %}

1. すべてのイベントデータをダウンロードし、SplunkのHTTPイベントコレクタへ送信します。Splunk HECエンドポイントの入力を求めるプロンプトが表示されます。
2. レコードUIDを参照するすべてのイベントデータをダウンロードして、JSON形式で出力します。
3. ID = 368009977790518のノードの過去30日以内のイベントデータを取得します。**audit-log-json**という名前のボルトレコードを使用して追加のクエリパラメータを取得し、必要に応じて更新します。
4. UID = **8oGAJPplH2DFUQ0obwox7Q**の共有フォルダのイベントデータを取得し、Splunk HTTP イベントコレクターにエクスポートします。**Splunk-Log**レコードに設定されたカスタムフィールド値を使用して、イベントデータクエリパラメーターを入力し、適切なSplunk アカウントにエクスポートするのに必要な情報 (HECエンドポイント、認証情報など) を渡します。

### audit-reportコマンド <a href="#audit-report-command" id="audit-report-command"></a>

{% hint style="info" %}
レポートを実行するには、[ARAM](https://app.gitbook.com/s/eJwa6ByNJ2qindnPknCW/event-reporting)アドオンが必要です。
{% endhint %}

#### 概要 <a href="#audit-report-command-details" id="audit-report-command-details"></a>

随時カスタマイズされた高度な監査イベントレポートをraw形式および要約形式で生成します。

#### イベントのプロパティ <a href="#audit-report-command-event-properties" id="audit-report-command-event-properties"></a>

```
  id                イベントID
  created           イベント時間
  username          監査イベントを作成したユーザー
  to_username       監査イベントのターゲットユーザー
  from_username     監査イベントのソースユーザー
  ip_address        IPアドレス
  geo_location      場所
  audit_event_type  監査イベントタイプ
  keeper_version    Keeperアプリケーション
  channel           2FAチャネル
  status            Keeper API result_code
  record_uid        レコードUID
  shared_folder_uid 共有フォルダのUID
  node_id           ノードID (Enterpriseイベントのみ)
  team_uid          チームUID (Enterpriseイベントのみ)
```

#### パラメータ <a href="#audit-report-command-parameters" id="audit-report-command-parameters"></a>

指定したパターンに一致する行のみを結果として表示します。高度なパターン用プレフィックスと論理制御に対応しています。

#### パターンプレフィックス <a href="#audit-report-command-pattern-prefixes" id="audit-report-command-pattern-prefixes"></a>

* `regex:<pattern>`\
  正規表現による指定。大文字と小文字は区別されません。
* `exact:<text>`\
  文字列の完全一致。大文字と小文字は区別されません。
* `not:<pattern>`\
  否定指定。パターンに一致する行を除外します。
* `not:regex:<pattern>`\
  正規表現による否定指定。
* `not:exact:<text>`\
  完全一致による否定指定。

#### パターンの論理条件 <a href="#audit-report-command-pattern-logic" id="audit-report-command-pattern-logic"></a>

* **デフォルト**\
  OR条件。いずれかのパターンに一致すれば対象になります。
* **--match-all**\
  AND条件。すべてのパターンに一致する必要があります。

#### パターンの例 <a href="#audit-report-command-pattern-examples" id="audit-report-command-pattern-examples"></a>

```
# 基本的な部分一致
audit-report "user@example.com"

# 正規表現による個別指定
audit-report "regex:login.*"            # login、login_console、login_failed_console に一致

# 完全一致
audit-report "exact:record_update"      # 「record_update」イベントのみに一致

# 否定指定によるフィルタリング
audit-report "not:failed"               # login_failed_console や agent_authentication_failed を除外
audit-report "not:exact:login"          # 「login」イベントのみを除外し、login_console などは含める

# AND条件(すべてのパターンに一致)
audit-report "exact:login" "Commander" --match-all           # コマンダーアプリからのログインイベントのみ

# OR条件(デフォルト。いずれかのパターンに一致)
audit-report "exact:login" "exact:logout"                    # ログインまたはログアウトのイベント

# 複合条件
audit-report "regex:^login" "not:failed" --match-all         # 失敗していないログインイベントのみ
```

#### ページ分割 <a href="#audit-report-command-pagination" id="audit-report-command-pagination"></a>

`audit-report` コマンドでは、大量のデータを扱う場合に自動的にページ分割が行われます。

* **rawレポート**\
  1000イベント単位でページ分割されます。
* **集計レポート**\
  2000行単位でページ分割されます。
* データ量に関係なくすべてのデータを取得したい場合は、`--limit -1` を指定してください。
* ページネーションは、raw、span、hour、day、week、monthのすべてのレポートタイプで有効です。

#### 例 <a href="#audit-report-command-example" id="audit-report-command-example"></a>

```bash
# spanレポートのデータをすべて取得(制限なし)
audit-report --report-type span --columns username --columns audit_event_type --limit -1
```

#### オプション <a href="#audit-report-command-switches" id="audit-report-command-switches"></a>

`--report-type <{raw, dim, hour, day, week, month, span}>`

表示するレポートの種類を指定します。デフォルトは `raw` です。

* `raw`\
  すべての監査イベントを表示します。 `--report-format` を指定すると出力形式を変更できます (デフォルトは list)。
* `hour`\
  1時間単位で集計したレポートを表示します。
* `day`\
  1日単位で集計したレポートを表示します。
* `week`\
  1週間単位で集計したレポートを表示します。
* `month`\
  1か月単位で集計したレポートを表示します。
* `span`\
  監査イベントの発生回数のみをデフォルトで表示する表形式のレポートを出力します。`--columns` を指定することで、追加の列を表示できます。
* `dim`\
  指定した列に対して、使用可能なすべての値と詳細情報の一覧を表示します。複数の列を指定した場合は、それぞれの詳細一覧が順に表示されます。使用するには `--columns` の指定が必須です。

`--report-format <{_message, field_s}>`

出力形式を指定します。`raw` レポートでのみ有効です。

* `message` (デフォルト)\
  以下の列が表示されます。
  * created
  * audit\_event\_type
  * username
  * ip\_address
  * keeper\_version
  * geo\_location
  * message
* `fields`

  以下の列が表示されます。

  * created
  * audit\_event\_type
  * username
  * ip\_address
  * keeper\_version
  * geo\_location
  * record\_uid

`--columns <列名>`

表示する列を指定します。`raw`レポートでは無視されます。

使用可能な列は以下のとおりです。

* audit\_event\_type
* username
* ip\_address
* keeper\_version
* geo\_location
* message
* created
* record\_uid
* record\_name (コンプライアンスレポートモジュールが必要\*)

#### 使用方法 <a href="#audit-report-command-columns-usage" id="audit-report-command-columns-usage"></a>

列を指定する場合は、列ごとに `--columns` オプションを指定してください。

```
audit-report --report-type day --columns username --columns ip_address
```

`--aggregate <{occurrences, first_created, last_created}>`

集計対象の値を指定します。複数回指定できます。`raw` レポートでは無視されます。

* `occurrences`\
  イベントタイプの発生回数を表示します。
* `first_created`\
  イベントタイプが最初に発生した時刻を表示します。
* `last_created`\
  イベントタイプが最後に発生した時刻を表示します。

#### 使用方法 <a href="#audit-report-command-aggregate-usage" id="audit-report-command-aggregate-usage"></a>

表示したい集計項目ごとに、`--aggregate` オプションを指定してください。

```
audit-report --report-type day --aggregate occurrences --aggregate last_created
```

`--timezone <タイムゾーン>`

指定したタイムゾーンに基づいて結果を表示します。

`--limit <行数>`

返される行数の上限を指定します。デフォルトは50です。-1を指定すると、レポートタイプに関係なくすべての行を取得します。

{% hint style="info" %}
rawレポートでは、1000行単位でデータを取得します。集計レポート (span、hour、day、week、month) では、2000行単位でデータを取得します。`--limit -1` を指定した場合、すべてのデータを取得するまで自動的にページ分割処理が継続されます。
{% endhint %}

`--order <{desc, asc}>`

ソート順。最初に返された列に基づいてソートします。

`--created <作成日>`

作成日時で結果を絞り込みます。

形式

以下の定義済みフィルタ値から指定できます。

* today
* yesterday
* last\_7\_days
* last\_30\_days
* month\_to\_date
* last\_month
* year\_to\_date
* last\_year

または、以下のカスタム期間を指定できます。

`between %Y-%m-%dT%H:%M:%SZ and %Y-%m-%dT%H:%M:%SZ`

例

`between 2022-01-01 and 2022-06-01`

`--event-type <イベントコード>`

イベントタイプで結果を絞り込みます。使用可能なイベントタイプの一覧は、[イベントの一覧](https://app.gitbook.com/s/eJwa6ByNJ2qindnPknCW/event-reporting/event-descriptions)をご参照ください。

`--username <ユーザー名>`

ユーザー名で結果を絞り込みます。

`--to-username <対象ユーザー名>`

イベントの対象となったユーザー名で結果を絞り込みます。

`--record-uid <レコードUID>`

レコードUIDで結果を絞り込みます。

`--shared-folder-uid <共有フォルダUID>`

共有フォルダUIDで結果を絞り込みます。

`--geo-location <地域>`

地域で結果を絞り込みます。使用可能な地域の一覧は、以下のコマンドを実行して確認してください。

```
audit-report --report-type=dim --columns=geo_location
```

`--ip-address <IPアドレス>`

IPアドレスで結果を絞り込みます。

地域フィルタの形式

地域は以下の形式で指定します。

`[[市区町村, ] 都道府県・州,] 国`

例

* `"El Dorado Hills, California, US"`
* `"Bayern, DE"` (ドイツ・バイエルン州)
* `"CA"` (カナダ)

`--ip-address <IPアドレス>`

ユーザーのIPアドレスで結果を絞り込みます。

特定のIPアドレスから発生した直近5000件のイベントを確認する例は以下のとおりです。

```
audit-report --report-type raw --format csv --limit 5000 --ip-address 11.22.33.44
```

`--device-type <デバイスタイプ>`

Keeperのデバイスまたはアプリケーション種別で結果を絞り込みます。必要に応じてバージョンも指定できます。

```
audit-report --report-type=dim --columns=device_type
```

デバイスタイプフィルタの形式

デバイスタイプは、以下の形式で指定します。

`デバイスタイプ[, バージョン]`

例

* `Commander`\
  Keeperコマンダーのすべてのバージョンを対象とします。
* `Web App, 16`\
  ウェブボルトアプリケーションのバージョン `16.x.x` を対象とします。

`--format <table | csv | json>`

出力形式を指定します。デフォルトは `table` です。

`--max-record-details`

ローカルキャッシュに存在しない場合でも、追加のレコード詳細データを取得できるようにします。

`--regex`

行のフィルタとして正規表現を使用します。

`--match-all`

いずれかの条件に一致する場合(OR条件)ではなく、すべての条件に一致する行のみを対象とします (AND条件)。

#### 例 <a href="#audit-report-command-examples" id="audit-report-command-examples"></a>

{% code overflow="wrap" %}

```
audit-report --report-type raw --limit 5000
audit-report --report-type raw --report-format fields
audit-report --report-type dim --column audit_event_type
audit-report --report-type day --column username --column audit_event_type
audit-report --report-type hour --aggregate occurrences --column audit_event_type --created today
audit-report --report-type=span --event-type=record_add --event-type=record_update --username=user@mydomain.com --column=record_uid --created=last_30_days
audit-report --format=table --report-type=day --event-type=open_record --columns username --columns ip_address --columns record_uid --columns record_title --created today
audit-report --report-type=span --event-type=open_record --column=username --column=record_title --column=record_url --aggregate=last_created --max-record-details
```

{% endcode %}

1. 各イベントのメッセージを含むすべてのイベントに関する監査レポートを表示します (最新の5000イベントを表示します)。
2. 各イベントのレコードUIDを含むすべてのイベントに関する監査レポートを表示します。
3. 使用可能なすべての監査イベントタイプを表示します。
4. イベントタイプとユーザー名を含む監査レポートを日別に要約して表示します。
5. 当日の1時間ごとに実行された各イベントタイプの数の監査レポートを表示します。
6. 過去30日以内&#x306B;**<user@mydomain.com>**&#x306B;よって作成または更新されたすべてのレコードUIDを表示します。
7. 復号化されたレコードタイトルを含めて、当日発生した有効なレコードイベントをすべて表示します。
8. 各ユーザーが各レコードに最後にアクセスした時刻 (タイトルおよび関連URLも) を表示し、キャッシュを介してデータがローカルで利用可能でない場合は、各レコードの詳細 (タイトル、URLなど) の追加取得を強制 (時間とリソースを大量に消費する可能性があります)。

### user-reportコマンド <a href="#user-report-command" id="user-report-command"></a>

#### 概要 <a href="#user-report-command-details" id="user-report-command-details"></a>

ユーザーステータスレポートを随時生成します。

#### オプション <a href="#user-report-command-switches" id="user-report-command-switches"></a>

`--format <table | json | csv>`

レポートの出力形式を指定します。

`--output <ファイル名>`

指定したファイル名で出力します。

`--days <日数>`

最終ログイン日から遡る日数を指定します。

`--last-login`

各ユーザーが最後にログインした時刻を表示します。

#### 例 <a href="#user-report-command-examples" id="user-report-command-examples"></a>

```
user-report
user-report --format csv --output logins.csv --days 30
user-report --format csv --output last-logins.csv 
```

1. 過去365日間のユーザーログインレポートを表示します。
2. 過去30日間のユーザーレポートを作成し、「logins.csv」という名前のファイルにcsv形式で出力します。
3. 社内の各ユーザーが最後にログインした時刻のレポートを作成し、「last-logins.csv」ファイルに保存します。

### security-audit-reportコマンド <a href="#security-audit-report-command" id="security-audit-report-command"></a>

#### 概要 <a href="#security-audit-report-command-details" id="security-audit-report-command-details"></a>

エンタープライズ内のユーザーを対象に、パスワードのセキュリティ強度レポートを生成します。

#### **レポートの列** <a href="#security-audit-report-command-report-columns" id="security-audit-report-command-report-columns"></a>

```
My Vault> security-audit-report --syntax-help

Security Audit Report Command Syntax Description:

Column Name       Description
  username          user name
  email             e-mail address
  weak              number of records whose password strength is in the weak category
  medium            number of records whose password strength is in the medium category
  strong            number of records whose password strength is in the strong category
  reused            number of reused passwords
  unique            number of unique passwords
  securityScore     security score
  twoFactorChannel  2FA - ON/OFF
```

#### オプション <a href="#security-audit-report-command-switches" id="security-audit-report-command-switches"></a>

`--format <{table,json,csv}>`

レポートの出力形式を指定します。デフォルトは `table` です。

`--output <ファイル名>`

指定したファイル名で結果を出力します。

`--syntax-help`

レポートに含まれる各列の説明を表示します。

`-n`、`--node <ノード名またはUID>`

指定したノード名またはノードUIDで結果を絞り込みます。

`-b`、`--breachwatch`

BreachWatchのセキュリティレポートを表示します (Commander v16.5.5以降)。BreachWatchが有効でない場合は無視されます。

`-su`、`--show-updated`

各ボルトの現在のセキュリティ監査スコアを計算し、ローカルに表示します (プレビュー)。

`-s`、`--save`

`--show-updated` と同様にスコアを計算し、さらに更新後のスコアをKeeperへ送信します。

`-st`、`--score-type <{strong_passwords,default}>`

ユーザーのセキュリティスコア算出方法を指定します。`strong_passwords` を指定した場合、各ユーザーの「強力なパスワード数」のみに基づいて集計され、該当ボルトのセキュリティ監査ページに表示される値と同じ基準になります。

`--attempt-fix`

セキュリティデータが無効と判定されたボルトに対して、強制的な同期を実行します。関連するセキュリティスコアはリセットされ、対象ボルトで再計算と更新が完了するまで正確な値になりません。

`-f`、`--force`

確認プロンプトを省略して実行します (非対話モード)。

{% hint style="info" %}
後方互換性を保つため、このコマンドはデフォルトでは、直近のボルト変更を反映したセキュリティスコアの再計算を行いません。そのため、更新後のセキュリティスコアも自動では保存されません。

この動作を変更するには、コマンド実行時に `--show-updated` または `--save` フラグを指定してください。なお、`--save` を指定した場合は、`--show-updated` を併せて指定する必要はありません。
{% endhint %}

#### 例 <a href="#security-audit-report-command-examples" id="security-audit-report-command-examples"></a>

```
security-audit-report
security-audit-report --format json --output security_score.json
security-audit-report -b
security-audit-report -su
security-audit-report -s
sar -n Node1
security-audit-report --score-type=strong_passwords --save
```

1. セキュリティ監査レポート (社内のユーザーごとのパスワードの強度) を表示します。
2. セキュリティ監査レポートを作成し、「security\_score.json」という名前のファイルにjson形式で出力します。
3. BreachWatchセキュリティレポートを表示します。
4. セキュリティ監査スコアを再計算し、セキュリティ監査レポートを表示します。結果はKeeperに反映しません。
5. セキュリティ監査スコアを再計算し、セキュリティ監査レポートを表示し、結果をKeeperに送信します。
6. セキュリティ監査レポートを表示します (コマンドの省略形を使用)。結果は、企業ノード**Node1**に割り当てられたアカウントに制限されます。
7. 強力と見なされた各ユーザーのパスワードの数に基づいてセキュリティ監査スコアを表示し、結果をKeeperに送信します。

### breachwatch report (bw report) コマンド <a href="#breachwatch-report-command" id="breachwatch-report-command"></a>

#### 概要 <a href="#breachwatch-report-command-details" id="breachwatch-report-command-details"></a>

組織内の全ユーザーのBreachWatchセキュリティレポートを実行します。

#### オプション <a href="#breachwatch-report-command-switches" id="breachwatch-report-command-switches"></a>

`--format <{table,csv}>`

レポートの出力形式を指定します。

`--output <ファイル名>`

指定したファイル名で出力します。

#### 例 <a href="#breachwatch-report-command-examples" id="breachwatch-report-command-examples"></a>

```
breachwatch report
bw report --format csv --output breachwatch_report.csv
```

1. BreachWatch固有のセキュリティスコアを表示します。
2. BreachWatchセキュリティレポートを、コマンダーの現在の作業ディレクトリ (フォルダの完全なパスを取得するには `v -v` コマンドを実行) に「breachwatch\_report.csv」としてCSV形式でエクスポートします。

### share-reportコマンド <a href="#share-report-command" id="share-report-command"></a>

#### 概要 <a href="#share-report-command-details" id="share-report-command-details"></a>

共有レコード (呼び出し元のユーザーと共有するレコードおよび呼び出し元のユーザーが共有するレコードの両方) のレポートを表示します。

#### パラメータ <a href="#share-report-command-parameters" id="share-report-command-parameters"></a>

レポートに表示するレコードを含むフォルダのパスまたはUID。オプション (複数の値を指定可能)。

#### オプション <a href="#share-report-command-switches" id="share-report-command-switches"></a>

`--format <{table,csv}>`

レポートの出力形式を指定します。

`--output <ファイル名>`

指定したファイル名で出力します。

`-r`、`--record <レコード名かレコードUID>`

指定したレコードに対するレポートを表示します。

`-e`、`--email <ユーザーのメールまたはチーム名>`

指定したユーザーまたはチームに対する共有レコードのレポートを表示します。

`-o`、`--owner`

レコードの所有者を表示します。

`--share-date`

レコードが共有された日時を表示します。`--owner` オプションを指定した場合にのみ使用できます。このオプションは、会社全体のレポート実行権限を持つユーザーのみ利用できます。

`-sf`、`--shared-folders`

共有フォルダの詳細情報を表示します。省略した場合は、共有レコードが対象になります。

`-v`、`--verbose`

レポートにレコードUIDを表示します。

`-f`、`--folders`

共有フォルダのみに対象を限定します (共有レコードは除外されます)。

`-tu`、`--show-team-users`

レポート内の共有フォルダまたはレコードについて、チーム共有情報を展開し、各チームの個別メンバーを表示します。

#### 例 <a href="#share-report-command-examples" id="share-report-command-examples"></a>

```
share-report
share-report --record 5R7Ued8#JctulYbBLwM$
share-report --format csv --output share_report.csv
share-report -e john.doe@gmail.com --owner --share-date -v
share-report -o -v Team1_Folder Za2aspMQG9De5In28sc3KA
share-report --folders
```

1. 共有レコードのレポートを表示します。
2. 指定したUIDを持つレコードの共有レポートを表示します。
3. 共有レコードのレポートをcsv形式で出力します。
4. 「<john.doe@gmail.com>」と共有されたレコードのレポートを表示します。元の所有者と共有された日時も表示します。
5. 「**Team1\_Folder**」という名前のフォルダとUIDが**Za2aspMQG9De5In28sc3KA**のフォルダに含まれる各共有レコードの所有権情報と詳細な共有権限が記載されたレポートを表示します。
6. 現在のユーザーのボルト内の共有フォルダのリストと、各共有フォルダーにアクセスできるチームおよび他のユーザーを表示します。

### shared-records-report (srr) コマンド <a href="#shared-records-report-command" id="shared-records-report-command"></a>

#### 概要 <a href="#shared-records-report-command-details" id="shared-records-report-command-details"></a>

共有レコードに関する情報を表示します。表示対象は、実行ユーザーが他のユーザーに共有しているレコードに限られ、他のユーザーから共有されたレコードは含まれません。両方のタイプのレコードを含めるには、[`share-report` コマンド](#share-report-command)をご参照ください。

#### パラメータ <a href="#shared-records-report-command-parameters" id="shared-records-report-command-parameters"></a>

レポートに表示するレコードを含むフォルダのパスまたはUID。オプション (複数の値を指定可能)。

#### オプション <a href="#shared-records-report-command-switches" id="shared-records-report-command-switches"></a>

`--format <{json,csv,table}>`

レポートの出力形式を指定します。

`-o`、`--output <ファイル名>`

指定したファイル名に出力します。`table` 形式では無視されます。

`--all-records`

すべてのレコードをレポートに含めます。デフォルトでは、所有しているレコードのみが対象になります。

`--show-team-users` または `-tu`

チーム共有フォルダ経由で共有されているレコードについて、チームのメンバーを表示します。

#### 例 <a href="#shared-records-report-command-examples" id="shared-records-report-command-examples"></a>

```
shared-records-report
shared-records-report --format csv
shared-records-report --show-team-users 
srr --format json -o shared_records.json 'My Shares' Team1/Shares _qsA0AA0XwJkeTVQdijmEg
```

1. 共有レコードの情報を表形式で表示します。
2. 共有レコードの情報をcsv形式で表示します
3. 共有フォルダを使用してレコードを共有するすべてのチームの個々のメンバーと共有されたレコードに関する情報を表示します
4. **「My Shares」**、**「Team1/Shares」**&#x30D5;ォルダ (パスで識別されるフォルダ) およ&#x3073;**「\_qsA0AA0XwJkeTVQdijmEg」**&#x30D5;ォルダ (UIDで識別されるフォルダ) にある共有レコードに関する情報を**shared\_records.json**という名前のJSON形式のファイルにエクスポートします。この場合、格納フォルダがコマンド呼び出しで明示的に指定されているため、結果のレポートに含まれるレコードは、指定したフォルダ内にあるレコードのみに制限されます (フォルダの子として、またはサブフォルダの子としてなど)

### external-shares-reportコマンド <a href="#external-shares-report-command" id="external-shares-report-command"></a>

#### 概要 <a href="#external-shares-report-command-details" id="external-shares-report-command-details"></a>

エンタープライズ外のユーザーに共有されているフォルダおよびレコードを表示します。必要に応じて、外部共有をすべて削除することもできます。

#### オプション <a href="#external-shares-report-command-switches" id="external-shares-report-command-switches"></a>

`--format <table | json | csv>`

出力形式。

`--output <ファイル名>`

指定したファイル名に出力します。`table` 形式では無視されます。

`-a`、`--action {remove,none}`

外部共有に対して実行する操作を指定します。`remove` を指定すると、確認後に外部共有を削除します。省略した場合は `none` となり、削除は行われません。

`-t`、`--share-type <direct | shared-folder | all>`

表示する共有の種類を指定します。`direct` は個別共有されたレコードのみ、`shared-folder` は共有フォルダのみを対象とします。省略した場合は `all` となります。

`-f`、`--force`

確認を求めずに操作を実行します。

`-r`、`--refresh-data`

レポート実行前にデータを同期し、最新の情報を取得します。

#### 例 <a href="#external-shares-report-command-examples" id="external-shares-report-command-examples"></a>

```
external-shares-report
external-shares-report --format csv --output share_report.csv
external-shares-report -a remove
external-shares-report -a remove -t direct
external-shares-report -a remove -t shared-folder
external-shares-report -a remove -f 
external-shares-report -r
```

1. 外部共有フォルダおよびレコードをすべて表示します。
2. すべての外部共有フォルダおよびレコードをshare\_report.csvとして出力します。
3. 外部共有フォルダおよびレコードをすべて削除します (確認プロンプトを表示)。
4. 外部で共有されている個々のレコードをすべて削除しますが、共有フォルダは削除しません。
5. 外部共有フォルダはすべて削除しますが、個々のレコードは削除しません。
6. 外部共有フォルダおよびレコードを確認プロンプトを表示せずにすべて削除します。
7. Keeperと同期して最新のデータを取得し、共有レポートを生成します。

### msp-legacy-reportコマンド <a href="#msp-legacy-report-command" id="msp-legacy-report-command"></a>

#### 概要 <a href="#msp-legacy-report-command-details" id="msp-legacy-report-command-details"></a>

管理対象会社の使用可能なライセンスの情報を表示します。

#### オプション <a href="#msp-legacy-report-command-switches" id="msp-legacy-report-command-switches"></a>

`--format <json | table | csv>`

レポートの出力形式を指定します。

`--range <today | yesterday | last_7_days | last_30_days | month_to_date | last_month | year_to_date | last_year>`

ライセンス使用状況を集計する期間を指定します。

`--from <開始日>`

ライセンス使用状況を表示する期間の開始日を指定します。`--type audit` を指定し、`--range` を使用しない場合に利用します。日付形式は `YYYY-MM-DD` です (例: `2021-07-08`)。

`--to <終了日>`

ライセンス使用状況を表示する期間の終了日を指定します。`--type audit` を指定し、`--range` を使用しない場合に利用します。日付形式は `YYYY-MM-DD` です (例: `2021-07-08`)。

`--output <ファイル名>`

指定したファイル名にレポートを出力します。

#### 例 <a href="#msp-legacy-report-command-examples" id="msp-legacy-report-command-examples"></a>

```
msp-legacy-report
msp-legacy-report --range last_30_days
msp-legacy-report --from 2021-02-01 --to 2021-03-01
msp-legacy-report --format csv --output licenses.csv
```

1. 組織に現在割り当てられているライセンスと残りのライセンスのレポートを表示します。
2. 過去30日間のライセンス使用状況のレポートを表示します。
3. 2021年2月1日から3月1日までのライセンス使用状況のレポートを表示します。
4. 現在のライセンス使用状況のレポートを「licenses.csv」という名前のファイルにcsv形式で出力します。

### aging-reportコマンド <a href="#aging-report-command" id="aging-report-command"></a>

{% hint style="info" %}
このレポートには、レポート・アラートモジュールとコンプライアンスモジュールが必要です。詳細は、[コンプライアンスレポートのページ](https://docs.keeper.io/jp/keeperpam/commander-cli/command-reference/enterprise-management-commands/compliance-commands)をご参照ください。
{% endhint %}

#### 概要 <a href="#aging-report-command-details" id="aging-report-command-details"></a>

指定した期間内にパスワードが変更されていないレコードを特定します。エンタープライズプラットフォームの高度なレポート機能に加え、特権管理者向けにレコード名の復号が可能なコンプライアンスデータを使用します。

#### オプション <a href="#aging-report-command-switches" id="aging-report-command-switches"></a>

`-r、--rebuild`

レコードのデータベースを再構築します。

`--delete`

暗号化されたコンプライアンスレコードデータを含むローカルデータベースキャッシュを削除します。

`-nc`、`-no-cache`

コマンド完了時に、メモリ以外のローカルストレージに保存されたデータをすべて削除します。

`-s`, `--sort <owner | title | last_changed>`

指定した項目で出力結果を並び替えます。

`--format <table | json | csv>`

レポートの出力形式を指定します。

`--output <ファイル名>`

指定したファイル名に出力します。

`--period <期間>`

指定した期間内にパスワードが変更されていないレコードを対象とします。`--cutoff-date` と併用することはできません。

`--cutoff-date <日付>`

指定した日付以降にパスワードが変更されていないレコードを対象とします。`--period` と併用することはできません。

`--username <ユーザー名>`

指定したユーザーの期限切れパスワードをレポートします。

`--exclude-deleted`

削除済みのレコードをレポートから除外します。このオプションを指定すると、追加のデータ取得が必要になる場合があり、コマンドの実行時間が長くなることがあります。

`--in-shared-folder`

共有フォルダ内のレコードのみに対象を限定します。

#### 例 <a href="#aging-report-command-examples" id="aging-report-command-examples"></a>

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

```
aging-report --rebuild
aging-report --period=1y
aging-report --period=3m --format=table --username user@company.com
aging-report --exclude-deleted
aging-report --in-shared-folder
aging-report --cutoff-date 12/31/2020
```

{% endcode %}

1. 監査データとコンプライアンスデータをローカルで再構築します。
2. 1年以上更新されていないパスワードの経過レポートを生成します。
3. 3か月以上更新されていない特定のユーザーのパスワードの経過レポートを生成します。
4. 各ボルトのごみ箱に現在入っているレコードは無視して、パスワード経過レポートを生成します。
5. 過去3か月間パスワードが変更されていないすべての共有フォルダ内のレコードをリストとして表示します。
6. 2020年12月31日以前にパスワードが最後に変更されたすべてのレコードを一覧表示します。

### risk-managementコマンド <a href="#risk-management-command" id="risk-management-command"></a>

{% hint style="info" %}
Wiz、Tenable、Saviyntなどのセキュリティポスチャ管理ツール向けのネイティブコネクターは、今後提供予定です。

現時点では、AWS CloudTrailやCloudWatchなどのミドルウェアを利用することで、KeeperのデータをWizに連携できます。設定手順の詳細は、[AWSのドキュメント](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/monitor-cloudtrail-log-files-with-cloudwatch-logs.html)をご参照ください。
{% endhint %}

#### 概要 <a href="#risk-management-command-details" id="risk-management-command-details"></a>

リスク管理レポートを生成します。

```
My Vault> risk-management --help
Command    Description
---------  ---------------------------------
user       Show Risk Management user report
alert      Show Risk management alert report
```

#### オプション <a href="#risk-management-command-switches" id="risk-management-command-switches"></a>

`--format <{table, json,csv}>`

レポートの出力形式を指定します。

`--output <ファイル名>`

結果をファイルに保存したい場合に指定します。

#### 例 <a href="#risk-management-command-examples" id="risk-management-command-examples"></a>

```
My Vault> risk-management user
My Vault> risk-management alert --format=json
```

### action-reportコマンド <a href="#action-report-command" id="action-report-command"></a>

{% hint style="info" %}
[ARAM](https://app.gitbook.com/s/eJwa6ByNJ2qindnPknCW/event-reporting)アドオンが必要となります。
{% endhint %}

#### 概要 <a href="#action-report-command-details" id="action-report-command-details"></a>

特定の状態にあるユーザー、または所定の期間内に特定の操作を行っていないユーザーを対象に、レポートの生成や操作の実行を行います。`--days-since` で期間を指定しない場合の既定は直近30日間です。`--target all` を指定した場合は、`days-since` の既定値が0になります。

#### オプション <a href="#action-report-command-switches" id="action-report-command-switches"></a>

`--format <table | json | csv>`

レポートの出力形式を指定します。

`--output <ファイル名>`

結果をファイルに保存する場合に指定します。

`-d <日数>` または `--days-since <日数>`

指定した日数分さかのぼって、対象となる操作や状態を判定します。省略した場合は30日が使用されます。

`-t` または `--target <all | no-logon | no-update | locked | invited | no-recovery>`

レポート対象、または操作対象とするユーザーの状態を指定します。`all` を指定すると、アクティブ、招待済み、ロックされたユーザーを一覧し、このときの `days-since` の既定値は0です。

`--node <ノード名またはID>`

指定したノードでユーザーを絞り込みます。`--recursive` を指定しない場合、返されるのは当該ノードに直接属するユーザーのみです。

`--recursive`

`--node` と併用した場合、サブノードも含めてユーザーを検索します。

`--columns <列名のカンマ区切り>`

レポートに表示する列を指定します。使用可能な列は以下のとおりです。\
`2fa_enabled`, `team_count`, `status`, `transfer_status`, `alias`, `role_count`, `node`, `teams`, `name`, `roles`

`-a` または `--apply-action <lock | delete | transfer | move | none>`

`--target` で指定したユーザー状態に一致する各ユーザーアカウントに対して実行する操作を指定します。

`--target-user <ユーザー>`

`--apply-action transfer` を指定した場合の、ボルトの転送先となるアカウントを指定します。

`--target-node <ノード>`

`--apply-action move` を指定した場合の、ユーザーの移動先ノードを指定します。

`-n`, `--dry-run`

実際の操作は行わず、`--target` または `-t` で指定した条件に該当するアカウントと、`-a` または `--apply-action` で指定した管理操作内容のみを表示します。

`-f`, `--force`

確認を求めずに、`-a` または `--apply-action` で指定した管理操作を実行します。このオプションは、`delete` および `transfer` の管理操作の場合にのみ適用されます。

#### 対象ユーザーのレポート例 <a href="#action-report-command-example-target-reports" id="action-report-command-example-target-reports"></a>

1. 過去45日以内にログインしていないユーザーの一覧を表示します。

```
action-report --target no-logon --days-since 45
```

2. 特定のノード内で60日以上ロック状態のままのユーザーアカウントの一覧を表示します。

```
action-report --target locked --days-since 60 --node <Node name/ID>
```

3. 15日以上招待状態にあるユーザーの一覧を表示します。

```
action-report -t invited -d 15
```

4. 過去35日間にレコードを更新していないユーザーの一覧を表示します。

```
action-report --target no-update --days-since 35
```

5. デフォルトの期間 (過去30日間) 内にアカウントの復旧設定を設定または変更していないユーザーを表示します。

```
action-report -t no-recovery
```

6. 過去30日間 (指定がない場合のデフォルトの期間) 以内にアカウントにログインしていないユーザーのレポートを生成します。これには、レポート内の各ユーザーの2FA ステータス、割り当てられているチームの数、割り当てられているロールの数、割り当てられているノード、フルネームが含まれます。

```
action-report -t=no-logon --columns=2fa_enabled,team_count,role_count,node,name
```

#### アクション対象ユーザーの例 (ドライランの場合は-nを追加) <a href="#action-report-command-example-target-with-actions" id="action-report-command-example-target-with-actions"></a>

1. アカウントが招待された状態で90日以上経過しているユーザーを削除します。

<pre><code>action-report <a data-footnote-ref href="#user-content-fn-1">-t invited</a> <a data-footnote-ref href="#user-content-fn-2">-a delete</a> -d 90
</code></pre>

2. 90日間ロックされているすべてのユーザーのボルトを指定したボルトに[移管](https://app.gitbook.com/s/eJwa6ByNJ2qindnPknCW/account-transfer-policy)します。

```
action-report -t locked -d 90 -a transfer --target-user destination.vault@email.com
```

3. 180日以内にログインしていないすべてのユーザーをロックします。

```
action-report -t no-logon -d 180 -a lock
```

4. ノード「EU」とそのサブノードにいるすべてのユーザーを、移動先ノード「EMEA」へ移動します。

{% code overflow="wrap" %}

```
action-report -t all --node "EU" --recursive --target-node "EMEA"
```

{% endcode %}

### compliance-reportコマンド <a href="#compliance-report-command" id="compliance-report-command"></a>

{% hint style="info" %}
[コンプライアンスレポート作成](https://app.gitbook.com/s/eJwa6ByNJ2qindnPknCW/compliance-reports)のアドオンが必要となります。

詳細については、[コンプライアンスコマンドのページ](https://docs.keeper.io/jp/keeperpam/commander-cli/command-reference/enterprise-management-commands/compliance-commands)をご参照ください。
{% endhint %}

#### **概要** <a href="#compliance-report-command-overview" id="compliance-report-command-overview"></a>

**コマンド:** `compliance-report` / `compliance report`

各ユーザーのボルトにある、すべての所有レコードについてレポートを生成します。レコードが共有されている場合、共有関係ごとに行が複製されます。

{% hint style="info" %}
`compliance report` は、所有に焦点を当てたレポートです。ユーザー単位のボルト可視性 (所有レコードに加え、ユーザーのボルトへ共有されたレコード) を完全に把握するには、`compliance record-access-report --report-type vault` と併用し、`compliance report` のユーザー名と `rar.vault_owner`、および `record_uid` が一致する行同士で結合してください。
{% endhint %}

{% hint style="info" %}
このレポートは、コマンドが初めて呼び出されたときにキャッシュが構築されます。企業の規模によっては、セッション内で初めて実行する際に完了まで時間がかかることがあります。生成速度を上げるには、ユーザーを指定してレポートを絞り込むことを検討してください。
{% endhint %}

#### オプション <a href="#compliance-report-command-switches" id="compliance-report-command-switches"></a>

`--format <table | json | csv>`

レポートの出力形式を指定します。

`--output <ファイル名>`

指定したファイル名に出力します。

`-u`, `--username <ユーザー名>`

指定したユーザーのレコードに絞り込みます。複数のユーザーを指定する場合は、繰り返し指定してください。

`-n`, `--node <ノード名またはID>`

指定したノード内のボルトに含まれるレコードに絞り込みます。

`-jt`, `--job-title <職種名>`

指定した職種のユーザーが所有するボルト内のレコードに絞り込みます。複数の職種を指定する場合は、繰り返し指定してください。

`--record <レコード名またはUID>`

指定したレコードのみを表示します。複数のレコードを指定する場合は、繰り返し指定してください。

`--team <チーム名>`

指定したチームに属するユーザーのみを対象とします。複数のチームを指定する場合は、繰り返し指定してください。

`--url <URL>`

指定したURLを持つレコードのみを表示します。複数のURLを指定する場合は、繰り返し指定してください。

`--shared`

共有されているレコードのみを表示します。共有フォルダ内のレコードは、フォルダが他ユーザーと共有されていなくても共有されているものとして扱われます。

`--deleted-items`

削除済みのレコードのみを表示します。`--active-items` とは併用できません。

`--active-items`

有効なレコードのみを表示します。`--deleted-items` とは併用できません。[Lost Access](https://app.gitbook.com/s/-LSGVtOTYUIkVBoYtFvK/web-vault#lost-access) レコードも含まれます。

`-r`, `--rebuild`

このレポートで使用されるキャッシュ済みレコードを更新します。

`-nr`, `--no-rebuild`

キャッシュが存在する場合でも、古いキャッシュの更新を行いません。`--rebuild` とは併用できません。

`-nc`, `--no-cache`

基盤となるレポートデータについて、永続的なローカルキャッシュを無効にします。

`--aging`

経過に関する列 (`Created`、`Last Pw Change`、`Last Modified`、`Last Rotation`) を含めます。

#### 例 <a href="#compliance-report-command-examples" id="compliance-report-command-examples"></a>

```
compliance-report --rebuild
compliance-report -u user@company.com
compliance-report --node "Chicago" -jt "Manager"
compliance-report --team "Admins" --shared
compliance-report --nr --deleted-items --record="AWS MySQL Administrator"  
compliance-report -nc -r --active-items --aging -u user1@company.com -u user2@company.com
```

1. エンタープライズ全体のユーザーについて、所有レコードと共有関係の情報を最新のキャッシュで取得します。
2. ユーザー `user@company.com` が所有するレコードと共有関係を返します。
3. シカゴノードに属し、職種がManagerのユーザーが所有するレコードと共有関係を返します。
4. Adminsチームのユーザーが所有するレコードのうち、共有されているもののみを返します。
5. キャッシュが存在する場合に限り、タイトルが「AWS MySQL Administrator」の削除済みレコードについて、所有者と共有関係を返します。
6. ユーザー `user1@company.com` および `user2@company.com` について、削除済みレコードを除き、経過列を含めた最新の所有レコードと共有関係を返します。

### compliance team-reportコマンド <a href="#compliance-team-report" id="compliance-team-report"></a>

{% hint style="info" %}
[コンプライアンスレポート作成](https://app.gitbook.com/s/eJwa6ByNJ2qindnPknCW/compliance-reports)のアドオンが必要となります。

詳細については、[コンプライアンスコマンドのページ](https://docs.keeper.io/jp/keeperpam/commander-cli/command-reference/enterprise-management-commands/compliance-commands)をご参照ください。
{% endhint %}

#### 概要 <a href="#compliance-team-report-details" id="compliance-team-report-details"></a>

少なくとも1件のレコードを含む共有フォルダごとに、アクセス権を持つチームと、それぞれの編集権限および共有権限をまとめたレポートを作成できます。

#### オプション <a href="#compliance-team-report-switches" id="compliance-team-report-switches"></a>

`--format <table | json | csv>`

レポートの出力形式を指定します。

`--output <ファイル名>`

指定したファイル名に出力します。

`-n`, `--node <ノード名 または ID>`

指定したノード内のボルトに含まれるレコードに絞り込みます。

`-r`, `--rebuild`

このレポートで使用されるキャッシュ済みレコードを更新します。

`-nr`, `--no-rebuild`

キャッシュが存在する場合でも、古いキャッシュの更新を行いません。`--rebuild` とは併用できません。

`-nc`, `--no-cache`

基盤となるレポートデータについて、永続的なローカルキャッシュを無効にします。

`-tu`, `--show-team-users`

レポート内で、各チームの個別メンバーを表示します。

#### 例 <a href="#compliance-team-report-examples" id="compliance-team-report-examples"></a>

```
compliance team-report
compliance team-report --format csv --output "team-report.csv"
compliance team-report --show-team-users
```

1. コンプライアンスチームのレポートを表示します。
2. コンプライアンスチームのレポートのCSVファイル出力を保存します
3. レポートに各チームに割り当てられた個々のユーザーを表示します

### compliance record-access-report (compliance rar) コマンド <a href="#compliance-record-access-report" id="compliance-record-access-report"></a>

{% hint style="info" %}
[コンプライアンスレポート作成](https://docs.keeper.io/enterprise-guide/compliance-reports)のアドオンと[ARAM](https://docs.keeper.io/enterprise-guide/event-reporting)アドオンが必要となります。

詳細は、[コンプライアンスコマンドのページ](https://docs.keeper.io/jp/keeperpam/commander-cli/command-reference/enterprise-management-commands/compliance-commands)をご参照ください。
{% endhint %}

#### 概要 <a href="#compliance-record-access-report-details" id="compliance-record-access-report-details"></a>

ユーザーのボルトで利用可能なレコードのうち、少なくとも1つの共有関係があるものについてレポートを生成します。[コンプライアンスレポート](#compliance-report-command)は各ユーザーのボルト内の所有レコードのみを列挙しますが、本レポートではユーザーがアクセスできるレコードも含みます。一方、共有されていないレコードは含みません。

#### パラメータ <a href="#compliance-record-access-report-parameters" id="compliance-record-access-report-parameters"></a>

ユーザー名またはユーザーIDを指定します。`@all` を指定すると、すべてのユーザーを対象にレポートを実行します。

#### オプション <a href="#compliance-record-access-report-switches" id="compliance-record-access-report-switches"></a>

`--format <table | json | csv>`

レポートの出力形式を指定します。

`--output <ファイル名>`

指定したファイル名に出力します。

`-n`, `--node <ノード名 または ID>`

指定したノード内のボルトに含まれるレコードに絞り込みます。

`-r`, `--rebuild`

このレポートで使用されるキャッシュ済みレコードを更新します。

`-nr`, `--no-rebuild`

キャッシュが存在する場合でも、古いキャッシュの更新を行いません。`--rebuild` とは併用できません。

`-nc`, `--no-cache`

基盤となるレポートデータについて、永続的なローカルキャッシュを無効にします。

`--report-type <vault | history>`

レポートに含めるレコードアクセス情報の種類を指定します。省略した場合は `history` が使用されます。\
`vault` を指定すると現在アクセス可能なレコードを表示し、`history` を指定すると過去にアクセスしたレコードのみを表示します。

`--aging`

経過に関する列 (`Created`、`Last Pw Change`、`Last Modified`、`Last Rotation`) を含めます。

{% hint style="warning" %}
一部のコマンダーバージョンでは、`--report-type vault` にすべての共有レコードが含まれない場合があります。ボルト全体を完全に可視化するには、`compliance report` (所有レコード) と `compliance record-access-report --report-type vault` (共有関係) を併用し、`compliance report.username == rar.vault_owner` かつ `record_uid` が一致する行同士で結合してください。
{% endhint %}

#### 例 <a href="#compliance-record-access-report-examples" id="compliance-record-access-report-examples"></a>

```
compliance record-access-report user@company.com
compliance rar --report-type vault --format csv --output "all_vaults.csv" -e @all
compliance rar --report-type vault --aging -e user1@company.com -e user2@company.com
```

1. `user@company.com` が過去にアクセスしたすべてのレコードの一覧を表示します。
2. すべてのユーザーについて、現在それぞれのボルト内にある共有レコードをCSVファイルとしてエクスポートします。
3. **<user1@company.com>** および **<user2@company.com>** が現在アクセスできる共有レコードについて、各レコードの作成日時、最終変更日時、最終ローテーション日時を含むレポートを生成します。

## SIEMにイベントのログを記録 <a href="#event-logging-to-siem" id="event-logging-to-siem"></a>

コマンダーは、Splunk、Sumo、汎用Syslog形式などの一般的なSIEMソリューションとの連携に対応しています。イベントの一般的なレポート作成には、`audit-report` コマンドの使用をお勧めします。オンプレミスのSIEMへイベントデータを送信する場合は、`audit-log` コマンドが適しています。このコマンドは、前回エクスポートしたイベントを自動的に追跡し、差分のみを送信します。イベントタイプは200種類を超え、その一覧はエンタープライズガイドの[こちらのページ](https://app.gitbook.com/s/eJwa6ByNJ2qindnPknCW/event-reporting)に記載されています。

オンプレミス環境でHTTPイベントコレクターが社内ネットワーク内でのみ利用可能な場合、Keeperコマンダーを使用したSIEM連携が有効に機能します。Keeper管理コンソール (バージョン13.3以降) では、バックエンドのイベントデータをSIEMソリューションへ連携できますが、この機能を利用するにはクラウドベースのSIEMソリューションを使用している必要があります。Keeperコマンダーを使用せずにSIEMとの連携が必要な場合は、ビジネスサポートチーム (<business.support@keepersecurity.com>) までお問い合わせください。

### **Syslog形式でのイベントログのエクスポート** <a href="#export-of-event-logs-in-syslog-format" id="export-of-event-logs-in-syslog-format"></a>

Keeperコマンダーを使用すると、すべてのイベントログをsyslog形式でローカルファイルにエクスポートできます。また、差分のみを含む増分ファイルとしてデータをエクスポートすることも可能です。前回エクスポートしたイベントの参照情報は、ボルト内のKeeperレコードに保存されます。

```
$ keeper shell
```

以下では、すべてのイベントをエクスポートし、最後にエクスポートされたイベント時刻の追跡を開始します。

```
My Vault> audit-log --target=syslog
Do you want to create a Keeper record to store audit log settings? [y/n]: y
Choose the title for audit log record [Default:Audit Log:Syslog]:
Enter filename for syslog messages.
...             Syslog file name: all_events.log
...         Gzip messages? (y/N): n
Exported 3952 audit events
My Vault>
```

この操作により、ボルト内にレコードが作成されます(この例では「Audit Log: Syslog」というタイトルになります)。このレコードには、最後にエクスポートされたイベントのタイムスタンプと出力ファイル名が保存されます。その後、イベントデータはテキスト形式またはgzip形式のファイルとしてエクスポートされます。

以降の監査ログのエクスポートは、以下のコマンドを使用して実行できます。

```
$ keeper audit-log --format=syslog --record=<your record UID>
```

またはシェルから以下のように実行します。

```
My Vault> audit-log --target=syslog --record=<your record UID>
```

syslogイベントを5分ごとにエクスポートするように自動化するには、以下のようなJSON設定ファイルを作成します。

```
{
    "server":"https://keepersecurity.com",
    "user":"user@company.com",
    "password":"your_password_here",
    "mfa_token":"filled_in_by_commander",
    "mfa_type":"device_token",
    "debug":false,
    "plugins":[],
    "commands":["sync-down","audit-log --target=syslog"],
    "timedelay":600
}
```

次に、以下のようにconfigパラメータを指定してコマンドを実行します。

```
$ keeper --config=my_config_file.json
```

### Splunk HTTP Event Collectorへの送信 <a href="#splunk-http-event-collector-push" id="splunk-http-event-collector-push"></a>

Keeperでは、オンプレミスまたはクラウド環境のSplunkインスタンスへ、イベントログを直接送信できます。設定は以下の手順で行います。

* Splunk Enterpriseにログインします。
* **\[Settings]** (設定) -> **\[Data Inputs]** (データ入力) -> **\[HTTP Event Collector]** (HTTPイベントコレクタ) に移動します。
* **\[New Token]** (新しいトークン) をクリックして名前を入力し、インデックスを選択して完了します。
* 最後の画面で表示される「Token Value」 (トークン値) をコピーし、以降の手順で使用するために保存します。
* Keeperコマンダーシェルにログインします。

```
$ keeper shell
```

次に、コマンダーでSplunk連携の設定を行います。設定時に指定したトークンとSplunk HTTP Event Collectorの情報は、ボルト内のKeeperレコードに保存されます。このレコードは、取得済みの最終イベントを追跡するためにも使用され、以降の実行では前回の続きからイベントが送信されます。なお、HTTP Event Collectorのデフォルトポートは8088です。

```
$ keeper audit-log --format=splunk

Do you want to create a Keeper record to store audit log settings? [y/n]: y
Choose the title for audit log record [Default:Audit Log:Splunk]: <enter> 

Enter HTTP Event Collector (HEC) endpoint in format [host:port].
Example: splunk.company.com:8088
...          Splunk HEC endpoint:192.168.51.41:8088
Testing 'https://192.168.51.41:8088/services/collector' ...Found.
...                 Splunk Token: e2449233-4hfe-4449-912c-4923kjf599de
```

以下の監査ログエクスポートでSplunkレコードのレコードUIDが確認できます。

```
My Vault> search splunk

  #  Record UID              Title              Login    URL
---  ----------------------  -----------------  -------  -----
  1  schQd2fOWwNchuSsDEXfEg  Audit Log:Splunk
```

以降の各監査ログのエクスポートは、以下のコマンドで実行できます。

```
$ keeper audit-log --format=splunk --record=<your record UID>
```

またはシェルから以下のように実行します。

```
My Vault> audit-log --target=splunk --record=<your record UID>
```

Splunkイベントを5分ごとに送信するよう自動化するには、以下のようなJSON設定ファイルを作成します。

```
{
    "server":"https://keepersecurity.com",
    "user":"user@company.com",
    "password":"your_password_here",
    "mfa_token":"filled_in_by_commander",
    "mfa_type":"device_token",
    "debug":false,
    "plugins":[],
    "commands":["sync-down","audit-log --target=splunk"],
    "timedelay":600
}
```

次に、以下のようにconfigパラメータを指定してコマンドを実行します。

```
$ keeper --config=my_config_file.json
```

### Sumo Logic HTTP Event Collectorへの送信 <a href="#sumo-logic-http-event-collector-push" id="sumo-logic-http-event-collector-push"></a>

Keeperでは、Sumo Logicアカウントへイベントログを直接送信できます。設定は以下の手順で行います。

* Sumo Logicにログインします。
* **\[Manage Data]** (データ管理) -> **\[Collection]** (収集) に移動します。
* **\[Add Collector]** (コレクタを追加) -> **\[Hosted Collector]** (ホストされたコレクタ)、**\[Add Source]** (ソースを追加) -> **\[HTTP Logs & Metrics]** (HTTPログ&メトリクス) の順にクリックします
* コレクタに名前を付けて保存します。その他のフィールドはデフォルトのままで問題ありません。
* 表示されるHTTP Source Address (コレクタURL) を控えておきます。
* Keeperコマンダーシェルにログインします

```
$ keeper shell
```

次に、コマンダーでSumo Logic連携の設定を行います。設定したHTTP Collectorの情報は、ボルト内のKeeperレコードに保存されます。このレコードは、取得済みの最終イベントを追跡するためにも使用され、以降の実行では前回の続きからイベントが送信されます。

```
$ keeper audit-log --format=sumo
```

「HTTP Collector URL:」の入力を求められたら、先ほどSumoの画面で取得したURLを貼り付けてください。

この手順を完了すると、イベントデータ連携を追跡するためのレコードがボルト内に作成されます。以降の監査ログエクスポートで使用するため、このSumo用レコードのUIDを確認できます。

```
My Vault> search sumo

  #  Record UID              Title              Login    URL
---  ----------------------  -----------------  -------  -----
  1  schQd2fOWwNchuSsDEXfEg  Audit Log:Sumo
```

以降の各監査ログのエクスポートは、以下のコマンドで実行できます。

```
$ keeper audit-log --format=sumo --record=<your record UID>
```

またはシェルから以下のように実行します。

```
My Vault> audit-log --target=sumo --record=<your record UID>
```

Sumo Logicイベントを5分ごとに送信するよう自動化するには、以下のようなJSON設定ファイルを作成します。

```
{
    "server":"https://keepersecurity.com",
    "user":"user@company.com",
    "password":"your_password_here",
    "mfa_token":"filled_in_by_commander",
    "mfa_type":"device_token",
    "debug":false,
    "plugins":[],
    "commands":["sync-down","audit-log --target=sumo"],
    "timedelay":600
}
```

次に、以下のようにconfigパラメータを指定してコマンドを実行します。

```
$ keeper --config=my_config_file.json
```

### **JSON形式でのイベントログのエクスポート** <a href="#export-of-event-logs-in-json-format" id="export-of-event-logs-in-json-format"></a>

Keeperコマンダーを使用すると、すべてのイベントログをJSON形式でローカルファイルにエクスポートできます。このローカルファイルは、コマンダーを実行するたびに上書きされます。この形式のエクスポートは、ファイルを処理する他のアプリケーションと組み合わせて利用できます。前回エクスポートしたイベントの参照情報は、ボルト内のKeeperレコードに保存されます。

```
$ keeper shell
```

すべてのイベントをエクスポートし、エクスポート済みの最終イベント時刻の追跡を開始するには、以下の手順を実行します。

```
My Vault> audit-log --target=json
Do you want to create a Keeper record to store audit log settings? [y/n]: y
Choose the title for audit log record [Default:Audit Log:JSON]:
JSON file name: all_events.json
Exported 3952 audit events
My Vault>
```

この操作により、ボルト内にレコードが作成されます (この例では「Audit Log: JSON」というタイトルになります)。このレコードには、最後にエクスポートされたイベントのタイムスタンプと出力ファイル名が保存されます。その後、イベントデータはファイルとしてエクスポートされます。

以降の監査ログのエクスポートは、以下のコマンドを使用して実行できます。

```
$ keeper audit-log --format=json --record=<your record UID>
```

またはシェルから以下のように実行します。

```
My Vault> audit-log --target=json --record=<your record UID>
```

JSONイベントを5分ごとにエクスポートするように自動化するには、以下のようなJSON設定ファイルを作成します。

```
{
    "server":"https://keepersecurity.com",
    "user":"user@company.com",
    "password":"your_password_here",
    "mfa_token":"filled_in_by_commander",
    "mfa_type":"device_token",
    "debug":false,
    "plugins":[],
    "commands":["sync-down","audit-log --target=json"],
    "timedelay":600
}
```

次に、以下のようにconfigパラメータを指定してコマンドを実行します。

```
$ keeper --config=my_config_file.json
```

### **Azure Log Analyticsへの送信** <a href="#azure-log-analytics" id="azure-log-analytics"></a>

Keeperでは、Azure Log Analyticsワークスペースへイベントログを直接送信できます。設定は以下の手順で行います。

* Azureポータルにログインし、Log Analyticsワークスペースを開きます。
* **\[Settings]** (設定) -> **\[Advanced settings]** (詳細設定) に移動します。
* Workspace IDと、Primary KeyまたはSecondary Keyを控えておきます。
* Keeperコマンダーシェルにログインします。

```
$ keeper shell
```

次に、コマンダーでLog Analytics連携の設定を行います。設定したLog Analyticsのアクセス情報は、ボルト内のKeeperレコードに保存されます。このレコードは、取得済みの最終イベントを追跡するためにも使用され、以降の実行では前回の続きからイベントが送信されます。

```
$ keeper audit-log --format=azure-la
```

「Workspace ID:」の入力を求められたら、先ほどAdvanced settings画面で確認したWorkspace IDを貼り付けてください。「Key:」の入力を求められたら、同じ画面で確認したPrimary KeyまたはSecondary Keyを貼り付けてください。

この手順を完了すると、イベントデータ連携を追跡するためのレコードがボルト内に作成されます。以降の監査ログエクスポートで使用するため、このLog Analytics用レコードのUIDを確認できます。

```
My Vault> search analytics

  #  Record UID              Title                           Login                                 URL
---  ----------------------  ------------------------------  ------------------------------------  -----
  1  schQd2fOWwNchuSsDEXfEg  Audit Log:Azure Log Analytics  <WORKSPACE GUID>
```

以降の各監査ログのエクスポートは、以下のコマンドで実行できます。

```
$ keeper audit-log --format=azure-la --record=<your record UID>
```

またはシェルから以下のように実行します。

```
My Vault> audit-log --target=azure-la --record=<your record UID>
```

Azure Log Analyticsにイベントを5分ごとに送信するよう自動化するには、以下のようなJSON設定ファイルを作成します。

```
{
    "server":"https://keepersecurity.com",
    "user":"user@company.com",
    "password":"your_password_here",
    "mfa_token":"filled_in_by_commander",
    "mfa_type":"device_token",
    "debug":false,
    "plugins":[],
    "commands":["sync-down","audit-log --target=azure-la"],
    "timedelay":600
}
```

次に、以下のようにconfigパラメータを指定してコマンドを実行します。

```
$ keeper --config=my_config_file.json
```

[^1]: 「招待済み」状態の対象ユーザー

[^2]: 削除するアクション


---

# 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/jp/keeperpam/commander-cli/command-reference/reporting-commands.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.
