ark-sdk-python 2.0.14__py3-none-any.whl → 2.1.1__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.
- ark_sdk_python/actions/ark_profiles_action.py +0 -1
- ark_sdk_python/actions/ark_service_exec_action.py +3 -1
- ark_sdk_python/ark.py +1 -2
- ark_sdk_python/ark_api.py +107 -43
- ark_sdk_python/auth/identity/ark_identity.py +4 -2
- ark_sdk_python/auth/identity/ark_identity_fqdn_resolver.py +3 -6
- ark_sdk_python/cli_services/sia/common/ark_sia_base_policies_editor_service.py +0 -1
- ark_sdk_python/cli_services/sia/vm/ark_sia_vm_policies_editor_service.py +8 -2
- ark_sdk_python/common/__init__.py +4 -0
- ark_sdk_python/common/ark_async_client.py +7 -1
- ark_sdk_python/common/ark_async_request.py +2 -2
- ark_sdk_python/common/ark_client.py +3 -3
- ark_sdk_python/common/ark_ip_utils.py +9 -0
- ark_sdk_python/common/ark_pollers.py +2 -2
- ark_sdk_python/common/ark_user_agent.py +7 -0
- ark_sdk_python/common/ark_version.py +1 -0
- ark_sdk_python/examples/requests/uap_sca_add_policy_request.json +61 -0
- ark_sdk_python/examples/requests/uap_sia_db_add_policy_request.json +209 -0
- ark_sdk_python/examples/requests/uap_sia_vm_add_policy_request.json +88 -0
- ark_sdk_python/models/actions/services/__init__.py +2 -0
- ark_sdk_python/models/actions/services/ark_identity_exec_action_consts.py +4 -0
- ark_sdk_python/models/actions/services/ark_sia_exec_action_consts.py +117 -47
- ark_sdk_python/models/actions/services/ark_uap_exec_action_consts.py +86 -0
- ark_sdk_python/models/ark_model.py +2 -0
- ark_sdk_python/models/auth/ark_auth_method.py +5 -7
- ark_sdk_python/models/common/__init__.py +2 -0
- ark_sdk_python/models/common/ark_category_type.py +7 -0
- ark_sdk_python/models/common/ark_connector_type.py +1 -1
- ark_sdk_python/models/common/ark_workspace_type.py +1 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_account.py +15 -17
- ark_sdk_python/models/services/pcloud/platforms/__init__.py +2 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_duplicate_target_platform.py +1 -1
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_duplicated_target_platform_info.py +1 -1
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_platform.py +4 -4
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_platform_details.py +16 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_platforms_filter.py +3 -3
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_target_platform.py +27 -27
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_target_platforms_filter.py +10 -10
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_add_safe_member.py +3 -3
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safe.py +9 -9
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safe_member.py +2 -2
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safe_members_filter.py +5 -5
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safes_filters.py +4 -4
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_update_safe_member.py +3 -3
- ark_sdk_python/models/services/sia/access/ark_sia_get_connector_setup_script.py +40 -1
- ark_sdk_python/models/services/sia/access/ark_sia_test_connector_reachability.py +32 -0
- ark_sdk_python/models/services/sia/access/ark_sia_uninstall_connector.py +2 -1
- ark_sdk_python/models/services/sia/policies/common/ark_sia_user_data.py +4 -4
- ark_sdk_python/models/services/sia/settings/__init__.py +44 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_adb_mfa_caching.py +12 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_certificate_validation.py +9 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_feature_name.py +16 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_get_setting.py +8 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_k8s_mfa_caching.py +11 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_list_settings.py +7 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_logon_sequence.py +9 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_rdp_file_transfer.py +9 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_rdp_keyboard_layout.py +9 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_rdp_mfa_caching.py +12 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_rdp_recording.py +9 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_rdp_token_mfa_caching.py +12 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_set_setting.py +10 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_set_settings.py +44 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_setting_types.py +29 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_settings.py +36 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_ssh_command_audit.py +10 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_ssh_mfa_caching.py +10 -0
- ark_sdk_python/models/services/sia/settings/ark_sia_settings_standing_access.py +15 -0
- ark_sdk_python/models/services/sia/ssh_ca/__init__.py +2 -2
- ark_sdk_python/models/services/sia/ssh_ca/{ark_sia_get_ssh_public_key.py → ark_sia_ssh_ca_get_ssh_public_key.py} +1 -1
- ark_sdk_python/models/services/uap/__init__.py +0 -0
- ark_sdk_python/models/services/uap/common/__init__.py +53 -0
- ark_sdk_python/models/services/uap/common/ark_uap_change_info.py +12 -0
- ark_sdk_python/models/services/uap/common/ark_uap_common_access_policy.py +20 -0
- ark_sdk_python/models/services/uap/common/ark_uap_conditions.py +11 -0
- ark_sdk_python/models/services/uap/common/ark_uap_delegation_classification.py +6 -0
- ark_sdk_python/models/services/uap/common/ark_uap_delete_policy_request.py +7 -0
- ark_sdk_python/models/services/uap/common/ark_uap_get_access_policies_request.py +127 -0
- ark_sdk_python/models/services/uap/common/ark_uap_get_access_policies_response.py +12 -0
- ark_sdk_python/models/services/uap/common/ark_uap_get_policy_by_name_request.py +7 -0
- ark_sdk_python/models/services/uap/common/ark_uap_get_policy_request.py +7 -0
- ark_sdk_python/models/services/uap/common/ark_uap_get_policy_status.py +10 -0
- ark_sdk_python/models/services/uap/common/ark_uap_metadata.py +40 -0
- ark_sdk_python/models/services/uap/common/ark_uap_policies_stats.py +13 -0
- ark_sdk_python/models/services/uap/common/ark_uap_policy_entitlement.py +17 -0
- ark_sdk_python/models/services/uap/common/ark_uap_policy_status.py +13 -0
- ark_sdk_python/models/services/uap/common/ark_uap_policy_type.py +6 -0
- ark_sdk_python/models/services/uap/common/ark_uap_principal.py +27 -0
- ark_sdk_python/models/services/uap/common/ark_uap_principal_type.py +7 -0
- ark_sdk_python/models/services/uap/common/ark_uap_response.py +7 -0
- ark_sdk_python/models/services/uap/common/ark_uap_status_type.py +10 -0
- ark_sdk_python/models/services/uap/common/ark_uap_time_condition.py +13 -0
- ark_sdk_python/models/services/uap/common/ark_uap_time_frame.py +24 -0
- ark_sdk_python/models/services/uap/sca/__init__.py +43 -0
- ark_sdk_python/models/services/uap/sca/ark_uap_sca_cloud_console_access_policy.py +83 -0
- ark_sdk_python/models/services/uap/sca/ark_uap_sca_cloud_invalid_resources.py +30 -0
- ark_sdk_python/models/services/uap/sca/ark_uap_sca_conditions.py +10 -0
- ark_sdk_python/models/services/uap/sca/ark_uap_sca_filters.py +45 -0
- ark_sdk_python/models/services/uap/sca/ark_uap_sca_targets.py +75 -0
- ark_sdk_python/models/services/uap/sia/__init__.py +0 -0
- ark_sdk_python/models/services/uap/sia/common/__init__.py +7 -0
- ark_sdk_python/models/services/uap/sia/common/ark_uap_sia_common_access_policy.py +9 -0
- ark_sdk_python/models/services/uap/sia/common/ark_uap_sia_common_conditions.py +18 -0
- ark_sdk_python/models/services/uap/sia/db/__init__.py +37 -0
- ark_sdk_python/models/services/uap/sia/db/ark_uap_sia_db_access_policy.py +51 -0
- ark_sdk_python/models/services/uap/sia/db/ark_uap_sia_db_authentication_method.py +10 -0
- ark_sdk_python/models/services/uap/sia/db/ark_uap_sia_db_consts.py +5 -0
- ark_sdk_python/models/services/uap/sia/db/ark_uap_sia_db_filters.py +40 -0
- ark_sdk_python/models/services/uap/sia/db/ark_uap_sia_db_instance_target.py +118 -0
- ark_sdk_python/models/services/uap/sia/db/ark_uap_sia_db_profiles.py +280 -0
- ark_sdk_python/models/services/uap/sia/db/ark_uap_sia_db_targets.py +29 -0
- ark_sdk_python/models/services/uap/sia/vm/__init__.py +14 -0
- ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_access_policy.py +78 -0
- ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_behavior.py +64 -0
- ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_consts.py +4 -0
- ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_filters.py +40 -0
- ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_targets.py +138 -0
- ark_sdk_python/models/services/uap/utils/__init__.py +6 -0
- ark_sdk_python/models/services/uap/utils/ark_uap_policies_workspace_type_serializer.py +20 -0
- ark_sdk_python/services/__init__.py +0 -1
- ark_sdk_python/services/pcloud/__init__.py +3 -0
- ark_sdk_python/services/pcloud/applications/ark_pcloud_applications_service.py +1 -1
- ark_sdk_python/services/pcloud/common/ark_pcloud_base_service.py +2 -2
- ark_sdk_python/services/pcloud/platforms/ark_pcloud_platforms_service.py +12 -6
- ark_sdk_python/services/sia/ark_sia_api.py +28 -16
- ark_sdk_python/services/sia/secrets/vm/ark_sia_vm_secrets_service.py +3 -3
- ark_sdk_python/services/sia/settings/__init__.py +3 -0
- ark_sdk_python/services/sia/settings/ark_sia_settings_service.py +162 -0
- ark_sdk_python/services/sia/ssh_ca/ark_sia_ssh_ca_service.py +5 -5
- ark_sdk_python/services/sia/sso/ark_sia_sso_service.py +1 -1
- ark_sdk_python/services/uap/__init__.py +3 -0
- ark_sdk_python/services/uap/ark_uap_service.py +60 -0
- ark_sdk_python/services/uap/common/__init__.py +3 -0
- ark_sdk_python/services/uap/common/ark_uap_base_service.py +238 -0
- ark_sdk_python/services/uap/sca/__init__.py +3 -0
- ark_sdk_python/services/uap/sca/ark_uap_sca_service.py +149 -0
- ark_sdk_python/services/uap/sia/__init__.py +0 -0
- ark_sdk_python/services/uap/sia/ark_uap_sia_policies_backward_compatible_utils.py +28 -0
- ark_sdk_python/services/uap/sia/db/__init__.py +3 -0
- ark_sdk_python/services/uap/sia/db/ark_uap_sia_db_service.py +116 -0
- ark_sdk_python/services/uap/sia/vm/__init__.py +3 -0
- ark_sdk_python/services/uap/sia/vm/ark_uap_sia_vm_service.py +116 -0
- {ark_sdk_python-2.0.14.dist-info → ark_sdk_python-2.1.1.dist-info}/METADATA +70 -4
- {ark_sdk_python-2.0.14.dist-info → ark_sdk_python-2.1.1.dist-info}/RECORD +148 -55
- {ark_sdk_python-2.0.14.dist-info → ark_sdk_python-2.1.1.dist-info}/LICENSE.txt +0 -0
- {ark_sdk_python-2.0.14.dist-info → ark_sdk_python-2.1.1.dist-info}/NOTICES.md +0 -0
- {ark_sdk_python-2.0.14.dist-info → ark_sdk_python-2.1.1.dist-info}/WHEEL +0 -0
- {ark_sdk_python-2.0.14.dist-info → ark_sdk_python-2.1.1.dist-info}/entry_points.txt +0 -0
|
@@ -87,7 +87,9 @@ class ArkServiceExecAction(ArkExecAction):
|
|
|
87
87
|
"""
|
|
88
88
|
action_def, action_dest = self.__deduce_action_command_def(args.command, args)
|
|
89
89
|
action_value = args.__dict__[action_dest]
|
|
90
|
-
api_name = action_dest.replace('_action', '')
|
|
90
|
+
api_name = action_dest.replace('_action', '')
|
|
91
|
+
# cli sub-commands use dashes, but function names use underscores
|
|
92
|
+
api_name = api_name.replace('-', '_')
|
|
91
93
|
while '_' in api_name and not hasattr(api, api_name):
|
|
92
94
|
api_name = api_name.rsplit('_', 1)[0]
|
|
93
95
|
service = getattr(api, api_name)
|
ark_sdk_python/ark.py
CHANGED
|
@@ -14,11 +14,10 @@ import argcomplete
|
|
|
14
14
|
import urllib3
|
|
15
15
|
|
|
16
16
|
from ark_sdk_python.actions import ArkAction, ArkCacheAction, ArkConfigureAction, ArkLoginAction, ArkProfilesAction, ArkServiceExecAction
|
|
17
|
+
from ark_sdk_python.common.ark_version import __version__
|
|
17
18
|
|
|
18
19
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
19
20
|
|
|
20
|
-
__version__ = '2.0.14'
|
|
21
|
-
|
|
22
21
|
|
|
23
22
|
def main():
|
|
24
23
|
parser: argparse.ArgumentParser = argparse.ArgumentParser()
|
ark_sdk_python/ark_api.py
CHANGED
|
@@ -83,7 +83,7 @@ class ArkAPI:
|
|
|
83
83
|
@property
|
|
84
84
|
def identity_connectors(self) -> "ArkIdentityConnectorsService":
|
|
85
85
|
"""
|
|
86
|
-
Returns the Identity Connectors Service if the appropriate authenticators were
|
|
86
|
+
Returns the Identity Connectors Service if the appropriate authenticators were provided.
|
|
87
87
|
|
|
88
88
|
Returns:
|
|
89
89
|
ArkIdentityConnectorsService: _description_
|
|
@@ -95,7 +95,7 @@ class ArkAPI:
|
|
|
95
95
|
@property
|
|
96
96
|
def identity_directories(self) -> "ArkIdentityDirectoriesService":
|
|
97
97
|
"""
|
|
98
|
-
Returns the Identity Directories Service if the appropriate authenticators were
|
|
98
|
+
Returns the Identity Directories Service if the appropriate authenticators were provided.
|
|
99
99
|
|
|
100
100
|
Returns:
|
|
101
101
|
ArkIdentityDirectoriesService: _description_
|
|
@@ -107,7 +107,7 @@ class ArkAPI:
|
|
|
107
107
|
@property
|
|
108
108
|
def identity_policies(self) -> "ArkIdentityPoliciesService":
|
|
109
109
|
"""
|
|
110
|
-
Returns the Identity Policies Service if the appropriate authenticators were
|
|
110
|
+
Returns the Identity Policies Service if the appropriate authenticators were provided.
|
|
111
111
|
|
|
112
112
|
Returns:
|
|
113
113
|
ArkIdentityPoliciesService: _description_
|
|
@@ -119,7 +119,7 @@ class ArkAPI:
|
|
|
119
119
|
@property
|
|
120
120
|
def identity_roles(self) -> "ArkIdentityRolesService":
|
|
121
121
|
"""
|
|
122
|
-
Returns the Identity Roles Service if the appropriate authenticators were
|
|
122
|
+
Returns the Identity Roles Service if the appropriate authenticators were provided.
|
|
123
123
|
|
|
124
124
|
Returns:
|
|
125
125
|
ArkIdentityRolesService: _description_
|
|
@@ -131,7 +131,7 @@ class ArkAPI:
|
|
|
131
131
|
@property
|
|
132
132
|
def identity_users(self) -> "ArkIdentityUsersService":
|
|
133
133
|
"""
|
|
134
|
-
Returns the Identity Users Service if the appropriate authenticators were
|
|
134
|
+
Returns the Identity Users Service if the appropriate authenticators were provided.
|
|
135
135
|
|
|
136
136
|
Returns:
|
|
137
137
|
ArkIdentityUsersService: _description_
|
|
@@ -141,28 +141,28 @@ class ArkAPI:
|
|
|
141
141
|
return cast(ArkIdentityUsersService, self.service(ArkIdentityUsersService))
|
|
142
142
|
|
|
143
143
|
@property
|
|
144
|
-
def
|
|
144
|
+
def sm(self) -> "ArkSMService":
|
|
145
145
|
"""
|
|
146
|
-
Returns the
|
|
146
|
+
Returns the Session Monitoring service if the appropriate authenticators were provided.
|
|
147
147
|
|
|
148
148
|
Returns:
|
|
149
|
-
|
|
149
|
+
ArkSMService: _description_
|
|
150
150
|
"""
|
|
151
|
-
from ark_sdk_python.services.
|
|
151
|
+
from ark_sdk_python.services.sm import ArkSMService
|
|
152
152
|
|
|
153
|
-
return cast(
|
|
153
|
+
return cast(ArkSMService, self.service(ArkSMService))
|
|
154
154
|
|
|
155
155
|
@property
|
|
156
|
-
def
|
|
156
|
+
def sia_workspaces_target_sets(self) -> "ArkSIATargetSetsWorkspaceService":
|
|
157
157
|
"""
|
|
158
|
-
Returns the SIA
|
|
158
|
+
Returns the SIA Target Sets Workspace service if the appropriate authenticators were provided.
|
|
159
159
|
|
|
160
160
|
Returns:
|
|
161
|
-
|
|
161
|
+
ArkSIATargetSetsWorkspaceService: _description_
|
|
162
162
|
"""
|
|
163
|
-
from ark_sdk_python.services.sia.
|
|
163
|
+
from ark_sdk_python.services.sia.workspaces.targetsets import ArkSIATargetSetsWorkspaceService
|
|
164
164
|
|
|
165
|
-
return cast(
|
|
165
|
+
return cast(ArkSIATargetSetsWorkspaceService, self.service(ArkSIATargetSetsWorkspaceService))
|
|
166
166
|
|
|
167
167
|
@property
|
|
168
168
|
def sia_workspaces_db(self) -> "ArkSIADBWorkspaceService":
|
|
@@ -176,18 +176,6 @@ class ArkAPI:
|
|
|
176
176
|
|
|
177
177
|
return cast(ArkSIADBWorkspaceService, self.service(ArkSIADBWorkspaceService))
|
|
178
178
|
|
|
179
|
-
@property
|
|
180
|
-
def sia_workspaces_target_sets(self) -> "ArkSIATargetSetsWorkspaceService":
|
|
181
|
-
"""
|
|
182
|
-
Returns the SIA Target Sets Workspace service if the appropriate authenticators were provided.
|
|
183
|
-
|
|
184
|
-
Returns:
|
|
185
|
-
ArkSIATargetSetsWorkspaceService: _description_
|
|
186
|
-
"""
|
|
187
|
-
from ark_sdk_python.services.sia.workspaces.targetsets import ArkSIATargetSetsWorkspaceService
|
|
188
|
-
|
|
189
|
-
return cast(ArkSIATargetSetsWorkspaceService, self.service(ArkSIATargetSetsWorkspaceService))
|
|
190
|
-
|
|
191
179
|
@property
|
|
192
180
|
def sia_policies_vm(self) -> "ArkSIAVMPoliciesService":
|
|
193
181
|
"""
|
|
@@ -212,6 +200,18 @@ class ArkAPI:
|
|
|
212
200
|
|
|
213
201
|
return cast(ArkSIADBPoliciesService, self.service(ArkSIADBPoliciesService))
|
|
214
202
|
|
|
203
|
+
@property
|
|
204
|
+
def sia_secrets_vm(self) -> "ArkSIAVMSecretsService":
|
|
205
|
+
"""
|
|
206
|
+
Returns the SIA VM Secrets service if the appropriate authenticators were provided.
|
|
207
|
+
|
|
208
|
+
Returns:
|
|
209
|
+
ArkSIAVMSecretsService: _description_
|
|
210
|
+
"""
|
|
211
|
+
from ark_sdk_python.services.sia.secrets.vm import ArkSIAVMSecretsService
|
|
212
|
+
|
|
213
|
+
return cast(ArkSIAVMSecretsService, self.service(ArkSIAVMSecretsService))
|
|
214
|
+
|
|
215
215
|
@property
|
|
216
216
|
def sia_secrets_db(self) -> "ArkSIADBSecretsService":
|
|
217
217
|
"""
|
|
@@ -225,16 +225,28 @@ class ArkAPI:
|
|
|
225
225
|
return cast(ArkSIADBSecretsService, self.service(ArkSIADBSecretsService))
|
|
226
226
|
|
|
227
227
|
@property
|
|
228
|
-
def
|
|
228
|
+
def sia_access(self) -> "ArkSIAAccessService":
|
|
229
229
|
"""
|
|
230
|
-
Returns the SIA
|
|
230
|
+
Returns the SIA Access service if the appropriate authenticators were provided.
|
|
231
231
|
|
|
232
232
|
Returns:
|
|
233
|
-
|
|
233
|
+
ArkSIAAccessService: _description_
|
|
234
234
|
"""
|
|
235
|
-
from ark_sdk_python.services.sia.
|
|
235
|
+
from ark_sdk_python.services.sia.access import ArkSIAAccessService
|
|
236
236
|
|
|
237
|
-
return cast(
|
|
237
|
+
return cast(ArkSIAAccessService, self.service(ArkSIAAccessService))
|
|
238
|
+
|
|
239
|
+
@property
|
|
240
|
+
def sia_ssh_ca(self) -> "ArkSIASSHCAService":
|
|
241
|
+
"""
|
|
242
|
+
Returns the SIA SSH CA service if the appropriate authenticators were provided.
|
|
243
|
+
|
|
244
|
+
Returns:
|
|
245
|
+
ArkSIASSHCAService: _description_
|
|
246
|
+
"""
|
|
247
|
+
from ark_sdk_python.services.sia.ssh_ca import ArkSIASSHCAService
|
|
248
|
+
|
|
249
|
+
return cast(ArkSIASSHCAService, self.service(ArkSIASSHCAService))
|
|
238
250
|
|
|
239
251
|
@property
|
|
240
252
|
def sia_sso(self) -> "ArkSIASSOService":
|
|
@@ -275,7 +287,7 @@ class ArkAPI:
|
|
|
275
287
|
@property
|
|
276
288
|
def sia_k8s(self) -> "ArkSIAK8SService":
|
|
277
289
|
"""
|
|
278
|
-
Returns the SIA
|
|
290
|
+
Returns the SIA K8S service if the appropriate authenticators were provided.
|
|
279
291
|
|
|
280
292
|
Returns:
|
|
281
293
|
ArkSIAK8SService: _description_
|
|
@@ -285,21 +297,21 @@ class ArkAPI:
|
|
|
285
297
|
return cast(ArkSIAK8SService, self.service(ArkSIAK8SService))
|
|
286
298
|
|
|
287
299
|
@property
|
|
288
|
-
def
|
|
300
|
+
def sia_settings(self) -> "ArkSIASettingsService":
|
|
289
301
|
"""
|
|
290
|
-
Returns the
|
|
302
|
+
Returns the SIA Settings service if the appropriate authenticators were provided.
|
|
291
303
|
|
|
292
304
|
Returns:
|
|
293
|
-
|
|
305
|
+
ArkSIASettingsService: _description_
|
|
294
306
|
"""
|
|
295
|
-
from ark_sdk_python.services.
|
|
307
|
+
from ark_sdk_python.services.sia.settings import ArkSIASettingsService
|
|
296
308
|
|
|
297
|
-
return cast(
|
|
309
|
+
return cast(ArkSIASettingsService, self.service(ArkSIASettingsService))
|
|
298
310
|
|
|
299
311
|
@property
|
|
300
312
|
def pcloud_accounts(self) -> "ArkPCloudAccountsService":
|
|
301
313
|
"""
|
|
302
|
-
Returns the PCloud Accounts service if the appropriate authenticators were
|
|
314
|
+
Returns the PCloud Accounts service if the appropriate authenticators were provided.
|
|
303
315
|
|
|
304
316
|
Returns:
|
|
305
317
|
ArkPCloudAccountsService: _description_
|
|
@@ -311,7 +323,7 @@ class ArkAPI:
|
|
|
311
323
|
@property
|
|
312
324
|
def pcloud_safes(self) -> "ArkPCloudSafesService":
|
|
313
325
|
"""
|
|
314
|
-
Returns the PCloud Safes service if the appropriate authenticators were
|
|
326
|
+
Returns the PCloud Safes service if the appropriate authenticators were provided.
|
|
315
327
|
|
|
316
328
|
Returns:
|
|
317
329
|
ArkPCloudSafesService: _description_
|
|
@@ -323,7 +335,7 @@ class ArkAPI:
|
|
|
323
335
|
@property
|
|
324
336
|
def pcloud_platforms(self) -> "ArkPCloudPlatformsService":
|
|
325
337
|
"""
|
|
326
|
-
Returns the PCloud Platforms service if the appropriate authenticators were
|
|
338
|
+
Returns the PCloud Platforms service if the appropriate authenticators were provided.
|
|
327
339
|
|
|
328
340
|
Returns:
|
|
329
341
|
ArkPCloudPlatformsService: _description_
|
|
@@ -335,7 +347,7 @@ class ArkAPI:
|
|
|
335
347
|
@property
|
|
336
348
|
def pcloud_applications(self) -> "ArkPCloudApplicationsService":
|
|
337
349
|
"""
|
|
338
|
-
Returns the PCloud Applications service if the appropriate authenticators were
|
|
350
|
+
Returns the PCloud Applications service if the appropriate authenticators were provided.
|
|
339
351
|
|
|
340
352
|
Returns:
|
|
341
353
|
ArkPCloudApplicationsService: _description_
|
|
@@ -347,7 +359,7 @@ class ArkAPI:
|
|
|
347
359
|
@property
|
|
348
360
|
def cmgr(self) -> "ArkCmgrService":
|
|
349
361
|
"""
|
|
350
|
-
Returns the Connector Management service if the appropriate authenticators were
|
|
362
|
+
Returns the Connector Management service if the appropriate authenticators were provided.
|
|
351
363
|
|
|
352
364
|
Returns:
|
|
353
365
|
ArkCmgrService: _description_
|
|
@@ -355,3 +367,55 @@ class ArkAPI:
|
|
|
355
367
|
from ark_sdk_python.services.cmgr import ArkCmgrService
|
|
356
368
|
|
|
357
369
|
return cast(ArkCmgrService, self.service(ArkCmgrService))
|
|
370
|
+
|
|
371
|
+
@property
|
|
372
|
+
def uap(self) -> "ArkUAPService":
|
|
373
|
+
"""
|
|
374
|
+
Returns the UAP Executions service if the appropriate authenticators were provided.
|
|
375
|
+
|
|
376
|
+
Returns:
|
|
377
|
+
ArkUAPService: _description_
|
|
378
|
+
"""
|
|
379
|
+
|
|
380
|
+
from ark_sdk_python.services.uap.ark_uap_service import ArkUAPService
|
|
381
|
+
|
|
382
|
+
return cast(ArkUAPService, self.service(ArkUAPService))
|
|
383
|
+
|
|
384
|
+
@property
|
|
385
|
+
def uap_sca(self) -> "ArkUAPSCAService":
|
|
386
|
+
"""
|
|
387
|
+
Returns the UAP SCA Executions service if the appropriate authenticators were provided.
|
|
388
|
+
|
|
389
|
+
Returns:
|
|
390
|
+
ArkUAPSCAService: _description_
|
|
391
|
+
"""
|
|
392
|
+
|
|
393
|
+
from ark_sdk_python.services.uap.sca.ark_uap_sca_service import ArkUAPSCAService
|
|
394
|
+
|
|
395
|
+
return cast(ArkUAPSCAService, self.service(ArkUAPSCAService))
|
|
396
|
+
|
|
397
|
+
@property
|
|
398
|
+
def uap_db(self) -> "ArkUAPSIADBService":
|
|
399
|
+
"""
|
|
400
|
+
Returns the UAP SIA DB Executions service if the appropriate authenticators were provided.
|
|
401
|
+
|
|
402
|
+
Returns:
|
|
403
|
+
ArkUAPSIADBService: _description_
|
|
404
|
+
"""
|
|
405
|
+
|
|
406
|
+
from ark_sdk_python.services.uap.sia.db.ark_uap_sia_db_service import ArkUAPSIADBService
|
|
407
|
+
|
|
408
|
+
return cast(ArkUAPSIADBService, self.service(ArkUAPSIADBService))
|
|
409
|
+
|
|
410
|
+
@property
|
|
411
|
+
def uap_vm(self) -> "ArkUAPSIAVMService":
|
|
412
|
+
"""
|
|
413
|
+
Returns the UAP SIA VM Executions service if the appropriate authenticators were provided.
|
|
414
|
+
|
|
415
|
+
Returns:
|
|
416
|
+
ArkUAPSIAVMService: _description_
|
|
417
|
+
"""
|
|
418
|
+
|
|
419
|
+
from ark_sdk_python.services.uap.sia.vm.ark_uap_sia_vm_service import ArkUAPSIAVMService
|
|
420
|
+
|
|
421
|
+
return cast(ArkUAPSIAVMService, self.service(ArkUAPSIAVMService))
|
|
@@ -95,7 +95,7 @@ class ArkIdentity:
|
|
|
95
95
|
self.__identity_url = self.__resolve_fqdn_from_username_or_subdomain(identity_url, identity_tenant_subdomain)
|
|
96
96
|
if not self.__identity_url.startswith('https://'):
|
|
97
97
|
self.__identity_url = f'https://{self.__identity_url}'
|
|
98
|
-
self.__mfa_type = mfa_type
|
|
98
|
+
self.__mfa_type = mfa_type or 'email'
|
|
99
99
|
self.__logger = logger or get_logger(app=self.__class__.__name__)
|
|
100
100
|
self.__interaction_process: Optional[Process] = None
|
|
101
101
|
self.__is_polling: bool = False
|
|
@@ -472,10 +472,12 @@ class ArkIdentity:
|
|
|
472
472
|
def is_password_required(cls, username: str, identity_url: Optional[str], identity_tenant_subdomain: Optional[str]) -> bool:
|
|
473
473
|
"""
|
|
474
474
|
Checks whether or not the specified username is from an external IDP.
|
|
475
|
+
|
|
475
476
|
Args:
|
|
476
477
|
username (str): _description_
|
|
477
478
|
identity_url (Optional[str]): _description_
|
|
478
479
|
identity_tenant_subdomain (Optional[str]): _description_
|
|
480
|
+
|
|
479
481
|
Returns:
|
|
480
482
|
bool: _description_
|
|
481
483
|
"""
|
|
@@ -615,7 +617,7 @@ class ArkIdentity:
|
|
|
615
617
|
Raises:
|
|
616
618
|
ArkAuthException: _description_
|
|
617
619
|
"""
|
|
618
|
-
if not self.__session_details.token:
|
|
620
|
+
if not self.__session_details or not self.__session_details.token:
|
|
619
621
|
# We only refresh platform token at the moment, call the normal authentication instead
|
|
620
622
|
return self.auth_identity(profile, interactive, force)
|
|
621
623
|
|
|
@@ -6,6 +6,7 @@ from cachetools import LRUCache, cached
|
|
|
6
6
|
from pydantic import ValidationError
|
|
7
7
|
from requests import Session
|
|
8
8
|
|
|
9
|
+
from ark_sdk_python.common.ark_user_agent import user_agent
|
|
9
10
|
from ark_sdk_python.common.env import IDENTITY_ENV_URLS, ROOT_DOMAIN, AwsEnv
|
|
10
11
|
from ark_sdk_python.models import ArkException
|
|
11
12
|
from ark_sdk_python.models.common.identity import TenantFqdnResponse
|
|
@@ -19,21 +20,17 @@ class ArkIdentityFQDNResolver:
|
|
|
19
20
|
@staticmethod
|
|
20
21
|
@cached(cache=LRUCache(maxsize=1024))
|
|
21
22
|
def default_headers() -> Dict[str, str]:
|
|
22
|
-
from fake_useragent import UserAgent
|
|
23
|
-
|
|
24
23
|
return {
|
|
25
24
|
'Content-Type': 'application/json',
|
|
26
25
|
'X-IDAP-NATIVE-CLIENT': 'true',
|
|
27
|
-
'User-Agent':
|
|
26
|
+
'User-Agent': user_agent(),
|
|
28
27
|
'OobIdPAuth': 'true',
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
@staticmethod
|
|
32
31
|
@cached(cache=LRUCache(maxsize=1024))
|
|
33
32
|
def default_system_headers() -> Dict[str, str]:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return {'X-IDAP-NATIVE-CLIENT': 'true', 'User-Agent': UserAgent(browsers=['chrome']).chrome}
|
|
33
|
+
return {'X-IDAP-NATIVE-CLIENT': 'true', 'User-Agent': user_agent()}
|
|
37
34
|
|
|
38
35
|
@staticmethod
|
|
39
36
|
@cached(cache=LRUCache(maxsize=1024))
|
|
@@ -527,7 +527,6 @@ class ArkSIABasePoliciesEditorService(
|
|
|
527
527
|
The function first calculates the differences between the local and remote policies to find out which policies were edited, including
|
|
528
528
|
the policies selected for deletion and new, uncommitted policies. It also
|
|
529
529
|
allows selecting whether to commit all the edited policies or only specific policies by name.
|
|
530
|
-
|
|
531
530
|
After all policies are committed, the workspace is reorganized accordingly.
|
|
532
531
|
|
|
533
532
|
Args:
|
|
@@ -11,7 +11,13 @@ from ark_sdk_python.models.ark_profile import ArkProfile
|
|
|
11
11
|
from ark_sdk_python.models.cli_services.sia.policies_editor.vm import ArkSIAVMGeneratePolicy
|
|
12
12
|
from ark_sdk_python.models.common import ArkProtocolType, ArkWorkspaceType
|
|
13
13
|
from ark_sdk_python.models.services import ArkServiceConfig
|
|
14
|
-
from ark_sdk_python.models.services.sia.policies.common import
|
|
14
|
+
from ark_sdk_python.models.services.sia.policies.common import (
|
|
15
|
+
ArkSIADeletePolicy,
|
|
16
|
+
ArkSIAGetPolicy,
|
|
17
|
+
ArkSIARuleStatus,
|
|
18
|
+
ArkSIAUserData,
|
|
19
|
+
ArkSIAUserDataAttribute,
|
|
20
|
+
)
|
|
15
21
|
from ark_sdk_python.models.services.sia.policies.vm import (
|
|
16
22
|
ArkSIAVMAddPolicy,
|
|
17
23
|
ArkSIAVMAuthorizationRule,
|
|
@@ -46,7 +52,7 @@ DEFAULT_GENERATED_POLICY: Final[ArkSIAVMPolicy] = ArkSIAVMPolicy(
|
|
|
46
52
|
)
|
|
47
53
|
DEFAULT_GENERATED_AUTHORIZATION_RULE: Final[ArkSIAVMAuthorizationRule] = ArkSIAVMAuthorizationRule(
|
|
48
54
|
rule_name='Default VM Rule',
|
|
49
|
-
user_data=ArkSIAUserData(roles=['DpaAdmin'], groups=[], users=[]),
|
|
55
|
+
user_data=ArkSIAUserData(roles=[ArkSIAUserDataAttribute(name='DpaAdmin')], groups=[], users=[]),
|
|
50
56
|
connection_information=ArkSIAVMConnectionInformation(
|
|
51
57
|
connect_as={},
|
|
52
58
|
grant_access=2,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from ark_sdk_python.common.ark_async_client import ArkAsyncClient
|
|
2
2
|
from ark_sdk_python.common.ark_async_request import ArkAsyncRequest
|
|
3
3
|
from ark_sdk_python.common.ark_client import ArkClient
|
|
4
|
+
from ark_sdk_python.common.ark_ip_utils import is_ip_address
|
|
5
|
+
from ark_sdk_python.common.ark_jwt_utils import ArkJWTUtils
|
|
4
6
|
from ark_sdk_python.common.ark_keyring import ArkKeyring
|
|
5
7
|
from ark_sdk_python.common.ark_logger import ArkLogger, get_logger
|
|
6
8
|
from ark_sdk_python.common.ark_page import ArkPage
|
|
@@ -18,5 +20,7 @@ __all__ = [
|
|
|
18
20
|
'ArkPollers',
|
|
19
21
|
'ArkSystemConfig',
|
|
20
22
|
'ArkLogger',
|
|
23
|
+
'ArkJWTUtils',
|
|
21
24
|
'get_logger',
|
|
25
|
+
'is_ip_address',
|
|
22
26
|
]
|
|
@@ -36,7 +36,12 @@ class ArkAsyncClient(ABC, ArkClient):
|
|
|
36
36
|
self.__async_request_settings = async_request_settings or ArkAsyncRequestSettings()
|
|
37
37
|
|
|
38
38
|
@abstractmethod
|
|
39
|
-
def async_request_for(
|
|
39
|
+
def async_request_for(
|
|
40
|
+
self,
|
|
41
|
+
poll_model: ArkPollableModel,
|
|
42
|
+
async_task: ArkAsyncTask,
|
|
43
|
+
request_class_type: Optional[Type[ArkAsyncRequest]] = None,
|
|
44
|
+
) -> ArkAsyncRequest:
|
|
40
45
|
"""
|
|
41
46
|
Creates an async request for the specified model and task.
|
|
42
47
|
The request polls for async operations as defined by the poll model's implementation.
|
|
@@ -44,6 +49,7 @@ class ArkAsyncClient(ABC, ArkClient):
|
|
|
44
49
|
Args:
|
|
45
50
|
poll_model (ArkPollableModel): _description_
|
|
46
51
|
async_task (ArkAsyncTask): _description_
|
|
52
|
+
request_class_type (Optional[Type[ArkAsyncRequest]]): _description_
|
|
47
53
|
|
|
48
54
|
Returns:
|
|
49
55
|
ArkAsyncRequest: _description_
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
|
-
from typing import Callable
|
|
2
|
+
from typing import Callable, Union
|
|
3
3
|
|
|
4
4
|
from ark_sdk_python.common.ark_client import ArkClient
|
|
5
5
|
from ark_sdk_python.common.ark_logger import get_logger
|
|
@@ -7,7 +7,7 @@ from ark_sdk_python.models.common import ArkAsyncRequestSettings, ArkAsyncStatus
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ArkAsyncRequest(ABC):
|
|
10
|
-
def __init__(self, client: ArkClient, async_task: ArkAsyncTask, async_request_settings: ArkAsyncRequestSettings):
|
|
10
|
+
def __init__(self, client: ArkClient, async_task: Union[ArkAsyncTask, Callable], async_request_settings: ArkAsyncRequestSettings):
|
|
11
11
|
self._async_task = async_task
|
|
12
12
|
self._client = client
|
|
13
13
|
self._async_request_settings = async_request_settings
|
|
@@ -8,6 +8,8 @@ from requests import Response, Session
|
|
|
8
8
|
from requests.cookies import RequestsCookieJar
|
|
9
9
|
|
|
10
10
|
from ark_sdk_python.common.ark_system_config import ArkSystemConfig
|
|
11
|
+
from ark_sdk_python.common.ark_user_agent import user_agent
|
|
12
|
+
from ark_sdk_python.common.ark_version import __version__
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
def allowed_gai_family():
|
|
@@ -34,8 +36,6 @@ class ArkClient:
|
|
|
34
36
|
origin_verify: Optional[str] = None,
|
|
35
37
|
origin_verify_header_name: str = 'x-origin-verify',
|
|
36
38
|
) -> None:
|
|
37
|
-
from fake_useragent import UserAgent
|
|
38
|
-
|
|
39
39
|
self.__session = Session()
|
|
40
40
|
self.__base_url = base_url
|
|
41
41
|
self.__token = token
|
|
@@ -54,7 +54,7 @@ class ArkClient:
|
|
|
54
54
|
else:
|
|
55
55
|
verify = ArkSystemConfig.is_verifiying_certificates()
|
|
56
56
|
self.__session.verify = verify
|
|
57
|
-
self.__session.headers['User-Agent'] =
|
|
57
|
+
self.__session.headers['User-Agent'] = user_agent()
|
|
58
58
|
if origin_verify is not None and len(origin_verify) > 0:
|
|
59
59
|
self.__session.headers[origin_verify_header_name] = origin_verify
|
|
60
60
|
|
|
@@ -10,7 +10,7 @@ class ArkPollers:
|
|
|
10
10
|
from colorama import Fore
|
|
11
11
|
|
|
12
12
|
if async_status == ArkAsyncStatus.StartedPolling:
|
|
13
|
-
ArkArgsFormatter.print_colored(async_task.
|
|
13
|
+
ArkArgsFormatter.print_colored(async_task.model_dump_json(indent=4), fore=Fore.GREEN)
|
|
14
14
|
ArkArgsFormatter.print_colored(
|
|
15
15
|
f'[ID: {async_task.task_id}] Started Polling...[Time Remaining: {time_left_seconds}s, '
|
|
16
16
|
f'Status: {async_task.task_status()}]',
|
|
@@ -35,7 +35,7 @@ class ArkPollers:
|
|
|
35
35
|
fore=Fore.CYAN,
|
|
36
36
|
)
|
|
37
37
|
elif async_status == ArkAsyncStatus.AsyncTaskUpdated:
|
|
38
|
-
ArkArgsFormatter.print_colored(async_task.
|
|
38
|
+
ArkArgsFormatter.print_colored(async_task.model_dump_json(indent=4), fore=Fore.GREEN)
|
|
39
39
|
ArkArgsFormatter.print_colored(
|
|
40
40
|
f'[ID: {async_task.task_id}] Still Polling...[Time Remaining: {time_left_seconds}s, '
|
|
41
41
|
f'Status: {async_task.task_status()}]',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.1.1'
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"name": "Cool Cloud Policy",
|
|
4
|
+
"description": "Cool Cloud Policy Description",
|
|
5
|
+
"policyTags": [
|
|
6
|
+
"cool_tag",
|
|
7
|
+
"cool_tag2"
|
|
8
|
+
],
|
|
9
|
+
"policyEntitlement": {
|
|
10
|
+
"targetCategory": "Cloud console",
|
|
11
|
+
"locationType": "AWS",
|
|
12
|
+
"policyType": "Recurring"
|
|
13
|
+
},
|
|
14
|
+
"timeFrame": {
|
|
15
|
+
"fromTime": null,
|
|
16
|
+
"toTime": null
|
|
17
|
+
},
|
|
18
|
+
"status": {
|
|
19
|
+
"status": "Validating",
|
|
20
|
+
"statusCode": null,
|
|
21
|
+
"statusDescription": "Example status description",
|
|
22
|
+
"link": null
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"principals": [
|
|
26
|
+
{
|
|
27
|
+
"id": "c2c7bcc6-9560-44e0-8dff-5be221cd37ee",
|
|
28
|
+
"name": "user@cyberark.cloud.12345",
|
|
29
|
+
"type": "User",
|
|
30
|
+
"sourceDirectoryName": "CyberArk Cloud Directory",
|
|
31
|
+
"sourceDirectoryId": "09B9A9B0-6CE8-465F-AB03-65766D33B05E"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"conditions": {
|
|
35
|
+
"accessWindow": {
|
|
36
|
+
"daysOfTheWeek": [
|
|
37
|
+
0,
|
|
38
|
+
1,
|
|
39
|
+
2,
|
|
40
|
+
3,
|
|
41
|
+
4,
|
|
42
|
+
5,
|
|
43
|
+
6
|
|
44
|
+
],
|
|
45
|
+
"fromHour": "05:00:00",
|
|
46
|
+
"toHour": "23:59:00"
|
|
47
|
+
},
|
|
48
|
+
"maxSessionDuration": 2
|
|
49
|
+
},
|
|
50
|
+
"delegationClassification": "Unrestricted",
|
|
51
|
+
"targets": {
|
|
52
|
+
"awsAccountTargets": [
|
|
53
|
+
{
|
|
54
|
+
"roleId": "arn:aws:iam::123456789012:role/RoleName",
|
|
55
|
+
"workspaceId": "123456789012",
|
|
56
|
+
"roleName": "RoleName",
|
|
57
|
+
"workspaceName": "WorkspaceName"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|