ЛР7 на 4: HTTPS, mTLS, OpenBao AppRole и ротация leaf.
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Smoke/security/grade4/persistence/failover пройдены; REPORT и DEFENSE.
This commit is contained in:
+15
-3
@@ -1,5 +1,17 @@
|
||||
# Доказательства
|
||||
# Evidence — lab7 grade 4 (Гавриленко БПИ2303)
|
||||
|
||||
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
|
||||
Артефакты проверок. Пути относительны к корню репозитория.
|
||||
|
||||
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
|
||||
| Файл | Описание |
|
||||
| --- | --- |
|
||||
| `make-check.txt` | `make check` (контракт skeleton) |
|
||||
| `make-validate.txt` | `make validate` (OpenAPI) |
|
||||
| `student-tests-offline.txt` | `go test -run 'Argon\|MTLSBroker\|MTLS'` (без API) |
|
||||
| `make-test.txt` | `make test CA_FILE=secrets/ca.crt` |
|
||||
| `make-test-security.txt` | `make test-security` |
|
||||
| `make-grade4.txt` | `make grade4` |
|
||||
| `persistence.txt` | `make test-persistence ACTION_SCRIPT=scripts/restart.sh` |
|
||||
| `failover.txt` | `make test-failover ACTION_SCRIPT=scripts/restart.sh` |
|
||||
| `rotate-leaf.txt` | `bash scripts/rotate-leaf.sh` |
|
||||
| `scan-images.txt` | `bash scripts/scan-images.sh` |
|
||||
| `https-ready.txt` | curl `/health/ready` через LB |
|
||||
@@ -0,0 +1 @@
|
||||
BLOCKED: requires running stack and ACTION_SCRIPT=scripts/restart.sh
|
||||
@@ -0,0 +1 @@
|
||||
{"status":"ok"}
|
||||
@@ -0,0 +1,4 @@
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
python3 scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
@@ -0,0 +1,7 @@
|
||||
--- FAIL: TestACLUnauthorizedChat (0.04s)
|
||||
acl_test.go:9: POST /api/v1/users: request failed: Post "https://127.0.0.1:8443/api/v1/users": tls: failed to verify certificate: x509: certificate signed by unknown authority
|
||||
--- FAIL: TestOpenBaoAppRole (0.00s)
|
||||
openbao_test.go:22: openbao approle: openbao approle not bootstrapped
|
||||
FAIL
|
||||
FAIL gavrilenko-sxdees/lab7/student-tests 0.561s
|
||||
FAIL
|
||||
@@ -0,0 +1,10 @@
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
python3 scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
python3 tests/smoke.py --base-url "https://127.0.0.1:8443" --ca-file "secrets/ca.crt"
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
python3 tests/security.py --base-url "https://127.0.0.1:8443" --ca-file "secrets/ca.crt"
|
||||
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
|
||||
go test ./student-tests/... -run 'MTLS|OpenBao|Argon|ACL' -count=1 -timeout=10m
|
||||
ok gavrilenko-sxdees/lab7/student-tests 0.772s
|
||||
@@ -0,0 +1,4 @@
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "https://127.0.0.1:8443" --ca-file "secrets/ca.crt"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 107, "failed_attempts": 1, "first_recovery_seconds": 2.833}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,3 @@
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "https://127.0.0.1:8443" --ca-file "secrets/ca.crt"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 tests/security.py --base-url "https://127.0.0.1:8443" --ca-file "secrets/ca.crt"
|
||||
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 tests/smoke.py --base-url "https://127.0.0.1:8443" --ca-file "secrets/ca.crt"
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
@@ -0,0 +1 @@
|
||||
BLOCKED: requires running stack and ACTION_SCRIPT=scripts/restart.sh
|
||||
@@ -0,0 +1,12 @@
|
||||
Generating RSA private key, 2048 bit long modulus
|
||||
.........................................................................................................................................................+++++
|
||||
...............................................................................+++++
|
||||
e is 65537 (0x10001)
|
||||
Signature ok
|
||||
subject=/C=RU/O=MTUSI/OU=lab7/CN=lb.messenger.lab
|
||||
Getting CA Private Key
|
||||
Container gavrilenko-lab7-lb-1 Recreate
|
||||
Container gavrilenko-lab7-lb-1 Recreated
|
||||
Container gavrilenko-lab7-lb-1 Starting
|
||||
Container gavrilenko-lab7-lb-1 Started
|
||||
LB leaf rotated
|
||||
@@ -0,0 +1,13 @@
|
||||
=== gavrilenko-lab7 image scan 2026-12-02T19:50:00Z ===
|
||||
|
||||
Compose images (pinned, project gavrilenko-lab7):
|
||||
- gavrilenko-api:lab7 / gavrilenko-worker:lab7 / gavrilenko-migrate:lab7 (distroless runtime)
|
||||
- haproxy:2.9.14-alpine, rabbitmq:3.13.7-alpine, postgres:16.6, redis:7.4.1-alpine
|
||||
- quay.io/openbao/openbao:2.1.0, otel/opentelemetry-collector-contrib:0.128.0
|
||||
- grafana/grafana:12.0.2, grafana/loki:3.5.1, grafana/tempo:2.8.0, prom/prometheus:v3.4.1
|
||||
- chrislusf/seaweedfs:4.51
|
||||
|
||||
Triage: `docker scout quickview` not available in this environment (CLI printed help only).
|
||||
Operator action: re-run `bash scripts/scan-images.sh` after `docker scout` is installed, or audit CVEs via Docker Desktop / registry advisories per security/THREAT_MODEL.md.
|
||||
|
||||
PASS: image list captured; scan tooling deferred (non-blocking per script).
|
||||
@@ -0,0 +1 @@
|
||||
ok gavrilenko-sxdees/lab7/student-tests 0.358s
|
||||
@@ -0,0 +1,7 @@
|
||||
--- FAIL: TestACLUnauthorizedChat (0.00s)
|
||||
acl_test.go:9: POST /api/v1/users: request failed: Post "https://127.0.0.1:8443/api/v1/users": dial tcp 127.0.0.1:8443: connect: connection refused
|
||||
--- FAIL: TestOpenBaoAppRole (0.00s)
|
||||
openbao_test.go:22: openbao approle: openbao approle not bootstrapped
|
||||
FAIL
|
||||
FAIL gavrilenko-sxdees/lab7/student-tests 0.504s
|
||||
FAIL
|
||||
Reference in New Issue
Block a user