pycti.entities.opencti_settings
===============================
.. py:module:: pycti.entities.opencti_settings
Classes
-------
.. autoapisummary::
pycti.entities.opencti_settings.Settings
Module Contents
---------------
.. py:class:: Settings(opencti)
Represents the Settings object in OpenCTI
These are the properties which are viewable in the customization and
security policies views on OpenCTI platform. This also includes all
messages on the platform.
See the properties attribute to understand which properties are fetched by
default on graphql queries.
:param opencti: instance of :py:class:`~pycti.api.opencti_api_client.OpenCTIApiClient`
:type opencti: OpenCTIApiClient
Initialize the Settings instance.
:param opencti: OpenCTI API client instance
:type opencti: OpenCTIApiClient
.. py:attribute:: opencti
.. py:attribute:: properties
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
id
standard_id
entity_type
parent_types
platform_organization {
id, name, description
}
platform_title
platform_favicon
platform_email
platform_url
platform_language
platform_cluster {
instances_number
}
platform_modules {
id, enable, warning
}
platform_providers {
name, type, strategy, provider
}
platform_user_statuses {
status, message
}
platform_theme {
id
standard_id
entity_type
parent_types
name
theme_background
theme_paper
theme_nav
theme_primary
theme_secondary
theme_accent
theme_logo
theme_logo_collapsed
theme_logo_login
theme_text_color
built_in
}
platform_map_tile_server_dark
platform_map_tile_server_light
platform_ai_enabled
platform_openaev_url
platform_opengrc_url
platform_ai_type
platform_ai_model
platform_ai_has_token
platform_login_message
platform_consent_message
platform_consent_confirm_text
platform_banner_text
platform_banner_level
platform_session_idle_timeout
platform_session_timeout
platform_whitemark
platform_demo
platform_reference_attachment
platform_feature_flags {
id, enable, warning
}
platform_critical_alerts {
message, type
details {
groups {
id, name, description
}
}
}
platform_trash_enabled
platform_protected_sensitive_config {
enabled
markings {
enabled, protected_ids
}
groups {
enabled, protected_ids
}
roles {
enabled, protected_ids
}
rules {
enabled, protected_ids
}
ce_ee_toggle {
enabled, protected_ids
}
file_indexing {
enabled, protected_ids
}
platform_organization {
enabled, protected_ids
}
}
created_at
updated_at
platform_enterprise_edition {
license_enterprise
license_by_configuration
license_customer
license_validated
license_valid_cert
license_expired
license_expiration_prevention
license_start_date
license_expiration_date
license_platform
license_type
license_platform_match
license_creator
license_global
}
analytics_google_analytics_v4
activity_listeners {
id, name, entity_type
}
"""
.. raw:: html
.. py:attribute:: messages_properties
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
entity_type
platform_messages {
id, message, activated, dismissible, updated_at, color
recipients {
id, name, entity_type
}
}
messages_administration {
id, message, activated, dismissible, updated_at, color
recipients {
id, name, entity_type
}
}
"""
.. raw:: html
.. py:attribute:: password_policy_properties
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
otp_mandatory
password_policy_min_length
password_policy_max_length
password_policy_min_symbols
password_policy_min_numbers
password_policy_min_words
password_policy_min_lowercase
password_policy_min_uppercase
"""
.. raw:: html
.. py:attribute:: editable_properties
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
id
platform_organization {
id
}
platform_title
platform_favicon
platform_email
platform_language
platform_login_message
platform_consent_message
platform_consent_confirm_text
platform_banner_text
platform_banner_level
platform_whitemark
analytics_google_analytics_v4
otp_mandatory
password_policy_min_length
password_policy_max_length
password_policy_min_symbols
password_policy_min_numbers
password_policy_min_words
password_policy_min_lowercase
password_policy_min_uppercase
"""
.. raw:: html
.. py:method:: read(**kwargs) -> Dict
Reads settings from the platform
:param customAttributes: Custom attribues to return from query
:type customAttributes: str, optional
:param include_password_policy: Defaults to False. Whether to include
password policy properties in response.
:type include_password_policy: bool, optional
:param include_messages: Defaults to False. Whether to include messages
in query response.
:type include_messages: bool, optional
:return: Representation of the platform settings
:rtype: Dict
.. py:method:: update_field(**kwargs) -> Optional[Dict]
Update settings using input to fieldPatch
:param id: ID of the settings object to update
:type id: str
:param input: List of EditInput objects
:type input: List[Dict]
:param customAttributes: Custom attribues to return from query
:type customAttributes: str, optional
:param include_password_policy: Defaults to False. Whether to include
password policy properties in response.
:type include_password_policy: bool, optional
:param include_messages: Defaults to False. Whether to include messages
in query response.
:type include_messages: bool, optional
:return: Representation of the platform settings
:rtype: Optional[Dict]
.. py:method:: edit_message(**kwargs) -> Optional[Dict]
Edit or add a message to the platform
To add a message, don't include an ID in the input object. To edit a
message an ID must be provided.
:param id: ID of the settings object on the platform
:type id: str
:param input: SettingsMessageInput object
:type input: Dict
:return: Settings ID and message objects
:rtype: Optional[Dict]
.. py:method:: delete_message(**kwargs) -> Optional[Dict]
Delete a message from the platform
:param id: ID of the settings object on the platform
:type id: str
:param input: ID of the message to delete
:type input: str
:return: Settings ID and message objects
:rtype: Optional[Dict]
.. py:method:: process_multiple_fields(data)
Process and normalize fields in settings data.
:param data: the settings data dictionary to process
:type data: dict
:return: the processed settings data with normalized fields
:rtype: dict