forked from mtusi2026/mtusi2026lab7
lab 7 openbao
This commit is contained in:
+5
-5
@@ -1,5 +1,5 @@
|
||||
# Доказательства
|
||||
|
||||
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
|
||||
|
||||
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
|
||||
# Доказательства
|
||||
|
||||
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
|
||||
|
||||
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
|
||||
|
||||
@@ -0,0 +1,270 @@
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
make check
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
make validate
|
||||
python3 scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
make up
|
||||
sh scripts/up.sh
|
||||
bootstrap done (PKI, passwords, Redis ACL). Next: scripts/up.sh
|
||||
[+] Running 8/8
|
||||
✔ openbao Pulled 13.8s
|
||||
[+] Running 6/7
|
||||
[+] Running 9/9i-lab7_backend Created 0.2s
|
||||
✔ Network mtusi-lab7_backend Created 0.2s
|
||||
✔ Volume "mtusi-lab7_grafana_data" Created 0.1s
|
||||
[+] Running 9/10-lab7_bao_data" Created 0.0s
|
||||
✔ Network mtusi-lab7_backend Created 0.2s
|
||||
✔ Volume "mtusi-lab7_grafana_data" Created 0.1s
|
||||
✔ Volume "mtusi-lab7_bao_data" Created 0.0s
|
||||
[+] Running 9/10-lab7_redis_data" Created 0.0s
|
||||
✔ Network mtusi-lab7_backend Created 0.2s
|
||||
✔ Volume "mtusi-lab7_grafana_data" Created 0.1s
|
||||
✔ Volume "mtusi-lab7_bao_data"
|
||||
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
curl --cacert secrets/pki/ca/ca.crt https://localhost:8443/health/ready
|
||||
{"status":"ok"}thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$ make test
|
||||
python3 tests/smoke.py --base-url "https://localhost:8443" --ca-file "/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork/secrets/pki/ca/ca.crt"
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
make test-security
|
||||
python3 tests/security.py --base-url "https://localhost:8443" --ca-file "/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork/secrets/pki/ca/ca.crt"
|
||||
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
make test-tls
|
||||
sh security-tests/run_in_net.sh tls_audit.py
|
||||
PASS api: lb identity accepted: HTTP/1.1 200 OK
|
||||
PASS api: no client cert refused: EmptyReply
|
||||
PASS api: foreign-CA cert refused: EmptyReply
|
||||
PASS api: same-CA, wrong identity (outsider) refused: EmptyReply
|
||||
PASS api: worker identity refused: EmptyReply
|
||||
PASS api: client distrusting server CA fails verification: SSLCertVerificationError
|
||||
PASS collector: api identity accepted: HTTP/1.1 404 Not Found
|
||||
PASS collector: worker identity accepted: HTTP/1.1 404 Not Found
|
||||
PASS collector: dispatcher identity accepted: HTTP/1.1 404 Not Found
|
||||
PASS collector: outsider (same root CA, not a workload) refused: SSLError
|
||||
PASS collector: grafana (same root CA, not a workload) refused: SSLError
|
||||
PASS collector: lb (same root CA, not a workload) refused: SSLError
|
||||
PASS collector: no client cert refused: SSLError
|
||||
PASS collector: plaintext refused: TLS_ONLY
|
||||
PASS kafka: dispatcher may produce: OK
|
||||
%0|1795386387.764|FATAL|rdkafka#producer-2| [thrd:main]: Fatal error: Broker: Cluster authorization failed: Failed to acquire idempotence PID from broker ssl://kafka:9092/1: Broker: Cluster authorization failed
|
||||
%4|1795386387.764|TERMINATE|rdkafka#producer-2| [thrd:app]: Producer terminating with 1 message (11 bytes) still in queue or transit: use flush() to wait for outstanding message delivery
|
||||
PASS kafka: worker may NOT produce: KafkaError{FATAL,code=CLUSTER_AUTHORIZATION_FAILED,val=31,str="Failed to acquire idempotence PID from broker ssl://kafka:9092/1: Broker: Cluster authorization failed"}
|
||||
PASS kafka: CA-signed outsider may NOT produce: KafkaError{code=TOPIC_AUTHORIZATION_FAILED,val=29,str="Broker: Topic authorization failed"}
|
||||
PASS kafka: api identity may NOT produce: KafkaError{code=TOPIC_AUTHORIZATION_FAILED,val=29,str="Broker: Topic authorization failed"}
|
||||
PASS kafka: plaintext refused: NoHTTP
|
||||
PASS postgres: foreign CA -> verification error: SSLCertVerificationError
|
||||
PASS redis: foreign CA -> verification error: SSLCertVerificationError
|
||||
PASS s3: foreign CA -> verification error: SSLCertVerificationError
|
||||
PASS openbao: foreign CA -> verification error: SSLCertVerificationError
|
||||
PASS prometheus: foreign CA -> verification error: SSLCertVerificationError
|
||||
PASS loki: foreign CA -> verification error: SSLCertVerificationError
|
||||
PASS tempo: foreign CA -> verification error: SSLCertVerificationError
|
||||
PASS prometheus: no client cert refused (mTLS): SSLError
|
||||
PASS prometheus: client cert accepted: HTTP/1.1 302 Found
|
||||
PASS loki: no client cert refused (mTLS): SSLError
|
||||
PASS loki: client cert accepted: HTTP/1.1 404 Not Found
|
||||
PASS tempo: no client cert refused (mTLS): SSLError
|
||||
PASS tempo: client cert accepted: HTTP/1.1 404 Not Found
|
||||
PASS s3: TLS with verification works: HTTP/1.1 200 OK
|
||||
PASS openbao: TLS with verification works: HTTP/1.1 200 OK
|
||||
PASS redis: plaintext refused: ConnectionResetError
|
||||
PASS s3: plaintext refused: TLS_ONLY
|
||||
PASS openbao: plaintext refused: TLS_ONLY
|
||||
PASS postgres: sslmode=disable refused (pg_hba reject): OperationalError
|
||||
|
||||
38/38 probes as expected
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
make test-acl
|
||||
python3 security-tests/acl_leak.py --ca-file "/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork/secrets/pki/ca/ca.crt" --grafana-password-file secrets/ops/grafana_admin_password
|
||||
PASS outsider cannot read chat metadata (404)
|
||||
PASS outsider cannot read messages (404)
|
||||
PASS outsider cannot attach a file to a foreign chat (404)
|
||||
PASS forged X-User-Id does not change the Bearer identity (404)
|
||||
PASS X-User-Id alone gives no access (401)
|
||||
PASS logout returns 204 (204)
|
||||
PASS token is dead after logout (401)
|
||||
PASS JSON body over 64 KiB -> 413 (413)
|
||||
PASS canary user registered (201)
|
||||
PASS canary login (201)
|
||||
PASS password and token absent from container logs
|
||||
PASS password and token absent from Loki
|
||||
PASS login: 429 after repeated failures, Retry-After present ([401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 429, 429, 429, 429] retry=59)
|
||||
|
||||
ALL PASS
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$ docker compose run --rm --entrypoint python migrate scripts/argon2_bench.py --runs 20
|
||||
[+] Creating 1/1
|
||||
✔ Container mtusi-lab7-postgres-1 Running 0.0s
|
||||
m=19 MiB t=2 p=1: median 83 ms, p95 94 ms, max logins/s per slot 12.0
|
||||
m=46 MiB t=1 p=1: median 211 ms, p95 400 ms, max logins/s per slot 4.7
|
||||
m=64 MiB t=3 p=4: median 609 ms, p95 811 ms, max logins/s per slot 1.6
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
make test-persistence
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "https://localhost:8443" --ca-file "/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork/secrets/pki/ca/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.
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
make test-failover
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "https://localhost:8443" --ca-file "/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork/secrets/pki/ca/ca.crt"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 100, "failed_attempts": 1, "first_recovery_seconds": 2.785}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
make test-compromise
|
||||
sh security-tests/run_in_net.sh worker_compromise.py --profile after > evidence/worker-compromise-after.json
|
||||
%5|1795386798.420|PARTCNT|rdkafka#producer-2| [thrd:ssl://kafka:9092/1]: Topic attachment-jobs partition count changed from 3 to 0
|
||||
PASS: every probe matches the least-privilege expectation
|
||||
sh security-tests/run_in_net.sh worker_compromise.py --profile before > evidence/worker-compromise-before.json
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
make incident
|
||||
docker compose stop worker
|
||||
[+] Stopping 0/1
|
||||
[+] Stopping 0/1si-lab7-worker-1 Stopping 0.1s
|
||||
[+] Stopping 0/1si-lab7-worker-1 Stopping 0.2s
|
||||
[+] Stopping 0/1si-lab7-worker-1 Stopping 0.3s
|
||||
[+] Stopping 0/1si-lab7-worker-1 Stopping 0.4s
|
||||
[+] Stopping 0/1si-lab7-worker-1 Stopping 0.5s
|
||||
[+] Stopping 0/1si-lab7-worker-1 Stopping 0.6s
|
||||
[+] Stopping 0/1si-lab7-worker-1 Stopping 0.7s
|
||||
[+] Stopping 0/1si-lab7-worker-1 Stopping 0.8s
|
||||
[+] Stopping 0/1si-lab7-worker-1 Stopping 0.9s
|
||||
[+] Stopping 1/1si-lab7-worker-1 Stopping 1.0s
|
||||
✔ Container mtusi-lab7-worker-1 Stopped 1.1s
|
||||
python3 security-tests/jobs_integrity.py submit --n 10 --ca-file "/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork/secrets/pki/ca/ca.crt"
|
||||
submitted 10 jobs; they stay queued while the worker is stopped
|
||||
sh scripts/incident_worker.sh
|
||||
[+] Stopping 1/1
|
||||
✔ Container mtusi-lab7-worker-1 Stopped 0.0s
|
||||
identity worker revoked (SecretIDs destroyed, login tokens revoked)
|
||||
[+] Creating 1/1
|
||||
✔ Container mtusi-lab7-postgres-1 Running0.0s
|
||||
[+] Restarting 1/1
|
||||
✔ Container mtusi-lab7-worker-1 Started0.5s 4s
|
||||
rotated db-worker; old value is dead in the store, new value lives in OpenBao only; worker restarted
|
||||
[+] Creating 2/2
|
||||
✔ Container mtusi-lab7-init_perms-1 Created0.0s
|
||||
✔ Container mtusi-lab7-s3-1 Running0.0s
|
||||
[+] Running 1/1
|
||||
✔ Container mtusi-lab7-init_perms-1 Exited1.4s
|
||||
[+] Restarting 1/1
|
||||
✔ Container mtusi-lab7-worker-1 Started30.8s 7s
|
||||
rotated s3-worker; old value is dead in the store, new value lives in OpenBao only; worker restarted
|
||||
issued worker (workload CA, 14 d)
|
||||
secret_id issued for worker
|
||||
[+] Running 1/1
|
||||
✔ Container mtusi-lab7-worker-1 Running 0.0s
|
||||
PASS OpenBao: login with OLD SecretID: rejected (expected rejected)
|
||||
PASS PostgreSQL: new connection with OLD role password: rejected (expected rejected)
|
||||
PASS S3: new request with OLD svc-worker secret: rejected (expected rejected)
|
||||
PASS OpenBao: login with NEW SecretID: accepted (expected accepted)
|
||||
PASS PostgreSQL: new connection with NEW role password: accepted (expected accepted)
|
||||
PASS S3: new request with NEW svc-worker secret: accepted (expected accepted)
|
||||
|
||||
6/6 probes as expected
|
||||
worker recovered; old credentials are dead on new connections (evidence/revoked-creds.txt)
|
||||
also run: security-tests/run_in_net.sh worker_compromise.py --profile after
|
||||
cd "$PWD" && python3 security-tests/jobs_integrity.py verify --ca-file "/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork/secrets/pki/ca/ca.crt"
|
||||
10/10 attachments ready; lost=0
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
for c in $(docker compose ps -q); do docker inspect --format '{{.Name}} priv={{.HostConfig.Privileged}} net={{.HostConfig.NetworkMode}} ro={{.HostConfig.ReadonlyRootfs}} user={{.Config.User}} capdrop={{.HostConfig.CapDrop}} secopt={{.HostConfig.SecurityOpt}}' $c; done
|
||||
/mtusi-lab7-api-1 priv=false net=mtusi-lab7_backend ro=true user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-api-2 priv=false net=mtusi-lab7_backend ro=true user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-dispatcher-1 priv=false net=mtusi-lab7_backend ro=true user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-grafana-1 priv=false net=mtusi-lab7_backend ro=false user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-kafka-1 priv=false net=mtusi-lab7_backend ro=false user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-load_balancer-1 priv=false net=mtusi-lab7_backend ro=true user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-loki-1 priv=false net=mtusi-lab7_backend ro=false user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-openbao-1 priv=false net=mtusi-lab7_backend ro=false user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-otel-collector-1 priv=false net=mtusi-lab7_backend ro=true user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-postgres-1 priv=false net=mtusi-lab7_backend ro=false user= capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-prometheus-1 priv=false net=mtusi-lab7_backend ro=false user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-redis-1 priv=false net=mtusi-lab7_backend ro=true user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-s3-1 priv=false net=mtusi-lab7_backend ro=false user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-s3_sweeper-1 priv=false net=mtusi-lab7_backend ro=true user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-tempo-1 priv=false net=mtusi-lab7_backend ro=false user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
/mtusi-lab7-worker-1 priv=false net=mtusi-lab7_backend ro=true user=10001:10001 capdrop=[ALL] secopt=[no-new-privileges:true]
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
docker compose restart openbao
|
||||
sleep 15
|
||||
docker compose restart worker
|
||||
sleep 20
|
||||
docker compose logs worker --tail 8
|
||||
curl --cacert secrets/pki/ca/ca.crt https://localhost:8443/health/ready
|
||||
sh scripts/bao_unseal.sh
|
||||
sh scripts/bao_secret_id.sh all
|
||||
docker compose restart worker
|
||||
sleep 30
|
||||
docker compose ps worker
|
||||
[+] Restarting 1/1
|
||||
✔ Container mtusi-lab7-openbao-1 Started 0.6s
|
||||
[+] Restarting 1/1
|
||||
✔ Container mtusi-lab7-worker-1 Started 1.1s
|
||||
worker-1 | {"timestamp": "2026-11-23T11:14:55.994Z", "severity": "INFO", "service.name": "messenger-worker", "event": "worker_started", "message": "worker 84aa576470e6 started, concurrency=2, max_attempts=5, lease=75s"}
|
||||
{"status":"ok"}OpenBao unsealed
|
||||
secret_id issued for api
|
||||
secret_id issued for worker
|
||||
secret_id issued for dispatcher
|
||||
secret_id issued for sweeper
|
||||
[+] Restarting 1/1
|
||||
✔ Container mtusi-lab7-worker-1 Started 0.7s
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi-lab7-worker-1 mtusi-lab7-app:1.0.0 "python -m src.worker" worker 16 minutes ago Up 30 seconds
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026la
|
||||
b7-fork$ m
|
||||
ake scan
|
||||
sh scripts/scan.sh
|
||||
Scanning mtusi-lab7-app:1.0.0 ...
|
||||
PASS: mtusi-lab7-app:1.0.0; report saved to evidence/trivy-mtusi-lab7-app_1.0.0.txt
|
||||
Scanning openbao/openbao:2.4.1 ...
|
||||
PASS: openbao/openbao:2.4.1; report saved to evidence/trivy-openbao_openbao_2.4.1.txt
|
||||
Scanning redis:7.4.2-alpine ...
|
||||
PASS: redis:7.4.2-alpine; report saved to evidence/trivy-redis_7.4.2-alpine.txt
|
||||
Scanning postgres:17.6-alpine ...
|
||||
PASS: postgres:17.6-alpine; report saved to evidence/trivy-postgres_17.6-alpine.txt
|
||||
Scanning haproxy:3.2.5-alpine ...
|
||||
PASS: haproxy:3.2.5-alpine; report saved to evidence/trivy-haproxy_3.2.5-alpine.txt
|
||||
scan finished: evidence/pip-audit.txt, evidence/trivy-*.txt
|
||||
thereal_alyoname@DESKTOP-8Q26HPT:/mnt/c/Users/User/Desktop/MTUCI/4_course/highload_apps/lab7/mtusi2026lab7-fork$
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
2026-11-22T23:27:08Z
|
||||
@@ -0,0 +1 @@
|
||||
2026-11-22T23:25:35Z
|
||||
@@ -0,0 +1,96 @@
|
||||
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
|
||||
|
||||
[notice] A new release of pip is available: 25.0.1 -> 26.3
|
||||
[notice] To update, run: pip install --upgrade pip
|
||||
Found 89 known vulnerabilities in 3 packages
|
||||
Name Version ID Fix Versions
|
||||
----------------- ------- ------------------- ------------
|
||||
pillow 11.3.0 PYSEC-2026-2249 12.1.1
|
||||
pillow 11.3.0 PYSEC-2026-2250 12.2.0
|
||||
pillow 11.3.0 PYSEC-2026-165 12.2.0
|
||||
pillow 11.3.0 PYSEC-2026-2251 12.2.0
|
||||
pillow 11.3.0 PYSEC-2026-2874 12.2.0
|
||||
pillow 11.3.0 PYSEC-2026-2252 12.2.0
|
||||
pillow 11.3.0 PYSEC-2026-165 12.2.0
|
||||
pillow 11.3.0 PYSEC-2026-2250 12.2.0
|
||||
pillow 11.3.0 PYSEC-2026-2253 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-2251 12.2.0
|
||||
pillow 11.3.0 PYSEC-2026-2255 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-2257 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-2256 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-2254 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-2252 12.2.0
|
||||
pillow 11.3.0 PYSEC-2026-2249 12.1.1
|
||||
pillow 11.3.0 PYSEC-2026-2874 12.2.0
|
||||
pillow 11.3.0 PYSEC-2026-3453 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3451 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3493 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-2254 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-2253 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-2256 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-2255 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3454 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3451 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3494 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3495 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3496 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3453 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3454 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3495 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3496 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3494 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-3493 12.3.0
|
||||
pillow 11.3.0 PYSEC-2026-4327 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4328 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4326 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4339 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4340 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4343 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4334 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4337 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4341 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4330 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4338 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4335 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4336 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4331 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4332 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4329 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4342 13.0.0
|
||||
pillow 11.3.0 PYSEC-2026-4363 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112895 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112400 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112897 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112395 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112404 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112899 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112900 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112893 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112891 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112390 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112401 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112391 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112894 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112406 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112399 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112892 13.0.0
|
||||
pillow 11.3.0 CVE-2026-112393 13.0.0
|
||||
pillow 11.3.0 CVE-2026-96638 13.0.0
|
||||
pillow 11.3.0 CVE-2026-96640 13.0.0
|
||||
pillow 11.3.0 CVE-2026-96778 13.0.0
|
||||
pillow 11.3.0 GHSA-78g4-xqwv-q3g8 13.0.0
|
||||
pillow 11.3.0 CVE-2026-128067 13.0.0
|
||||
pillow 11.3.0 CVE-2026-128066 13.0.0
|
||||
opentelemetry-api 1.45.1 CVE-2026-126360 1.45.2
|
||||
starlette 0.47.3 PYSEC-2026-1942 0.49.1
|
||||
starlette 0.47.3 PYSEC-2026-161 1.0.1
|
||||
starlette 0.47.3 PYSEC-2026-161 1.0.1
|
||||
starlette 0.47.3 PYSEC-2026-2281 1.1.0
|
||||
starlette 0.47.3 PYSEC-2026-2280 1.1.0
|
||||
starlette 0.47.3 PYSEC-2026-249 1.3.1
|
||||
starlette 0.47.3 PYSEC-2026-248 1.3.0
|
||||
starlette 0.47.3 PYSEC-2026-249 1.3.1
|
||||
starlette 0.47.3 PYSEC-2026-248 1.3.0
|
||||
starlette 0.47.3 PYSEC-2026-1942 0.49.1
|
||||
starlette 0.47.3 PYSEC-2026-2281 1.1.0
|
||||
starlette 0.47.3 PYSEC-2026-2280 1.1.0
|
||||
@@ -0,0 +1,8 @@
|
||||
PASS OpenBao: login with OLD SecretID: rejected (expected rejected)
|
||||
PASS PostgreSQL: new connection with OLD role password: rejected (expected rejected)
|
||||
PASS S3: new request with OLD svc-worker secret: rejected (expected rejected)
|
||||
PASS OpenBao: login with NEW SecretID: accepted (expected accepted)
|
||||
PASS PostgreSQL: new connection with NEW role password: accepted (expected accepted)
|
||||
PASS S3: new request with NEW svc-worker secret: accepted (expected accepted)
|
||||
|
||||
6/6 probes as expected
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"profile": "after",
|
||||
"probes": [
|
||||
{
|
||||
"probe": "db: SELECT attachment_jobs (job state)",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "db: UPDATE attachments (status)",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "db: SELECT users.password_hash",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "db: SELECT messages (content)",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "db: DELETE FROM attachment_jobs",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "db: CREATE TABLE / DDL",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "s3: GET staging/*",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "s3: GET attachments/* (finished files)",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "s3: PUT attachments/*",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "s3: DELETE attachments/*",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "s3: PUT staging/* (forge input)",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "s3: ListBucket",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "kafka: consume jobs topic, own group",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "kafka: produce to jobs topic (forge jobs)",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "kafka: consume with another group",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "bao: read kv/data/worker (own secret)",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "bao: read kv/data/api",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "bao: write sys policy",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
},
|
||||
{
|
||||
"probe": "api: connect to api:8443 with worker certificate",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"profile": "before",
|
||||
"probes": [
|
||||
{
|
||||
"probe": "db: SELECT attachment_jobs (job state)",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "db: UPDATE attachments (status)",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "db: SELECT users.password_hash",
|
||||
"expected_after": "denied",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "db: SELECT messages (content)",
|
||||
"expected_after": "denied",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "db: DELETE FROM attachment_jobs",
|
||||
"expected_after": "denied",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "db: CREATE TABLE / DDL",
|
||||
"expected_after": "denied",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "s3: GET staging/*",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "s3: GET attachments/* (finished files)",
|
||||
"expected_after": "denied",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "s3: PUT attachments/*",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "s3: DELETE attachments/*",
|
||||
"expected_after": "denied",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "s3: PUT staging/* (forge input)",
|
||||
"expected_after": "denied",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "s3: ListBucket",
|
||||
"expected_after": "denied",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "kafka: consume jobs topic, own group",
|
||||
"expected_after": "allowed",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "kafka: produce to jobs topic (forge jobs)",
|
||||
"expected_after": "denied",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "kafka: consume with another group",
|
||||
"expected_after": "denied",
|
||||
"observed": "allowed"
|
||||
},
|
||||
{
|
||||
"probe": "api: connect to api:8443 with worker certificate",
|
||||
"expected_after": "denied",
|
||||
"observed": "denied"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user