ЛР 7 — БВТ2303 — Брезгунова — на 5
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Lab7 solution / integration (pull_request) Blocked by required conditions

This commit is contained in:
2026-12-04 17:07:57 +03:00
parent 20afc2c790
commit ee9d70af85
129 changed files with 81564 additions and 90 deletions
+16
View File
@@ -0,0 +1,16 @@
"""Malformed optional telemetry must not break the business/health response."""
import json
import sys
from pathlib import Path
import urllib.request
ROOT=Path(__file__).resolve().parents[1]
sys.path.insert(0,str(ROOT/'student-tests'))
from security import context,check,save
results=[]
for name in ('traceparent','tracestate'):
req=urllib.request.Request('https://api1:8443/health/live',headers={name:'\xff'})
with urllib.request.urlopen(req,context=context('lb'),timeout=10) as response:
check(response.status==200 and response.headers['X-Request-Id'],'telemetry header caused API failure')
results.append({'header':name,'invalid_byte':'ff','status':response.status})
save('malformed-telemetry-headers.json',{'result':'PASS','probes':results})
print('PASS: non-ASCII optional trace headers ignored safely on verified mTLS API')