Red Hat Developer Hub の監査ログ


Red Hat Developer Hub 1.6

Red Hat Developer Hub 監査ログを使用して、ユーザーアクティビティー、システムイベント、データ変更を追跡する

Red Hat Customer Content Services

概要

Red Hat Developer Hub (RHDH) 管理者は、RHDH 監査ログを使用して、ユーザーアクティビティー、システムイベント、およびデータの変更を追跡できます。

第1章 Red Hat Developer Hub の監査ログ

監査ログは、Red Hat Developer Hub のユーザー、管理者、またはコンポーネントに影響するユーザーアクティビティー、システムイベント、およびデータ変更を記録した時系列のレコードのセットです。管理者は、OpenShift Container Platform Web コンソールで Developer Hub 監査ログを表示して、scaffolder イベント、RBAC システムの変更、カタログデータベースの変更を監視できます。監査ログには次の情報が含まれます。

  • 監査対象イベントの名前
  • 監査対象イベントをトリガーしたアクター (ターミナル、ポート、IP アドレス、ホスト名など)
  • イベントのメタデータ (日付、時刻など)
  • イベントのステータス (successfailure など)
  • 重大度 (infodebugwarnerror など)

監査ログの情報を使用すると、次の目的を達成できます。

セキュリティーの強化
自動化システムやソフトウェアテンプレートによって開始されたアクティビティーも含め、アクティビティーをソースまで追跡できます。ソフトウェアテンプレートがいつ実行されたか、またアプリケーションとコンポーネントのインストール、更新、設定の変更、削除の詳細を把握できます。
コンプライアンスの自動化
効率的なプロセスを使用して、監査目的または継続的なコンプライアンス維持のために、特定の時点のログデータを表示できます。
問題のデバッグ
アクセスレコードとアクティビティーの詳細を使用して、ソフトウェアテンプレートやプラグインの問題を修正できます。
注記

監査ログは、デフォルトでは内部ログストアに転送されません。内部ログストアには、セキュアなストレージがないためです。お客様の責任において、監査ログを転送するシステムが組織および政府の規制に準拠し、適切に保護されていることを確認してください。

第2章 OpenShift Container Platform で Developer Hub の監査ログを設定する

OpenShift Container Platform Web コンソールを使用して、Developer Hub の監査ログを使用するように次の OpenShift Container Platform ロギングコンポーネントを設定します。

ロギングのデプロイメント
各ロギングコンポーネントの CPU とメモリーの制限を含むロギング環境を設定します。詳細は、Red Hat OpenShift Container Platform - ロギングデプロイメントの設定 を参照してください。
ロギングコレクター
ClusterLogging カスタムリソース (CR) の spec.collection スタンザを設定して、サポートされているログコレクターの変更を使用し、STDOUT からログを収集します。詳細は、Red Hat OpenShift Container Platform - ログコレクターの設定 を参照してください。
ログ転送
ClusterLogForwarder CR で出力とパイプラインの組み合わせを指定して、OpenShift Container Platform クラスター内外の特定のエンドポイントにログを送信します。詳細は、Red Hat OpenShift Container Platform - JSON ログ転送の有効化 および Red Hat OpenShift Container Platform - ログ転送の設定 を参照してください。

2.1. Red Hat Developer Hub 監査ログを Splunk に転送

Red Hat OpenShift Logging (OpenShift Logging) Operator と ClusterLogForwarder インスタンスを使用して、Developer Hub インスタンスからストリーミングされた監査ログをキャプチャーし、Splunk インスタンスに関連付けられた HTTPS エンドポイントに転送できます。

前提条件

  • サポートされている OpenShift Container Platform バージョンでクラスターが実行されている。
  • cluster-admin 権限を持つアカウントがある。
  • Splunk Cloud アカウントがあるか、Splunk Enterprise がインストールされている。

手順

  1. OpenShift Container Platform クラスターにログインします。
  2. OpenShift Logging Operator を openshift-logging namespace にインストールし、namespace に切り替えます。

    namespace に切り替えるコマンドの例

    oc project openshift-logging

  3. log-collector という名前の serviceAccount を作成し、collect-application-logs ロールを serviceAccount にバインドします。

    serviceAccount を作成するためのコマンド例

    oc create sa log-collector

    ロールを serviceAccount にバインドするコマンドの例

    oc create clusterrolebinding log-collector --clusterrole=collect-application-logs --serviceaccount=openshift-logging:log-collector

  4. Splunk インスタンスで hecToken を生成します。
  5. openshift-logging namespace にキー/値シークレットを作成し、そのシークレットを検証します。

    hecToken を使用してキー/値シークレットを作成するコマンドの例

    oc -n openshift-logging create secret generic splunk-secret --from-literal=hecToken=<HEC_Token>

    シークレットを検証するコマンドの例

    oc -n openshift-logging get secret/splunk-secret -o yaml

  6. 次のように、基本的な `ClusterLogForwarder` リソース YAML ファイルを作成します。

    `ClusterLogForwarder` リソースの YAML ファイルの例

    apiVersion: logging.openshift.io/v1
    kind: ClusterLogForwarder
    metadata:
      name: instance
      namespace: openshift-logging

    詳細は、ログフォワーダーの作成 を参照してください。

  7. OpenShift Web コンソールまたは OpenShift CLI を使用して、次の ClusterLogForwarder 設定を定義します。

    1. YAML ファイルで、log-collectorserviceAccount として指定します。

      serviceAccount 設定例

      serviceAccount:
        name: log-collector

    2. 転送するログの種類とソースを指定するには、inputs を設定します。次の設定により、フォワーダーは指定された namespace 内のすべてのアプリケーションからログをキャプチャーできるようになります。

      inputs 設定の例

      inputs:
        - name: my-app-logs-input
          type: application
          application:
            includes:
              - namespace: my-rhdh-project
            containerLimit:
              maxRecordsPerSecond: 100

      詳細は、特定の Pod からのアプリケーションログの転送 を参照してください。

    3. 出力を設定して、キャプチャーされたログの送信先を指定します。このステップでは、splunk タイプに焦点を当てます。Splunk エンドポイントが自己署名 TLS 証明書を使用する場合は tls.insecureSkipVerify オプションを使用するか (非推奨)、Secret を使用して証明書チェーンを提供できます。

      outputs 設定の例

      outputs:
        - name: splunk-receiver-application
          type: splunk
          splunk:
            authentication:
              token:
                key: hecToken
                secretName: splunk-secret
            index: main
            url: 'https://my-splunk-instance-url'
            rateLimit:
              maxRecordsPerSecond: 250

      詳細は、OpenShift Container Platform ドキュメントの Splunk へのログの転送 を参照してください。

    4. オプション: 監査ログのみを含めるようにログをフィルタリングします。

      filters 設定例

      filters:
        - name: audit-logs-only
          type: drop
          drop:
            - test:
              - field: .message
                notMatches: isAuditEvent

      詳細は、OpenShift Container Platform ドキュメントの コンテンツによるログのフィルタリング を参照してください。

    5. 特定の入力から指定された出力にログをルーティングするようにパイプラインを設定します。定義された入力と出力の名前を使用して、各パイプラインで複数の inputRefsoutputRefs を指定します。

      pipelines 設定の例

      pipelines:
        - name: my-app-logs-pipeline
          detectMultilineErrors: true
          inputRefs:
            - my-app-logs-input
          outputRefs:
            - splunk-receiver-application
          filterRefs:
            - audit-logs-only

  8. ClusterLogForwarder 設定を適用するには、次のコマンドを実行します。

    ClusterLogForwarder 設定を適用するコマンドの例

    oc apply -f <ClusterLogForwarder-configuration.yaml>

  9. オプション: ログ損失のリスクを軽減するには、次のオプションを使用して ClusterLogForwarder Pod を設定します。

    1. ログコレクターのリソース要求と制限を次のように定義します。

      collector 設定の例

      collector:
        resources:
          requests:
            cpu: 250m
            memory: 64Mi
            ephemeral-storage: 250Mi
          limits:
            cpu: 500m
            memory: 128Mi
            ephemeral-storage: 500Mi

    2. deliverycompressionRetryDuration など、ログ配信の tuning オプションを定義します。必要に応じて出力ごとにチューニングを適用できます。

      tuning 設定の例

      tuning:
        delivery: AtLeastOnce 
      1
      
        compression: none
        minRetryDuration: 1s
        maxRetryDuration: 10s

      1
      AtLeastOnce 配信モードとは、ログフォワーダーがクラッシュしたり再起動したりした場合に、クラッシュ前に読み取られたにもかかわらず宛先に送信されなかったログが、再送信されることを意味します。クラッシュ後に一部のログが重複している可能性があります。

検証

  1. Splunk ダッシュボードでログを表示して、ログが Splunk インスタンスに転送されていることを確認します。
  2. 必要に応じて、OpenShift Container Platform と Splunk ログを使用して問題をトラブルシューティングします。

第3章 Developer Hub の監査ログの表示

管理者は、Red Hat OpenShift Container Platform Web コンソールからログデータを表示、検索、フィルタリング、管理できます。isAuditEvent フィールドを使用して、監査ログを他のログタイプからフィルターできます。

前提条件

  • OpenShift Container Platform Web コンソールに管理者としてログインしている。

手順

  1. OpenShift Container Platform Web コンソールの Developer 視点から、Topology タブをクリックします。
  2. Topology ビューから、監査ログデータを表示する Pod をクリックします。
  3. Pod パネルから、Resources タブをクリックします。
  4. Resources タブの Pods セクションで、View logs をクリックします。
  5. Logs ビューから、Search フィールドに isAuditEvent と入力して、監査ログを他のログタイプからフィルターします。矢印を使用して、isAuditEvent フィールドを含むログを参照できます。

法律上の通知

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る