mrok 0.1.8__py3-none-any.whl → 0.1.9__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.
- mrok/ziti/api.py +3 -0
- mrok/ziti/bootstrap.py +9 -4
- {mrok-0.1.8.dist-info → mrok-0.1.9.dist-info}/METADATA +1 -1
- {mrok-0.1.8.dist-info → mrok-0.1.9.dist-info}/RECORD +7 -7
- {mrok-0.1.8.dist-info → mrok-0.1.9.dist-info}/WHEEL +0 -0
- {mrok-0.1.8.dist-info → mrok-0.1.9.dist-info}/entry_points.txt +0 -0
- {mrok-0.1.8.dist-info → mrok-0.1.9.dist-info}/licenses/LICENSE.txt +0 -0
mrok/ziti/api.py
CHANGED
|
@@ -397,6 +397,9 @@ class ZitiManagementAPI(BaseZitiAPI):
|
|
|
397
397
|
async def search_config_type(self, id_or_name: str) -> dict[str, Any] | None:
|
|
398
398
|
return await self.search_by_id_or_name("/config-types", id_or_name)
|
|
399
399
|
|
|
400
|
+
async def delete_config_type(self, config_type_id: str) -> dict[str, Any] | None:
|
|
401
|
+
return await self.delete("/config-types", config_type_id)
|
|
402
|
+
|
|
400
403
|
async def get_identity(self, identity_id: str) -> dict[str, Any]:
|
|
401
404
|
return await self.get("/identities", identity_id)
|
|
402
405
|
|
mrok/ziti/bootstrap.py
CHANGED
|
@@ -19,19 +19,27 @@ async def bootstrap_identity(
|
|
|
19
19
|
|
|
20
20
|
identity_json = None
|
|
21
21
|
existing_identity = await mgmt_api.search_identity(identity_name)
|
|
22
|
+
policy = await mgmt_api.search_router_policy(identity_name)
|
|
23
|
+
config_type_name = f"{mode}.proxy.v1"
|
|
24
|
+
config_type = await mgmt_api.search_config_type(config_type_name)
|
|
22
25
|
|
|
23
26
|
if forced and existing_identity:
|
|
24
27
|
logger.info(f"Deleting existing identity '{identity_name}' ({existing_identity['id']})")
|
|
25
28
|
|
|
26
|
-
policy = await mgmt_api.search_router_policy(identity_name)
|
|
27
29
|
if policy:
|
|
28
30
|
await mgmt_api.delete_router_policy(policy["id"])
|
|
29
31
|
logger.info(f"Deleted existing ERP '{policy['name']}' ({policy['id']})")
|
|
32
|
+
policy = None
|
|
30
33
|
|
|
31
34
|
await mgmt_api.delete_identity(existing_identity["id"])
|
|
32
35
|
logger.info("Deleted existing identity")
|
|
33
36
|
existing_identity = None
|
|
34
37
|
|
|
38
|
+
if forced and config_type:
|
|
39
|
+
await mgmt_api.delete_config_type(config_type["id"])
|
|
40
|
+
logger.info(f"Deleted existing config type '{config_type_name}' ({config_type['id']})")
|
|
41
|
+
config_type = None
|
|
42
|
+
|
|
35
43
|
if existing_identity:
|
|
36
44
|
frontend_id = existing_identity["id"]
|
|
37
45
|
logger.info(f"Identity '{identity_name}' ({frontend_id}) is already enrolled")
|
|
@@ -44,7 +52,6 @@ async def bootstrap_identity(
|
|
|
44
52
|
)
|
|
45
53
|
logger.info(f"Identity '{identity_name}' ({frontend_id}) successfully enrolled")
|
|
46
54
|
|
|
47
|
-
policy = await mgmt_api.search_router_policy(identity_name)
|
|
48
55
|
if not policy:
|
|
49
56
|
policy_id = await mgmt_api.create_router_policy(
|
|
50
57
|
identity_name,
|
|
@@ -55,8 +62,6 @@ async def bootstrap_identity(
|
|
|
55
62
|
else:
|
|
56
63
|
logger.info(f"Found ERP '{policy['name']}' ({policy['id']})")
|
|
57
64
|
|
|
58
|
-
config_type_name = f"{mode}.proxy.v1"
|
|
59
|
-
config_type = await mgmt_api.search_config_type(config_type_name)
|
|
60
65
|
if config_type is None:
|
|
61
66
|
config_type_id = await mgmt_api.create_config_type(config_type_name, tags=tags)
|
|
62
67
|
logger.info(f"Created '{config_type_name}' ({config_type_id}) config type")
|
|
@@ -50,15 +50,15 @@ mrok/http/master.py,sha256=o_0Sxe2XuTgVAwvBbWkYcO3HkCcfvYP4rgxcuIDPwXo,2426
|
|
|
50
50
|
mrok/http/protocol.py,sha256=ap8jbLUvgbAH81ZJZCBkQiYR7mkV_eL3rpfwEkoE8sU,392
|
|
51
51
|
mrok/http/server.py,sha256=Mj7C85fc-DXp-WTBWaOd7ag808oliLmFBH5bf-G2FHg,370
|
|
52
52
|
mrok/ziti/__init__.py,sha256=20OWMiexRhOovZOX19zlX87-V78QyWnEnSZfyAftUdE,263
|
|
53
|
-
mrok/ziti/api.py,sha256=
|
|
54
|
-
mrok/ziti/bootstrap.py,sha256=
|
|
53
|
+
mrok/ziti/api.py,sha256=onVOSgcqALTeC3EBX-RPJvkqQ3OhhzvJ91HPsGaIJC4,16171
|
|
54
|
+
mrok/ziti/bootstrap.py,sha256=QIDhlkIxPW2QRuumFq2D1WDbD003P5f3z24pAUsyeBI,2696
|
|
55
55
|
mrok/ziti/constants.py,sha256=Urq1X3bCBQZfw8NbnEa1pqmY4oq1wmzkwPfzam3kbTw,339
|
|
56
56
|
mrok/ziti/errors.py,sha256=yYCbVDwktnR0AYduqtynIjo73K3HOhIrwA_vQimvEd4,368
|
|
57
57
|
mrok/ziti/identities.py,sha256=oE_3j6Y4xCr6uKNdprW55bxGsyKnmJt-MrxrylB2Ey4,5388
|
|
58
58
|
mrok/ziti/pki.py,sha256=-V3LDAtntYZ4C6IH2rqfAANxmzpOZ32Rd0MK_27YNME,1906
|
|
59
59
|
mrok/ziti/services.py,sha256=JnznLTHNZjgbFwnBtv7y2XIp4NiQxLVawwP9EfWdVuM,3208
|
|
60
|
-
mrok-0.1.
|
|
61
|
-
mrok-0.1.
|
|
62
|
-
mrok-0.1.
|
|
63
|
-
mrok-0.1.
|
|
64
|
-
mrok-0.1.
|
|
60
|
+
mrok-0.1.9.dist-info/METADATA,sha256=C6efuUa5kHfw19OLwZVawjLZEcGXBMCH7vV3YniB9Fw,15506
|
|
61
|
+
mrok-0.1.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
62
|
+
mrok-0.1.9.dist-info/entry_points.txt,sha256=tloXwvU1uJicBJR2h-8HoVclPgwJWDwuREMHN8Zq-nU,38
|
|
63
|
+
mrok-0.1.9.dist-info/licenses/LICENSE.txt,sha256=6PaICaoA3yNsZKLv5G6OKqSfLSoX7MakYqTDgJoTCBs,11346
|
|
64
|
+
mrok-0.1.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|