centra-sdk 0.1.51.dev0__tar.gz → 0.1.51.dev1__tar.gz
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.
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/PKG-INFO +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/pyproject.toml +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/dependencies.py +28 -2
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/main.py +7 -1
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/__init__.py +3 -0
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/__init__.py +3 -0
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/common/__init__.py +3 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/common/common.py +3 -2
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/common/inventory.py +41 -4
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/config/__init__.py +3 -0
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/config/switches.py +41 -0
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/consumer/__init__.py +3 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/consumer/agents.py +2 -2
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/consumer/enforcement.py +2 -2
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/k8s/__init__.py +3 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/k8s/k8s_inventory.py +6 -5
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/operations/__init__.py +3 -0
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/operations/aws/__init__.py +3 -0
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/operations/aws/accounts.py +144 -0
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/operations/aws/flowlogs.py +83 -0
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/operations/azure/__init__.py +3 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/operations/azure/setup.py +2 -2
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/operations/config.py +2 -2
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/operations/gcp/__init__.py +3 -0
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/operations/gcp/setup.py +142 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/operations/health.py +6 -2
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/operations/info.py +19 -2
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/operations/log.py +2 -2
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/operations/onboard.py +29 -6
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/provider/__init__.py +3 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/provider/inventory.py +5 -5
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/provider/lookup.py +2 -2
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/provider/networks.py +219 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/v1/provider/reveal.py +2 -2
- centra_sdk-0.1.51.dev1/src/centra_sdk/models/connector/v1/provider/switch_observability.py +81 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/models/connector/version.py +2 -2
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/account.py +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/agents.py +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/authentication.py +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/control.py +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/enforcement.py +1 -1
- centra_sdk-0.1.51.dev1/src/centra_sdk/routers/flow_logs.py +55 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/health.py +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/info.py +26 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/inventory.py +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/logging.py +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/onboarding.py +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/operations.py +1 -1
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/routers/setup.py +62 -1
- centra_sdk-0.1.51.dev1/src/centra_sdk/routers/switch_observability.py +52 -0
- centra_sdk-0.1.51.dev1/src/centra_sdk/routers/switches.py +56 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/utils/gc_cli.py +2 -167
- centra_sdk-0.1.51.dev0/src/centra_sdk/models/connector/__init__.py +0 -3
- centra_sdk-0.1.51.dev0/src/centra_sdk/models/connector/v1/__init__.py +0 -3
- centra_sdk-0.1.51.dev0/src/centra_sdk/models/connector/v1/common/__init__.py +0 -3
- centra_sdk-0.1.51.dev0/src/centra_sdk/models/connector/v1/consumer/__init__.py +0 -3
- centra_sdk-0.1.51.dev0/src/centra_sdk/models/connector/v1/k8s/__init__.py +0 -3
- centra_sdk-0.1.51.dev0/src/centra_sdk/models/connector/v1/operations/__init__.py +0 -3
- centra_sdk-0.1.51.dev0/src/centra_sdk/models/connector/v1/operations/aws/__init__.py +0 -3
- centra_sdk-0.1.51.dev0/src/centra_sdk/models/connector/v1/operations/aws/accounts.py +0 -73
- centra_sdk-0.1.51.dev0/src/centra_sdk/models/connector/v1/operations/azure/__init__.py +0 -3
- centra_sdk-0.1.51.dev0/src/centra_sdk/models/connector/v1/provider/__init__.py +0 -3
- centra_sdk-0.1.51.dev0/src/centra_sdk/utils/sdk_version.py +0 -49
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/README.md +0 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/__init__.py +0 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/utils/auth.py +0 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/utils/config_masking.py +0 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/utils/context.py +0 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/utils/gc_handler.py +0 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/utils/gc_serializer.py +0 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/utils/handler_registry.py +0 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/utils/log_handling.py +0 -0
- {centra_sdk-0.1.51.dev0 → centra_sdk-0.1.51.dev1}/src/centra_sdk/utils/option_values_handler.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by fastapi-codegen:
|
|
2
2
|
# filename: connector
|
|
3
|
-
# timestamp: 2026-
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -13,6 +13,7 @@ from starlette.requests import Request
|
|
|
13
13
|
from centra_sdk.utils.gc_serializer import GcSerializer
|
|
14
14
|
|
|
15
15
|
from .models.connector.v1.common.inventory import InventoryItem
|
|
16
|
+
from .models.connector.v1.config.switches import SwitchesConfig
|
|
16
17
|
from .models.connector.v1.consumer.agents import AgentsInfo
|
|
17
18
|
from .models.connector.v1.consumer.enforcement import (
|
|
18
19
|
Action,
|
|
@@ -21,9 +22,21 @@ from .models.connector.v1.consumer.enforcement import (
|
|
|
21
22
|
)
|
|
22
23
|
from .models.connector.v1.operations.aws.accounts import (
|
|
23
24
|
AccountRegistration,
|
|
25
|
+
ArtifactRequest,
|
|
24
26
|
AssumeRoleTemplateRequest,
|
|
25
27
|
InvalidAccountsResponse,
|
|
28
|
+
InvalidOnboardingConfigResponse,
|
|
29
|
+
InvalidOrganizationResponse,
|
|
30
|
+
OrganizationRegistration,
|
|
31
|
+
OrganizationRegistrationErrorResponse,
|
|
32
|
+
OUReaderRolePermissionError,
|
|
26
33
|
RegisteredAccountsResponse,
|
|
34
|
+
RegisteredOrganizationResponse,
|
|
35
|
+
)
|
|
36
|
+
from .models.connector.v1.operations.aws.flowlogs import (
|
|
37
|
+
FlowlogBucketMetadataErrorResponse,
|
|
38
|
+
FlowlogBucketMetadataResponse,
|
|
39
|
+
FlowlogConfig,
|
|
27
40
|
)
|
|
28
41
|
from .models.connector.v1.operations.azure.setup import (
|
|
29
42
|
Action,
|
|
@@ -40,12 +53,23 @@ from .models.connector.v1.operations.config import (
|
|
|
40
53
|
InternalConfig,
|
|
41
54
|
InternalConfigMetadata,
|
|
42
55
|
)
|
|
56
|
+
from .models.connector.v1.operations.gcp.setup import (
|
|
57
|
+
Action,
|
|
58
|
+
BundleRequest,
|
|
59
|
+
GCPValidationError,
|
|
60
|
+
ServiceAccountValidationRequest,
|
|
61
|
+
ServiceAccountValidationSuccess,
|
|
62
|
+
)
|
|
43
63
|
from .models.connector.v1.operations.health import (
|
|
44
64
|
V1OperationsFlagsGetResponse,
|
|
45
65
|
V1OperationsHealthGetResponse,
|
|
46
66
|
V1OperationsMetricsGetResponse,
|
|
47
67
|
)
|
|
48
|
-
from .models.connector.v1.operations.info import
|
|
68
|
+
from .models.connector.v1.operations.info import (
|
|
69
|
+
EnvUnits,
|
|
70
|
+
IntegrationEnvInfo,
|
|
71
|
+
IntegrationInfo,
|
|
72
|
+
)
|
|
49
73
|
from .models.connector.v1.operations.log import LogStart, LogStatus
|
|
50
74
|
from .models.connector.v1.operations.onboard import (
|
|
51
75
|
Onboard,
|
|
@@ -62,6 +86,8 @@ from .models.connector.v1.provider.inventory import (
|
|
|
62
86
|
V1ProviderInventoryIdAssetsAssetTypePostResponse1,
|
|
63
87
|
)
|
|
64
88
|
from .models.connector.v1.provider.lookup import LookupRequest
|
|
89
|
+
from .models.connector.v1.provider.networks import ErrorResponse, Networks
|
|
90
|
+
from .models.connector.v1.provider.switch_observability import SwitchObservability
|
|
65
91
|
from .models.connector.version import (
|
|
66
92
|
BadRequestError,
|
|
67
93
|
LoginRequest,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by fastapi-codegen:
|
|
2
2
|
# filename: connector
|
|
3
|
-
# timestamp: 2026-
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -16,6 +16,7 @@ from .routers import (
|
|
|
16
16
|
authentication,
|
|
17
17
|
control,
|
|
18
18
|
enforcement,
|
|
19
|
+
flow_logs,
|
|
19
20
|
health,
|
|
20
21
|
info,
|
|
21
22
|
inventory,
|
|
@@ -23,6 +24,8 @@ from .routers import (
|
|
|
23
24
|
onboarding,
|
|
24
25
|
operations,
|
|
25
26
|
setup,
|
|
27
|
+
switch_observability,
|
|
28
|
+
switches,
|
|
26
29
|
)
|
|
27
30
|
|
|
28
31
|
|
|
@@ -51,6 +54,7 @@ app.include_router(agents.router)
|
|
|
51
54
|
app.include_router(authentication.router)
|
|
52
55
|
app.include_router(control.router)
|
|
53
56
|
app.include_router(enforcement.router)
|
|
57
|
+
app.include_router(flow_logs.router)
|
|
54
58
|
app.include_router(health.router)
|
|
55
59
|
app.include_router(info.router)
|
|
56
60
|
app.include_router(inventory.router)
|
|
@@ -58,3 +62,5 @@ app.include_router(logging.router)
|
|
|
58
62
|
app.include_router(onboarding.router)
|
|
59
63
|
app.include_router(operations.router)
|
|
60
64
|
app.include_router(setup.router)
|
|
65
|
+
app.include_router(switch_observability.router)
|
|
66
|
+
app.include_router(switches.router)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by fastapi-codegen:
|
|
2
|
-
# filename: /Users/
|
|
3
|
-
# timestamp: 2026-
|
|
2
|
+
# filename: /Users/ivasylen/Code/contracts/guardicore/connector
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -15,6 +15,7 @@ from centra_sdk.utils.gc_serializer import GcSerializer
|
|
|
15
15
|
class Connector(Enum):
|
|
16
16
|
CLOUD_AZURE = 'cloud_azure'
|
|
17
17
|
CLOUD_AWS = 'cloud_aws'
|
|
18
|
+
CLOUD_GCP = 'cloud_gcp'
|
|
18
19
|
PACKETFENCE = 'packetfence'
|
|
19
20
|
ALGOSEC = 'algosec'
|
|
20
21
|
PENSANDO = 'pensando'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by fastapi-codegen:
|
|
2
|
-
# filename: /Users/
|
|
3
|
-
# timestamp: 2026-
|
|
2
|
+
# filename: /Users/ivasylen/Code/contracts/guardicore/connector
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -18,13 +18,28 @@ class ItemType(Enum):
|
|
|
18
18
|
ASSET = 'asset'
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
class
|
|
21
|
+
class LabelInventoryItem(BaseModel, GcSerializer):
|
|
22
22
|
model_config = ConfigDict(
|
|
23
23
|
populate_by_name=True,
|
|
24
24
|
from_attributes=True,
|
|
25
25
|
)
|
|
26
26
|
key: str
|
|
27
27
|
value: str
|
|
28
|
+
acls: Optional[str] = None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class AccessListMap(Enum):
|
|
32
|
+
Y = 'Y'
|
|
33
|
+
N = 'N'
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class AccessListMappingEntry(BaseModel, GcSerializer):
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
from_attributes=True,
|
|
40
|
+
)
|
|
41
|
+
accesslist: str = Field(..., description='access list specification')
|
|
42
|
+
role: str = Field(..., description='device role name')
|
|
28
43
|
|
|
29
44
|
|
|
30
45
|
class Type(Enum):
|
|
@@ -105,6 +120,7 @@ class NetworkInterfaceData(BaseModel, GcSerializer):
|
|
|
105
120
|
None, alias='private-ip-addresses'
|
|
106
121
|
)
|
|
107
122
|
public_ip_addresses: Optional[List[str]] = Field(None, alias='public-ip-addresses')
|
|
123
|
+
switch_id: Optional[str] = Field(None, alias='switch-id')
|
|
108
124
|
vlan: Optional[int] = None
|
|
109
125
|
vrf: Optional[str] = None
|
|
110
126
|
|
|
@@ -187,6 +203,26 @@ class HardwareInfo(BaseModel, GcSerializer):
|
|
|
187
203
|
bios_uuid: Optional[str] = Field(None, alias='bios-uuid')
|
|
188
204
|
|
|
189
205
|
|
|
206
|
+
class SwitchInventoryItem(BaseModel, GcSerializer):
|
|
207
|
+
model_config = ConfigDict(
|
|
208
|
+
populate_by_name=True,
|
|
209
|
+
from_attributes=True,
|
|
210
|
+
)
|
|
211
|
+
id: str = Field(..., description='switch identifier (IP address or CIDR range)')
|
|
212
|
+
description: str = Field(..., description='switch description')
|
|
213
|
+
type: str = Field(..., description='switch type (e.g., Cisco::Cisco_IOS_15_5)')
|
|
214
|
+
AccessListMap_1: Optional[AccessListMap] = Field(
|
|
215
|
+
None, alias='AccessListMap', description='access list mapping enabled'
|
|
216
|
+
)
|
|
217
|
+
AccessListMapping: Optional[List[AccessListMappingEntry]] = Field(
|
|
218
|
+
None, description='access list mappings for roles'
|
|
219
|
+
)
|
|
220
|
+
device_type_access_lists: Optional[Dict[str, str]] = Field(
|
|
221
|
+
None,
|
|
222
|
+
description='dynamic device-type-specific access list mappings (e.g., Apple_OSAccessList, etc.)',
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
|
|
190
226
|
class VMData(BaseModel, GcSerializer):
|
|
191
227
|
model_config = ConfigDict(
|
|
192
228
|
populate_by_name=True,
|
|
@@ -264,7 +300,8 @@ class InventoryItem(BaseModel, GcSerializer):
|
|
|
264
300
|
description='additional entity data depending on its type',
|
|
265
301
|
union_mode='left_to_right',
|
|
266
302
|
)
|
|
267
|
-
labels: Optional[List[
|
|
303
|
+
labels: Optional[List[LabelInventoryItem]] = None
|
|
304
|
+
bypass_acls: Optional[str] = Field(None, alias='bypass-acls')
|
|
268
305
|
metadata_attributes: Optional[Dict[str, Any]] = Field(
|
|
269
306
|
None, alias='metadata-attributes'
|
|
270
307
|
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# generated by fastapi-codegen:
|
|
2
|
+
# filename: /Users/ivasylen/Code/contracts/guardicore/connector
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
|
|
9
|
+
from pydantic import BaseModel, ConfigDict, Field, RootModel
|
|
10
|
+
|
|
11
|
+
from centra_sdk.utils.gc_serializer import GcSerializer
|
|
12
|
+
|
|
13
|
+
from ..common.inventory import SwitchInventoryItem
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Switches(RootModel[List[SwitchInventoryItem]]):
|
|
17
|
+
model_config = ConfigDict(
|
|
18
|
+
populate_by_name=True,
|
|
19
|
+
from_attributes=True,
|
|
20
|
+
)
|
|
21
|
+
root: List[SwitchInventoryItem] = Field(
|
|
22
|
+
..., description='List of switches for pagination compatibility'
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
def __getattr__(self, attr: str):
|
|
26
|
+
return getattr(self.root, attr)
|
|
27
|
+
|
|
28
|
+
def __iter__(self):
|
|
29
|
+
for item in self.root:
|
|
30
|
+
yield item
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class SwitchesConfig(BaseModel, GcSerializer):
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
from_attributes=True,
|
|
37
|
+
)
|
|
38
|
+
items: Switches = Field(..., description='Array of switch configuration items')
|
|
39
|
+
prev_cursor: Optional[int] = Field(0, description='Previous cursor position')
|
|
40
|
+
status: Optional[int] = Field(200, description='HTTP status code')
|
|
41
|
+
total_count: Optional[int] = Field(None, description='Total count of switch items')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by fastapi-codegen:
|
|
2
|
-
# filename: /Users/
|
|
3
|
-
# timestamp: 2026-
|
|
2
|
+
# filename: /Users/ivasylen/Code/contracts/guardicore/connector
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by fastapi-codegen:
|
|
2
|
-
# filename: /Users/
|
|
3
|
-
# timestamp: 2026-
|
|
2
|
+
# filename: /Users/ivasylen/Code/contracts/guardicore/connector
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# generated by fastapi-codegen:
|
|
2
|
-
# filename: /Users/
|
|
3
|
-
# timestamp: 2026-
|
|
2
|
+
# filename: /Users/ivasylen/Code/contracts/guardicore/connector
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
7
|
from enum import Enum
|
|
8
|
-
from typing import Dict, List, Optional, Union
|
|
8
|
+
from typing import Any, Dict, List, Optional, Union
|
|
9
9
|
|
|
10
10
|
from pydantic import BaseModel, ConfigDict, Field
|
|
11
11
|
|
|
@@ -76,6 +76,7 @@ class CniType(Enum):
|
|
|
76
76
|
OVN = 'OVN'
|
|
77
77
|
AZURECNI = 'azurecni'
|
|
78
78
|
AMAZONVPC = 'amazonvpc'
|
|
79
|
+
CILIUM = 'cilium'
|
|
79
80
|
|
|
80
81
|
|
|
81
82
|
class K8SClusterSpec(BaseModel, GcSerializer):
|
|
@@ -126,7 +127,7 @@ class KubernetesServicePort(BaseModel, GcSerializer):
|
|
|
126
127
|
node_port: Optional[int] = None
|
|
127
128
|
port: Optional[int] = None
|
|
128
129
|
protocol: Optional[str] = None
|
|
129
|
-
target_port: Optional[str] = None
|
|
130
|
+
target_port: Optional[Union[str, int]] = None
|
|
130
131
|
|
|
131
132
|
|
|
132
133
|
class KubernetesOwnerReference(BaseModel, GcSerializer):
|
|
@@ -176,7 +177,7 @@ class K8SControllerSpec(BaseModel, GcSerializer):
|
|
|
176
177
|
)
|
|
177
178
|
kind: Kind1
|
|
178
179
|
type: Optional[Type] = Field(None, description='type of resource')
|
|
179
|
-
metadata: Optional[Dict[str,
|
|
180
|
+
metadata: Optional[Dict[str, Any]] = None
|
|
180
181
|
selector: Optional[KubernetesV1LabelSelector] = None
|
|
181
182
|
owner_references: Optional[List[KubernetesOwnerReference]] = None
|
|
182
183
|
dependants_labels: Optional[Dict[str, str]] = None
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# generated by fastapi-codegen:
|
|
2
|
+
# filename: /Users/ivasylen/Code/contracts/guardicore/connector
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import List, Optional
|
|
9
|
+
|
|
10
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from centra_sdk.utils.gc_serializer import GcSerializer
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Action(Enum):
|
|
16
|
+
REGISTER = 'register'
|
|
17
|
+
TEST = 'test'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class AccountRegistration(BaseModel, GcSerializer):
|
|
21
|
+
model_config = ConfigDict(
|
|
22
|
+
populate_by_name=True,
|
|
23
|
+
from_attributes=True,
|
|
24
|
+
)
|
|
25
|
+
assume_role_name: str = Field(
|
|
26
|
+
..., alias='assume-role-name', description='Name of the Assume role'
|
|
27
|
+
)
|
|
28
|
+
account_ids: List[str] = Field(
|
|
29
|
+
..., alias='account-ids', description='List of AWS account IDs'
|
|
30
|
+
)
|
|
31
|
+
action: Optional[Action] = Field(
|
|
32
|
+
'register',
|
|
33
|
+
description='Action to perform - register accounts or test assume role existence',
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class InvalidAccountsResponse(BaseModel, GcSerializer):
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
from_attributes=True,
|
|
41
|
+
)
|
|
42
|
+
invalid_accounts: List[str] = Field(
|
|
43
|
+
..., alias='invalid-accounts', description='List of invalid AWS account IDs'
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class InvalidOnboardingConfigResponse(BaseModel, GcSerializer):
|
|
48
|
+
model_config = ConfigDict(
|
|
49
|
+
populate_by_name=True,
|
|
50
|
+
from_attributes=True,
|
|
51
|
+
)
|
|
52
|
+
message: str = Field(..., description='Invalid onboarding configuration')
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class RegisteredAccountsResponse(BaseModel, GcSerializer):
|
|
56
|
+
model_config = ConfigDict(
|
|
57
|
+
populate_by_name=True,
|
|
58
|
+
from_attributes=True,
|
|
59
|
+
)
|
|
60
|
+
message: str = Field(..., description='All accounts registered successfully')
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class OrganizationRegistration(BaseModel, GcSerializer):
|
|
64
|
+
model_config = ConfigDict(
|
|
65
|
+
populate_by_name=True,
|
|
66
|
+
from_attributes=True,
|
|
67
|
+
)
|
|
68
|
+
assume_role_name: str = Field(
|
|
69
|
+
..., alias='assume-role-name', description='Name of the Assume role'
|
|
70
|
+
)
|
|
71
|
+
ou_role_arn: str = Field(
|
|
72
|
+
...,
|
|
73
|
+
alias='ou-role-arn',
|
|
74
|
+
description='ARN of the OU role used to register the AWS organization',
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class RegisteredOrganizationResponse(BaseModel, GcSerializer):
|
|
79
|
+
model_config = ConfigDict(
|
|
80
|
+
populate_by_name=True,
|
|
81
|
+
from_attributes=True,
|
|
82
|
+
)
|
|
83
|
+
message: str = Field(..., description='Organization registered successfully')
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class InvalidOrganizationResponse(BaseModel, GcSerializer):
|
|
87
|
+
model_config = ConfigDict(
|
|
88
|
+
populate_by_name=True,
|
|
89
|
+
from_attributes=True,
|
|
90
|
+
)
|
|
91
|
+
message: str = Field(..., description='Invalid OU role ARN provided')
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class OUReaderRolePermissionError(BaseModel, GcSerializer):
|
|
95
|
+
model_config = ConfigDict(
|
|
96
|
+
populate_by_name=True,
|
|
97
|
+
from_attributes=True,
|
|
98
|
+
)
|
|
99
|
+
message: str = Field(
|
|
100
|
+
...,
|
|
101
|
+
description='Error message describing permission or delegation issues with the OU reader role',
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class OrganizationRegistrationErrorResponse(BaseModel, GcSerializer):
|
|
106
|
+
model_config = ConfigDict(
|
|
107
|
+
populate_by_name=True,
|
|
108
|
+
from_attributes=True,
|
|
109
|
+
)
|
|
110
|
+
message: str = Field(
|
|
111
|
+
...,
|
|
112
|
+
description='Error message when there are no accounts to register or the assume role is not present in any of the accounts',
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class OperationMode(Enum):
|
|
117
|
+
REVEAL = 'reveal'
|
|
118
|
+
REVEAL_AND_ENFORCEMENT = 'reveal_and_enforcement'
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class Scope(Enum):
|
|
122
|
+
ORG_UNITS = 'org_units'
|
|
123
|
+
ACCOUNTS = 'accounts'
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class AssumeRoleTemplateRequest(BaseModel, GcSerializer):
|
|
127
|
+
model_config = ConfigDict(
|
|
128
|
+
populate_by_name=True,
|
|
129
|
+
from_attributes=True,
|
|
130
|
+
)
|
|
131
|
+
operation_mode: OperationMode = Field(
|
|
132
|
+
..., alias='operation-mode', description='Operation mode for the templates'
|
|
133
|
+
)
|
|
134
|
+
scope: Scope = Field(..., description='Scope for the templates')
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
class ArtifactRequest(BaseModel, GcSerializer):
|
|
138
|
+
model_config = ConfigDict(
|
|
139
|
+
populate_by_name=True,
|
|
140
|
+
from_attributes=True,
|
|
141
|
+
)
|
|
142
|
+
operation_mode: OperationMode = Field(
|
|
143
|
+
..., alias='operation-mode', description='Operation mode for the templates'
|
|
144
|
+
)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# generated by fastapi-codegen:
|
|
2
|
+
# filename: /Users/ivasylen/Code/contracts/guardicore/connector
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import List, Optional
|
|
9
|
+
|
|
10
|
+
from pydantic import BaseModel, ConfigDict, Field, RootModel
|
|
11
|
+
|
|
12
|
+
from centra_sdk.utils.gc_serializer import GcSerializer
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class FlowlogsPartition(Enum):
|
|
16
|
+
DAILY = 'daily'
|
|
17
|
+
HOURLY = 'hourly'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class BucketConfig(BaseModel, GcSerializer):
|
|
21
|
+
model_config = ConfigDict(
|
|
22
|
+
populate_by_name=True,
|
|
23
|
+
from_attributes=True,
|
|
24
|
+
)
|
|
25
|
+
bucket_name: str = Field(
|
|
26
|
+
..., alias='bucket-name', description='Name of the S3 bucket'
|
|
27
|
+
)
|
|
28
|
+
flowlogs_path_prefix: Optional[str] = Field(
|
|
29
|
+
'',
|
|
30
|
+
alias='flowlogs-path-prefix',
|
|
31
|
+
description='Path prefix for flow logs within the bucket',
|
|
32
|
+
)
|
|
33
|
+
hive_compatible_partition: Optional[bool] = Field(
|
|
34
|
+
False,
|
|
35
|
+
alias='hive-compatible-partition',
|
|
36
|
+
description='Whether the bucket uses Hive-compatible partitioning',
|
|
37
|
+
)
|
|
38
|
+
flowlogs_partition: Optional[FlowlogsPartition] = Field(
|
|
39
|
+
'daily',
|
|
40
|
+
alias='flowlogs-partition',
|
|
41
|
+
description='Partition granularity for flow logs',
|
|
42
|
+
)
|
|
43
|
+
bucket_region: Optional[str] = Field(
|
|
44
|
+
'us-east-1',
|
|
45
|
+
alias='bucket-region',
|
|
46
|
+
description='AWS region where the flow log bucket is located',
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class FlowlogConfig(RootModel[List[BucketConfig]]):
|
|
51
|
+
model_config = ConfigDict(
|
|
52
|
+
populate_by_name=True,
|
|
53
|
+
from_attributes=True,
|
|
54
|
+
)
|
|
55
|
+
root: List[BucketConfig] = Field(
|
|
56
|
+
..., description='List of bucket flow log configurations', min_length=1
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
def __getattr__(self, attr: str):
|
|
60
|
+
return getattr(self.root, attr)
|
|
61
|
+
|
|
62
|
+
def __iter__(self):
|
|
63
|
+
for item in self.root:
|
|
64
|
+
yield item
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class FlowlogBucketMetadataResponse(BaseModel, GcSerializer):
|
|
68
|
+
model_config = ConfigDict(
|
|
69
|
+
populate_by_name=True,
|
|
70
|
+
from_attributes=True,
|
|
71
|
+
)
|
|
72
|
+
message: str = Field(..., description='Flowlog bucket metadata stored successfully')
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class FlowlogBucketMetadataErrorResponse(BaseModel, GcSerializer):
|
|
76
|
+
model_config = ConfigDict(
|
|
77
|
+
populate_by_name=True,
|
|
78
|
+
from_attributes=True,
|
|
79
|
+
)
|
|
80
|
+
error: str = Field(
|
|
81
|
+
...,
|
|
82
|
+
description='Error message describing which bucket and field failed validation',
|
|
83
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by fastapi-codegen:
|
|
2
|
-
# filename: /Users/
|
|
3
|
-
# timestamp: 2026-
|
|
2
|
+
# filename: /Users/ivasylen/Code/contracts/guardicore/connector
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by fastapi-codegen:
|
|
2
|
-
# filename: /Users/
|
|
3
|
-
# timestamp: 2026-
|
|
2
|
+
# filename: /Users/ivasylen/Code/contracts/guardicore/connector
|
|
3
|
+
# timestamp: 2026-05-29T08:45:26+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|