Лабораторная 7: TLS, mTLS и OpenBao

This commit is contained in:
2026-11-28 01:28:30 +03:00
parent 20afc2c790
commit 2c2734df60
119 changed files with 8651 additions and 104 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env python3
"""Bounded verified-HTTPS readiness wait."""
import ssl,time,urllib.request
context=ssl.create_default_context(cafile='secrets/ca/ca.crt')
pending={'api':'https://localhost:8443/health/ready','grafana':'https://localhost:17400/api/health'}
deadline=time.monotonic()+120
while pending and time.monotonic()<deadline:
for name,url in list(pending.items()):
try:
with urllib.request.urlopen(url,context=context,timeout=2) as response:
if response.status==200:del pending[name]
except OSError:pass
if pending:time.sleep(1)
if pending:raise SystemExit('Readiness timeout: '+','.join(pending))
print('PASS verified HTTPS API and Grafana ready')