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

서비스 계정, 워크로드 아이덴티티 이메일 또는 서비스 계정 속성에서 사용자 인증 정보 객체를 빌드합니다.

참고 user_service_account, target_principal 또는 service_account_attr (**kwargs 사용) 중 하나를 제공해야 합니다. 그렇지 않으면 EmptyMandatoryValues 예외가 발생합니다.

매개변수

매개변수
user_service_account SingleJson | None

사용자 서비스 계정 JSON입니다.

target_principal str | None

워크로드 아이덴티티 이메일입니다.

source_credentials google.auth.Credentials | None

가장된 사용자 인증 정보를 획득하는 데 사용된 소스 사용자 인증 정보입니다.

None가 제공되면 시스템에서 애플리케이션 기본 사용자 인증 정보를 사용하려고 시도합니다.

quota_project_id str | None

할당량 및 결제에 사용되는 프로젝트 ID입니다.

scopes list[str]

Google Cloud 사용자 인증 정보 범위입니다. 기본값은 ['https://www.googleapis.com/auth/cloud-platform']입니다.

verify_ssl bool

SSL 인증서를 확인할지 여부를 정의합니다.

기본값은 True입니다.

service_account_attr dict[str, Any]

구조가 해체된 서비스 계정 필드의 키-값 쌍입니다.

발생 오류

EmptyMandatoryValues – 서비스 계정 또는 워크로드 아이덴티티 이메일이 없거나 서비스 계정의 필수 필드가 누락된 경우 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 사용자 인증 정보 범위입니다. 기본값은 ['https://www.googleapis.com/auth/cloud-platform']입니다.

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

google.oauth2.credentials.Credentials 객체

verify_ssl bool

SSL을 통해 사용자 인증 정보 토큰을 새로고침할지 여부를 정의합니다.

기본값은 True입니다.

반환

승인 헤더에 사용할 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

Google Cloud 필요한 Identity and Access Management 역할이 있는 프로젝트 서비스 계정

expiry_length int

토큰이 만료될 때까지 설정된 시간(초)입니다. 기본값은 1시간입니다.

audience str

Google Cloud 범위 제공되지 않으면 https://www.googleapis.com/auth/cloud-platform로 대체됩니다.

반환

승인 헤더에 사용할 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를 확인하는 데 사용됩니다.

지정하지 않으면 Compute Engine 사용자 인증 정보의 표준 라이브러리 HTTP 클라이언트 또는 외부 계정 사용자 인증 정보의 google.auth.transport.requests.Request 클라이언트를 사용합니다.

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 인증서를 확인합니다. 기본값은 True입니다.

반환

승인된 요청 객체입니다.

반환 유형

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 서비스 계정 가장을 사용하여 단기 사용자 인증 정보 객체를 가져옵니다.

매개변수

매개변수
target_principal str

가장할 서비스 계정입니다.

source_credentials google.auth.Credentials | None

가장된 사용자 인증 정보를 획득하는 데 사용된 소스 사용자 인증 정보입니다.

아무것도 제공되지 않으면 시스템에서 애플리케이션 기본 사용자 인증 정보를 사용하려고 시도합니다.

target_scopes Sequence[str] | None

승인 부여 중에 요청할 범위입니다.

None이 제공되면 기본 https://www.googleapis.com/auth/cloud-platform 범위가 사용됩니다.

delegates Sequence[str] | None

최종 액세스 토큰을 부여하는 데 필요한 위임자의 연결된 목록입니다.

설정된 경우 ID 시퀀스에는 이전 ID에 부여된 Service Account Token Creator 기능이 있어야 합니다.

예를 들어 [serviceAccountB, serviceAccountC]로 설정된 경우 source_credentialserviceAccountB에 대한 토큰 생성자 역할이 있어야 합니다. serviceAccountB에는 serviceAccountC의 토큰 생성자가 있어야 합니다. 마지막으로 Ctarget_principal에 대한 토큰 생성자 권한이 있어야 합니다.

설정하지 않은 경우 source_credentialtarget_principal에 대한 해당 역할이 있어야 합니다.

quota_project_id str | None

할당량 및 결제에 사용되는 프로젝트 ID입니다.

참고: 이 프로젝트는 사용자 인증 정보를 만드는 데 사용된 프로젝트와 다를 수 있습니다.

반환

타겟 주 구성원의 단기 사용자 인증 정보 객체입니다.

반환 유형

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

기본: object

Google Cloud 오류 이유 상수 네임스페이스입니다.

상수

  • IAM_PERMISSION_DENIED = 'IAM_PERMISSION_DENIED'

class TIPCommon.rest.gcp.GcpPermissions

클래스 TIPCommon.rest.gcp.GcpPermissions

기본: object

Google Cloud Permissions 상수 네임스페이스입니다.

상수

  • 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 인증서를 확인합니다. 기본값은 True입니다.

반환

승인된 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 메타데이터 서버에서 워크로드 서비스 계정 이메일을 가져옵니다.

매개변수

매개변수
default_sa_to_return str | None

찾을 수 없는 경우 반환할 기본 서비스 계정입니다.

기본값은 None입니다.

반환

워크로드 서비스 계정 이메일입니다.

반환 유형

str

발생 오류

GoogleCloudException – GCP 워크로드 서비스 계정 이메일을 가져올 수 없는 경우

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

서비스 계정 또는 워크로드 아이덴티티 이메일에서 프로젝트 ID를 가져옵니다.

매개변수

매개변수
user_service_account SingleJson | None

사용자 서비스 계정 JSON입니다.

service_account_email str | None

워크로드 아이덴티티 이메일입니다.

default_project_id str | None

찾을 수 없는 경우 반환할 기본 프로젝트 ID입니다.

제공된 경우 이 함수는 NotFoundError을 발생시키지 않습니다.

기본값은 None입니다.

반환

서비스 계정 또는 워크로드 아이덴티티 이메일의 프로젝트 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

응답 콘텐츠에서 찾을 수 없는 경우 발생시킬 오류 메시지입니다.

기본값은 "Service Account Impersonation failed"입니다.

반환

서비스 계정 가장이 승인된 경우 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 - 사용자 인증 정보와 서비스 계정이 제공되지 않은 경우

exception 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

맞춤 필드 값의 상위 경로입니다 (예: cases/1, cases/1/alerts/1).

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입니다. 예: 13, "41"

alert_identifier str

알림의 식별자입니다 (예: '{alert.name}_{alert.id}').

예: alert.name=SERVICE_ACCOUNT_USED alert.id=c3b80f09-38d3-4328-bddb-b938ccee0256 identifier=SERVICE_ACCOUNT_USED_c3b80f09-38d3-4328-bddb-b938ccee0256

반환

요청의 응답 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입니다.

반환

케이스 세부정보 객체입니다.

반환 유형

(CaseDetails)

발생 오류

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

항목 식별자입니다.

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

필터 권한 유형 목록입니다 (예: 0).

반환

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

맞춤 입력란 값의 상위 경로입니다 (예: cases/1, cases/1/alerts/1).

반환

케이스 세부정보 객체입니다.

반환 유형

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

{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

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 우선순위 enum 값입니다.

반환

없음

반환 유형

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

맞춤 입력란 값의 상위 경로입니다(예: cases/1, cases/1/alerts/1.

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 전문가로부터 답변을 받으세요.