lab7: отчёт, разбор сканирования, доказательства прогона 43267046991
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Доказательства
|
||||
|
||||
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
|
||||
|
||||
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
|
||||
@@ -0,0 +1,17 @@
|
||||
/mtusi2026lab7-api-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-api-2 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-grafana-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-lb-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-loki-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-openbao-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-otel-collector-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-postgres-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-prometheus-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-rabbitmq-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-reconciler-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-redis-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-relay-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-s3-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-tempo-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-tempo-init-1 restarts=0 oom_killed=false exit=0
|
||||
/mtusi2026lab7-worker-1 restarts=0 oom_killed=false exit=0
|
||||
@@ -0,0 +1,18 @@
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab7-api-1 mtusi2026lab7-api:local "/app/api" api About a minute ago Up About a minute (healthy) 8443/tcp
|
||||
mtusi2026lab7-api-2 mtusi2026lab7-api:local "/app/api" api About a minute ago Up About a minute (healthy) 8443/tcp
|
||||
mtusi2026lab7-grafana-1 grafana/grafana:11.4.0 "/run.sh" grafana About a minute ago Up About a minute (healthy) 127.0.0.1:3000->3000/tcp
|
||||
mtusi2026lab7-lb-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" lb About a minute ago Up About a minute 127.0.0.1:8443->8443/tcp
|
||||
mtusi2026lab7-loki-1 grafana/loki:3.3.2 "/usr/bin/loki -conf…" loki About a minute ago Up About a minute 3100/tcp
|
||||
mtusi2026lab7-openbao-1 openbao/openbao:2.1.0 "docker-entrypoint.s…" openbao 2 minutes ago Up 2 minutes 127.0.0.1:8200->8200/tcp
|
||||
mtusi2026lab7-otel-collector-1 otel/opentelemetry-collector-contrib:0.116.1 "/otelcol-contrib --…" otel-collector About a minute ago Up About a minute 4317-4318/tcp, 55678-55679/tcp
|
||||
mtusi2026lab7-postgres-1 postgres:16.4-alpine "sh -c 'install -o p…" postgres 2 minutes ago Up 2 minutes (healthy) 5432/tcp
|
||||
mtusi2026lab7-prometheus-1 prom/prometheus:v3.1.0 "/bin/prometheus --c…" prometheus About a minute ago Up About a minute 9090/tcp
|
||||
mtusi2026lab7-rabbitmq-1 rabbitmq:4.0.9-alpine "docker-entrypoint.s…" rabbitmq 2 minutes ago Up 2 minutes (healthy) 4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp
|
||||
mtusi2026lab7-reconciler-1 mtusi2026lab7-api:local "/app/reconcile --ap…" reconciler About a minute ago Up About a minute (healthy) 8443/tcp
|
||||
mtusi2026lab7-redis-1 redis:7.4.1-alpine "docker-entrypoint.s…" redis 2 minutes ago Up About a minute (healthy) 6379/tcp
|
||||
mtusi2026lab7-relay-1 mtusi2026lab7-api:local "/app/pipeline relay" relay About a minute ago Up About a minute (healthy) 8443/tcp
|
||||
mtusi2026lab7-s3-1 bitnamilegacy/minio:2025.4.22@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01 "/bin/bash -c 'mkdir…" s3 2 minutes ago Up 2 minutes (healthy) 9000-9001/tcp
|
||||
mtusi2026lab7-tempo-1 grafana/tempo:2.6.1 "/tempo -config.file…" tempo About a minute ago Up About a minute
|
||||
mtusi2026lab7-tempo-init-1 grafana/tempo:2.6.1 "chown 10001:10001 /…" tempo-init About a minute ago Exited (0) About a minute ago
|
||||
mtusi2026lab7-worker-1 mtusi2026lab7-api:local "/app/pipeline worker" worker About a minute ago Up About a minute (healthy) 8443/tcp
|
||||
@@ -0,0 +1,16 @@
|
||||
mtusi2026lab7-grafana-1 0.08% 65.02MiB / 256MiB
|
||||
mtusi2026lab7-lb-1 0.30% 13.46MiB / 128MiB
|
||||
mtusi2026lab7-tempo-1 0.02% 40.2MiB / 1GiB
|
||||
mtusi2026lab7-api-1 0.22% 67.7MiB / 256MiB
|
||||
mtusi2026lab7-otel-collector-1 0.69% 45.99MiB / 256MiB
|
||||
mtusi2026lab7-reconciler-1 0.00% 5.035MiB / 128MiB
|
||||
mtusi2026lab7-worker-1 0.16% 17.5MiB / 768MiB
|
||||
mtusi2026lab7-loki-1 0.69% 49.43MiB / 1GiB
|
||||
mtusi2026lab7-prometheus-1 0.36% 35.24MiB / 512MiB
|
||||
mtusi2026lab7-api-2 0.18% 67.39MiB / 256MiB
|
||||
mtusi2026lab7-relay-1 0.30% 11.89MiB / 128MiB
|
||||
mtusi2026lab7-s3-1 0.03% 459.4MiB / 512MiB
|
||||
mtusi2026lab7-postgres-1 0.23% 54.02MiB / 512MiB
|
||||
mtusi2026lab7-redis-1 0.41% 3.93MiB / 256MiB
|
||||
mtusi2026lab7-rabbitmq-1 0.99% 91.57MiB / 512MiB
|
||||
mtusi2026lab7-openbao-1 0.26% 23.14MiB / 256MiB
|
||||
@@ -0,0 +1,6 @@
|
||||
2
|
||||
total used free shared buff/cache available
|
||||
Mem: 7932 2086 1102 90 5148 5845
|
||||
Swap: 3071 0 3071
|
||||
28.0.4
|
||||
Docker Compose version v2.38.2
|
||||
@@ -0,0 +1,299 @@
|
||||
{
|
||||
"before_least_privilege": {
|
||||
"db": {
|
||||
"connect": "allowed",
|
||||
"create role": "allowed",
|
||||
"create table": "allowed",
|
||||
"delete attachments": "allowed",
|
||||
"insert attachment_variants": "allowed",
|
||||
"insert message": "allowed",
|
||||
"read chat_members": "allowed",
|
||||
"read jobs": "allowed",
|
||||
"read messages": "allowed",
|
||||
"read users.password_hash": "allowed",
|
||||
"role": "messenger",
|
||||
"truncate jobs": "allowed",
|
||||
"update attachments.owner_id": "allowed",
|
||||
"update attachments.status": "allowed",
|
||||
"update jobs.state": "allowed"
|
||||
},
|
||||
"s3": {
|
||||
"delete a/*": "allowed",
|
||||
"delete o/*": "allowed",
|
||||
"delete s/*": "allowed",
|
||||
"delete v/*": "allowed",
|
||||
"get a/*": "allowed (no such key)",
|
||||
"get o/*": "allowed (no such key)",
|
||||
"get s/*": "allowed (no such key)",
|
||||
"get v/*": "allowed (no such key)",
|
||||
"list all buckets": "allowed",
|
||||
"list bucket": "allowed",
|
||||
"make bucket": "denied (AccessDenied)",
|
||||
"put a/*": "allowed",
|
||||
"put o/*": "allowed",
|
||||
"put s/*": "allowed",
|
||||
"put v/*": "allowed"
|
||||
},
|
||||
"amqp": {
|
||||
"connect": "allowed",
|
||||
"consume attachment.dead (DLQ)": "allowed",
|
||||
"consume attachment.process": "allowed",
|
||||
"declare queue evil": "allowed",
|
||||
"delete queue attachment.process": "denied: Exception (540) Reason: \"NOT_IMPLEMENTED - cannot delete queue 'attachment.process' in vhost '/'. queue.delete operations with if-unused flag set are not suppor",
|
||||
"publish attachments (job)": "allowed"
|
||||
},
|
||||
"otlp": "allowed (lab6: OTLP по HTTP без аутентификации, любой процесс сети telemetry)",
|
||||
"api_as_lb": "allowed (lab6: API на :8080 по HTTP, доступен из сети front/back)",
|
||||
"openbao": "n/a (lab6: секреты всех нужных сервисов — файлами в контейнере)"
|
||||
},
|
||||
"after_least_privilege": {
|
||||
"amqp": {
|
||||
"connect": "allowed",
|
||||
"consume attachment.dead (DLQ)": "denied: Exception (403) Reason: \"ACCESS_REFUSED - read access to queue 'attachment.dead' in vhost '/' refused for user 'worker-g1'\"",
|
||||
"consume attachment.process": "allowed",
|
||||
"declare queue evil": "denied: Exception (403) Reason: \"ACCESS_REFUSED - configure access to queue 'evil.probe' in vhost '/' refused for user 'worker-g1'\"",
|
||||
"delete queue attachment.process": "denied: Exception (403) Reason: \"ACCESS_REFUSED - configure access to queue 'attachment.process' in vhost '/' refused for user 'worker-g1'\"",
|
||||
"publish attachments (job)": "denied: nack"
|
||||
},
|
||||
"api_as_lb": {
|
||||
"addr": "api:8443",
|
||||
"result": "server_rejected: bad certificate"
|
||||
},
|
||||
"db": {
|
||||
"connect": "allowed",
|
||||
"create role": "denied",
|
||||
"create table": "denied",
|
||||
"delete attachments": "denied",
|
||||
"insert attachment_variants": "allowed",
|
||||
"insert message": "denied",
|
||||
"read chat_members": "denied",
|
||||
"read jobs": "allowed",
|
||||
"read messages": "denied",
|
||||
"read users.password_hash": "denied",
|
||||
"role": "app_worker",
|
||||
"truncate jobs": "denied",
|
||||
"update attachments.owner_id": "denied",
|
||||
"update attachments.status": "allowed",
|
||||
"update jobs.state": "allowed"
|
||||
},
|
||||
"identity_cert": "/pki/worker.crt",
|
||||
"openbao": {
|
||||
"create token with other policy": "denied (403)",
|
||||
"list secrets": "denied (403)",
|
||||
"login": "allowed",
|
||||
"read messenger/api": "denied (403)",
|
||||
"read messenger/reconciler": "denied (403)",
|
||||
"read messenger/relay": "denied (403)",
|
||||
"read own messenger/worker": "allowed",
|
||||
"seal openbao": "denied (403)",
|
||||
"write own secret": "denied (403)",
|
||||
"write policy": "denied (403)"
|
||||
},
|
||||
"otlp": {
|
||||
"ingest": "allowed",
|
||||
"status": 200
|
||||
},
|
||||
"s3": {
|
||||
"delete a/*": "denied (AccessDenied)",
|
||||
"delete o/*": "denied (AccessDenied)",
|
||||
"delete s/*": "allowed",
|
||||
"delete v/*": "denied (AccessDenied)",
|
||||
"get a/*": "denied (AccessDenied)",
|
||||
"get o/*": "denied (AccessDenied)",
|
||||
"get s/*": "allowed (no such key)",
|
||||
"get v/*": "denied (AccessDenied)",
|
||||
"list all buckets": "denied (AccessDenied)",
|
||||
"list bucket": "denied (AccessDenied)",
|
||||
"make bucket": "denied (AccessDenied)",
|
||||
"put a/*": "denied (AccessDenied)",
|
||||
"put o/*": "allowed",
|
||||
"put s/*": "denied (AccessDenied)",
|
||||
"put v/*": "allowed"
|
||||
},
|
||||
"stolen_secrets": [
|
||||
"db_password",
|
||||
"db_user",
|
||||
"s3_access_key",
|
||||
"s3_secret_key"
|
||||
]
|
||||
},
|
||||
"response_steps": [
|
||||
{
|
||||
"step": "новая identity: сертификат CN worker-g2 (перезапись файла на месте)",
|
||||
"at_s": 0.0,
|
||||
"took_s": 0.1
|
||||
},
|
||||
{
|
||||
"step": "OpenBao cert-роль worker → только CN worker-g2; RabbitMQ: worker-g2 создан, worker-g1 удалён (соединения закрыты)",
|
||||
"at_s": 0.1,
|
||||
"took_s": 17.1
|
||||
},
|
||||
{
|
||||
"step": "отзыв всех токенов OpenBao, выданных worker",
|
||||
"at_s": 17.2,
|
||||
"took_s": 3.7
|
||||
},
|
||||
{
|
||||
"step": "ротация пароля роли БД app_worker + разрыв её соединений",
|
||||
"at_s": 20.9,
|
||||
"took_s": 1.3
|
||||
},
|
||||
{
|
||||
"step": "ротация secret key S3 svc-worker",
|
||||
"at_s": 22.2,
|
||||
"took_s": 5.2
|
||||
}
|
||||
],
|
||||
"processing_restored_seconds_after_response": 0.5,
|
||||
"worker_recovery_log_events": [
|
||||
"secrets.login",
|
||||
"secrets.version"
|
||||
],
|
||||
"worker_restarts": 0,
|
||||
"stolen_identity_after_response": {
|
||||
"amqp": {
|
||||
"connect": "denied: Exception (403) Reason: \"username or password not allowed\""
|
||||
},
|
||||
"api_as_lb": {
|
||||
"addr": "api:8443",
|
||||
"result": "server_rejected: bad certificate"
|
||||
},
|
||||
"identity_cert": "/pki/test/worker-stolen.crt",
|
||||
"openbao": {
|
||||
"login": "denied: login 400"
|
||||
},
|
||||
"otlp": {
|
||||
"ingest": "allowed",
|
||||
"status": 200
|
||||
},
|
||||
"stolen_secrets": "none: openbao login denied (login 400)",
|
||||
"db_with_stolen_password": "denied: failed to connect to `user=app_worker database=messenger`: 172.18.0.5:5432 (postgres): failed SASL auth: FATAL: password authentication failed for user \"app_wor",
|
||||
"s3_with_stolen_key": {
|
||||
"delete a/*": "denied (SignatureDoesNotMatch)",
|
||||
"delete o/*": "denied (SignatureDoesNotMatch)",
|
||||
"delete s/*": "denied (SignatureDoesNotMatch)",
|
||||
"delete v/*": "denied (SignatureDoesNotMatch)",
|
||||
"get a/*": "denied (SignatureDoesNotMatch)",
|
||||
"get o/*": "denied (SignatureDoesNotMatch)",
|
||||
"get s/*": "denied (SignatureDoesNotMatch)",
|
||||
"get v/*": "denied (SignatureDoesNotMatch)",
|
||||
"list all buckets": "denied (SignatureDoesNotMatch)",
|
||||
"list bucket": "denied (SignatureDoesNotMatch)",
|
||||
"make bucket": "denied (SignatureDoesNotMatch)",
|
||||
"put a/*": "denied (SignatureDoesNotMatch)",
|
||||
"put o/*": "denied (SignatureDoesNotMatch)",
|
||||
"put s/*": "denied (SignatureDoesNotMatch)",
|
||||
"put v/*": "denied (SignatureDoesNotMatch)"
|
||||
}
|
||||
},
|
||||
"tasks": {
|
||||
"accepted_202": 27,
|
||||
"upload_errors": 0,
|
||||
"final": {
|
||||
"ready": 27
|
||||
},
|
||||
"accepted_during_response": 21
|
||||
},
|
||||
"comparison": {
|
||||
"before": {
|
||||
"db: connect": "allowed",
|
||||
"db: create role": "allowed",
|
||||
"db: create table": "allowed",
|
||||
"db: delete attachments": "allowed",
|
||||
"db: insert attachment_variants": "allowed",
|
||||
"db: insert message": "allowed",
|
||||
"db: read chat_members": "allowed",
|
||||
"db: read jobs": "allowed",
|
||||
"db: read messages": "allowed",
|
||||
"db: read users.password_hash": "allowed",
|
||||
"db: role": "messenger",
|
||||
"db: truncate jobs": "allowed",
|
||||
"db: update attachments.owner_id": "allowed",
|
||||
"db: update attachments.status": "allowed",
|
||||
"db: update jobs.state": "allowed",
|
||||
"s3: delete a/*": "allowed",
|
||||
"s3: delete o/*": "allowed",
|
||||
"s3: delete s/*": "allowed",
|
||||
"s3: delete v/*": "allowed",
|
||||
"s3: get a/*": "allowed (no such key)",
|
||||
"s3: get o/*": "allowed (no such key)",
|
||||
"s3: get s/*": "allowed (no such key)",
|
||||
"s3: get v/*": "allowed (no such key)",
|
||||
"s3: list all buckets": "allowed",
|
||||
"s3: list bucket": "allowed",
|
||||
"s3: make bucket": "denied (AccessDenied)",
|
||||
"s3: put a/*": "allowed",
|
||||
"s3: put o/*": "allowed",
|
||||
"s3: put s/*": "allowed",
|
||||
"s3: put v/*": "allowed",
|
||||
"amqp: connect": "allowed",
|
||||
"amqp: consume attachment.dead (DLQ)": "allowed",
|
||||
"amqp: consume attachment.process": "allowed",
|
||||
"amqp: declare queue evil": "allowed",
|
||||
"amqp: delete queue attachment.process": "denied: Exception (540) Reason: \"NOT_IMPLEMENTED - cannot delete queue 'attachment.process' in vhost '/'. queue.delete operations with if-unused flag set are not suppor",
|
||||
"amqp: publish attachments (job)": "allowed",
|
||||
"otlp": "allowed (lab6: OTLP по HTTP без аутентификации, любой процесс сети telemetry)",
|
||||
"api_as_lb": "allowed (lab6: API на :8080 по HTTP, доступен из сети front/back)",
|
||||
"openbao": "n/a (lab6: секреты всех нужных сервисов — файлами в контейнере)"
|
||||
},
|
||||
"after": {
|
||||
"amqp: connect": "allowed",
|
||||
"amqp: consume attachment.dead (DLQ)": "denied: Exception (403) Reason: \"ACCESS_REFUSED - read access to queue 'attachment.dead' in vhost '/' refused for user 'worker-g1'\"",
|
||||
"amqp: consume attachment.process": "allowed",
|
||||
"amqp: declare queue evil": "denied: Exception (403) Reason: \"ACCESS_REFUSED - configure access to queue 'evil.probe' in vhost '/' refused for user 'worker-g1'\"",
|
||||
"amqp: delete queue attachment.process": "denied: Exception (403) Reason: \"ACCESS_REFUSED - configure access to queue 'attachment.process' in vhost '/' refused for user 'worker-g1'\"",
|
||||
"amqp: publish attachments (job)": "denied: nack",
|
||||
"api_as_lb: addr": "api:8443",
|
||||
"api_as_lb: result": "server_rejected: bad certificate",
|
||||
"db: connect": "allowed",
|
||||
"db: create role": "denied",
|
||||
"db: create table": "denied",
|
||||
"db: delete attachments": "denied",
|
||||
"db: insert attachment_variants": "allowed",
|
||||
"db: insert message": "denied",
|
||||
"db: read chat_members": "denied",
|
||||
"db: read jobs": "allowed",
|
||||
"db: read messages": "denied",
|
||||
"db: read users.password_hash": "denied",
|
||||
"db: role": "app_worker",
|
||||
"db: truncate jobs": "denied",
|
||||
"db: update attachments.owner_id": "denied",
|
||||
"db: update attachments.status": "allowed",
|
||||
"db: update jobs.state": "allowed",
|
||||
"identity_cert": "/pki/worker.crt",
|
||||
"openbao: create token with other policy": "denied (403)",
|
||||
"openbao: list secrets": "denied (403)",
|
||||
"openbao: login": "allowed",
|
||||
"openbao: read messenger/api": "denied (403)",
|
||||
"openbao: read messenger/reconciler": "denied (403)",
|
||||
"openbao: read messenger/relay": "denied (403)",
|
||||
"openbao: read own messenger/worker": "allowed",
|
||||
"openbao: seal openbao": "denied (403)",
|
||||
"openbao: write own secret": "denied (403)",
|
||||
"openbao: write policy": "denied (403)",
|
||||
"otlp: ingest": "allowed",
|
||||
"otlp: status": 200,
|
||||
"s3: delete a/*": "denied (AccessDenied)",
|
||||
"s3: delete o/*": "denied (AccessDenied)",
|
||||
"s3: delete s/*": "allowed",
|
||||
"s3: delete v/*": "denied (AccessDenied)",
|
||||
"s3: get a/*": "denied (AccessDenied)",
|
||||
"s3: get o/*": "denied (AccessDenied)",
|
||||
"s3: get s/*": "allowed (no such key)",
|
||||
"s3: get v/*": "denied (AccessDenied)",
|
||||
"s3: list all buckets": "denied (AccessDenied)",
|
||||
"s3: list bucket": "denied (AccessDenied)",
|
||||
"s3: make bucket": "denied (AccessDenied)",
|
||||
"s3: put a/*": "denied (AccessDenied)",
|
||||
"s3: put o/*": "allowed",
|
||||
"s3: put s/*": "denied (AccessDenied)",
|
||||
"s3: put v/*": "allowed",
|
||||
"stolen_secrets": [
|
||||
"db_password",
|
||||
"db_user",
|
||||
"s3_access_key",
|
||||
"s3_secret_key"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user