forked from mtusi2026/mtusi2026lab7
Выполнить лабораторную 7 по безопасности мессенджера
This commit is contained in:
+6
-4
@@ -1,5 +1,7 @@
|
||||
# Доказательства
|
||||
# Результаты проверок
|
||||
|
||||
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
|
||||
|
||||
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
|
||||
В каталоге хранятся текстовые итоги прогонов на локальном стенде 4 декабря
|
||||
2026 года. Команды, паспорт стенда и интерпретация результатов приведены в
|
||||
[REPORT.md](../REPORT.md). Здесь используются только синтетические данные и
|
||||
агрегированные показатели. Локальное состояние OpenBao, ключи, пароли и
|
||||
пользовательские токены исключены.
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"19456": {
|
||||
"samples": 40,
|
||||
"verify_per_s": 47.1,
|
||||
"p50_ms": 22.96,
|
||||
"p95_ms": 78.75
|
||||
},
|
||||
"24576": {
|
||||
"samples": 40,
|
||||
"verify_per_s": 25.0,
|
||||
"p50_ms": 78.23,
|
||||
"p95_ms": 163.76
|
||||
},
|
||||
"32768": {
|
||||
"samples": 40,
|
||||
"verify_per_s": 10.7,
|
||||
"p50_ms": 167.27,
|
||||
"p95_ms": 374.13
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
Container mtusi2026lab7-rustfs-1 Running
|
||||
Container mtusi2026lab7-s3-store-1 Running
|
||||
Container mtusi2026lab7-loki-core-1 Running
|
||||
Container mtusi2026lab7-tempo-core-1 Running
|
||||
Container mtusi2026lab7-loki-1 Running
|
||||
Container mtusi2026lab7-rabbitmq-1 Running
|
||||
Container mtusi2026lab7-prometheus-1 Running
|
||||
Container mtusi2026lab7-openbao-1 Running
|
||||
Container mtusi2026lab7-tempo-1 Running
|
||||
Container mtusi2026lab7-collector-core-1 Running
|
||||
Container mtusi2026lab7-postgres-1 Running
|
||||
Container mtusi2026lab7-collector-1 Running
|
||||
Container mtusi2026lab7-grafana-1 Running
|
||||
Container mtusi2026lab7-prometheus-core-1 Running
|
||||
Container mtusi2026lab7-rustfs-1 Waiting
|
||||
Container mtusi2026lab7-s3-store-1 Waiting
|
||||
Container mtusi2026lab7-collector-core-1 Waiting
|
||||
Container mtusi2026lab7-grafana-1 Waiting
|
||||
Container mtusi2026lab7-openbao-1 Waiting
|
||||
Container mtusi2026lab7-postgres-1 Waiting
|
||||
Container mtusi2026lab7-loki-core-1 Waiting
|
||||
Container mtusi2026lab7-tempo-core-1 Waiting
|
||||
Container mtusi2026lab7-loki-1 Waiting
|
||||
Container mtusi2026lab7-prometheus-1 Waiting
|
||||
Container mtusi2026lab7-rabbitmq-1 Waiting
|
||||
Container mtusi2026lab7-tempo-1 Waiting
|
||||
Container mtusi2026lab7-collector-1 Waiting
|
||||
Container mtusi2026lab7-prometheus-core-1 Waiting
|
||||
Container mtusi2026lab7-prometheus-core-1 Healthy
|
||||
Container mtusi2026lab7-s3-store-1 Healthy
|
||||
Container mtusi2026lab7-collector-1 Healthy
|
||||
Container mtusi2026lab7-postgres-1 Healthy
|
||||
Container mtusi2026lab7-rustfs-1 Healthy
|
||||
Container mtusi2026lab7-tempo-core-1 Healthy
|
||||
Container mtusi2026lab7-loki-core-1 Healthy
|
||||
Container mtusi2026lab7-collector-core-1 Healthy
|
||||
Container mtusi2026lab7-tempo-1 Healthy
|
||||
Container mtusi2026lab7-rabbitmq-1 Healthy
|
||||
Container mtusi2026lab7-grafana-1 Healthy
|
||||
Container mtusi2026lab7-loki-1 Healthy
|
||||
Container mtusi2026lab7-prometheus-1 Healthy
|
||||
Container mtusi2026lab7-openbao-1 Healthy
|
||||
NOTICE: role "bao_db" has already been granted membership in role "messenger_api" by role "owner"
|
||||
NOTICE: role "bao_db" has already been granted membership in role "messenger_worker" by role "owner"
|
||||
Container mtusi2026lab7-bucket-bootstrap-run-3273941d44c9 Creating
|
||||
Container mtusi2026lab7-bucket-bootstrap-run-3273941d44c9 Created
|
||||
Private bucket and both scoped S3 users are ready.
|
||||
Enabled audit, certificate auth, separate policies and short database leases.
|
||||
Image mtusi2026lab7:local Building
|
||||
Image mtusi2026lab7:local Building
|
||||
Image mtusi2026lab7:local Building
|
||||
#1 [internal] load local bake definitions
|
||||
#1 reading from stdin 1.55kB done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [migrate internal] load build definition from Dockerfile
|
||||
#2 transferring dockerfile: 1.10kB done
|
||||
#2 DONE 0.0s
|
||||
|
||||
#3 [worker internal] load metadata for docker.io/library/python:3.12.16-slim-trixie@sha256:5b5fe805d367f8f5a359ded6ab2652b7f9a206453ee6ee789c0045ba6ec15016
|
||||
#3 DONE 0.0s
|
||||
|
||||
#4 [worker internal] load .dockerignore
|
||||
#4 transferring context: 196B done
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [worker internal] load build context
|
||||
#5 transferring context: 888B done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [api 1/13] FROM docker.io/library/python:3.12.16-slim-trixie@sha256:5b5fe805d367f8f5a359ded6ab2652b7f9a206453ee6ee789c0045ba6ec15016
|
||||
#6 resolve docker.io/library/python:3.12.16-slim-trixie@sha256:5b5fe805d367f8f5a359ded6ab2652b7f9a206453ee6ee789c0045ba6ec15016 0.0s done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [api 8/13] COPY --chown=app:app security_runtime.py bao_client.py supervise.py ./
|
||||
#7 CACHED
|
||||
|
||||
#8 [api 4/13] RUN pip install --no-cache-dir -r requirements.txt && pip uninstall --yes pip && groupadd --gid 10001 app && useradd --uid 10001 --gid app --no-create-home --shell /usr/sbin/nologin app
|
||||
#8 CACHED
|
||||
|
||||
#9 [api 9/13] COPY --chown=app:app migrations ./migrations
|
||||
#9 CACHED
|
||||
|
||||
#10 [api 2/13] WORKDIR /app
|
||||
#10 CACHED
|
||||
|
||||
#11 [api 5/13] COPY --chown=app:app server.py ./server.py
|
||||
#11 CACHED
|
||||
|
||||
#12 [api 6/13] COPY --chown=app:app jobs.py ./jobs.py
|
||||
#12 CACHED
|
||||
|
||||
#13 [api 11/13] COPY --chown=app:app scripts/replay_failed.py ./scripts/replay_failed.py
|
||||
#13 CACHED
|
||||
|
||||
#14 [api 12/13] COPY --chown=app:app scripts/cleanup_staging.py ./scripts/cleanup_staging.py
|
||||
#14 CACHED
|
||||
|
||||
#15 [api 3/13] COPY requirements.txt .
|
||||
#15 CACHED
|
||||
|
||||
#16 [api 10/13] COPY --chown=app:app scripts/reprocess_pipeline.py ./scripts/reprocess_pipeline.py
|
||||
#16 CACHED
|
||||
|
||||
#17 [api 7/13] COPY --chown=app:app telemetry.py ./telemetry.py
|
||||
#17 CACHED
|
||||
|
||||
#18 [api 13/13] COPY --chown=app:app tests/fixtures/sample.png ./tests/fixtures/sample.png
|
||||
#18 CACHED
|
||||
|
||||
#17 [worker 7/13] COPY --chown=app:app telemetry.py ./telemetry.py
|
||||
#17 CACHED
|
||||
|
||||
#11 [worker 5/13] COPY --chown=app:app server.py ./server.py
|
||||
#11 CACHED
|
||||
|
||||
#16 [worker 10/13] COPY --chown=app:app scripts/reprocess_pipeline.py ./scripts/reprocess_pipeline.py
|
||||
#16 CACHED
|
||||
|
||||
#10 [worker 2/13] WORKDIR /app
|
||||
#10 CACHED
|
||||
|
||||
#9 [worker 9/13] COPY --chown=app:app migrations ./migrations
|
||||
#9 CACHED
|
||||
|
||||
#13 [worker 11/13] COPY --chown=app:app scripts/replay_failed.py ./scripts/replay_failed.py
|
||||
#13 CACHED
|
||||
|
||||
#15 [worker 3/13] COPY requirements.txt .
|
||||
#15 CACHED
|
||||
|
||||
#12 [worker 6/13] COPY --chown=app:app jobs.py ./jobs.py
|
||||
#12 CACHED
|
||||
|
||||
#14 [worker 12/13] COPY --chown=app:app scripts/cleanup_staging.py ./scripts/cleanup_staging.py
|
||||
#14 CACHED
|
||||
|
||||
#7 [worker 8/13] COPY --chown=app:app security_runtime.py bao_client.py supervise.py ./
|
||||
#7 CACHED
|
||||
|
||||
#8 [worker 4/13] RUN pip install --no-cache-dir -r requirements.txt && pip uninstall --yes pip && groupadd --gid 10001 app && useradd --uid 10001 --gid app --no-create-home --shell /usr/sbin/nologin app
|
||||
#8 CACHED
|
||||
|
||||
#18 [worker 13/13] COPY --chown=app:app tests/fixtures/sample.png ./tests/fixtures/sample.png
|
||||
#18 CACHED
|
||||
|
||||
#19 [migrate] exporting to image
|
||||
#19 exporting layers done
|
||||
#19 exporting manifest sha256:06cc64b02d5b63bc957dc57a8406e7480ad2af0515b20af6447e98d0bb46d08a done
|
||||
#19 exporting config sha256:414c84a56cbdcc16d8fddcd64651a8355139864b4c3150023647903bc1dc437e done
|
||||
#19 exporting attestation manifest sha256:d13a9722a7245669d3291d4aee63449f747bc0c76e3c7a24c9d37cb10eb91b42 0.0s done
|
||||
#19 exporting manifest list sha256:8cbf01d222e316178dde50376c0306092cd490115cfff79bc9008a36d2afb30d 0.0s done
|
||||
#19 naming to docker.io/library/mtusi2026lab7:local
|
||||
#19 naming to docker.io/library/mtusi2026lab7:local done
|
||||
#19 unpacking to docker.io/library/mtusi2026lab7:local done
|
||||
#19 DONE 0.1s
|
||||
|
||||
#20 [worker] exporting to image
|
||||
#20 exporting layers 0.0s done
|
||||
#20 exporting manifest sha256:4de27164c8c9a860b39cdc6b8d95848cdc3efe547ac2eb722490e01883724ca7 0.0s done
|
||||
#20 exporting config sha256:9315d93d22b7c1b9791e7de847dbad03978549e0661aeaa53837aa68eb6cf6c2 0.0s done
|
||||
#20 exporting attestation manifest sha256:7585d381dc60e115e5178241c955fa8cf2d3ef9f26afcaef532264953fff8dcf 0.0s done
|
||||
#20 exporting manifest list sha256:a99e3f22b757bdda4b0b0420cd13e26d4097106399b9f35ce88998d8e6499376 done
|
||||
#20 naming to docker.io/library/mtusi2026lab7:local done
|
||||
#20 unpacking to docker.io/library/mtusi2026lab7:local 0.0s done
|
||||
#20 DONE 0.1s
|
||||
|
||||
#21 [api] exporting to image
|
||||
#21 exporting layers 0.0s done
|
||||
#21 exporting manifest sha256:42b7f15b0a69a4e4f5eda31976c78720e653bc27471b55a0a68f6d0e5835c4e7 0.0s done
|
||||
#21 exporting config sha256:df9607c0ebd18f132b87b56d0a8d62bad3a62666a9b9ec288d2f941cfab0c434 0.0s done
|
||||
#21 exporting attestation manifest sha256:705da7d158e65243b1bafdfc0664d90d71e73aa3cbbb53f0be53e0b189d0ca35 0.0s done
|
||||
#21 exporting manifest list sha256:b01e65eeb51a8b23b15fe2ec3cb8a88f9f0c2379368e05571d540114df64787a done
|
||||
#21 naming to docker.io/library/mtusi2026lab7:local done
|
||||
#21 unpacking to docker.io/library/mtusi2026lab7:local 0.0s done
|
||||
#21 DONE 0.2s
|
||||
|
||||
#22 [migrate] resolving provenance for metadata file
|
||||
#22 DONE 0.0s
|
||||
|
||||
#23 [worker] resolving provenance for metadata file
|
||||
#23 DONE 0.0s
|
||||
|
||||
#24 [api] resolving provenance for metadata file
|
||||
#24 DONE 0.0s
|
||||
Image mtusi2026lab7:local Built
|
||||
Image mtusi2026lab7:local Built
|
||||
Image mtusi2026lab7:local Built
|
||||
Container mtusi2026lab7-haproxy-1 Running
|
||||
Container mtusi2026lab7-openbao-1 Running
|
||||
Container mtusi2026lab7-postgres-1 Running
|
||||
Container mtusi2026lab7-migrate-1 Recreate
|
||||
Container mtusi2026lab7-migrate-1 Recreated
|
||||
Container mtusi2026lab7-worker-1 Recreate
|
||||
Container mtusi2026lab7-api-2 Recreate
|
||||
Container mtusi2026lab7-api-1 Recreate
|
||||
Container mtusi2026lab7-worker-1 Recreated
|
||||
Container mtusi2026lab7-api-1 Recreated
|
||||
Container mtusi2026lab7-api-2 Recreated
|
||||
Container mtusi2026lab7-postgres-1 Waiting
|
||||
Container mtusi2026lab7-postgres-1 Healthy
|
||||
Container mtusi2026lab7-migrate-1 Starting
|
||||
Container mtusi2026lab7-migrate-1 Started
|
||||
Container mtusi2026lab7-migrate-1 Waiting
|
||||
Container mtusi2026lab7-migrate-1 Waiting
|
||||
Container mtusi2026lab7-migrate-1 Exited
|
||||
Container mtusi2026lab7-migrate-1 Exited
|
||||
Container mtusi2026lab7-worker-1 Starting
|
||||
Container mtusi2026lab7-api-1 Starting
|
||||
Container mtusi2026lab7-worker-1 Started
|
||||
Container mtusi2026lab7-api-1 Started
|
||||
Container mtusi2026lab7-api-2 Starting
|
||||
Container mtusi2026lab7-api-2 Started
|
||||
curl: (56) The requested URL returned error: 503
|
||||
{"status":"ok"}
|
||||
@@ -0,0 +1,5 @@
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
.venv/bin/python scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
PASS Compose config
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"image": "haproxy:3.0.8-alpine",
|
||||
"db_built": "2026-12-04T06:21:49Z",
|
||||
"counts": {
|
||||
"Critical": 14,
|
||||
"High": 48,
|
||||
"Medium": 40,
|
||||
"Low": 16
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{"image": "grafana/grafana:11.6.1", "db_built": "2026-12-04T06:21:49Z", "counts": {"Critical": 58, "High": 385, "Medium": 275, "Low": 40, "Unknown": 1}}
|
||||
{"image": "grafana/loki:3.4.3", "db_built": "2026-12-04T06:21:49Z", "counts": {"Critical": 17, "High": 111, "Medium": 82, "Low": 8, "Unknown": 1}}
|
||||
{"image": "grafana/tempo:2.7.2", "db_built": "2026-12-04T06:21:49Z", "counts": {"Critical": 31, "High": 169, "Medium": 120, "Low": 25, "Unknown": 1}}
|
||||
{"image": "haproxy:3.0.32-alpine3.24", "db_built": "2026-12-04T06:21:49Z", "counts": {"High": 13, "Medium": 10, "Unknown": 2}, "critical_or_python_high": []}
|
||||
{"image": "mtusi2026lab7:local", "db_built": "2026-12-04T06:21:49Z", "counts": {"Medium": 80, "High": 82, "Negligible": 55, "Low": 13, "Unknown": 4}, "critical_or_python_high": []}
|
||||
{"image": "openbao/openbao:2.7.3", "db_built": "2026-12-04T06:21:49Z", "counts": {"High": 23, "Medium": 18, "Critical": 1, "Unknown": 2}, "critical_or_python_high": [{"id": "CVE-2026-4738", "package": "zlib", "version": "1.3.2-r1", "fix": ["1.4-r0"]}]}
|
||||
{"image": "otel/opentelemetry-collector-contrib:0.123.0", "db_built": "2026-12-04T06:21:49Z", "counts": {"Critical": 24, "High": 140, "Medium": 99, "Low": 14, "Unknown": 2}}
|
||||
{"image": "postgres:16.4-bookworm", "db_built": "2026-12-04T06:21:49Z", "counts": {"High": 397, "Critical": 59, "Negligible": 132, "Medium": 387, "Low": 75, "Unknown": 30}}
|
||||
{"image": "prom/prometheus:v3.3.0", "db_built": "2026-12-04T06:21:49Z", "counts": {"High": 224, "Critical": 35, "Medium": 169, "Low": 16, "Unknown": 2}}
|
||||
{"image": "rabbitmq:4.0.5-management-alpine", "db_built": "2026-12-04T06:21:49Z", "counts": {"Critical": 33, "High": 161, "Medium": 172, "Low": 40, "Negligible": 2}}
|
||||
{"image": "rustfs/rc:v0.1.37", "db_built": "2026-12-04T06:21:49Z", "counts": {"High": 77, "Critical": 5, "Medium": 33, "Unknown": 2, "Low": 1}}
|
||||
{"image": "rustfs/rustfs:1.0.4", "db_built": "2026-12-04T06:21:49Z", "counts": {"High": 21, "Medium": 23, "Critical": 1, "Unknown": 2}}
|
||||
@@ -0,0 +1,102 @@
|
||||
python3 student-tests/lifecycle.py
|
||||
Container mtusi2026lab7-haproxy-1 Killing
|
||||
Container mtusi2026lab7-haproxy-1 Killed
|
||||
Container mtusi2026lab7-haproxy-1 Killing
|
||||
Container mtusi2026lab7-haproxy-1 Killed
|
||||
Container mtusi2026lab7-haproxy-1 Killing
|
||||
Container mtusi2026lab7-haproxy-1 Killed
|
||||
OpenBao unsealed by operator.
|
||||
{
|
||||
"offered_rps": 8,
|
||||
"max_concurrency": 24,
|
||||
"phase": {
|
||||
"baseline": {
|
||||
"seconds": 8.004,
|
||||
"counts": {
|
||||
"200": 64
|
||||
},
|
||||
"success_rps": 8.0,
|
||||
"error_pct": 0.0,
|
||||
"success_p50_p95_p99_ms": [
|
||||
22.27,
|
||||
79.13,
|
||||
131.09
|
||||
]
|
||||
},
|
||||
"trust_overlap_and_cutover": {
|
||||
"seconds": 7.717,
|
||||
"counts": {
|
||||
"200": 61
|
||||
},
|
||||
"success_rps": 7.9,
|
||||
"error_pct": 0.0,
|
||||
"success_p50_p95_p99_ms": [
|
||||
40.22,
|
||||
458.86,
|
||||
480.54
|
||||
]
|
||||
},
|
||||
"short_leaf_expiry": {
|
||||
"seconds": 11.136,
|
||||
"counts": {
|
||||
"200": 64,
|
||||
"expired_certificate": 25
|
||||
},
|
||||
"success_rps": 5.75,
|
||||
"error_pct": 28.09,
|
||||
"success_p50_p95_p99_ms": [
|
||||
20.75,
|
||||
72.59,
|
||||
77.95
|
||||
]
|
||||
},
|
||||
"leaf_renewal": {
|
||||
"seconds": 6.877,
|
||||
"counts": {
|
||||
"expired_certificate": 12,
|
||||
"200": 43
|
||||
},
|
||||
"success_rps": 6.25,
|
||||
"error_pct": 21.82,
|
||||
"success_p50_p95_p99_ms": [
|
||||
20.27,
|
||||
114.83,
|
||||
294.29
|
||||
]
|
||||
},
|
||||
"sealed_bao": {
|
||||
"seconds": 43.949,
|
||||
"counts": {
|
||||
"200": 326,
|
||||
"503": 26
|
||||
},
|
||||
"success_rps": 7.42,
|
||||
"error_pct": 7.39,
|
||||
"success_p50_p95_p99_ms": [
|
||||
16.56,
|
||||
126.82,
|
||||
494.16
|
||||
]
|
||||
},
|
||||
"lease_recovery": {
|
||||
"seconds": 13.164,
|
||||
"counts": {
|
||||
"503": 48,
|
||||
"200": 57
|
||||
},
|
||||
"success_rps": 4.33,
|
||||
"error_pct": 45.71,
|
||||
"success_p50_p95_p99_ms": [
|
||||
11.64,
|
||||
46.27,
|
||||
51.85
|
||||
]
|
||||
}
|
||||
},
|
||||
"old_ca_only": "denied",
|
||||
"expired_detected_after_s": 8.041,
|
||||
"leaf_recovery_after_s": 1.517,
|
||||
"sealed_to_first_503_s": 40.889,
|
||||
"unseal_to_first_200_s": 6.067,
|
||||
"previous_session_message_and_attachment": "verified"
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
python3 student-tests/lifecycle.py
|
||||
Container mtusi2026lab7-haproxy-1 Killing
|
||||
Container mtusi2026lab7-haproxy-1 Killed
|
||||
Container mtusi2026lab7-haproxy-1 Killing
|
||||
Container mtusi2026lab7-haproxy-1 Killed
|
||||
Container mtusi2026lab7-haproxy-1 Killing
|
||||
Container mtusi2026lab7-haproxy-1 Killed
|
||||
OpenBao unsealed by operator.
|
||||
{
|
||||
"offered_rps": 8,
|
||||
"max_concurrency": 24,
|
||||
"phase": {
|
||||
"baseline": {
|
||||
"seconds": 8.005,
|
||||
"counts": {
|
||||
"200": 64
|
||||
},
|
||||
"success_rps": 7.99,
|
||||
"error_pct": 0.0,
|
||||
"success_p50_p95_p99_ms": [
|
||||
10.06,
|
||||
20.23,
|
||||
24.64
|
||||
]
|
||||
},
|
||||
"trust_overlap_and_cutover": {
|
||||
"seconds": 6.432,
|
||||
"counts": {
|
||||
"200": 51
|
||||
},
|
||||
"success_rps": 7.93,
|
||||
"error_pct": 0.0,
|
||||
"success_p50_p95_p99_ms": [
|
||||
11.12,
|
||||
20.17,
|
||||
25.83
|
||||
]
|
||||
},
|
||||
"short_leaf_expiry": {
|
||||
"seconds": 12.372,
|
||||
"counts": {
|
||||
"200": 74,
|
||||
"expired_certificate": 25
|
||||
},
|
||||
"success_rps": 5.98,
|
||||
"error_pct": 25.25,
|
||||
"success_p50_p95_p99_ms": [
|
||||
10.07,
|
||||
22.28,
|
||||
41.31
|
||||
]
|
||||
},
|
||||
"leaf_renewal": {
|
||||
"seconds": 5.447,
|
||||
"counts": {
|
||||
"expired_certificate": 2,
|
||||
"200": 42
|
||||
},
|
||||
"success_rps": 7.71,
|
||||
"error_pct": 4.55,
|
||||
"success_p50_p95_p99_ms": [
|
||||
8.87,
|
||||
18.64,
|
||||
79.03
|
||||
]
|
||||
},
|
||||
"sealed_bao": {
|
||||
"seconds": 36.819,
|
||||
"counts": {
|
||||
"200": 269,
|
||||
"503": 25
|
||||
},
|
||||
"success_rps": 7.31,
|
||||
"error_pct": 8.5,
|
||||
"success_p50_p95_p99_ms": [
|
||||
10.9,
|
||||
26.97,
|
||||
50.09
|
||||
]
|
||||
},
|
||||
"lease_recovery": {
|
||||
"seconds": 9.113,
|
||||
"counts": {
|
||||
"503": 16,
|
||||
"200": 57
|
||||
},
|
||||
"success_rps": 6.25,
|
||||
"error_pct": 21.92,
|
||||
"success_p50_p95_p99_ms": [
|
||||
11.02,
|
||||
20.4,
|
||||
23.55
|
||||
]
|
||||
}
|
||||
},
|
||||
"old_ca_only": "denied",
|
||||
"expired_detected_after_s": 9.318,
|
||||
"plaintext_after_expiry": "denied",
|
||||
"leaf_recovery_after_s": 0.316,
|
||||
"sealed_to_first_503_s": 33.747,
|
||||
"unseal_to_first_200_s": 2.051,
|
||||
"previous_session_message_and_attachment": "verified"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
docker compose run --rm --no-deps -T audit
|
||||
Container mtusi2026lab7-audit-run-e3518044d5a4 Creating
|
||||
Container mtusi2026lab7-audit-run-e3518044d5a4 Created
|
||||
PASS LB → 2 API: valid client; none/foreign CA/wrong identity/hostname denied
|
||||
PASS RabbitMQ EXTERNAL + ACL: api/worker allowed, unknown identities/roles/plaintext denied
|
||||
PASS Collector mTLS, backend role ACL, scrape/Grafana mTLS, localhost-only plaintext hops
|
||||
PASS OpenBao scopes & renewal, PostgreSQL verify-full and worker DB ACL, S3 prefix ACL
|
||||
@@ -0,0 +1,126 @@
|
||||
Clean checkout of upstream mtusi2026/mtusi2026lab7, commit 20afc2c.
|
||||
Isolated Compose project, public HTTPS port 18443.
|
||||
PASS OpenAPI 3.1 and JSON Schema; official contract and public tests match upstream.
|
||||
PASS CI workflow YAML; startup, HTTPS smoke and cleanup steps.
|
||||
PASS Compose: three loopback publications, non-root and read-only APIs and worker, cap_drop ALL.
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
|
||||
{"hostname_mismatch": "PASS", "acl": "PASS", "logout": "PASS", "expiry": "PASS", "argon2_rehash": "PASS", "login_attempt_statuses": [401, 401, 401, 401, 401, 401, 401, 401, 429, 429], "replica_count": 2}
|
||||
PASS LB → 2 API: valid client; none/foreign CA/wrong identity/hostname denied
|
||||
PASS RabbitMQ EXTERNAL + ACL: api/worker allowed, unknown identities/roles/plaintext denied
|
||||
PASS Collector mTLS, backend role ACL, scrape/Grafana mTLS, localhost-only plaintext hops
|
||||
PASS OpenBao scopes & renewal, PostgreSQL verify-full and worker DB ACL, S3 prefix ACL
|
||||
PASS Grafana queries over mTLS: request in Loki and Tempo, Prometheus scrape up; secret canaries absent
|
||||
PASS 40,008,000 decoded pixels rejected; 40,000,000 decoded pixels processed, bytes preserved
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
{"observed_instances_before": 2, "successful_writes": 104, "failed_attempts": 1, "first_recovery_seconds": 4.989}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
{"jobs_with_verified_original": 3, "old_key_before": "ok", "old_key_after": "InvalidAccessKeyId", "new_key": "ok", "seconds": 22.54}
|
||||
{
|
||||
"offered_rps": 8,
|
||||
"max_concurrency": 24,
|
||||
"phase": {
|
||||
"warmup": {
|
||||
"seconds": 10.003,
|
||||
"counts": {
|
||||
"200": 80
|
||||
},
|
||||
"success_rps": 8.0,
|
||||
"error_pct": 0.0,
|
||||
"success_p50_p95_p99_ms": [
|
||||
14.26,
|
||||
22.19,
|
||||
26.2
|
||||
]
|
||||
},
|
||||
"baseline": {
|
||||
"seconds": 8.002,
|
||||
"counts": {
|
||||
"200": 65
|
||||
},
|
||||
"success_rps": 8.12,
|
||||
"error_pct": 0.0,
|
||||
"success_p50_p95_p99_ms": [
|
||||
15.64,
|
||||
22.28,
|
||||
23.28
|
||||
]
|
||||
},
|
||||
"trust_overlap_and_cutover": {
|
||||
"seconds": 6.425,
|
||||
"counts": {
|
||||
"200": 51
|
||||
},
|
||||
"success_rps": 7.94,
|
||||
"error_pct": 0.0,
|
||||
"success_p50_p95_p99_ms": [
|
||||
14.57,
|
||||
22.47,
|
||||
30.63
|
||||
]
|
||||
},
|
||||
"short_leaf_expiry": {
|
||||
"seconds": 12.716,
|
||||
"counts": {
|
||||
"200": 77,
|
||||
"expired_certificate": 25
|
||||
},
|
||||
"success_rps": 6.06,
|
||||
"error_pct": 24.51,
|
||||
"success_p50_p95_p99_ms": [
|
||||
11.84,
|
||||
22.92,
|
||||
26.5
|
||||
]
|
||||
},
|
||||
"leaf_renewal": {
|
||||
"seconds": 5.574,
|
||||
"counts": {
|
||||
"expired_certificate": 3,
|
||||
"200": 41
|
||||
},
|
||||
"success_rps": 7.36,
|
||||
"error_pct": 6.82,
|
||||
"success_p50_p95_p99_ms": [
|
||||
12.74,
|
||||
20.49,
|
||||
22.18
|
||||
]
|
||||
},
|
||||
"sealed_bao": {
|
||||
"seconds": 31.918,
|
||||
"counts": {
|
||||
"200": 223,
|
||||
"503": 33
|
||||
},
|
||||
"success_rps": 6.99,
|
||||
"error_pct": 12.89,
|
||||
"success_p50_p95_p99_ms": [
|
||||
14.08,
|
||||
21.34,
|
||||
33.03
|
||||
]
|
||||
},
|
||||
"lease_recovery": {
|
||||
"seconds": 8.03,
|
||||
"counts": {
|
||||
"503": 7,
|
||||
"200": 57
|
||||
},
|
||||
"success_rps": 7.1,
|
||||
"error_pct": 10.94,
|
||||
"success_p50_p95_p99_ms": [
|
||||
11.96,
|
||||
20.7,
|
||||
23.43
|
||||
]
|
||||
}
|
||||
},
|
||||
"old_ca_only": "denied",
|
||||
"expired_detected_after_s": 9.7,
|
||||
"plaintext_after_expiry": "denied",
|
||||
"leaf_recovery_after_s": 0.484,
|
||||
"sealed_to_first_503_s": 28.91,
|
||||
"unseal_to_first_200_s": 0.989,
|
||||
"previous_session_message_and_attachment": "verified"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
python3 tests/smoke.py --base-url "https://localhost:8443" --ca-file "secrets/trust/edge.crt"
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
python3 tests/security.py --base-url "https://localhost:8443" --ca-file "secrets/trust/edge.crt"
|
||||
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
|
||||
python3 student-tests/public_security.py
|
||||
{"hostname_mismatch": "PASS", "acl": "PASS", "logout": "PASS", "expiry": "PASS", "argon2_rehash": "PASS", "login_attempt_statuses": [401, 401, 401, 401, 401, 401, 401, 401, 429, 429], "replica_count": 2}
|
||||
python3 tests/smoke.py --base-url "https://localhost:8443" --ca-file "secrets/trust/edge.crt"
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,15 @@
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "https://localhost:8443" --ca-file "secrets/trust/edge.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.
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "https://localhost:8443" --ca-file "secrets/trust/edge.crt"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 111, "failed_attempts": 0, "first_recovery_seconds": 3.371}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
Container mtusi2026lab7-postgres-1 Waiting
|
||||
Container mtusi2026lab7-postgres-1 Healthy
|
||||
Container mtusi2026lab7-migrate-1 Starting
|
||||
Container mtusi2026lab7-migrate-1 Started
|
||||
Container mtusi2026lab7-migrate-1 Waiting
|
||||
Container mtusi2026lab7-migrate-1 Exited
|
||||
Container mtusi2026lab7-api-1 Starting
|
||||
Container mtusi2026lab7-api-1 Started
|
||||
@@ -0,0 +1,6 @@
|
||||
Docker 29.8.2
|
||||
Docker Compose version v5.6.0
|
||||
vCPUs=8 RAM_bytes=4106604544 architecture=aarch64
|
||||
/mtusi2026lab7-api-1 uid=10001:10001 read_only=true dropped=[ALL] security=[no-new-privileges:true] cpu_nanos=1000000000 memory_bytes=402653184
|
||||
/mtusi2026lab7-api-2 uid=10001:10001 read_only=true dropped=[ALL] security=[no-new-privileges:true] cpu_nanos=1000000000 memory_bytes=402653184
|
||||
/mtusi2026lab7-worker-1 uid=10001:10001 read_only=true dropped=[ALL] security=[no-new-privileges:true] cpu_nanos=1000000000 memory_bytes=536870912
|
||||
@@ -0,0 +1,12 @@
|
||||
python3 student-tests/s3_rotation.py
|
||||
Container mtusi2026lab7-audit-run-fb68f0bd57b8 Creating
|
||||
Container mtusi2026lab7-audit-run-fb68f0bd57b8 Created
|
||||
Container mtusi2026lab7-bucket-bootstrap-run-4775c8599a7c Creating
|
||||
Container mtusi2026lab7-bucket-bootstrap-run-4775c8599a7c Created
|
||||
Container mtusi2026lab7-audit-run-5ab937f1b6ad Creating
|
||||
Container mtusi2026lab7-audit-run-5ab937f1b6ad Created
|
||||
Container mtusi2026lab7-bucket-bootstrap-run-c491c4bbf299 Creating
|
||||
Container mtusi2026lab7-bucket-bootstrap-run-c491c4bbf299 Created
|
||||
Container mtusi2026lab7-audit-run-4282dd847c7e Creating
|
||||
Container mtusi2026lab7-audit-run-4282dd847c7e Created
|
||||
{"jobs_with_verified_original": 3, "old_key_before": "ok", "old_key_after": "InvalidAccessKeyId", "new_key": "ok", "seconds": 24.68}
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 student-tests/telemetry_security.py
|
||||
PASS Grafana queries over mTLS: request in Loki and Tempo, Prometheus scrape up; secret canaries absent
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 student-tests/upload_limits.py
|
||||
PASS 40,008,000 decoded pixels rejected; 40,000,000 decoded pixels processed, bytes preserved
|
||||
Reference in New Issue
Block a user