ark-sdk-python 1.0.7__py3-none-any.whl → 1.1.0__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/ark.py +1 -1
- ark_sdk_python/ark_api.py +48 -0
- ark_sdk_python/examples/create_identity_resources.py +20 -0
- ark_sdk_python/examples/default_suffix.py +12 -0
- ark_sdk_python/models/actions/services/__init__.py +3 -0
- ark_sdk_python/models/actions/services/ark_identity_exec_action_consts.py +114 -0
- ark_sdk_python/models/common/identity/ark_identity_directory_schemas.py +2 -0
- ark_sdk_python/models/services/dpa/policies/db/ark_dpa_db_connection_data.py +7 -3
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_add_database.py +1 -0
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_database.py +1 -0
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_update_database.py +1 -0
- ark_sdk_python/models/services/identity/__init__.py +0 -0
- ark_sdk_python/models/services/identity/directories/__init__.py +21 -0
- ark_sdk_python/models/services/identity/directories/ark_identity_directory.py +9 -0
- ark_sdk_python/models/services/identity/directories/ark_identity_entity.py +37 -0
- ark_sdk_python/models/services/identity/directories/ark_identity_list_directories.py +10 -0
- ark_sdk_python/models/services/identity/directories/ark_identity_list_directories_entities.py +22 -0
- ark_sdk_python/models/services/identity/policies/__init__.py +31 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_add_authentication_profile.py +13 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_add_policy.py +13 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_authentication_profile.py +14 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_disable_policy.py +7 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_enable_policy.py +7 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_get_authentication_profile.py +10 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_get_policy.py +7 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_policy.py +25 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_policy_info.py +11 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_policy_operation.py +9 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_policy_operation_type.py +6 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_remove_authentication_profile.py +10 -0
- ark_sdk_python/models/services/identity/policies/ark_identity_remove_policy.py +7 -0
- ark_sdk_python/models/services/identity/roles/__init__.py +33 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_add_admin_right_to_role.py +12 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_add_group_to_role.py +8 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_add_role_to_role.py +8 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_add_user_to_role.py +8 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_admin_right.py +10 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_create_role.py +12 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_delete_role.py +10 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_list_role_members.py +10 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_remove_group_from_role.py +8 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_remove_role_from_role.py +8 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_remove_user_from_role.py +8 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_role.py +8 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_role_id_by_name.py +7 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_role_member.py +10 -0
- ark_sdk_python/models/services/identity/roles/ark_identity_update_role.py +12 -0
- ark_sdk_python/models/services/identity/users/__init__.py +19 -0
- ark_sdk_python/models/services/identity/users/ark_identity_create_user.py +29 -0
- ark_sdk_python/models/services/identity/users/ark_identity_delete_user.py +10 -0
- ark_sdk_python/models/services/identity/users/ark_identity_reset_user_password.py +8 -0
- ark_sdk_python/models/services/identity/users/ark_identity_update_user.py +14 -0
- ark_sdk_python/models/services/identity/users/ark_identity_user.py +16 -0
- ark_sdk_python/models/services/identity/users/ark_identity_user_by_name.py +7 -0
- ark_sdk_python/models/services/identity/users/ark_identity_user_id_by_name.py +7 -0
- ark_sdk_python/models/services/identity/users/ark_identity_user_info.py +16 -0
- ark_sdk_python/services/dpa/sso/ark_dpa_sso_service.py +9 -5
- ark_sdk_python/services/identity/__init__.py +3 -0
- ark_sdk_python/services/identity/ark_identity_api.py +53 -0
- ark_sdk_python/services/identity/common/__init__.py +3 -0
- ark_sdk_python/services/identity/common/ark_identity_base_service.py +38 -0
- ark_sdk_python/services/identity/directories/__init__.py +3 -0
- ark_sdk_python/services/identity/directories/ark_identity_directories_service.py +216 -0
- ark_sdk_python/services/identity/policies/__init__.py +3 -0
- ark_sdk_python/services/identity/policies/ark_identity_policies_service.py +366 -0
- ark_sdk_python/services/identity/roles/__init__.py +3 -0
- ark_sdk_python/services/identity/roles/ark_identity_roles_service.py +402 -0
- ark_sdk_python/services/identity/users/__init__.py +3 -0
- ark_sdk_python/services/identity/users/ark_identity_users_service.py +267 -0
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.0.dist-info}/METADATA +11 -1
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.0.dist-info}/RECORD +75 -15
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.0.dist-info}/LICENSE.txt +0 -0
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.0.dist-info}/NOTICES.md +0 -0
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.0.dist-info}/WHEEL +0 -0
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.0.dist-info}/entry_points.txt +0 -0
ark_sdk_python/ark.py
CHANGED
ark_sdk_python/ark_api.py
CHANGED
|
@@ -80,6 +80,54 @@ class ArkAPI:
|
|
|
80
80
|
"""
|
|
81
81
|
return self.__profile
|
|
82
82
|
|
|
83
|
+
@property
|
|
84
|
+
def identity_directories(self) -> "ArkIdentityDirectoriesService":
|
|
85
|
+
"""
|
|
86
|
+
Returns the Identity Directories Service if the appropriate authenticators were given
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
ArkIdentityDirectoriesService: _description_
|
|
90
|
+
"""
|
|
91
|
+
from ark_sdk_python.services.identity.directories import ArkIdentityDirectoriesService
|
|
92
|
+
|
|
93
|
+
return cast(ArkIdentityDirectoriesService, self.service(ArkIdentityDirectoriesService))
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def identity_policies(self) -> "ArkIdentityPoliciesService":
|
|
97
|
+
"""
|
|
98
|
+
Returns the Identity Policies Service if the appropriate authenticators were given
|
|
99
|
+
|
|
100
|
+
Returns:
|
|
101
|
+
ArkIdentityPoliciesService: _description_
|
|
102
|
+
"""
|
|
103
|
+
from ark_sdk_python.services.identity.policies import ArkIdentityPoliciesService
|
|
104
|
+
|
|
105
|
+
return cast(ArkIdentityPoliciesService, self.service(ArkIdentityPoliciesService))
|
|
106
|
+
|
|
107
|
+
@property
|
|
108
|
+
def identity_roles(self) -> "ArkIdentityRolesService":
|
|
109
|
+
"""
|
|
110
|
+
Returns the Identity Roles Service if the appropriate authenticators were given
|
|
111
|
+
|
|
112
|
+
Returns:
|
|
113
|
+
ArkIdentityRolesService: _description_
|
|
114
|
+
"""
|
|
115
|
+
from ark_sdk_python.services.identity.roles import ArkIdentityRolesService
|
|
116
|
+
|
|
117
|
+
return cast(ArkIdentityRolesService, self.service(ArkIdentityRolesService))
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def identity_users(self) -> "ArkIdentityUsersService":
|
|
121
|
+
"""
|
|
122
|
+
Returns the Identity Users Service if the appropriate authenticators were given
|
|
123
|
+
|
|
124
|
+
Returns:
|
|
125
|
+
ArkIdentityUsersService: _description_
|
|
126
|
+
"""
|
|
127
|
+
from ark_sdk_python.services.identity.users import ArkIdentityUsersService
|
|
128
|
+
|
|
129
|
+
return cast(ArkIdentityUsersService, self.service(ArkIdentityUsersService))
|
|
130
|
+
|
|
83
131
|
@property
|
|
84
132
|
def dpa_workspaces_db(self) -> "ArkDPADBWorkspaceService":
|
|
85
133
|
"""
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from ark_sdk_python.auth import ArkISPAuth
|
|
2
|
+
from ark_sdk_python.models.auth import ArkAuthMethod, ArkAuthProfile, ArkSecret, IdentityArkAuthMethodSettings
|
|
3
|
+
from ark_sdk_python.models.services.identity.roles import ArkIdentityCreateRole
|
|
4
|
+
from ark_sdk_python.models.services.identity.users import ArkIdentityCreateUser
|
|
5
|
+
from ark_sdk_python.services.identity import ArkIdentityAPI
|
|
6
|
+
|
|
7
|
+
if __name__ == "__main__":
|
|
8
|
+
isp_auth = ArkISPAuth()
|
|
9
|
+
isp_auth.authenticate(
|
|
10
|
+
auth_profile=ArkAuthProfile(
|
|
11
|
+
username='CoolUser', auth_method=ArkAuthMethod.Identity, auth_method_settings=IdentityArkAuthMethodSettings()
|
|
12
|
+
),
|
|
13
|
+
secret=ArkSecret(secret='CoolPassword'),
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
# Create an identity service to create some users and roles
|
|
17
|
+
print('Creating identity roles and users')
|
|
18
|
+
identity_api = ArkIdentityAPI(isp_auth)
|
|
19
|
+
identity_api.identity_roles.create_role(ArkIdentityCreateRole(role_name='IT'))
|
|
20
|
+
identity_api.identity_users.create_user(ArkIdentityCreateUser(username='it_user', password='CoolPassword', roles=['IT']))
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from ark_sdk_python.auth import ArkISPAuth
|
|
2
|
+
from ark_sdk_python.models.ark_profile import ArkProfileLoader
|
|
3
|
+
from ark_sdk_python.models.services.identity.directories import ArkIdentityListDirectoriesEntities
|
|
4
|
+
from ark_sdk_python.services.identity import ArkIdentityAPI
|
|
5
|
+
|
|
6
|
+
if __name__ == "__main__":
|
|
7
|
+
isp_auth = ArkISPAuth()
|
|
8
|
+
isp_auth.authenticate(ArkProfileLoader().load_default_profile())
|
|
9
|
+
identity_api = ArkIdentityAPI(isp_auth)
|
|
10
|
+
print(identity_api.identity_directories.tenant_default_suffix())
|
|
11
|
+
for page in identity_api.identity_directories.list_directories_entities(ArkIdentityListDirectoriesEntities()):
|
|
12
|
+
print([i.name for i in page.items])
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
from typing import Any, List
|
|
2
2
|
|
|
3
3
|
from ark_sdk_python.models.actions.services.ark_dpa_exec_action_consts import DPA_ACTIONS
|
|
4
|
+
from ark_sdk_python.models.actions.services.ark_identity_exec_action_consts import IDENTITY_ACTIONS
|
|
4
5
|
from ark_sdk_python.models.actions.services.ark_sm_exec_action_consts import SM_ACTIONS
|
|
5
6
|
|
|
6
7
|
SUPPORTED_SERVICE_ACTIONS: List[Any] = [
|
|
8
|
+
IDENTITY_ACTIONS,
|
|
7
9
|
DPA_ACTIONS,
|
|
8
10
|
SM_ACTIONS,
|
|
9
11
|
]
|
|
10
12
|
|
|
11
13
|
__all__ = [
|
|
14
|
+
'IDENTITY_ACTIONS',
|
|
12
15
|
'DPA_ACTIONS',
|
|
13
16
|
'SM_ACTIONS',
|
|
14
17
|
'SUPPORTED_SERVICE_ACTIONS',
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
from typing import Dict, Final, Optional, Type
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkModel
|
|
4
|
+
from ark_sdk_python.models.actions.ark_service_action_definition import ArkServiceActionDefinition
|
|
5
|
+
from ark_sdk_python.models.services.identity.directories import ArkIdentityListDirectories, ArkIdentityListDirectoriesEntities
|
|
6
|
+
from ark_sdk_python.models.services.identity.policies import (
|
|
7
|
+
ArkIdentityAddAuthenticationProfile,
|
|
8
|
+
ArkIdentityAddPolicy,
|
|
9
|
+
ArkIdentityDisablePolicy,
|
|
10
|
+
ArkIdentityEnablePolicy,
|
|
11
|
+
ArkIdentityGetAuthenticationProfile,
|
|
12
|
+
ArkIdentityGetPolicy,
|
|
13
|
+
ArkIdentityRemoveAuthenticationProfile,
|
|
14
|
+
ArkIdentityRemovePolicy,
|
|
15
|
+
)
|
|
16
|
+
from ark_sdk_python.models.services.identity.roles import (
|
|
17
|
+
ArkIdentityAddAdminRightsToRole,
|
|
18
|
+
ArkIdentityAddGroupToRole,
|
|
19
|
+
ArkIdentityAddRoleToRole,
|
|
20
|
+
ArkIdentityAddUserToRole,
|
|
21
|
+
ArkIdentityCreateRole,
|
|
22
|
+
ArkIdentityDeleteRole,
|
|
23
|
+
ArkIdentityListRoleMembers,
|
|
24
|
+
ArkIdentityRemoveGroupFromRole,
|
|
25
|
+
ArkIdentityRemoveRoleFromRole,
|
|
26
|
+
ArkIdentityRemoveUserFromRole,
|
|
27
|
+
ArkIdentityRoleIdByName,
|
|
28
|
+
ArkIdentityUpdateRole,
|
|
29
|
+
)
|
|
30
|
+
from ark_sdk_python.models.services.identity.users import (
|
|
31
|
+
ArkIdentityCreateUser,
|
|
32
|
+
ArkIdentityDeleteUser,
|
|
33
|
+
ArkIdentityResetUserPassword,
|
|
34
|
+
ArkIdentityUpdateUser,
|
|
35
|
+
ArkIdentityUserByName,
|
|
36
|
+
ArkIdentityUserIdByName,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
# Identity Definitions
|
|
40
|
+
# Directories
|
|
41
|
+
IDENTITY_DIRECTORIES_ACTION_TO_SCHEMA_MAP: Final[Dict[str, Optional[Type[ArkModel]]]] = {
|
|
42
|
+
'list-directories': ArkIdentityListDirectories,
|
|
43
|
+
'list-directories-entities': ArkIdentityListDirectoriesEntities,
|
|
44
|
+
'tenant-default-suffix': None,
|
|
45
|
+
}
|
|
46
|
+
IDENTITY_DIRECTORIES_ACTIONS: Final[ArkServiceActionDefinition] = ArkServiceActionDefinition(
|
|
47
|
+
action_name='directories',
|
|
48
|
+
schemas=IDENTITY_DIRECTORIES_ACTION_TO_SCHEMA_MAP,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
# Policies
|
|
52
|
+
IDENTITY_POLICIES_ACTION_TO_SCHEMA_MAP: Final[Dict[str, Optional[Type[ArkModel]]]] = {
|
|
53
|
+
'add-authentication-profile': ArkIdentityAddAuthenticationProfile,
|
|
54
|
+
'remove-authentication-profile': ArkIdentityRemoveAuthenticationProfile,
|
|
55
|
+
'list-authentication-profiles': None,
|
|
56
|
+
'authentication-profile': ArkIdentityGetAuthenticationProfile,
|
|
57
|
+
'add-policy': ArkIdentityAddPolicy,
|
|
58
|
+
'remove-policy': ArkIdentityRemovePolicy,
|
|
59
|
+
'list-policies': None,
|
|
60
|
+
'policy': ArkIdentityGetPolicy,
|
|
61
|
+
'enable-policy': ArkIdentityEnablePolicy,
|
|
62
|
+
'disable-policy': ArkIdentityDisablePolicy,
|
|
63
|
+
'enable-default-policy': None,
|
|
64
|
+
'disable-default-policy': None,
|
|
65
|
+
}
|
|
66
|
+
IDENTITY_POLICIES_ACTIONS: Final[ArkServiceActionDefinition] = ArkServiceActionDefinition(
|
|
67
|
+
action_name='policies',
|
|
68
|
+
schemas=IDENTITY_POLICIES_ACTION_TO_SCHEMA_MAP,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Roles
|
|
72
|
+
IDENTITY_ROLES_ACTION_TO_SCHEMA_MAP: Final[Dict[str, Optional[Type[ArkModel]]]] = {
|
|
73
|
+
'add-user-to-role': ArkIdentityAddUserToRole,
|
|
74
|
+
'add-group-to-role': ArkIdentityAddGroupToRole,
|
|
75
|
+
'add-role-to-role': ArkIdentityAddRoleToRole,
|
|
76
|
+
'remove-user-from-role': ArkIdentityRemoveUserFromRole,
|
|
77
|
+
'remove-group-from-role': ArkIdentityRemoveGroupFromRole,
|
|
78
|
+
'remove-role-from-role': ArkIdentityRemoveRoleFromRole,
|
|
79
|
+
'create-role': ArkIdentityCreateRole,
|
|
80
|
+
'update-role': ArkIdentityUpdateRole,
|
|
81
|
+
'delete-role': ArkIdentityDeleteRole,
|
|
82
|
+
'list-role-members': ArkIdentityListRoleMembers,
|
|
83
|
+
'add-admin-rights-to-role': ArkIdentityAddAdminRightsToRole,
|
|
84
|
+
'role-id-by-name': ArkIdentityRoleIdByName,
|
|
85
|
+
}
|
|
86
|
+
IDENTITY_ROLES_ACTIONS: Final[ArkServiceActionDefinition] = ArkServiceActionDefinition(
|
|
87
|
+
action_name='roles',
|
|
88
|
+
schemas=IDENTITY_ROLES_ACTION_TO_SCHEMA_MAP,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
# Users
|
|
92
|
+
IDENTITY_USERS_ACTION_TO_SCHEMA_MAP: Final[Dict[str, Optional[Type[ArkModel]]]] = {
|
|
93
|
+
'create-user': ArkIdentityCreateUser,
|
|
94
|
+
'update-user': ArkIdentityUpdateUser,
|
|
95
|
+
'delete-user': ArkIdentityDeleteUser,
|
|
96
|
+
'user-by-name': ArkIdentityUserByName,
|
|
97
|
+
'user-id-by-name': ArkIdentityUserIdByName,
|
|
98
|
+
'reset-user-password': ArkIdentityResetUserPassword,
|
|
99
|
+
}
|
|
100
|
+
IDENTITY_USERS_ACTIONS: Final[ArkServiceActionDefinition] = ArkServiceActionDefinition(
|
|
101
|
+
action_name='users',
|
|
102
|
+
schemas=IDENTITY_USERS_ACTION_TO_SCHEMA_MAP,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
# Service Actions Definition
|
|
106
|
+
IDENTITY_ACTIONS: Final[ArkServiceActionDefinition] = ArkServiceActionDefinition(
|
|
107
|
+
action_name='identity',
|
|
108
|
+
subactions=[
|
|
109
|
+
IDENTITY_DIRECTORIES_ACTIONS,
|
|
110
|
+
IDENTITY_POLICIES_ACTIONS,
|
|
111
|
+
IDENTITY_ROLES_ACTIONS,
|
|
112
|
+
IDENTITY_USERS_ACTIONS,
|
|
113
|
+
],
|
|
114
|
+
)
|
|
@@ -94,6 +94,7 @@ class RoleRow(ArkModel):
|
|
|
94
94
|
id: str = Field(alias='_ID')
|
|
95
95
|
admin_rights: Optional[List[RoleAdminRight]] = Field(alias='AdministrativeRights')
|
|
96
96
|
is_hidden: Optional[bool] = Field(alias='IsHidden')
|
|
97
|
+
description: Optional[str] = Field(alias='Description')
|
|
97
98
|
|
|
98
99
|
|
|
99
100
|
class RoleResult(ArkModel):
|
|
@@ -113,6 +114,7 @@ class UserRow(ArkModel):
|
|
|
113
114
|
directory_service_type: DirectoryService = Field(alias='ServiceType')
|
|
114
115
|
email: Optional[str] = Field(alias='EMail')
|
|
115
116
|
internal_id: Optional[str] = Field(alias='InternalName')
|
|
117
|
+
description: Optional[str] = Field(alias='Description')
|
|
116
118
|
|
|
117
119
|
|
|
118
120
|
class UserResult(ArkModel):
|
|
@@ -40,9 +40,13 @@ class ArkDPADBOracleDBAuth(ArkDPADBBaseAuth):
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
class ArkDPADBMongoDBAuth(ArkDPADBBaseAuth):
|
|
43
|
-
global_builtin_roles: List[ArkDPADBMongoGlobalBuiltinRole] = Field(
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
global_builtin_roles: List[ArkDPADBMongoGlobalBuiltinRole] = Field(
|
|
44
|
+
description='Global builtin roles across all databases', default_factory=list
|
|
45
|
+
)
|
|
46
|
+
database_builtin_roles: Dict[str, List[ArkDPADBMongoDatabaseBuiltinRole]] = Field(
|
|
47
|
+
description='Per database builtin roles', default_factory=dict
|
|
48
|
+
)
|
|
49
|
+
database_custom_roles: Dict[str, List[str]] = Field(description='Custom per database roles', default_factory=dict)
|
|
46
50
|
applied_to: Optional[List[ArkDPADBAppliedTo]] = Field(description='Which resources to apply to')
|
|
47
51
|
|
|
48
52
|
|
|
@@ -14,6 +14,7 @@ class ArkDPADBAddDatabase(ArkCamelizedModel):
|
|
|
14
14
|
platform: ArkWorkspaceType = Field(
|
|
15
15
|
description='Platform of the database, as in, where it resides, defaulted to on premises', default=ArkWorkspaceType.ONPREM
|
|
16
16
|
)
|
|
17
|
+
auth_database: str = Field(description='Authentication database used, most commonly used with mongodb', default='admin')
|
|
17
18
|
services: Optional[List[str]] = Field(description='Services related to the database, most commonly used with oracle')
|
|
18
19
|
domain: Optional[str] = Field(description='The domain the DB resides in')
|
|
19
20
|
domain_controller_name: Optional[str] = Field(description='Domain controller name associated to this database')
|
|
@@ -13,6 +13,7 @@ class ArkDPADBDatabase(ArkCamelizedModel):
|
|
|
13
13
|
name: str = Field(description='Name of the database, often referenced in policies and other APIs')
|
|
14
14
|
network_name: str = Field(description='Name of the network the database resides in', default='OnPrem')
|
|
15
15
|
platform: Optional[ArkWorkspaceType] = Field(description='Platform of the database, as in, where it resides')
|
|
16
|
+
auth_database: str = Field(description='Authentication database used, most commonly used with mongodb', default='admin')
|
|
16
17
|
services: List[str] = Field(description='Services related to the database, most commonly used with oracle', default_factory=list)
|
|
17
18
|
domain: Optional[str] = Field(description='The domain the DB resides in')
|
|
18
19
|
domain_controller_name: Optional[str] = Field(description='Domain controller name associated to this database')
|
|
@@ -14,6 +14,7 @@ class ArkDPADBUpdateDatabase(ArkCamelizedModel):
|
|
|
14
14
|
new_name: Optional[str] = Field(description='New name for the database')
|
|
15
15
|
network_name: Optional[str] = Field(description='Name of the network the database resides in', default='ON-PREMISE')
|
|
16
16
|
platform: Optional[ArkWorkspaceType] = Field(description='Platform of the database, as in, where it resides')
|
|
17
|
+
auth_database: str = Field(description='Authentication database used, most commonly used with mongodb', default='admin')
|
|
17
18
|
services: Optional[List[str]] = Field(description='Services related to the database, most commonly used with oracle')
|
|
18
19
|
domain: Optional[str] = Field(description='The domain the DB resides in')
|
|
19
20
|
domain_controller_name: Optional[str] = Field(description='Domain controller name associated to this database')
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from ark_sdk_python.models.services.identity.directories.ark_identity_directory import ArkIdentityDirectory
|
|
2
|
+
from ark_sdk_python.models.services.identity.directories.ark_identity_entity import (
|
|
3
|
+
ArkIdentityEntity,
|
|
4
|
+
ArkIdentityEntityType,
|
|
5
|
+
ArkIdentityGroupEntity,
|
|
6
|
+
ArkIdentityRoleEntity,
|
|
7
|
+
ArkIdentityUserEntity,
|
|
8
|
+
)
|
|
9
|
+
from ark_sdk_python.models.services.identity.directories.ark_identity_list_directories import ArkIdentityListDirectories
|
|
10
|
+
from ark_sdk_python.models.services.identity.directories.ark_identity_list_directories_entities import ArkIdentityListDirectoriesEntities
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
'ArkIdentityListDirectoriesEntities',
|
|
14
|
+
'ArkIdentityEntity',
|
|
15
|
+
'ArkIdentityEntityType',
|
|
16
|
+
'ArkIdentityGroupEntity',
|
|
17
|
+
'ArkIdentityRoleEntity',
|
|
18
|
+
'ArkIdentityUserEntity',
|
|
19
|
+
'ArkIdentityListDirectories',
|
|
20
|
+
'ArkIdentityDirectory',
|
|
21
|
+
]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkModel
|
|
4
|
+
from ark_sdk_python.models.common.identity import DirectoryService
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ArkIdentityDirectory(ArkModel):
|
|
8
|
+
directory: DirectoryService = Field(description='Name of the directory')
|
|
9
|
+
directory_service_uuid: str = Field(description='ID of the directory')
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from typing import List, Optional
|
|
3
|
+
|
|
4
|
+
from pydantic import Field
|
|
5
|
+
|
|
6
|
+
from ark_sdk_python.models import ArkModel
|
|
7
|
+
from ark_sdk_python.models.common.identity import DirectoryService, RoleAdminRight
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ArkIdentityEntityType(str, Enum):
|
|
11
|
+
Role = 'ROLE'
|
|
12
|
+
User = 'USER'
|
|
13
|
+
Group = 'GROUP'
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ArkIdentityEntity(ArkModel):
|
|
17
|
+
id: str = Field(description='ID of the entity')
|
|
18
|
+
name: str = Field(description='Name of the entity')
|
|
19
|
+
entity_type: ArkIdentityEntityType = Field(description='Type of the entity')
|
|
20
|
+
directory_service_type: DirectoryService = Field(description='Directory type of the entity')
|
|
21
|
+
display_name: Optional[str] = Field(description='Display name of the entity')
|
|
22
|
+
service_instance_localized: str = Field(description='Display directory service name')
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ArkIdentityUserEntity(ArkIdentityEntity):
|
|
26
|
+
email: Optional[str] = Field(description='Email of the user')
|
|
27
|
+
description: Optional[str] = Field(description='Description of the user')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ArkIdentityGroupEntity(ArkIdentityEntity):
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ArkIdentityRoleEntity(ArkIdentityEntity):
|
|
35
|
+
admin_rights: Optional[List[RoleAdminRight]] = Field(description='Admin rights of the role')
|
|
36
|
+
is_hidden: bool = Field(description='Whwether this role is hidden or not')
|
|
37
|
+
description: Optional[str] = Field(description='Description of the role')
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkModel
|
|
6
|
+
from ark_sdk_python.models.common.identity import DirectoryService
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ArkIdentityListDirectories(ArkModel):
|
|
10
|
+
directories: Optional[List[DirectoryService]] = Field(description='Directories types to list')
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from typing import Final, List, Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkModel
|
|
6
|
+
from ark_sdk_python.models.common.identity import DirectoryService
|
|
7
|
+
from ark_sdk_python.models.services.identity.directories.ark_identity_entity import ArkIdentityEntityType
|
|
8
|
+
|
|
9
|
+
DEFAULT_ENTITIES_PAGE_SIZE: Final[int] = 10000
|
|
10
|
+
DEFAULT_ENTITIES_LIMIT: Final[int] = 10000
|
|
11
|
+
DEFAULT_MAX_PAGE_SIZE: Final[int] = -1
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ArkIdentityListDirectoriesEntities(ArkModel):
|
|
15
|
+
directories: Optional[List[DirectoryService]] = Field(description='Directories to search on')
|
|
16
|
+
entity_types: Optional[List[ArkIdentityEntityType]] = Field(
|
|
17
|
+
description='Member types to search in the format of X,Y,Z, possible values are ROLE,USER,GROUP'
|
|
18
|
+
)
|
|
19
|
+
search: Optional[str] = Field(description='Search string to use')
|
|
20
|
+
page_size: int = Field(description='Page size to emit', default=DEFAULT_ENTITIES_PAGE_SIZE)
|
|
21
|
+
limit: int = Field(description='Limit amount to list', default=DEFAULT_ENTITIES_LIMIT)
|
|
22
|
+
max_page_count: int = Field(description='Max page count to reach to', default=DEFAULT_MAX_PAGE_SIZE)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_add_authentication_profile import ArkIdentityAddAuthenticationProfile
|
|
2
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_add_policy import ArkIdentityAddPolicy
|
|
3
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_authentication_profile import ArkIdentityAuthenticationProfile
|
|
4
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_disable_policy import ArkIdentityDisablePolicy
|
|
5
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_enable_policy import ArkIdentityEnablePolicy
|
|
6
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_get_authentication_profile import ArkIdentityGetAuthenticationProfile
|
|
7
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_get_policy import ArkIdentityGetPolicy
|
|
8
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_policy import ArkIdentityPolicy
|
|
9
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_policy_info import ArkIdentityPolicyInfo
|
|
10
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_policy_operation import ArkIdentityPolicyOperation
|
|
11
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_policy_operation_type import ArkIdentityPolicyOperationType
|
|
12
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_remove_authentication_profile import (
|
|
13
|
+
ArkIdentityRemoveAuthenticationProfile,
|
|
14
|
+
)
|
|
15
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_remove_policy import ArkIdentityRemovePolicy
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
'ArkIdentityPolicy',
|
|
19
|
+
'ArkIdentityPolicyInfo',
|
|
20
|
+
'ArkIdentityDisablePolicy',
|
|
21
|
+
'ArkIdentityEnablePolicy',
|
|
22
|
+
'ArkIdentityPolicyOperationType',
|
|
23
|
+
'ArkIdentityPolicyOperation',
|
|
24
|
+
'ArkIdentityAddPolicy',
|
|
25
|
+
'ArkIdentityGetPolicy',
|
|
26
|
+
'ArkIdentityRemovePolicy',
|
|
27
|
+
'ArkIdentityAddAuthenticationProfile',
|
|
28
|
+
'ArkIdentityAuthenticationProfile',
|
|
29
|
+
'ArkIdentityGetAuthenticationProfile',
|
|
30
|
+
'ArkIdentityRemoveAuthenticationProfile',
|
|
31
|
+
]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ArkIdentityAddAuthenticationProfile(ArkModel):
|
|
9
|
+
auth_profile_name: str = Field(description='Name of the profile')
|
|
10
|
+
first_challenges: List[str] = Field(description='List of first challenges for the profile, i,e "UP,SMS"')
|
|
11
|
+
second_challenges: Optional[List[str]] = Field(description='List of second challenges for the profile, i,e "UP,SMS"')
|
|
12
|
+
additional_data: Optional[Dict[str, Any]] = Field(description='Additional auth profile data')
|
|
13
|
+
duration_in_minutes: int = Field(description='Duration of auth profile', default=30)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ArkIdentityAddPolicy(ArkModel):
|
|
9
|
+
policy_name: str = Field(description='Name of the policy to create')
|
|
10
|
+
description: str = Field(description='Description of the policy', default="")
|
|
11
|
+
role_names: List[str] = Field(description='Roles to associate to the policy')
|
|
12
|
+
auth_profile_name: str = Field(description='Authentication profile to assoicate to the policy')
|
|
13
|
+
settings: Optional[Dict[str, Any]] = Field(description='Settings of the policy')
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkTitleizedModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ArkIdentityAuthenticationProfile(ArkTitleizedModel):
|
|
9
|
+
challenges: List[str] = Field(description='List of challenges for the profile')
|
|
10
|
+
id: Optional[str] = Field(description='Identifier of the profile', alias='ID')
|
|
11
|
+
name: str = Field(description='Name of the profile')
|
|
12
|
+
single_challenge_mechanisms: Optional[str] = Field(description='Single challenge mechanisms used')
|
|
13
|
+
uuid: str = Field(description='UUID of the profile')
|
|
14
|
+
additional_data: Dict[str, Any] = Field(description='Additional profile data')
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ArkIdentityGetAuthenticationProfile(ArkModel):
|
|
9
|
+
auth_profile_id: Optional[str] = Field(description='Gets the profile by id')
|
|
10
|
+
auth_profile_name: Optional[str] = Field(description='Gets the profile by name')
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkTitleizedModel
|
|
6
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_authentication_profile import ArkIdentityAuthenticationProfile
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ArkIdentityPolicyDirectoryService(ArkTitleizedModel):
|
|
10
|
+
display_name_short: str = Field(description='Display name of the directory service')
|
|
11
|
+
directory_service_uuid: str = Field(description='UUID of the directory', alias='directoryServiceUuid')
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ArkIdentityPolicy(ArkTitleizedModel):
|
|
15
|
+
auth_profiles: List[ArkIdentityAuthenticationProfile] = Field(description="Auth profiles set for the policy")
|
|
16
|
+
description: str = Field(description='Description of the policy')
|
|
17
|
+
directory_services: List[ArkIdentityPolicyDirectoryService] = Field(description='Directory services of the policy')
|
|
18
|
+
path: str = Field(description='Path of the policy')
|
|
19
|
+
policy_modifiers: List[str] = Field(description='Modifiers of the policy')
|
|
20
|
+
radius_client_list: Optional[List[str]] = Field(description='Client list integrated with radius on the policy')
|
|
21
|
+
radius_server_list: Optional[List[str]] = Field(description='Server list integrated with radius on the policy')
|
|
22
|
+
rev_stamp: str = Field(description='Timestamp of the revision')
|
|
23
|
+
risk_analysis_levels: Dict[str, Any] = Field(description='Risk analysis info')
|
|
24
|
+
settings: Dict[str, Any] = Field(description='Settings of the policy')
|
|
25
|
+
version: int = Field(description='Version of the policy')
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkTitleizedModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ArkIdentityPolicyInfo(ArkTitleizedModel):
|
|
7
|
+
id: str = Field(description='ID of the policy', alias='ID')
|
|
8
|
+
description: str = Field(description='Description of the policy')
|
|
9
|
+
enable_compliant: bool = Field(description='Enable policy compliant')
|
|
10
|
+
link_type: str = Field(description='Type of policy link')
|
|
11
|
+
policy_set: str = Field(description="Policy set name")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkModel
|
|
4
|
+
from ark_sdk_python.models.services.identity.policies.ark_identity_policy_operation_type import ArkIdentityPolicyOperationType
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ArkIdentityPolicyOperation(ArkModel):
|
|
8
|
+
policy_name: str = Field(description='Policy name')
|
|
9
|
+
operation_type: ArkIdentityPolicyOperationType = Field(description='Operation to perform on the policy')
|
ark_sdk_python/models/services/identity/policies/ark_identity_remove_authentication_profile.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ArkIdentityRemoveAuthenticationProfile(ArkModel):
|
|
9
|
+
auth_profile_id: Optional[str] = Field(description='Remove the profile by id')
|
|
10
|
+
auth_profile_name: Optional[str] = Field(description='Remove the profile by name')
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_add_admin_right_to_role import ArkIdentityAddAdminRightsToRole
|
|
2
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_add_group_to_role import ArkIdentityAddGroupToRole
|
|
3
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_add_role_to_role import ArkIdentityAddRoleToRole
|
|
4
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_add_user_to_role import ArkIdentityAddUserToRole
|
|
5
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_admin_right import ArkIdentityAdminRights
|
|
6
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_create_role import ArkIdentityCreateRole
|
|
7
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_delete_role import ArkIdentityDeleteRole
|
|
8
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_list_role_members import ArkIdentityListRoleMembers
|
|
9
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_remove_group_from_role import ArkIdentityRemoveGroupFromRole
|
|
10
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_remove_role_from_role import ArkIdentityRemoveRoleFromRole
|
|
11
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_remove_user_from_role import ArkIdentityRemoveUserFromRole
|
|
12
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_role import ArkIdentityRole
|
|
13
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_role_id_by_name import ArkIdentityRoleIdByName
|
|
14
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_role_member import ArkIdentityRoleMember
|
|
15
|
+
from ark_sdk_python.models.services.identity.roles.ark_identity_update_role import ArkIdentityUpdateRole
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
'ArkIdentityAddAdminRightsToRole',
|
|
19
|
+
'ArkIdentityAddUserToRole',
|
|
20
|
+
'ArkIdentityAddGroupToRole',
|
|
21
|
+
'ArkIdentityAddRoleToRole',
|
|
22
|
+
'ArkIdentityAdminRights',
|
|
23
|
+
'ArkIdentityCreateRole',
|
|
24
|
+
'ArkIdentityDeleteRole',
|
|
25
|
+
'ArkIdentityRemoveUserFromRole',
|
|
26
|
+
'ArkIdentityRemoveGroupFromRole',
|
|
27
|
+
'ArkIdentityRemoveRoleFromRole',
|
|
28
|
+
'ArkIdentityRole',
|
|
29
|
+
'ArkIdentityRoleIdByName',
|
|
30
|
+
'ArkIdentityUpdateRole',
|
|
31
|
+
'ArkIdentityListRoleMembers',
|
|
32
|
+
'ArkIdentityRoleMember',
|
|
33
|
+
]
|