ark-sdk-python 1.0.7__py3-none-any.whl → 1.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/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 +36 -12
- ark_sdk_python/models/services/dpa/policies/db/ark_dpa_db_enums.py +24 -0
- ark_sdk_python/models/services/dpa/secrets/db/ark_dpa_db_secret_type.py +1 -0
- ark_sdk_python/models/services/dpa/secrets/db/secrets_data/__init__.py +6 -2
- ark_sdk_python/models/services/dpa/secrets/db/secrets_data/ark_dpa_db_iam_user_secret_data.py +20 -0
- ark_sdk_python/models/services/dpa/workspaces/db/__init__.py +10 -0
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_add_database.py +3 -0
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_auth_method.py +46 -0
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_database.py +8 -0
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_database_info.py +2 -0
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_databases_filter.py +2 -0
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_databases_stats.py +2 -0
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_update_database.py +3 -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 +30 -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/dpa/workspaces/db/ark_dpa_db_workspace_service.py +9 -0
- 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.1.dist-info}/METADATA +11 -1
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.1.dist-info}/RECORD +85 -23
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.1.dist-info}/LICENSE.txt +0 -0
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.1.dist-info}/NOTICES.md +0 -0
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.1.dist-info}/WHEEL +0 -0
- {ark_sdk_python-1.0.7.dist-info → ark_sdk_python-1.1.1.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):
|
|
@@ -4,11 +4,12 @@ from typing import Dict, List, Optional
|
|
|
4
4
|
from pydantic import Field
|
|
5
5
|
|
|
6
6
|
from ark_sdk_python.models.ark_model import ArkCamelizedModel
|
|
7
|
-
from ark_sdk_python.models.services.dpa.policies.db.ark_dpa_db_enums import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
from ark_sdk_python.models.services.dpa.policies.db.ark_dpa_db_enums import (
|
|
8
|
+
ArkDPADBMongoDatabaseBuiltinRole,
|
|
9
|
+
ArkDPADBMongoGlobalBuiltinRole,
|
|
10
|
+
ArkDPADBSqlServerDatabaseBuiltinRole,
|
|
11
|
+
ArkDPADBSqlServerGlobalBuiltinRole,
|
|
12
|
+
)
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class ArkDPADBResourceIdentifierType(str, Enum):
|
|
@@ -21,29 +22,46 @@ class ArkDPADBAppliedTo(ArkCamelizedModel):
|
|
|
21
22
|
type: ArkDPADBResourceIdentifierType = Field(description='Type of the resource')
|
|
22
23
|
|
|
23
24
|
|
|
25
|
+
class ArkDPADBBaseAuth(ArkCamelizedModel):
|
|
26
|
+
applied_to: Optional[List[ArkDPADBAppliedTo]] = Field(description='Which resources to apply to')
|
|
27
|
+
|
|
28
|
+
|
|
24
29
|
class ArkDPADBLDAPAuth(ArkDPADBBaseAuth):
|
|
25
30
|
assign_groups: List[str] = Field(description='LDAP groups to assign the ephemeral user to')
|
|
26
|
-
applied_to: Optional[List[ArkDPADBAppliedTo]] = Field(description='Which resources to apply to')
|
|
27
31
|
|
|
28
32
|
|
|
29
33
|
class ArkDPADBLocalDBAuth(ArkDPADBBaseAuth):
|
|
30
34
|
roles: List[str] = Field(description='Local DB roles to assign the ephemeral user to')
|
|
31
|
-
applied_to: Optional[List[ArkDPADBAppliedTo]] = Field(description='Which resources to apply to')
|
|
32
35
|
|
|
33
36
|
|
|
34
37
|
class ArkDPADBOracleDBAuth(ArkDPADBBaseAuth):
|
|
35
38
|
roles: List[str] = Field(description='Local DB roles to assign the ephemeral user to')
|
|
36
|
-
applied_to: Optional[List[ArkDPADBAppliedTo]] = Field(description='Which resources to apply to')
|
|
37
39
|
dba_role: bool = Field(description='Whether to apply to the ephemeral user the DBA role', default=False)
|
|
38
40
|
sysdba_role: bool = Field(description='Whether to apply to the ephemeral user the SYSDBA role', default=False)
|
|
39
41
|
sysoper_role: bool = Field(description='Whether to apply to the ephemeral user the SYSOPER role', default=False)
|
|
40
42
|
|
|
41
43
|
|
|
42
44
|
class ArkDPADBMongoDBAuth(ArkDPADBBaseAuth):
|
|
43
|
-
global_builtin_roles: List[ArkDPADBMongoGlobalBuiltinRole] = Field(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
global_builtin_roles: List[ArkDPADBMongoGlobalBuiltinRole] = Field(
|
|
46
|
+
description='Global builtin roles across all databases', default_factory=list
|
|
47
|
+
)
|
|
48
|
+
database_builtin_roles: Dict[str, List[ArkDPADBMongoDatabaseBuiltinRole]] = Field(
|
|
49
|
+
description='Per database builtin roles', default_factory=dict
|
|
50
|
+
)
|
|
51
|
+
database_custom_roles: Dict[str, List[str]] = Field(description='Custom per database roles', default_factory=dict)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class ArkDPADBRDSIAMUserAuth(ArkDPADBBaseAuth):
|
|
55
|
+
db_user: str = Field(description='The RDS DB User to use for the connection')
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class ArkDPADBSqlServerAuth(ArkDPADBBaseAuth):
|
|
59
|
+
global_builtin_roles: List[ArkDPADBSqlServerGlobalBuiltinRole] = Field(description='Global MSSQL built in roles', default_factory=list)
|
|
60
|
+
global_custom_roles: List[str] = Field(description='Global MSSQL custom roles', default_factory=list)
|
|
61
|
+
database_builtin_roles: Dict[str, List[ArkDPADBSqlServerDatabaseBuiltinRole]] = Field(
|
|
62
|
+
description='Per database builtin roles', default_factory=dict
|
|
63
|
+
)
|
|
64
|
+
database_custom_roles: Dict[str, List[str]] = Field(alias='Custom per database roles', default_factory=dict)
|
|
47
65
|
|
|
48
66
|
|
|
49
67
|
class ArkDPADBConnectAs(ArkCamelizedModel):
|
|
@@ -53,3 +71,9 @@ class ArkDPADBConnectAs(ArkCamelizedModel):
|
|
|
53
71
|
)
|
|
54
72
|
oracle_auth: Optional[List[ArkDPADBOracleDBAuth]] = Field(description='Oracle DB related authentication, only applies to Oracle')
|
|
55
73
|
mongo_auth: Optional[List[ArkDPADBMongoDBAuth]] = Field(description='Mongo DB related authentication, only applies to Mongo')
|
|
74
|
+
sqlserver_auth: Optional[List[ArkDPADBSqlServerAuth]] = Field(
|
|
75
|
+
description='SQL Server DB related authentication, only applies to SQL Server using local auth'
|
|
76
|
+
)
|
|
77
|
+
rds_iam_user_auth: Optional[List[ArkDPADBRDSIAMUserAuth]] = Field(
|
|
78
|
+
description='RDS IAM Related Authentication, only applies to RDS related DBs who support IAM Auth'
|
|
79
|
+
)
|
|
@@ -22,3 +22,27 @@ class ArkDPADBMongoDatabaseBuiltinRole(str, Enum):
|
|
|
22
22
|
DbAdmin = 'dbAdmin'
|
|
23
23
|
ReadWrite = 'readWrite'
|
|
24
24
|
Read = 'read'
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ArkDPADBSqlServerGlobalBuiltinRole(str, Enum):
|
|
28
|
+
SysAdmin = 'sysadmin'
|
|
29
|
+
ServerAdmin = 'serveradmin'
|
|
30
|
+
SecurityAdmin = 'securityadmin'
|
|
31
|
+
ProcessAdmin = 'processadmin'
|
|
32
|
+
SetupAdmin = 'setupadmin'
|
|
33
|
+
BulkAdmin = 'bulkadmin'
|
|
34
|
+
DiskAdmin = 'diskadmin'
|
|
35
|
+
DbCreator = 'dbcreator'
|
|
36
|
+
Public = 'public'
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class ArkDPADBSqlServerDatabaseBuiltinRole(str, Enum):
|
|
40
|
+
DbOwner = 'db_owner'
|
|
41
|
+
DbSecurityAdmin = 'db_securityadmin'
|
|
42
|
+
DbAccessAdmin = 'db_accessadmin'
|
|
43
|
+
DbBackupOperator = 'db_backupoperator'
|
|
44
|
+
DbDdlAdmin = 'db_ddladmin'
|
|
45
|
+
DbDataWriter = 'db_datawriter'
|
|
46
|
+
DbDataReader = 'db_datareader'
|
|
47
|
+
DbDenyDataWriter = 'db_denydatawriter'
|
|
48
|
+
DbDenyDataReader = 'db_denydatareader'
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
from typing import Union
|
|
2
2
|
|
|
3
|
+
from ark_sdk_python.models.services.dpa.secrets.db.secrets_data.ark_dpa_db_iam_user_secret_data import (
|
|
4
|
+
ArkDPADBExposedIAMUserSecretData,
|
|
5
|
+
ArkDPADBIAMUserSecretData,
|
|
6
|
+
)
|
|
3
7
|
from ark_sdk_python.models.services.dpa.secrets.db.secrets_data.ark_dpa_db_user_password_secret_data import (
|
|
4
8
|
ArkDPADBExposedUserPasswordSecretData,
|
|
5
9
|
ArkDPADBUserPasswordSecretData,
|
|
6
10
|
)
|
|
7
11
|
|
|
8
|
-
ArkDPADBSecretDataTypes = Union[ArkDPADBUserPasswordSecretData]
|
|
9
|
-
ArkDPADBSecretExposedDataTypes = Union[ArkDPADBExposedUserPasswordSecretData]
|
|
12
|
+
ArkDPADBSecretDataTypes = Union[ArkDPADBUserPasswordSecretData, ArkDPADBIAMUserSecretData]
|
|
13
|
+
ArkDPADBSecretExposedDataTypes = Union[ArkDPADBExposedUserPasswordSecretData, ArkDPADBExposedIAMUserSecretData]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import Any, Dict, Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field, SecretStr
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ArkDPADBIAMUserSecretData(BaseModel):
|
|
7
|
+
account: str = Field(description='Account number of the iam user')
|
|
8
|
+
region: Optional[str] = Field(description='Region associated with the iam user')
|
|
9
|
+
username: str = Field(description='Username portion in the ARN of the iam user')
|
|
10
|
+
access_key_id: SecretStr = Field(description='Access key id of the user')
|
|
11
|
+
secret_access_key: SecretStr = Field(description='Secret access key of the user')
|
|
12
|
+
metadata: Optional[Dict[str, Any]] = Field(description='Extra secret details')
|
|
13
|
+
|
|
14
|
+
class Config:
|
|
15
|
+
json_encoders = {SecretStr: lambda v: v.get_secret_value() if v else None}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ArkDPADBExposedIAMUserSecretData(BaseModel):
|
|
19
|
+
account: str = Field(description='Account number of the iam user')
|
|
20
|
+
username: str = Field(description='Username portion in the ARN of the iam user')
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_add_database import ArkDPADBAddDatabase
|
|
2
|
+
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_auth_method import (
|
|
3
|
+
ArkDPADBAuthMethod,
|
|
4
|
+
ArkDPADBAuthMethodType,
|
|
5
|
+
ArkDPADBDatabaseAuthMethod,
|
|
6
|
+
ArkDPADBDatabaseTargetConfiguredAuthMethod,
|
|
7
|
+
)
|
|
2
8
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_database import ArkDPADBDatabase
|
|
3
9
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_database_info import ArkDPADBDatabaseInfo, ArkDPADBDatabaseInfoList
|
|
4
10
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_databases_filter import ArkDPADBDatabasesFilter
|
|
@@ -38,4 +44,8 @@ __all__ = [
|
|
|
38
44
|
'ArkDPADBUpdateDatabase',
|
|
39
45
|
'ArkDPADBWarning',
|
|
40
46
|
'serialize_db_platform_type',
|
|
47
|
+
'ArkDPADBAuthMethod',
|
|
48
|
+
'ArkDPADBAuthMethodType',
|
|
49
|
+
'ArkDPADBDatabaseAuthMethod',
|
|
50
|
+
'ArkDPADBDatabaseTargetConfiguredAuthMethod',
|
|
41
51
|
]
|
|
@@ -4,6 +4,7 @@ from pydantic import Field, validator
|
|
|
4
4
|
|
|
5
5
|
from ark_sdk_python.models.ark_model import ArkCamelizedModel
|
|
6
6
|
from ark_sdk_python.models.common.ark_workspace_type import ArkWorkspaceType
|
|
7
|
+
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_auth_method import ArkDPADBAuthMethodType
|
|
7
8
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_provider import ArkDPADBDatabaseEngineType
|
|
8
9
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_tag import ArkDPADBTag
|
|
9
10
|
|
|
@@ -14,6 +15,7 @@ class ArkDPADBAddDatabase(ArkCamelizedModel):
|
|
|
14
15
|
platform: ArkWorkspaceType = Field(
|
|
15
16
|
description='Platform of the database, as in, where it resides, defaulted to on premises', default=ArkWorkspaceType.ONPREM
|
|
16
17
|
)
|
|
18
|
+
auth_database: str = Field(description='Authentication database used, most commonly used with mongodb', default='admin')
|
|
17
19
|
services: Optional[List[str]] = Field(description='Services related to the database, most commonly used with oracle')
|
|
18
20
|
domain: Optional[str] = Field(description='The domain the DB resides in')
|
|
19
21
|
domain_controller_name: Optional[str] = Field(description='Domain controller name associated to this database')
|
|
@@ -33,6 +35,7 @@ class ArkDPADBAddDatabase(ArkCamelizedModel):
|
|
|
33
35
|
port: Optional[int] = Field(description='Port of the database, if not given, the default one will be used')
|
|
34
36
|
secret_id: Optional[str] = Field(description='Secret identifier stored in the secret service related to this database')
|
|
35
37
|
tags: Optional[List[ArkDPADBTag]] = Field(description='Tags for the database')
|
|
38
|
+
configured_auth_method_type: Optional[ArkDPADBAuthMethodType] = Field(description='The target configured auth method type')
|
|
36
39
|
|
|
37
40
|
# pylint: disable=no-self-use,no-self-argument
|
|
38
41
|
@validator('platform')
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# pylint: disable=invalid-name
|
|
2
|
+
from enum import Enum
|
|
3
|
+
from typing import Dict, Final, List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field
|
|
6
|
+
|
|
7
|
+
from ark_sdk_python.models.ark_model import ArkCamelizedModel
|
|
8
|
+
from ark_sdk_python.models.common.ark_workspace_type import ArkWorkspaceType
|
|
9
|
+
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_provider import ArkDPADBDatabaseFamilyType
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ArkDPADBAuthMethodType(str, Enum):
|
|
13
|
+
ADEphemeralUser = 'ad_ephemeral_user'
|
|
14
|
+
LocalEphemeralUser = 'local_ephemeral_user'
|
|
15
|
+
RDSIAMAuthentication = 'rds_iam_authentication'
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ArkDPADBAuthMethod(ArkCamelizedModel):
|
|
19
|
+
id: int = Field(description='ID of the authentication method on the database')
|
|
20
|
+
auth_method_type: ArkDPADBAuthMethodType = Field(description='Type / name of the authentication method')
|
|
21
|
+
description: str = Field(description='Description about the authentication method')
|
|
22
|
+
workspaces: List[ArkWorkspaceType] = Field(description='Workspaces this authentication method is used in')
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ArkDPADBDatabaseAuthMethod(ArkCamelizedModel):
|
|
26
|
+
id: int = Field(description='ID of the relation between the authentication method and the database type')
|
|
27
|
+
provider_family: ArkDPADBDatabaseFamilyType = Field(description='Name of the database family this authentication method is used for')
|
|
28
|
+
auth_method: ArkDPADBAuthMethodType = Field(description='The actual authentication method')
|
|
29
|
+
method_enabled: bool = Field(description='Whether this authentication method is enabled or not')
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ArkDPADBDatabaseTargetConfiguredAuthMethod(ArkCamelizedModel):
|
|
33
|
+
database_auth_method: ArkDPADBDatabaseAuthMethod = Field(description='Identifier for the configured auth method')
|
|
34
|
+
database_target_id: int = Field(description='Database target identifier')
|
|
35
|
+
configured_auth_method_id: Optional[int] = Field(description='The configured auth method id for the target')
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
DATABASES_FAMILIES_TO_DEFAULT_AUTH_METHOD: Final[Dict[ArkDPADBDatabaseFamilyType, ArkDPADBAuthMethodType]] = {
|
|
39
|
+
ArkDPADBDatabaseFamilyType.Postgres: ArkDPADBAuthMethodType.LocalEphemeralUser,
|
|
40
|
+
ArkDPADBDatabaseFamilyType.Oracle: ArkDPADBAuthMethodType.LocalEphemeralUser,
|
|
41
|
+
ArkDPADBDatabaseFamilyType.MSSQL: ArkDPADBAuthMethodType.ADEphemeralUser,
|
|
42
|
+
ArkDPADBDatabaseFamilyType.MySQL: ArkDPADBAuthMethodType.LocalEphemeralUser,
|
|
43
|
+
ArkDPADBDatabaseFamilyType.MariaDB: ArkDPADBAuthMethodType.LocalEphemeralUser,
|
|
44
|
+
ArkDPADBDatabaseFamilyType.DB2: ArkDPADBAuthMethodType.ADEphemeralUser,
|
|
45
|
+
ArkDPADBDatabaseFamilyType.Mongo: ArkDPADBAuthMethodType.LocalEphemeralUser,
|
|
46
|
+
}
|
|
@@ -4,6 +4,7 @@ from pydantic import Field, validator
|
|
|
4
4
|
|
|
5
5
|
from ark_sdk_python.models.ark_model import ArkCamelizedModel
|
|
6
6
|
from ark_sdk_python.models.common.ark_workspace_type import ArkWorkspaceType
|
|
7
|
+
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_auth_method import ArkDPADBDatabaseTargetConfiguredAuthMethod
|
|
7
8
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_provider import ArkDPADBDatabaseProvider
|
|
8
9
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_tag import ArkDPADBTag
|
|
9
10
|
|
|
@@ -13,10 +14,16 @@ class ArkDPADBDatabase(ArkCamelizedModel):
|
|
|
13
14
|
name: str = Field(description='Name of the database, often referenced in policies and other APIs')
|
|
14
15
|
network_name: str = Field(description='Name of the network the database resides in', default='OnPrem')
|
|
15
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')
|
|
16
18
|
services: List[str] = Field(description='Services related to the database, most commonly used with oracle', default_factory=list)
|
|
17
19
|
domain: Optional[str] = Field(description='The domain the DB resides in')
|
|
18
20
|
domain_controller_name: Optional[str] = Field(description='Domain controller name associated to this database')
|
|
19
21
|
domain_controller_netbios: Optional[str] = Field(description='Domain controller netbios associated to this database')
|
|
22
|
+
domain_controller_use_ldaps: bool = Field(description='Whether to work with LDAP secure or not', default=False)
|
|
23
|
+
domain_controller_enable_certificate_validation: bool = Field(
|
|
24
|
+
description='Whether to enforce certificate validation on TLS comm to the DC', default=True
|
|
25
|
+
)
|
|
26
|
+
domain_controller_ldaps_certificate: Optional[str] = Field(description='Certificate id to use for the domain controller TLS comm')
|
|
20
27
|
provider_details: Optional[ArkDPADBDatabaseProvider] = Field(description='Provider details related to the database')
|
|
21
28
|
enable_certificate_validation: bool = Field(description='Whether to enable and enforce certificate validation', default=True)
|
|
22
29
|
certificate: Optional[str] = Field(description='Certificate id used for this database that resides in the certificates service')
|
|
@@ -25,6 +32,7 @@ class ArkDPADBDatabase(ArkCamelizedModel):
|
|
|
25
32
|
port: Optional[int] = Field(description='Port of the database, if not given, the default one will be used')
|
|
26
33
|
secret_id: Optional[str] = Field(description='Secret identifier stored in the secret service related to this database')
|
|
27
34
|
tags: Optional[List[ArkDPADBTag]] = Field(description='Tags for the database')
|
|
35
|
+
configured_auth_method: Optional[ArkDPADBDatabaseTargetConfiguredAuthMethod] = Field(description='The target configured auth method')
|
|
28
36
|
|
|
29
37
|
# pylint: disable=no-self-use,no-self-argument
|
|
30
38
|
@validator('platform')
|
|
@@ -4,6 +4,7 @@ from pydantic import Field, validator
|
|
|
4
4
|
|
|
5
5
|
from ark_sdk_python.models.ark_model import ArkModel
|
|
6
6
|
from ark_sdk_python.models.common.ark_workspace_type import ArkWorkspaceType
|
|
7
|
+
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_auth_method import ArkDPADBAuthMethodType
|
|
7
8
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_provider import ArkDPADBDatabaseProvider
|
|
8
9
|
|
|
9
10
|
|
|
@@ -16,6 +17,7 @@ class ArkDPADBDatabaseInfo(ArkModel):
|
|
|
16
17
|
secret_id: Optional[str] = Field(description='Secret identifier stored in the secret service related to this database')
|
|
17
18
|
platform: Optional[ArkWorkspaceType] = Field(description='Platform of the database, as in, where it resides')
|
|
18
19
|
provider_info: ArkDPADBDatabaseProvider = Field(description='Provider details')
|
|
20
|
+
configured_auth_method_type: Optional[ArkDPADBAuthMethodType] = Field(description='The target configured auth method type')
|
|
19
21
|
|
|
20
22
|
# pylint: disable=no-self-use,no-self-argument
|
|
21
23
|
@validator('platform')
|
|
@@ -3,6 +3,7 @@ from typing import List, Optional
|
|
|
3
3
|
from pydantic import Field
|
|
4
4
|
|
|
5
5
|
from ark_sdk_python.models.ark_model import ArkModel
|
|
6
|
+
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_auth_method import ArkDPADBAuthMethodType
|
|
6
7
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_provider import (
|
|
7
8
|
ArkDPADBDatabaseEngineType,
|
|
8
9
|
ArkDPADBDatabaseFamilyType,
|
|
@@ -17,5 +18,6 @@ class ArkDPADBDatabasesFilter(ArkModel):
|
|
|
17
18
|
provider_family: Optional[ArkDPADBDatabaseFamilyType] = Field(description='List filter by family')
|
|
18
19
|
provider_engine: Optional[ArkDPADBDatabaseEngineType] = Field(description='List filter by engine')
|
|
19
20
|
provider_workspace: Optional[ArkDPADBDatabaseWorkspaceType] = Field(description='List filter by workspace')
|
|
21
|
+
auth_methods: Optional[List[ArkDPADBAuthMethodType]] = Field(description='Auth method types to filter on')
|
|
20
22
|
tags: Optional[List[ArkDPADBTag]] = Field(description='List filter by tags')
|
|
21
23
|
db_warnings_filter: Optional[ArkDPADBWarning] = Field(description='Filter by databases who are with warnings / incomplete')
|
|
@@ -3,6 +3,7 @@ from typing import Dict
|
|
|
3
3
|
from pydantic import Field
|
|
4
4
|
|
|
5
5
|
from ark_sdk_python.models.ark_model import ArkModel
|
|
6
|
+
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_auth_method import ArkDPADBAuthMethodType
|
|
6
7
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_provider import (
|
|
7
8
|
ArkDPADBDatabaseEngineType,
|
|
8
9
|
ArkDPADBDatabaseFamilyType,
|
|
@@ -18,4 +19,5 @@ class ArkDPADBDatabasesStats(ArkModel):
|
|
|
18
19
|
databases_count_by_engine: Dict[ArkDPADBDatabaseEngineType, int] = Field(description='Databases count per engine type')
|
|
19
20
|
databases_count_by_family: Dict[ArkDPADBDatabaseFamilyType, int] = Field(description='Databases count per family type')
|
|
20
21
|
databases_count_by_workspace: Dict[ArkDPADBDatabaseWorkspaceType, int] = Field(description='Databases count per workspace type')
|
|
22
|
+
databases_count_by_auth_method: Dict[ArkDPADBAuthMethodType, int] = Field(description='Databases count per auth type')
|
|
21
23
|
databases_count_by_warning: Dict[ArkDPADBWarning, int] = Field(description='Databases count per warning type')
|
|
@@ -4,6 +4,7 @@ from pydantic import Field, root_validator, validator
|
|
|
4
4
|
|
|
5
5
|
from ark_sdk_python.models.ark_model import ArkCamelizedModel
|
|
6
6
|
from ark_sdk_python.models.common.ark_workspace_type import ArkWorkspaceType
|
|
7
|
+
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_auth_method import ArkDPADBAuthMethodType
|
|
7
8
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_provider import ArkDPADBDatabaseEngineType
|
|
8
9
|
from ark_sdk_python.models.services.dpa.workspaces.db.ark_dpa_db_tag import ArkDPADBTag
|
|
9
10
|
|
|
@@ -14,6 +15,7 @@ class ArkDPADBUpdateDatabase(ArkCamelizedModel):
|
|
|
14
15
|
new_name: Optional[str] = Field(description='New name for the database')
|
|
15
16
|
network_name: Optional[str] = Field(description='Name of the network the database resides in', default='ON-PREMISE')
|
|
16
17
|
platform: Optional[ArkWorkspaceType] = Field(description='Platform of the database, as in, where it resides')
|
|
18
|
+
auth_database: str = Field(description='Authentication database used, most commonly used with mongodb', default='admin')
|
|
17
19
|
services: Optional[List[str]] = Field(description='Services related to the database, most commonly used with oracle')
|
|
18
20
|
domain: Optional[str] = Field(description='The domain the DB resides in')
|
|
19
21
|
domain_controller_name: Optional[str] = Field(description='Domain controller name associated to this database')
|
|
@@ -33,6 +35,7 @@ class ArkDPADBUpdateDatabase(ArkCamelizedModel):
|
|
|
33
35
|
port: Optional[int] = Field(description='Port of the database, if not given, the default one will be used')
|
|
34
36
|
secret_id: Optional[str] = Field(description='Secret identifier stored in the secret service related to this database')
|
|
35
37
|
tags: Optional[List[ArkDPADBTag]] = Field(description='Tags for the database')
|
|
38
|
+
configured_auth_method_type: Optional[ArkDPADBAuthMethodType] = Field(description='The target configured auth method type')
|
|
36
39
|
|
|
37
40
|
# pylint: disable=no-self-use,no-self-argument
|
|
38
41
|
@root_validator
|
|
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')
|