binalyze-air-sdk 1.0.2__py3-none-any.whl → 1.0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- binalyze_air/__init__.py +77 -77
- binalyze_air/apis/__init__.py +67 -27
- binalyze_air/apis/acquisitions.py +107 -0
- binalyze_air/apis/api_tokens.py +49 -0
- binalyze_air/apis/assets.py +161 -0
- binalyze_air/apis/audit_logs.py +26 -0
- binalyze_air/apis/{authentication.py → auth.py} +29 -27
- binalyze_air/apis/auto_asset_tags.py +79 -75
- binalyze_air/apis/backup.py +177 -0
- binalyze_air/apis/baseline.py +46 -0
- binalyze_air/apis/cases.py +225 -0
- binalyze_air/apis/cloud_forensics.py +116 -0
- binalyze_air/apis/event_subscription.py +96 -96
- binalyze_air/apis/evidence.py +249 -53
- binalyze_air/apis/interact.py +153 -36
- binalyze_air/apis/investigation_hub.py +234 -0
- binalyze_air/apis/license.py +104 -0
- binalyze_air/apis/logger.py +83 -0
- binalyze_air/apis/multipart_upload.py +201 -0
- binalyze_air/apis/notifications.py +115 -0
- binalyze_air/apis/organizations.py +267 -0
- binalyze_air/apis/params.py +44 -39
- binalyze_air/apis/policies.py +186 -0
- binalyze_air/apis/preset_filters.py +79 -0
- binalyze_air/apis/recent_activities.py +71 -0
- binalyze_air/apis/relay_server.py +104 -0
- binalyze_air/apis/settings.py +395 -27
- binalyze_air/apis/tasks.py +80 -0
- binalyze_air/apis/triage.py +197 -0
- binalyze_air/apis/user_management.py +183 -74
- binalyze_air/apis/webhook_executions.py +50 -0
- binalyze_air/apis/webhooks.py +322 -230
- binalyze_air/base.py +207 -133
- binalyze_air/client.py +217 -1337
- binalyze_air/commands/__init__.py +175 -145
- binalyze_air/commands/acquisitions.py +661 -387
- binalyze_air/commands/api_tokens.py +55 -0
- binalyze_air/commands/assets.py +324 -362
- binalyze_air/commands/{authentication.py → auth.py} +36 -36
- binalyze_air/commands/auto_asset_tags.py +230 -230
- binalyze_air/commands/backup.py +47 -0
- binalyze_air/commands/baseline.py +32 -396
- binalyze_air/commands/cases.py +609 -602
- binalyze_air/commands/cloud_forensics.py +88 -0
- binalyze_air/commands/event_subscription.py +101 -101
- binalyze_air/commands/evidences.py +918 -988
- binalyze_air/commands/interact.py +172 -58
- binalyze_air/commands/investigation_hub.py +315 -0
- binalyze_air/commands/license.py +183 -0
- binalyze_air/commands/logger.py +126 -0
- binalyze_air/commands/multipart_upload.py +363 -0
- binalyze_air/commands/notifications.py +45 -0
- binalyze_air/commands/organizations.py +200 -221
- binalyze_air/commands/policies.py +175 -203
- binalyze_air/commands/preset_filters.py +55 -0
- binalyze_air/commands/recent_activities.py +32 -0
- binalyze_air/commands/relay_server.py +144 -0
- binalyze_air/commands/settings.py +431 -29
- binalyze_air/commands/tasks.py +95 -56
- binalyze_air/commands/triage.py +224 -360
- binalyze_air/commands/user_management.py +351 -126
- binalyze_air/commands/webhook_executions.py +77 -0
- binalyze_air/config.py +244 -244
- binalyze_air/exceptions.py +49 -49
- binalyze_air/http_client.py +426 -305
- binalyze_air/models/__init__.py +287 -285
- binalyze_air/models/acquisitions.py +365 -250
- binalyze_air/models/api_tokens.py +73 -0
- binalyze_air/models/assets.py +438 -438
- binalyze_air/models/audit.py +247 -272
- binalyze_air/models/audit_logs.py +14 -0
- binalyze_air/models/{authentication.py → auth.py} +69 -69
- binalyze_air/models/auto_asset_tags.py +227 -116
- binalyze_air/models/backup.py +138 -0
- binalyze_air/models/baseline.py +231 -231
- binalyze_air/models/cases.py +275 -275
- binalyze_air/models/cloud_forensics.py +145 -0
- binalyze_air/models/event_subscription.py +170 -171
- binalyze_air/models/evidence.py +65 -65
- binalyze_air/models/evidences.py +367 -348
- binalyze_air/models/interact.py +266 -135
- binalyze_air/models/investigation_hub.py +265 -0
- binalyze_air/models/license.py +150 -0
- binalyze_air/models/logger.py +83 -0
- binalyze_air/models/multipart_upload.py +352 -0
- binalyze_air/models/notifications.py +138 -0
- binalyze_air/models/organizations.py +293 -293
- binalyze_air/models/params.py +153 -127
- binalyze_air/models/policies.py +260 -249
- binalyze_air/models/preset_filters.py +79 -0
- binalyze_air/models/recent_activities.py +70 -0
- binalyze_air/models/relay_server.py +121 -0
- binalyze_air/models/settings.py +538 -84
- binalyze_air/models/tasks.py +215 -149
- binalyze_air/models/triage.py +141 -142
- binalyze_air/models/user_management.py +200 -97
- binalyze_air/models/webhook_executions.py +33 -0
- binalyze_air/queries/__init__.py +121 -133
- binalyze_air/queries/acquisitions.py +155 -155
- binalyze_air/queries/api_tokens.py +46 -0
- binalyze_air/queries/assets.py +186 -105
- binalyze_air/queries/audit.py +400 -416
- binalyze_air/queries/{authentication.py → auth.py} +55 -55
- binalyze_air/queries/auto_asset_tags.py +59 -59
- binalyze_air/queries/backup.py +66 -0
- binalyze_air/queries/baseline.py +21 -185
- binalyze_air/queries/cases.py +292 -292
- binalyze_air/queries/cloud_forensics.py +137 -0
- binalyze_air/queries/event_subscription.py +54 -54
- binalyze_air/queries/evidence.py +139 -139
- binalyze_air/queries/evidences.py +279 -279
- binalyze_air/queries/interact.py +140 -28
- binalyze_air/queries/investigation_hub.py +329 -0
- binalyze_air/queries/license.py +85 -0
- binalyze_air/queries/logger.py +58 -0
- binalyze_air/queries/multipart_upload.py +180 -0
- binalyze_air/queries/notifications.py +71 -0
- binalyze_air/queries/organizations.py +222 -222
- binalyze_air/queries/params.py +154 -115
- binalyze_air/queries/policies.py +149 -149
- binalyze_air/queries/preset_filters.py +60 -0
- binalyze_air/queries/recent_activities.py +44 -0
- binalyze_air/queries/relay_server.py +42 -0
- binalyze_air/queries/settings.py +533 -20
- binalyze_air/queries/tasks.py +125 -81
- binalyze_air/queries/triage.py +230 -230
- binalyze_air/queries/user_management.py +193 -83
- binalyze_air/queries/webhook_executions.py +39 -0
- binalyze_air_sdk-1.0.3.dist-info/METADATA +752 -0
- binalyze_air_sdk-1.0.3.dist-info/RECORD +132 -0
- {binalyze_air_sdk-1.0.2.dist-info → binalyze_air_sdk-1.0.3.dist-info}/WHEEL +1 -1
- binalyze_air/apis/endpoints.py +0 -22
- binalyze_air/apis/evidences.py +0 -216
- binalyze_air/apis/users.py +0 -68
- binalyze_air/commands/users.py +0 -101
- binalyze_air/models/endpoints.py +0 -76
- binalyze_air/models/users.py +0 -82
- binalyze_air/queries/endpoints.py +0 -25
- binalyze_air/queries/users.py +0 -69
- binalyze_air_sdk-1.0.2.dist-info/METADATA +0 -706
- binalyze_air_sdk-1.0.2.dist-info/RECORD +0 -82
- {binalyze_air_sdk-1.0.2.dist-info → binalyze_air_sdk-1.0.3.dist-info}/top_level.txt +0 -0
binalyze_air/models/settings.py
CHANGED
@@ -1,84 +1,538 @@
|
|
1
|
-
"""
|
2
|
-
Settings API models for the Binalyze AIR SDK.
|
3
|
-
"""
|
4
|
-
|
5
|
-
from typing import Optional, Dict, Any
|
6
|
-
from datetime import datetime
|
7
|
-
from enum import Enum
|
8
|
-
from pydantic import Field
|
9
|
-
|
10
|
-
from ..base import AIRBaseModel
|
11
|
-
|
12
|
-
|
13
|
-
class BannerType(str, Enum):
|
14
|
-
"""Banner types."""
|
15
|
-
INFO = "info"
|
16
|
-
WARNING = "warning"
|
17
|
-
ERROR = "error"
|
18
|
-
SUCCESS = "success"
|
19
|
-
MAINTENANCE = "maintenance"
|
20
|
-
|
21
|
-
|
22
|
-
class BannerPosition(str, Enum):
|
23
|
-
"""Banner display positions."""
|
24
|
-
TOP = "top"
|
25
|
-
BOTTOM = "bottom"
|
26
|
-
CENTER = "center"
|
27
|
-
|
28
|
-
|
29
|
-
class
|
30
|
-
"""
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
1
|
+
"""
|
2
|
+
Settings API models for the Binalyze AIR SDK.
|
3
|
+
"""
|
4
|
+
|
5
|
+
from typing import Optional, Dict, Any, List
|
6
|
+
from datetime import datetime
|
7
|
+
from enum import Enum
|
8
|
+
from pydantic import Field
|
9
|
+
|
10
|
+
from ..base import AIRBaseModel
|
11
|
+
|
12
|
+
|
13
|
+
class BannerType(str, Enum):
|
14
|
+
"""Banner types."""
|
15
|
+
INFO = "info"
|
16
|
+
WARNING = "warning"
|
17
|
+
ERROR = "error"
|
18
|
+
SUCCESS = "success"
|
19
|
+
MAINTENANCE = "maintenance"
|
20
|
+
|
21
|
+
|
22
|
+
class BannerPosition(str, Enum):
|
23
|
+
"""Banner display positions."""
|
24
|
+
TOP = "top"
|
25
|
+
BOTTOM = "bottom"
|
26
|
+
CENTER = "center"
|
27
|
+
|
28
|
+
|
29
|
+
class ProxyCertType(str, Enum):
|
30
|
+
"""Proxy certificate types."""
|
31
|
+
PEM = "PEM"
|
32
|
+
DER = "DER"
|
33
|
+
PKCS12 = "PKCS12"
|
34
|
+
|
35
|
+
|
36
|
+
class ProxySettings(AIRBaseModel):
|
37
|
+
"""Proxy settings model."""
|
38
|
+
enabled: bool = False
|
39
|
+
address: Optional[str] = None
|
40
|
+
port: Optional[int] = None
|
41
|
+
username: Optional[str] = None
|
42
|
+
password: Optional[str] = None
|
43
|
+
cert_type: Optional[ProxyCertType] = Field(None, alias="certType")
|
44
|
+
cert_password: Optional[str] = Field(None, alias="certPassword")
|
45
|
+
cert: Optional[str] = None # Certificate file content
|
46
|
+
|
47
|
+
|
48
|
+
class UpdateProxySettingsRequest(AIRBaseModel):
|
49
|
+
"""Request model for updating proxy settings."""
|
50
|
+
enabled: bool
|
51
|
+
address: Optional[str] = None
|
52
|
+
port: Optional[int] = None
|
53
|
+
username: Optional[str] = None
|
54
|
+
password: Optional[str] = None
|
55
|
+
cert_type: Optional[ProxyCertType] = Field(None, alias="certType")
|
56
|
+
cert_password: Optional[str] = Field(None, alias="certPassword")
|
57
|
+
cert: Optional[bytes] = None # Certificate file data
|
58
|
+
|
59
|
+
|
60
|
+
class ValidateProxySettingsRequest(AIRBaseModel):
|
61
|
+
"""Request model for validating proxy settings."""
|
62
|
+
enabled: bool
|
63
|
+
address: Optional[str] = None
|
64
|
+
port: Optional[int] = None
|
65
|
+
username: Optional[str] = None
|
66
|
+
password: Optional[str] = None
|
67
|
+
cert_type: Optional[ProxyCertType] = Field(None, alias="certType")
|
68
|
+
cert_password: Optional[str] = Field(None, alias="certPassword")
|
69
|
+
cert: Optional[bytes] = None # Certificate file data
|
70
|
+
|
71
|
+
|
72
|
+
class SSLCertificateInfo(AIRBaseModel):
|
73
|
+
"""SSL certificate information."""
|
74
|
+
valid_from: Optional[datetime] = Field(None, alias="validFrom")
|
75
|
+
valid_to: Optional[datetime] = Field(None, alias="validTo")
|
76
|
+
issuer: Optional[Dict[str, str]] = None
|
77
|
+
subject: Optional[Dict[str, str]] = None
|
78
|
+
|
79
|
+
|
80
|
+
class SSLSettings(AIRBaseModel):
|
81
|
+
"""SSL settings model."""
|
82
|
+
ca: Optional[SSLCertificateInfo] = None
|
83
|
+
certificate: Optional[SSLCertificateInfo] = None
|
84
|
+
|
85
|
+
|
86
|
+
class SMTPSettings(AIRBaseModel):
|
87
|
+
"""SMTP settings model."""
|
88
|
+
enabled: bool = False
|
89
|
+
use_secure_connection: Optional[bool] = Field(None, alias="useSecureConnection")
|
90
|
+
server: Optional[str] = None
|
91
|
+
port: Optional[int] = None
|
92
|
+
username: Optional[str] = None
|
93
|
+
from_email: Optional[str] = Field(None, alias="fromEmail")
|
94
|
+
|
95
|
+
|
96
|
+
class SSOProvider(AIRBaseModel):
|
97
|
+
"""Single Sign-On provider settings."""
|
98
|
+
enabled: bool = False
|
99
|
+
callback_url: Optional[str] = Field(None, alias="callbackURL")
|
100
|
+
|
101
|
+
|
102
|
+
class OktaSSO(SSOProvider):
|
103
|
+
"""Okta SSO settings."""
|
104
|
+
pass
|
105
|
+
|
106
|
+
|
107
|
+
class AzureSSO(SSOProvider):
|
108
|
+
"""Azure SSO settings."""
|
109
|
+
client_id: Optional[str] = Field(None, alias="clientId")
|
110
|
+
tenant_id: Optional[str] = Field(None, alias="tenantId")
|
111
|
+
client_secret: Optional[str] = Field(None, alias="clientSecret")
|
112
|
+
|
113
|
+
|
114
|
+
class SingleSignOnSettings(AIRBaseModel):
|
115
|
+
"""Single Sign-On settings."""
|
116
|
+
okta: Optional[OktaSSO] = None
|
117
|
+
azure: Optional[AzureSSO] = None
|
118
|
+
|
119
|
+
|
120
|
+
class BackupSchedule(AIRBaseModel):
|
121
|
+
"""Backup schedule settings."""
|
122
|
+
enabled: bool = False
|
123
|
+
keep_last: Optional[int] = Field(None, alias="keepLast")
|
124
|
+
start_date: Optional[datetime] = Field(None, alias="startDate")
|
125
|
+
recurrence: Optional[str] = None
|
126
|
+
|
127
|
+
|
128
|
+
class BackupRestoreSettings(AIRBaseModel):
|
129
|
+
"""Backup and restore settings."""
|
130
|
+
location: Optional[str] = None
|
131
|
+
schedule: Optional[BackupSchedule] = None
|
132
|
+
encryption_enabled: Optional[bool] = Field(None, alias="encryptionEnabled")
|
133
|
+
|
134
|
+
|
135
|
+
class AutoAssetTaggingSettings(AIRBaseModel):
|
136
|
+
"""Auto asset tagging settings."""
|
137
|
+
enabled: bool = False
|
138
|
+
|
139
|
+
|
140
|
+
class IPRestrictionSettings(AIRBaseModel):
|
141
|
+
"""IP restriction settings."""
|
142
|
+
rules: List[Dict[str, Any]] = []
|
143
|
+
|
144
|
+
|
145
|
+
class LocardSettings(AIRBaseModel):
|
146
|
+
"""Locard settings."""
|
147
|
+
organization: Optional[str] = None
|
148
|
+
host: Optional[str] = None
|
149
|
+
username: Optional[str] = None
|
150
|
+
enabled: bool = False
|
151
|
+
|
152
|
+
|
153
|
+
class PolicySettings(AIRBaseModel):
|
154
|
+
"""Policy settings."""
|
155
|
+
enabled: bool = False
|
156
|
+
|
157
|
+
|
158
|
+
class AgentUpdateSettings(AIRBaseModel):
|
159
|
+
"""Agent update settings."""
|
160
|
+
time_frame: Optional[bool] = Field(None, alias="timeFrame")
|
161
|
+
auto_update: Optional[bool] = Field(None, alias="autoUpdate")
|
162
|
+
update_from_cdn: Optional[bool] = Field(None, alias="updateFromCdn")
|
163
|
+
|
164
|
+
|
165
|
+
class AgentSettings(AIRBaseModel):
|
166
|
+
"""Agent settings."""
|
167
|
+
tamper_detection_enabled: Optional[bool] = Field(None, alias="tamperDetectionEnabled")
|
168
|
+
resolve_public_ip_enabled: Optional[bool] = Field(None, alias="resolvePublicIpEnabled")
|
169
|
+
update: Optional[AgentUpdateSettings] = None
|
170
|
+
uninstallation_password_protection_enabled: Optional[bool] = Field(None, alias="uninstallationPasswordProtectionEnabled")
|
171
|
+
|
172
|
+
|
173
|
+
class InterACTSettings(AIRBaseModel):
|
174
|
+
"""InterACT settings."""
|
175
|
+
enabled: bool = False
|
176
|
+
|
177
|
+
|
178
|
+
class RFC3161Settings(AIRBaseModel):
|
179
|
+
"""RFC3161 settings."""
|
180
|
+
enabled: bool = False
|
181
|
+
|
182
|
+
|
183
|
+
class MitreAttackSettings(AIRBaseModel):
|
184
|
+
"""MITRE ATT&CK settings."""
|
185
|
+
version: Optional[str] = None
|
186
|
+
last_sync: Optional[datetime] = Field(None, alias="lastSync")
|
187
|
+
|
188
|
+
|
189
|
+
class FleetAISettings(AIRBaseModel):
|
190
|
+
"""Fleet AI settings."""
|
191
|
+
enabled: bool = False
|
192
|
+
|
193
|
+
|
194
|
+
class AutoUpdateSettings(AIRBaseModel):
|
195
|
+
"""Auto update settings."""
|
196
|
+
update_time_type: Optional[str] = Field(None, alias="updateTimeType")
|
197
|
+
update_time: Optional[str] = Field(None, alias="updateTime")
|
198
|
+
update_day: Optional[str] = Field(None, alias="updateDay")
|
199
|
+
enabled: bool = False
|
200
|
+
|
201
|
+
|
202
|
+
class ActiveDirectorySettings(AIRBaseModel):
|
203
|
+
"""Active Directory settings model."""
|
204
|
+
enabled: bool = False
|
205
|
+
use_secure_connection: Optional[bool] = Field(None, alias="useSecureConnection")
|
206
|
+
query: Optional[str] = None
|
207
|
+
server: Optional[str] = None
|
208
|
+
domain: Optional[str] = None
|
209
|
+
username: Optional[str] = None
|
210
|
+
password: Optional[str] = None
|
211
|
+
|
212
|
+
|
213
|
+
class AllSettings(AIRBaseModel):
|
214
|
+
"""Complete settings model representing all system settings."""
|
215
|
+
|
216
|
+
# Core settings
|
217
|
+
language: Optional[str] = None
|
218
|
+
log_level: Optional[str] = Field(None, alias="logLevel")
|
219
|
+
automatic_error_reporting: Optional[bool] = Field(None, alias="automaticErrorReporting")
|
220
|
+
multi_port_enabled: Optional[bool] = Field(None, alias="multiPortEnabled")
|
221
|
+
enforce_tfa_globally: Optional[bool] = Field(None, alias="enforceTFAGlobally")
|
222
|
+
console_address: Optional[str] = Field(None, alias="consoleAddress")
|
223
|
+
console_id: Optional[str] = Field(None, alias="consoleId")
|
224
|
+
mandatory_case_selection_enabled: Optional[bool] = Field(None, alias="mandatoryCaseSelectionEnabled")
|
225
|
+
statistics_start_date: Optional[datetime] = Field(None, alias="statisticsStartDate")
|
226
|
+
|
227
|
+
# Complex settings objects
|
228
|
+
ssl: Optional[SSLSettings] = None
|
229
|
+
proxy: Optional[ProxySettings] = None
|
230
|
+
smtp: Optional[SMTPSettings] = None
|
231
|
+
active_directory: Optional[ActiveDirectorySettings] = Field(None, alias="activeDirectory")
|
232
|
+
syslog: Optional[Dict[str, Any]] = None
|
233
|
+
single_sign_on: Optional[SingleSignOnSettings] = Field(None, alias="singleSignOn")
|
234
|
+
backup_restore: Optional[BackupRestoreSettings] = Field(None, alias="backupRestore")
|
235
|
+
auto_asset_tagging: Optional[AutoAssetTaggingSettings] = Field(None, alias="autoAssetTagging")
|
236
|
+
ip_restriction: Optional[IPRestrictionSettings] = Field(None, alias="ipRestriction")
|
237
|
+
locard: Optional[LocardSettings] = None
|
238
|
+
banner: Optional[Dict[str, Any]] = None
|
239
|
+
policy: Optional[PolicySettings] = None
|
240
|
+
agent: Optional[AgentSettings] = None
|
241
|
+
interact: Optional[InterACTSettings] = Field(None, alias="interACT")
|
242
|
+
rfc3161: Optional[RFC3161Settings] = None
|
243
|
+
mitre_attack: Optional[MitreAttackSettings] = Field(None, alias="mitreAttack")
|
244
|
+
feature_flags: Optional[Dict[str, Any]] = Field(None, alias="featureFlags")
|
245
|
+
fleet_ai: Optional[FleetAISettings] = Field(None, alias="fleetAi")
|
246
|
+
auto_update: Optional[AutoUpdateSettings] = Field(None, alias="autoUpdate")
|
247
|
+
|
248
|
+
# Metadata
|
249
|
+
created_at: Optional[datetime] = Field(None, alias="createdAt")
|
250
|
+
updated_at: Optional[datetime] = Field(None, alias="updatedAt")
|
251
|
+
id: Optional[str] = Field(None, alias="_id")
|
252
|
+
|
253
|
+
|
254
|
+
class GeneralSettingsRequest(AIRBaseModel):
|
255
|
+
"""Request model for updating general settings."""
|
256
|
+
|
257
|
+
log_level: Optional[str] = Field(None, alias="logLevel")
|
258
|
+
multi_port_enabled: Optional[bool] = Field(None, alias="multiPortEnabled")
|
259
|
+
mandatory_case_selection_enabled: Optional[bool] = Field(None, alias="mandatoryCaseSelectionEnabled")
|
260
|
+
automatic_error_reporting: Optional[bool] = Field(None, alias="automaticErrorReporting")
|
261
|
+
enforce_tfa_globally: Optional[bool] = Field(None, alias="enforceTFAGlobally")
|
262
|
+
console_address: Optional[str] = Field(None, alias="consoleAddress")
|
263
|
+
|
264
|
+
|
265
|
+
class BannerSettings(AIRBaseModel):
|
266
|
+
"""Banner settings model."""
|
267
|
+
|
268
|
+
id: Optional[str] = None
|
269
|
+
enabled: bool = False
|
270
|
+
title: Optional[str] = None
|
271
|
+
message: str
|
272
|
+
banner_type: BannerType = BannerType.INFO
|
273
|
+
position: BannerPosition = BannerPosition.TOP
|
274
|
+
dismissible: bool = True
|
275
|
+
auto_dismiss: bool = False
|
276
|
+
auto_dismiss_timeout: Optional[int] = None # seconds
|
277
|
+
show_from: Optional[datetime] = None
|
278
|
+
show_until: Optional[datetime] = None
|
279
|
+
background_color: Optional[str] = None
|
280
|
+
text_color: Optional[str] = None
|
281
|
+
border_color: Optional[str] = None
|
282
|
+
icon: Optional[str] = None
|
283
|
+
link_url: Optional[str] = None
|
284
|
+
link_text: Optional[str] = None
|
285
|
+
target_roles: Optional[list[str]] = None
|
286
|
+
target_organizations: Optional[list[int]] = None
|
287
|
+
created_by: Optional[str] = None
|
288
|
+
created_at: Optional[datetime] = None
|
289
|
+
updated_at: Optional[datetime] = None
|
290
|
+
organization_id: Optional[int] = None
|
291
|
+
|
292
|
+
|
293
|
+
class UpdateBannerSettingsRequest(AIRBaseModel):
|
294
|
+
"""Request model for updating banner settings with proper API field mapping."""
|
295
|
+
|
296
|
+
enabled: Optional[bool] = None
|
297
|
+
title: Optional[str] = None
|
298
|
+
message: Optional[str] = None
|
299
|
+
# API expects these exact field names - use aliases to map from Python names to API names
|
300
|
+
users_can_dismiss: Optional[bool] = Field(default=None, alias="usersCanDismiss")
|
301
|
+
color: Optional[str] = None # API expects: general, info, maintenance, warning, alert
|
302
|
+
display_time_type: Optional[str] = Field(default=None, alias="displayTimeType") # always or scheduled
|
303
|
+
schedule_times: Optional[Dict[str, Any]] = Field(default=None, alias="scheduleTimes")
|
304
|
+
|
305
|
+
# Legacy/additional fields (may not be used by current API)
|
306
|
+
banner_type: Optional[BannerType] = None
|
307
|
+
position: Optional[BannerPosition] = None
|
308
|
+
dismissible: Optional[bool] = None
|
309
|
+
auto_dismiss: Optional[bool] = None
|
310
|
+
auto_dismiss_timeout: Optional[int] = None
|
311
|
+
show_from: Optional[datetime] = None
|
312
|
+
show_until: Optional[datetime] = None
|
313
|
+
background_color: Optional[str] = None
|
314
|
+
text_color: Optional[str] = None
|
315
|
+
border_color: Optional[str] = None
|
316
|
+
icon: Optional[str] = None
|
317
|
+
link_url: Optional[str] = None
|
318
|
+
link_text: Optional[str] = None
|
319
|
+
target_roles: Optional[list[str]] = None
|
320
|
+
target_organizations: Optional[list[int]] = None
|
321
|
+
|
322
|
+
|
323
|
+
class UpdateActiveDirectorySettingsRequest(AIRBaseModel):
|
324
|
+
"""Request model for updating Active Directory settings."""
|
325
|
+
enabled: bool
|
326
|
+
use_secure_connection: Optional[bool] = Field(None, alias="useSecureConnection")
|
327
|
+
query: Optional[str] = None
|
328
|
+
server: Optional[str] = None
|
329
|
+
domain: Optional[str] = None
|
330
|
+
username: Optional[str] = None
|
331
|
+
password: Optional[str] = None
|
332
|
+
|
333
|
+
|
334
|
+
class ValidateActiveDirectorySettingsRequest(AIRBaseModel):
|
335
|
+
"""Request model for validating Active Directory settings."""
|
336
|
+
server: str
|
337
|
+
domain: str
|
338
|
+
username: str
|
339
|
+
password: str
|
340
|
+
use_secure_connection: Optional[bool] = Field(None, alias="useSecureConnection")
|
341
|
+
|
342
|
+
|
343
|
+
class UpdateSMTPSettingsRequest(AIRBaseModel):
|
344
|
+
"""Request model for updating SMTP settings."""
|
345
|
+
enabled: bool
|
346
|
+
server: Optional[str] = None
|
347
|
+
port: Optional[int] = None
|
348
|
+
use_secure_connection: Optional[bool] = Field(None, alias="useSecureConnection")
|
349
|
+
username: Optional[str] = None
|
350
|
+
password: Optional[str] = None
|
351
|
+
to_address: Optional[str] = Field(None, alias="toAddress")
|
352
|
+
from_email: Optional[str] = Field(None, alias="fromEmail")
|
353
|
+
|
354
|
+
|
355
|
+
class ValidateSMTPSettingsRequest(AIRBaseModel):
|
356
|
+
"""Request model for validating SMTP settings."""
|
357
|
+
enabled: bool
|
358
|
+
server: Optional[str] = None
|
359
|
+
port: Optional[int] = None
|
360
|
+
use_secure_connection: Optional[bool] = Field(None, alias="useSecureConnection")
|
361
|
+
username: Optional[str] = None
|
362
|
+
password: Optional[str] = None
|
363
|
+
to_address: Optional[str] = Field(None, alias="toAddress")
|
364
|
+
from_email: Optional[str] = Field(None, alias="fromEmail")
|
365
|
+
|
366
|
+
|
367
|
+
class UpdateConsoleAddressSettingsRequest(AIRBaseModel):
|
368
|
+
"""Request model for updating console address settings."""
|
369
|
+
console_address: str = Field(alias="consoleAddress")
|
370
|
+
cert_type: Optional[str] = Field(None, alias="certType") # PEM, DER, PKCS12
|
371
|
+
cert_password: Optional[str] = Field(None, alias="certPassword")
|
372
|
+
cert: Optional[bytes] = None # Certificate file data
|
373
|
+
key: Optional[bytes] = None # Key file data
|
374
|
+
|
375
|
+
|
376
|
+
class ValidateConsoleAddressSettingsRequest(AIRBaseModel):
|
377
|
+
"""Request model for validating console address settings."""
|
378
|
+
console_address: str = Field(alias="consoleAddress")
|
379
|
+
|
380
|
+
|
381
|
+
class UpdatePolicySettingsRequest(AIRBaseModel):
|
382
|
+
"""Request model for updating policy settings."""
|
383
|
+
enabled: bool
|
384
|
+
|
385
|
+
|
386
|
+
class UpdateEnforceTFASettingsRequest(AIRBaseModel):
|
387
|
+
"""Request model for updating enforce TFA settings."""
|
388
|
+
enabled: bool
|
389
|
+
|
390
|
+
|
391
|
+
class UpdateAutoAssetTaggingSettingsRequest(AIRBaseModel):
|
392
|
+
"""Request model for updating auto asset tagging settings."""
|
393
|
+
enabled: bool
|
394
|
+
|
395
|
+
|
396
|
+
class UpdateInteractSettingsRequest(AIRBaseModel):
|
397
|
+
"""Request model for updating InterACT settings."""
|
398
|
+
enabled: bool
|
399
|
+
|
400
|
+
|
401
|
+
class UpdateRFC3161SettingsRequest(AIRBaseModel):
|
402
|
+
"""Request model for updating RFC3161 settings."""
|
403
|
+
enabled: bool
|
404
|
+
|
405
|
+
|
406
|
+
class UpdateResponderSettingsRequest(AIRBaseModel):
|
407
|
+
"""Request model for updating responder/agent settings."""
|
408
|
+
enabled: bool
|
409
|
+
|
410
|
+
|
411
|
+
class UpdateLocardSettingsRequest(AIRBaseModel):
|
412
|
+
"""Request model for updating Locard settings."""
|
413
|
+
enabled: bool
|
414
|
+
organization: Optional[str] = None
|
415
|
+
host: Optional[str] = None
|
416
|
+
username: Optional[str] = None
|
417
|
+
|
418
|
+
|
419
|
+
class UpdateUninstallationPasswordProtectionSettingsRequest(AIRBaseModel):
|
420
|
+
"""Request model for updating uninstallation password protection settings."""
|
421
|
+
enabled: bool = Field(alias="enabled")
|
422
|
+
|
423
|
+
|
424
|
+
class UpdateSyslogSettingsRequest(AIRBaseModel):
|
425
|
+
"""Request model for updating syslog settings"""
|
426
|
+
enabled: bool = Field(alias="enabled")
|
427
|
+
server: str = Field(alias="server")
|
428
|
+
port: int = Field(alias="port")
|
429
|
+
protocol: str = Field(alias="protocol") # tcp or udp
|
430
|
+
|
431
|
+
|
432
|
+
class ValidateSyslogSettingsRequest(AIRBaseModel):
|
433
|
+
"""Request model for validating syslog settings"""
|
434
|
+
enabled: bool = Field(alias="enabled")
|
435
|
+
server: str = Field(alias="server")
|
436
|
+
port: int = Field(alias="port")
|
437
|
+
protocol: str = Field(alias="protocol") # tcp or udp
|
438
|
+
|
439
|
+
|
440
|
+
class LocalBackupSettings(AIRBaseModel):
|
441
|
+
"""Local backup settings model"""
|
442
|
+
path: str = Field(alias="path")
|
443
|
+
|
444
|
+
|
445
|
+
class SftpBackupSettings(AIRBaseModel):
|
446
|
+
"""SFTP backup settings model"""
|
447
|
+
host: str = Field(alias="host")
|
448
|
+
port: int = Field(alias="port", default=22)
|
449
|
+
logon_type: str = Field(alias="logonType") # normal or keyfile
|
450
|
+
username: str = Field(alias="username")
|
451
|
+
password: str = Field(alias="password", default="")
|
452
|
+
private_key: str = Field(alias="privateKey", default="")
|
453
|
+
passphrase: str = Field(alias="passphrase", default="")
|
454
|
+
|
455
|
+
|
456
|
+
class BackupScheduleSettings(AIRBaseModel):
|
457
|
+
"""Backup schedule settings model"""
|
458
|
+
enabled: bool = Field(alias="enabled")
|
459
|
+
recurrence: str = Field(alias="recurrence", default="monthly") # daily, weekly, monthly
|
460
|
+
start_date: str = Field(alias="startDate") # ISO datetime
|
461
|
+
keep_last: int = Field(alias="keepLast", default=5)
|
462
|
+
|
463
|
+
|
464
|
+
class UpdateBackupRestoreSettingsRequest(AIRBaseModel):
|
465
|
+
"""Request model for updating backup restore settings"""
|
466
|
+
location: str = Field(alias="location") # local or sftp
|
467
|
+
encryption_enabled: bool = Field(alias="encryptionEnabled", default=False)
|
468
|
+
encryption_password: str = Field(alias="encryptionPassword", default="")
|
469
|
+
local: LocalBackupSettings = Field(alias="local")
|
470
|
+
sftp: SftpBackupSettings = Field(alias="sftp")
|
471
|
+
schedule: BackupScheduleSettings = Field(alias="schedule")
|
472
|
+
|
473
|
+
|
474
|
+
class ValidateBackupSftpSettingsRequest(AIRBaseModel):
|
475
|
+
"""Request model for validating backup SFTP settings"""
|
476
|
+
host: str = Field(alias="host")
|
477
|
+
port: int = Field(alias="port", default=22)
|
478
|
+
path: str = Field(alias="path", default="")
|
479
|
+
logon_type: str = Field(alias="logonType") # normal or keyfile
|
480
|
+
username: str = Field(alias="username")
|
481
|
+
password: str = Field(alias="password", default="")
|
482
|
+
private_key: str = Field(alias="privateKey", default="")
|
483
|
+
passphrase: str = Field(alias="passphrase", default="")
|
484
|
+
|
485
|
+
|
486
|
+
class AzureSsoSettings(AIRBaseModel):
|
487
|
+
"""Azure SSO settings model"""
|
488
|
+
enabled: bool = Field(alias="enabled")
|
489
|
+
tenant_id: str = Field(alias="tenantId")
|
490
|
+
client_id: str = Field(alias="clientId")
|
491
|
+
client_secret: str = Field(alias="clientSecret")
|
492
|
+
|
493
|
+
|
494
|
+
class OktaSsoSettings(AIRBaseModel):
|
495
|
+
"""Okta SSO settings model"""
|
496
|
+
enabled: bool = Field(alias="enabled")
|
497
|
+
entry_point: str = Field(alias="entryPoint")
|
498
|
+
issuer: str = Field(alias="issuer")
|
499
|
+
cert: str = Field(alias="cert")
|
500
|
+
|
501
|
+
|
502
|
+
class UpdateSingleSignOnSettingsRequest(AIRBaseModel):
|
503
|
+
"""Request model for updating single sign-on settings"""
|
504
|
+
azure: AzureSsoSettings = Field(alias="azure")
|
505
|
+
okta: OktaSsoSettings = Field(alias="okta")
|
506
|
+
|
507
|
+
|
508
|
+
class UpdateSslSettingsRequest(AIRBaseModel):
|
509
|
+
"""Request model for updating SSL settings (multipart form data)"""
|
510
|
+
cert_type: str = Field(alias="certType", default="PEM") # PEM or PKCS12
|
511
|
+
cert_password: str = Field(alias="certPassword", default="")
|
512
|
+
# Note: cert and key files handled separately in multipart upload
|
513
|
+
|
514
|
+
|
515
|
+
class ValidateSslSettingsRequest(AIRBaseModel):
|
516
|
+
"""Request model for validating SSL settings (multipart form data)"""
|
517
|
+
cert_type: str = Field(alias="certType", default="PEM") # PEM or PKCS12
|
518
|
+
cert_password: str = Field(alias="certPassword", default="")
|
519
|
+
# Note: cert and key files handled separately in multipart upload
|
520
|
+
|
521
|
+
|
522
|
+
class SslCertificateSubject(AIRBaseModel):
|
523
|
+
"""SSL certificate subject information"""
|
524
|
+
country_name: str = Field(alias="countryName")
|
525
|
+
state_or_province_name: str = Field(alias="stateOrProvinceName")
|
526
|
+
locality_name: str = Field(alias="localityName", default="")
|
527
|
+
organization_name: str = Field(alias="organizationName")
|
528
|
+
organizational_unit_name: str = Field(alias="organizationalUnitName", default="")
|
529
|
+
common_name: str = Field(alias="commonName")
|
530
|
+
email_address: str = Field(alias="emailAddress", default="")
|
531
|
+
|
532
|
+
|
533
|
+
class SslCertificateValidation(AIRBaseModel):
|
534
|
+
"""SSL certificate validation response"""
|
535
|
+
issuer: SslCertificateSubject = Field(alias="issuer")
|
536
|
+
subject: SslCertificateSubject = Field(alias="subject")
|
537
|
+
valid_from: str = Field(alias="validFrom") # ISO datetime
|
538
|
+
valid_to: str = Field(alias="validTo") # ISO datetime
|