Files
mtusi2026lab7/evidence/grade3-summary.md
T
d1frend cc41f601e3
Skeleton contracts / contracts (pull_request) Canceled after 0s
на оценку 4
2026-11-22 23:33:11 +03:00

2.9 KiB

Sanitized grade-3 evidence — 2026-11-18

No passwords, tokens, private keys, Authorization headers or user content are included.

Toolchain

  • Go 1.27.4 linux/amd64
  • Docker Engine 29.7.2; Compose 5.5.0
  • OpenSSL 3.5.5
  • Intel Core i5-1135G7, 8 vCPU exposed to WSL, 3.7 GiB RAM

Checks

make check
PASS: offline skeleton structure, local refs and Python syntax

PYTHON=/tmp/lab7-venv/bin/python make validate
PASS: full OpenAPI 3.1 and JSON Schema validation

go test ./...
PASS

go vet ./...
PASS

make test
PASS: lab7 public API scenario

make test-security
PASS: trusted HTTPS works; untrusted CA rejected

make test-security-grade3
PASS: missing/foreign/wrong-identity LB certificates rejected
PASS: allowed LB identity accepted
PASS: API replicas have no published bypass port
PASS: telemetry missing/wrong identity rejected; Grafana identity accepted

make test-rate-limit-grade3
PASS: login limit is shared across replicas and returns 429 with Retry-After

make test-openbao-policy
PASS: own path allow; foreign path, policy admin and write deny

./tests/minio_policy.sh
PASS: staging write-only; attachments read-only; bucket create/anonymous GET deny

go run golang.org/x/vuln/cmd/govulncheck@latest ./...
No vulnerabilities found. (govulncheck v1.10.0)

Argon2id benchmark

BenchmarkHashPasswordGrade3-8    5    32716606 ns/op

Parameters: Argon2id m=19456 KiB, t=2, p=1; five fixed iterations. This is a local latency observation, not a universal target.

Closed-loop synthetic load

{
  "workload": "closed-loop POST messages; no automatic retries",
  "requested_duration_seconds": 30,
  "elapsed_seconds": 30.094,
  "concurrency": 4,
  "successful_requests": 1959,
  "failed_requests": 0,
  "error_ratio": 0.0,
  "successful_rps": 65.095,
  "successful_latency_ms": {"p50": 87.901, "p95": 100.057, "p99": 106.397}
}

One docker stats --no-stream sample during the run:

Container CPU Memory
API-1 10.19% 16.38 MiB / 256 MiB
API-2 11.07% 21.20 MiB / 256 MiB
ingress 25.09% 23.41 MiB / 128 MiB
PostgreSQL 13.89% 68.33 MiB / 512 MiB

Closed-loop percentiles cover successful requests only and include client overhead/coordinated omission.

Failure hooks

make test-persistence ACTION_SCRIPT=scripts/restart.sh
PASS: persistence preserved confirmed data and existing session

make test-failover ACTION_SCRIPT=scripts/stop-one.sh
observed_instances_before=2
successful_writes=110
failed_attempts=8
first_recovery_seconds=4.932
PASS: confirmed data preserved; duplicate messages not observed

The persistence hook restarted PostgreSQL, Redis, MinIO, RabbitMQ, OpenBao and telemetry stores with volumes, performed operator unseal/bootstrap, then recreated the app processes. The failover hook stopped exactly the API instance named by its opaque X-Instance-Id and left the other replica serving.