Лабораторная 7: безопасность, mTLS и OpenBao, оценка 3

This commit is contained in:
Nurlygayanova Ekaterina
2026-11-13 12:41:35 +03:00
parent 20afc2c790
commit 4408471ed5
217 changed files with 21288 additions and 106 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env python3
import ssl,time,urllib.request
ctx=ssl.create_default_context(cafile='secrets/ca.crt')
for _ in range(90):
try:
with urllib.request.urlopen('https://localhost:8443/health/ready',context=ctx,timeout=2) as r:
if r.status==200: break
except OSError: pass
time.sleep(1)
else: raise SystemExit('HTTPS API readiness timeout')
print('HTTPS API ready with verified CA/hostname')