appmesh 1.1.4__py3-none-any.whl → 1.1.6__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.
appmesh/appmesh_client.py CHANGED
@@ -346,8 +346,7 @@ class AppMeshClient(metaclass=abc.ABCMeta):
346
346
  AppMeshClient.Method.POST,
347
347
  path="/appmesh/login",
348
348
  header={
349
- "Username": base64.b64encode(user_name.encode()),
350
- "Password": base64.b64encode(user_pwd.encode()),
349
+ "Authorization": "Basic " + base64.b64encode((user_name + ":" + user_pwd).encode()).decode(),
351
350
  "Expire-Seconds": self._parse_duration(timeout_seconds),
352
351
  },
353
352
  )
@@ -360,9 +359,9 @@ class AppMeshClient(metaclass=abc.ABCMeta):
360
359
  AppMeshClient.Method.POST,
361
360
  path="/appmesh/totp/validate",
362
361
  header={
363
- "Username": base64.b64encode(user_name.encode()),
364
- "Totp-Challenge": base64.b64encode(challenge.encode()),
365
- "Totp": base64.b64encode(totp_code.encode()),
362
+ "Username": base64.b64encode(user_name.encode()).decode(),
363
+ "Totp-Challenge": base64.b64encode(challenge.encode()).decode(),
364
+ "Totp": totp_code,
366
365
  "Expire-Seconds": self._parse_duration(timeout_seconds),
367
366
  },
368
367
  )
@@ -458,7 +457,7 @@ class AppMeshClient(metaclass=abc.ABCMeta):
458
457
  resp = self._request_http(
459
458
  method=AppMeshClient.Method.POST,
460
459
  path="/appmesh/totp/setup",
461
- header={"Totp": base64.b64encode(totp_code.encode())},
460
+ header={"Totp": totp_code},
462
461
  )
463
462
  if resp.status_code != HTTPStatus.OK:
464
463
  raise Exception(resp.text)
@@ -1302,10 +1301,12 @@ class AppMeshClientTCP(AppMeshClient):
1302
1301
  context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
1303
1302
  if hasattr(context, "minimum_version"):
1304
1303
  context.minimum_version = ssl.TLSVersion.TLSv1_2
1305
- context.verify_mode = ssl.CERT_NONE if self.ssl_verify is False else ssl.CERT_REQUIRED
1304
+ else:
1305
+ context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1
1306
+ if self.ssl_verify:
1307
+ context.verify_mode = ssl.CERT_REQUIRED
1306
1308
  if isinstance(self.ssl_verify, str):
1307
1309
  # Load server-side certificate authority (CA) certificates
1308
- context.check_hostname = True
1309
1310
  context.load_verify_locations(self.ssl_verify)
1310
1311
  if self.ssl_client_cert is not None:
1311
1312
  # Load client-side certificate and private key
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: appmesh
3
- Version: 1.1.4
3
+ Version: 1.1.6
4
4
  Summary: Client SDK for App Mesh
5
5
  Home-page: https://github.com/laoshanxi/app-mesh
6
6
  Author: laoshanxi
@@ -43,7 +43,7 @@ Cloud native | Schedule cloud level applications for running on multile hosts wi
43
43
  Micro service application | ⚡️ [Consul micro-service cluster management](https://app-mesh.readthedocs.io/en/latest/CONSUL.html)
44
44
  Extra Features | Collect host/app resource usage <br> Remote run shell commands <br> Download/Upload files interface <br> Hot-update support `systemctl reload appmesh` <br> Bash completion <br> Reverse proxy <br> [Web GUI](https://github.com/laoshanxi/app-mesh-ui)
45
45
  Platform support | X86_64 <br> ARM32 <br> ARM64
46
- SDK | [Python](https://app-mesh.readthedocs.io/en/latest/api/appmesh_client.html) <br> [Golang](https://github.com/laoshanxi/app-mesh/blob/main/src/sdk/go/appmesh_client.go)
46
+ SDK | [Python](https://app-mesh.readthedocs.io/en/latest/api/appmesh_client.html) <br> [Golang](https://github.com/laoshanxi/app-mesh/blob/main/src/sdk/go/appmesh_client.go) <br> Swagger `https://localhost:6060/swagger`
47
47
 
48
48
  ## Getting started
49
49
 
@@ -0,0 +1,6 @@
1
+ appmesh/__init__.py,sha256=xRdXeFHEieRauuJZElbEBASgXG0ZzU1a5_0isAhM7Gw,11
2
+ appmesh/appmesh_client.py,sha256=OybcrVVmUI8tGHXTrBJPzEK95sH4iv6VPtzLMQ8Gguc,59591
3
+ appmesh-1.1.6.dist-info/METADATA,sha256=lJWO8w8Hwz3VzywzX6fPAE7TLrS0kEMgP85Up7zUnAY,10832
4
+ appmesh-1.1.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
5
+ appmesh-1.1.6.dist-info/top_level.txt,sha256=-y0MNQOGJxUzLdHZ6E_Rfv5_LNCkV-GTmOBME_b6pg8,8
6
+ appmesh-1.1.6.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- appmesh/__init__.py,sha256=xRdXeFHEieRauuJZElbEBASgXG0ZzU1a5_0isAhM7Gw,11
2
- appmesh/appmesh_client.py,sha256=geBXc1ktgMAT0BYnIWl_x9CG_M67Eh8qiCXD5BC_PYk,59624
3
- appmesh-1.1.4.dist-info/METADATA,sha256=e5qvRPhCZqrKaWYOz2OhdrJnR1qcOMDsvwulJZe4G7Y,10786
4
- appmesh-1.1.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
5
- appmesh-1.1.4.dist-info/top_level.txt,sha256=-y0MNQOGJxUzLdHZ6E_Rfv5_LNCkV-GTmOBME_b6pg8,8
6
- appmesh-1.1.4.dist-info/RECORD,,