TIPCommon.rest
TIPCommon.rest.auth.build_credentials_from_sa
TIPCommon.rest.auth.build_credentials_from_sa(user_service_account: MutableMapping[str, Any] | None = None, target_principal: str | None = None, source_credentials: Credentials | None = None, quota_project_id: str | None = None, scopes: list[str] | None = None, verify_ssl: bool | None = True, **service_account_attr: Any)→ Credentials
サービス アカウント、ワークロード ID のメール、サービス アカウントの属性から認証情報オブジェクトをビルドします。
注
user_service_account
、target_principal
、または service_account_attr
(**kwargs
を使用)のいずれかを指定する必要があります。そうでない場合は、EmptyMandatoryValues
例外が発生します。
パラメータ
パラメータ | |
---|---|
user_service_account |
SingleJson | None ユーザー サービス アカウントの JSON。 |
target_principal |
str | None Workload Identity のメールアドレス。 |
source_credentials |
google.auth.Credentials | None 権限借用された認証情報の取得に使用されるソース認証情報。
|
quota_project_id |
str | None 割り当てと課金に使用されるプロジェクト ID。 |
scopes |
list[str] Google Cloud 認証情報スコープ。デフォルトは |
verify_ssl |
bool SSL 証明書を検証するかどうかを定義します。 デフォルトは |
service_account_attr |
dict[str, Any] 構造化解除されたサービス アカウント フィールドの Key-Value ペア。 |
発生
EmptyMandatoryValues
- サービス アカウントまたは Workload Identity のメールアドレスがない場合、またはサービス アカウントの必須フィールドが欠落している場合。google.auth.exceptions.RefreshError
- 認証情報を更新できなかった場合。
戻り値
認証情報オブジェクト。
戻り値の型
service_account.Credentials
TIPCommon.rest.auth.build_credentials_from_sa_attr
TIPCommon.rest.auth.build_credentials_from_sa_attr(account_type: str, project_id: str, private_key_id: str, private_key: str, client_email: str, client_id: str, auth_uri: str, token_uri: str, auth_provider_x509_url: str, client_x509_cert_url: str, scopes: list[str] | None = None, quota_project_id: str | None = None)→ Credentials
サービス アカウントの属性から認証情報オブジェクトをビルドします。
パラメータ
パラメータ | |
---|---|
account_type |
str サービス アカウントのタイプ。 |
project_id |
str サービス アカウントのプロジェクト ID。 |
private_key_id |
str サービス アカウントの秘密鍵 ID。 |
private_key |
str サービス アカウントの秘密鍵。 |
client_email |
str サービス アカウントのクライアント メール。 |
client_id |
str サービス アカウントのクライアント ID。 |
auth_uri |
str サービス アカウントの認証 URI。 |
token_uri |
str サービス アカウント トークンの URI。 |
auth_provider_x509_url |
str サービス アカウント認証プロバイダの x509 証明書 URL。 |
client_x509_cert_url |
str サービス アカウント クライアントの x509 証明書の URL。 |
scopes |
list[str], optional Google Cloud 認証情報スコープ。デフォルトは |
quota_project_id |
str | None 割り当てと課金に使用されるプロジェクト ID。 |
発生
EmptyMandatoryValues
- サービス アカウントの必須フィールドが指定されていない場合。
戻り値
認証情報オブジェクト。
戻り値の型
service_account.Credentials
TIPCommon.rest.auth.generate_jwt_from_credentials
TIPCommon.rest.auth.generate_jwt_from_credentials(credentials: Credentials, verify_ssl: bool = True)→ bytes
REST を使用して Google Cloud API リソースにアクセスするための JSON ウェブトークンを生成します。
パラメータ
パラメータ | |
---|---|
credentials |
google.oauth2.credentials.Credentials
|
verify_ssl |
bool SSL 経由で認証情報トークンを更新するかどうかを定義します。 デフォルトは |
戻り値
Authorization ヘッダーで使用する JWT トークン。
戻り値の型
bytes
TIPCommon.rest.auth.generate_jwt_from_sa
TIPCommon.rest.auth.generate_jwt_from_sa(service_account, expiry_length=3600, audience=None)
REST を使用して Google Cloud API リソースにアクセスするための JSON ウェブトークンを生成します。
パラメータ | |
---|---|
service_account |
str | dict 必要な Identity and Access Management ロールを持つGoogle Cloud プロジェクト サービス アカウント。 |
expiry_length |
int トークンの有効期限が切れるまでの時間(秒単位)。デフォルトは 1 時間です。 |
audience |
str Google Cloud スコープ。指定されていない場合、 |
戻り値
認可ヘッダーで使用する JWT トークン。
戻り値の型
bytes
TIPCommon.rest.auth.get_adc
TIPCommon.rest.auth.get_adc(scopes: Sequence[str] | None = None, request: Request | None = None, quota_project_id: str | None = None)→ Tuple[Credentials, str | None]
ランタイム環境のアプリケーションのデフォルト認証情報(ADC)を取得します。これは google.auth.default
のラッパー関数です。
パラメータ
パラメータ | |
---|---|
scopes |
Sequence[str] | None 認証情報のスコープのリスト。 指定すると、必要に応じて認証情報が自動的にスコープ設定されます。 |
request |
google.auth.transport.Request | None
HTTP リクエストを行うために使用されるオブジェクト。これは、アプリケーションが Compute Engine で実行されているかどうかを検出するか、ワークロード ID プール リソース(外部アカウント認証情報)に関連付けられたプロジェクト ID を特定するために使用されます。 指定しない場合、Compute Engine 認証情報には標準ライブラリ HTTP クライアント、外部アカウント認証情報には |
quota_project_id |
str | None 割り当てと課金に使用されるプロジェクト ID。 |
戻り値
現在の環境の認証情報とプロジェクト ID。プロジェクト ID は None
になることがあります。これは、環境からプロジェクト ID を特定できなかったことを示します。
戻り値の型
Tuple[google.auth.credentials.Credentials, str]
発生
google.auth.exceptions.DefaultCredentialsError
- 認証情報が見つからなかった場合、または見つかった認証情報が無効だった場合。
TIPCommon.rest.auth.get_auth_request
TIPCommon.rest.auth.get_auth_request(verify_ssl: bool = True)→ Request
Google Cloud リソース API への承認済み HTTP リクエストを作成します。
パラメータ
パラメータ | |
---|---|
verify_ssl |
bool, optional SSL 証明書を検証します。デフォルトは |
戻り値
承認済みのリクエスト オブジェクト。
戻り値の型
google.auth.transport.requests.Request
TIPCommon.rest.auth.get_impersonated_credentials
TIPCommon.rest.auth.get_impersonated_credentials(target_principal: str, source_credentials: google.auth.Credentials | None = None, target_scopes: Sequence[str] | None = None, delegates: Sequence[str] | None = None, quota_project_id: str | None = None)→ impersonated_credentials.Credentials
Google Cloud サービス アカウントの権限借用を使用して、有効期間の短い Credentials オブジェクトを取得します。
パラメータ
パラメータ | |
---|---|
target_principal |
str 権限を借用するサービス アカウント。 |
source_credentials |
google.auth.Credentials | None 権限借用された認証情報の取得に使用されるソース認証情報。 何も指定しない場合、システムはアプリケーションのデフォルト認証情報を使用しようとします。 |
target_scopes |
Sequence[str] | None 認可付与時にリクエストするスコープ。
|
delegates |
Sequence[str] | None 最終的なアクセス トークンを付与するために必要な委任者のチェーン リスト。 設定されている場合、ID のシーケンスでは、先行する ID に たとえば、 設定しない場合、 |
quota_project_id |
str | None 割り当てと課金に使用されるプロジェクト ID。 注: このプロジェクトは、認証情報の作成に使用したプロジェクトとは異なる場合があります。 |
戻り値
ターゲット プリンシパルの有効期間の短い Credentials オブジェクト。
戻り値の型
impersonated_credentials.Credentials
TIPCommon.rest.auth.get_secops_siem_tenant_credentials
TIPCommon.rest.auth.get_secops_siem_tenant_credentials(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, target_scopes: Sequence[str] | None = None, quota_project_id: str | None = None)→ Credentials
Google SecOps インスタンスの SIEM テナントの有効期間が短いサービス アカウント認証情報を取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
TIPCommon.types.ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
target_scopes |
Sequence[str] | None 認可付与時にリクエストするスコープ。 |
quota_project_id |
str | None 割り当てと課金に使用されるプロジェクト ID。 注: このプロジェクトは、認証情報の作成に使用したプロジェクトとは異なる場合があります。 |
戻り値
SIEM テナントの有効期間が短いサービス アカウント認証情報。
戻り値の型
impersonated_credentials.Credentials
class TIPCommon.rest.gcp.GcpErrorReason
クラス TIPCommon.rest.gcp.GcpErrorReason
ベース: オブジェクト
Google Cloud Error Reason 定数 Namespace。
定数
IAM_PERMISSION_DENIED = 'IAM_PERMISSION_DENIED'
class TIPCommon.rest.gcp.GcpPermissions
クラス TIPCommon.rest.gcp.GcpPermissions
ベース: オブジェクト
Google Cloud Permissions 定数 Namespace。
定数
IAM_SA_GET_ACCESS_TOKEN = 'iam.serviceAccounts.getAccessToken'
TIPCommon.rest.gcp.extract_project_id_from_sa_email
TIPCommon.rest.gcp.extract_project_id_from_sa_email(service_account_email: str)→ str
サービス アカウントのメールアドレスからプロジェクト ID を抽出します。
パラメータ
パラメータ | |
---|---|
service_account_email |
str サービス アカウントのメールアドレス。 |
戻り値
プロジェクト ID。
戻り値の型
str
発生
NotFoundError
- SA メールからプロジェクト名を解析できない場合。
TIPCommon.rest.gcp.extract_project_id_from_sa_key
TIPCommon.rest.gcp.extract_project_id_from_sa_key(service_account_json: MutableMapping[str, Any])→ str
サービス アカウントの JSON キーからプロジェクト ID を抽出します。
パラメータ
パラメータ | |
---|---|
service_account_json |
SingleJson サービス アカウントの JSON キー。 |
戻り値
サービス アカウント キーのプロジェクト ID フィールド。
戻り値の型
str
発生
NotFoundError
- サービス アカウント キーで「project_id」フィールドが見つからない場合。
TIPCommon.rest.gcp.get_http_client
TIPCommon.rest.gcp.get_http_client(credentials: Credentials, verify_ssl: bool = True)→ Http | AuthorizedHttp
Google Cloud 承認済みの HTTP クライアントを取得します。
パラメータ
パラメータ | |
---|---|
credentials |
service_account.Credentials Google Cloud Credentials オブジェクト。 |
verify_ssl |
bool 、省略可SSL 証明書を検証します。デフォルトは |
戻り値
承認済みの HTTP クライアント。
戻り値の型
Union[httplib2.Http, google_auth_httplib2.AuthorizedHttp]
TIPCommon.rest.gcp.get_workload_sa_email
TIPCommon.rest.gcp.get_workload_sa_email(default_sa_to_return: str | None = None)→ str
Google Cloud メタデータ サーバーから Workload サービス アカウントのメールアドレスを取得します。
パラメータ
パラメータ | |
---|---|
default_sa_to_return |
str | None 見つからなかった場合に返すデフォルトのサービス アカウント。 デフォルトは |
戻り値
ワークロード サービス アカウントのメールアドレス。
戻り値の型
str
発生
GoogleCloudException
- GCP Workload サービス アカウントのメールアドレスを取得できない場合。
TIPCommon.rest.gcp.retrieve_project_id
TIPCommon.rest.gcp.retrieve_project_id(user_service_account: MutableMapping[str, Any] | None = None, service_account_email: str | None = None, default_project_id: str | None = None)→ str | None
サービス アカウントまたは Workload Identity のメールからプロジェクト ID を取得します。
パラメータ
パラメータ | |
---|---|
user_service_account |
SingleJson | None ユーザー サービス アカウントの JSON。 |
service_account_email |
str | None Workload Identity のメールアドレス。 |
default_project_id |
str | None 見つからなかった場合に返すデフォルトのプロジェクト ID。 指定された場合、この関数は デフォルトは |
戻り値
サービス アカウントまたはワークロード ID のメールのプロジェクト ID。見つからない場合は、None
を返します。
戻り値の型
str | None
発生
NotFoundError
- SA メールからプロジェクト名を解析できない場合。
TIPCommon.rest.gcp.validate_impersonation
TIPCommon.rest.gcp.validate_impersonation(content: dict, default_error_msg: str = 'Service Account Impersonation failed')→ None
HTTP 承認済みレスポンスからサービス アカウントの権限借用を検証します。
パラメータ
パラメータ | |
---|---|
content |
dict HTTP 承認済みレスポンス コンテンツ。 |
default_error_msg |
str, optional レスポンス コンテンツで見つからなかった場合に発生させるエラー メッセージ。 デフォルトは |
戻り値
サービス アカウントの権限借用が承認されている場合は None
。
戻り値の型
None
発生
ImpersonationUnauthorizedError
- サービス アカウントの権限借用が承認されていない場合。
TIPCommon.rest.httplib.get_auth_session
TIPCommon.rest.httplib.get_auth_session(service_account, audience=None, verify_ssl=True)
Google Cloud リソース API への承認済み HTTP セッションを作成します。
パラメータ | |
---|---|
service_account |
str | dict 必要な Identity and Access Management ロールを持つ Google Cloud プロジェクト サービス アカウント。 |
audience |
str Google Cloud スコープ。 |
verify_ssl |
bool SSL 暗号化でセッションを作成するかどうかを定義します。 |
戻り値
承認済みセッション オブジェクト。
戻り値の型
requests.Session
発生
ValueError
- 認証情報とサービス アカウントが指定されていない場合。
例外 TIPCommon.rest.soar_api.SoarApiServerError
ベース: Exception
Google Security Operations SOAR の API 呼び出しからサーバーへのエラー。
TIPCommon.rest.soar_api.batch_set_custom_field_values
TIPCommon.rest.soar_api.batch_set_custom_field_values(chronicle_soar, identifier: int, parent: str, custom_fields_values_mapping: dict[int, list[str]])→ list[CustomFieldValue]
バッチでカスタム フィールドの値を設定します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
Google Security Operations SOAR SDK オブジェクト。 |
identifier |
int 親識別子。 |
parent |
str カスタム フィールド値の親パス( |
custom_fields_values_mapping |
dict[int, list[str]] カスタム フィールド ID と値のマッピング。 |
戻り値
CustomFieldValue オブジェクトのリスト。
戻り値の型
list[CustomFieldValue]
TIPCommon.rest.soar_api.get_alert_events
TIPCommon.rest.soar_api.get_alert_events(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, case_id: str | int, alert_identifier: str)→ list[AlertEvent]
特定のアラートのイベントを取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
case_id |
str | int ケース ID。例: |
alert_identifier |
str
アラートの識別子( 例: |
戻り値
リクエストのレスポンス JSON。イベントの JSON のリスト。
戻り値の型
list[SingleJson]
発生
requests.HTTPError
- サーバーが成功以外のステータス コードを返した場合。json.JSONDecodeError
- 戻り値が有効な JSON ではない場合。
TIPCommon.rest.soar_api.get_case_attachments
TIPCommon.rest.soar_api.get_case_attachments(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, case_id: int)→ MutableMapping[str, Any]
ケースの添付ファイルを取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
case_id |
int Google Security Operations SOAR ケース ID。 |
戻り値
ケースの添付ファイルを表すミュータブルなマッピング。
戻り値の型
MutableMapping[str, Any]
TIPCommon.rest.soar_api.get_case_overview_details
TIPCommon.rest.soar_api.get_case_overview_details(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, case_id: int | str) → CaseDetails
ケース ID でケースの概要の詳細を取得します。
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SDK オブジェクト。 |
case_id |
int | str Google Security Operations SOAR ケース ID。 |
戻り値
ケースの詳細オブジェクト。
戻り値の型
発生
requests.HTTPError
- リクエストが失敗した場合、またはリクエストのステータスが 200 ではない場合。json.JSONDecoderError
- レスポンスの解析に失敗した場合。
TIPCommon.rest.soar_api.get_connector_cards
TIPCommon.rest.soar_api.get_connector_cards(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, integration_name: str | None = None, connector_identifier: str | None = None)→ list[ConnectorCard]
すべてのコネクタカードを取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
integration_name |
str | None 統合名。 |
connector_identifier |
str | None コネクタ ID。 |
戻り値
すべてのコネクタカードのリスト。
戻り値の型
list[ConnectorCard]
TIPCommon.rest.soar_api.get_entity_data
TIPCommon.rest.soar_api.get_entity_data(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, entity_identifier: str, entity_environment: str, entity_type: str | None = None, last_case_type: int = 0, case_distribution_type: int = 0)→ MutableMapping[str, Any]
エンティティ データを取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
entity_identifier |
int エンティティ ID。 |
entity_environment |
str エンティティ環境。 |
entity_type |
str エンティティ タイプ。 |
last_case_type |
int 最後のケースタイプ。 |
case_distribution_type |
int ケースの配信タイプ。 |
戻り値
エンティティ データを表すミュータブル マッピング。
戻り値の型
dict
発生
requests.HTTPError
- サーバーが成功以外のステータス コードを返したとき。
TIPCommon.rest.soar_api.get_env_action_def_files
TIPCommon.rest.soar_api.get_env_action_def_files(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob)→ list[Dict[str, Any]]
環境アクション定義ファイルのリストを取得します。
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google SecOps SDK オブジェクト。 |
戻り値
アクション定義ファイルを表す SingleJson
オブジェクトのリスト。
戻り値の型
(list[SingleJson])
発生
requests.HTTPError
- サーバーが成功以外のステータス コードを返した場合。json.JSONDecodeError
- 戻り値が有効な JSON ではない場合。
TIPCommon.rest.soar_api.get_federation_cases
TIPCommon.rest.soar_api.get_federation_cases(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob)→ MutableMapping[str, Any]
連携ケースを取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
戻り値
レスポンス JSON。
戻り値の型
SingleJson
TIPCommon.rest.soar_api.get_full_case_details
TIPCommon.rest.soar_api.get_full_case_details(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, case_id: int)→ MutableMapping[str, Any]
ケースの詳細情報を取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
case_id |
int Google Security Operations SOAR ケース ID。 |
戻り値
ケースの詳細全体を表すミュータブルなマッピング。
戻り値の型
MutableMapping[str, Any]
TIPCommon.rest.soar_api.get_installed_integrations_of_environment
TIPCommon.rest.soar_api.get_installed_integrations_of_environment(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, environment: str, integration_identifier: str | None = None)→ list[InstalledIntegrationInstance]
指定された環境にインストールされているすべての統合を取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
environment |
str インスタンス環境のリスト。 |
integration_identifier |
str | None 統合 ID。 |
戻り値
統合インスタンスを表すディクショナリ オブジェクトのリスト。
戻り値の型
list[InstalledIntegrationInstance]
TIPCommon.rest.soar_api.get_installed_jobs
TIPCommon.rest.soar_api.get_installed_jobs(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob)→ list[Dict[str, Any]]
環境アクション定義ファイルのリストを取得します。
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google SecOps SDK オブジェクト。 |
戻り値
アクション定義ファイルを表す SingleJson
オブジェクトのリスト。
戻り値の型
(list[SingleJson])
発生
requests.HTTPError
- サーバーが成功以外のステータス コードを返した場合。json.JSONDecodeError
- 戻り値が有効な JSON ではない場合。
TIPCommon.rest.soar_api.get_integration_full_details
TIPCommon.rest.soar_api.get_integration_full_details(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, integration_identifier: str)→ Dict[str, Any]
インテグレーションの完全な詳細ファイルを取得します。
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google SecOps SDK オブジェクト。 |
integration_identifier |
str 統合 ID。 |
戻り値
統合の詳細を含む JSON レスポンス。
戻り値の型
(SingleJSON)
発生
requests.HTTPError
- サーバーが成功以外のステータス コードを返した場合。json.JSONDecodeError
- 戻り値が有効な JSON ではない場合。
TIPCommon.rest.soar_api.get_user_profile_cards
TIPCommon.rest.soar_api.get_user_profile_cards(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, search_term: str = '', requested_page: int = 0, page_size: int = 20, filter_by_role: bool = False, filter_disabled_users: bool = False, filter_support_users: bool = False, fetch_only_support_users: bool = False, filter_permission_types: list[int] = None)→ MutableMapping[str, Any]
ページとフィルタでユーザー プロフィール カードを取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
search_term |
str 検索キーワード。 |
requested_page |
int ユーザーのページを返すための開始オフセット。 |
page_size |
int 返すユーザーの数。 |
filter_by_role |
bool ロールでフィルタするかどうかを定義します。 |
filter_disabled_users |
bool 無効なユーザーをフィルタするかどうかを定義します。 |
filter_support_users |
bool サポート ユーザーを除外するかどうかを定義します。 |
fetch_only_support_users |
bool サポート ユーザーのみを返すかどうかを定義します。 |
filter_permission_types |
list[int] | None フィルタ権限のタイプ( |
戻り値
SOAR サーバーからのレスポンス(ユーザー プロファイル カード)。
戻り値の型
SingleJson
発生
requests.HTTPError
- サーバーが成功以外のステータス コードを返した場合。json.JSONDecodeError
- 戻り値が有効な JSON ではない場合。
例
レスポンス JSON の例:
{
"objectsList": [
{ "firstName": "string", "lastName": "string", "userName": "string", "accountState": 0 }
],
"metadata": {
"totalNumberOfPages": 0,
"totalRecordsCount": 0,
"pageSize": 0
}
}
TIPCommon.rest.soar_api.get_workflow_instance_card
TIPCommon.rest.soar_api.get_workflow_instance_card(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, case_id: int, alert_identifier: str)→ MutableMapping[str, Any]
ワークフロー インスタンス カードを取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
case_id |
int Google Security Operations SOAR ケース ID。 |
alert_identifier |
str Google Security Operations SOAR アラート ID。 |
戻り値
ワークフロー インスタンス カードを表す変更可能なマッピング。
戻り値の型
MutableMapping[str, Any]
TIPCommon.rest.soar_api.list_custom_field_values
TIPCommon.rest.soar_api.list_custom_field_values(chronicle_soar, parent: str)→ list[CustomFieldValue]
ケースまたはアラートのカスタム フィールド値を取得します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
parent |
str カスタム フィールド値の親パス(例: |
戻り値
ケースの詳細オブジェクト。
戻り値の型
list[CustomFieldValue]
発生
requests.HTTPError
- リクエストが失敗した場合、またはリクエスト ステータスが 200 ではない場合。json.JSONDecoderError
- レスポンスの解析に失敗した場合。
TIPCommon.rest.soar_api.list_custom_fields
TIPCommon.rest.soar_api.list_custom_fields(chronicle_soar, filter_: str | None = None)→ list[CustomField]
カスタム フィールドを一覧表示します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
filter_ |
str | None 検索のフィルタ値。 |
戻り値
ケースの詳細オブジェクト。
戻り値の型
list[CustomField]
発生
requests.HTTPError
- リクエストが失敗した場合、またはリクエスト ステータスが 200 ではない場合。json.JSONDecoderError
- レスポンスの解析に失敗した場合。
TIPCommon.rest.soar_api.remove_case_tag
TIPCommon.rest.soar_api.remove_case_tag(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, case_id: int, tag: str, alert_identifier: str | None = None)→ None
ケースタグを削除します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
case_id |
int Google Security Operations SOAR ケース ID。 |
tag |
str 削除するタグ。 |
alert_identifier |
str | None {The {google_secops_soar_name}} アラート ID。 |
戻り値
なし
戻り値の型
None
発生
requests.HTTPError
- サーバーが成功以外のステータス コードを返したとき。
TIPCommon.rest.soar_api.save_attachment_to_case_wall
TIPCommon.rest.soar_api.save_attachment_to_case_wall(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, attachment_data: CaseWallAttachment)→ MutableMapping[str, Any]
ファイルをケースウォールに直接保存します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
attachment_data |
CaseWallAttachment
|
戻り値
API レスポンスを表す変更可能なマッピング。
戻り値の型
MutableMapping[str, Any]
TIPCommon.rest.soar_api.set_alert_priority
TIPCommon.rest.soar_api.set_alert_priority(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, case_id: int, alert_identifier: str, alert_name: str, priority: int)→ None
アラートの優先度を設定します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
case_id |
int Google Security Operations SOAR ケース ID。 |
alert_identifier |
str Google Security Operations SOAR アラート ID。 |
alert_name |
str Google Security Operations SOAR アラートの名前。 |
priority |
int Google Security Operations SOAR の優先度列挙型値。 |
戻り値
なし
戻り値の型
None
発生
requests.HTTPError
- サーバーが成功以外のステータス コードを返したとき。
TIPCommon.rest.soar_api.set_case_score_bulk
TIPCommon.rest.soar_api.set_case_score_bulk(chronicle_soar: SiemplifyAction | SiemplifyConnectorExecution | SiemplifyJob, case_score_mapping: list[dict[str, int | float]])→ MutableMapping[str, Any]
ケースのスコアを一括で設定します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
case_score_mapping |
list[dict[str, int | float]] Google Security Operations SOAR のケース ID とスコアのマッピング。 |
戻り値
成功ステータスと、該当する場合は失敗したケースのリストを含むレスポンス JSON。
戻り値の型
MutableMapping[str, Any]
発生
requests.HTTPError
- サーバーが成功以外のステータス コードを返したとき。
例
{
case_score_mapping = [
{
"caseId": 1, "score": 1.0
}
]
}
TIPCommon.rest.soar_api.set_custom_field_values
TIPCommon.rest.soar_api.set_custom_field_values(chronicle_soar: ChronicleSOAR, parent: str, custom_field_id: int, values: list[str])→ CustomFieldValue
カスタム フィールドの値を設定します。
パラメータ
パラメータ | |
---|---|
chronicle_soar |
ChronicleSOAR Google Security Operations SOAR SDK オブジェクト。 |
parent |
str カスタム フィールド値の親パス(例: |
custom_field_id |
int カスタム フィールド ID。 |
values |
list[str] 設定するカスタム フィールド値のリスト。 |
戻り値
CustomFieldValue オブジェクト。
戻り値の型
CustomFieldValue
TIPCommon.rest.soar_api.validate_response
TIPCommon.rest.soar_api.validate_response(response: Response, validate_json: bool = False) → None
レスポンスを検証し、JSON として返します。
パラメータ | |
---|---|
response |
requests.Response 検証するレスポンス。 |
発生
HTTPError
- レスポンスのステータス コードが失敗を示している場合。
さらにサポートが必要な場合 コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。