ЛР 7 — БВТ2301 — Васильев — на 5 #18
+10
-19
@@ -1,20 +1,11 @@
|
||||
.git
|
||||
.github
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
*
|
||||
!pyproject.toml
|
||||
!uv.lock
|
||||
!src/
|
||||
!src/**
|
||||
!migrations/
|
||||
!migrations/**
|
||||
|
||||
operator-private
|
||||
secrets
|
||||
certs
|
||||
volumes
|
||||
data
|
||||
backups
|
||||
*.key
|
||||
*.pem
|
||||
*.p12
|
||||
*.pfx
|
||||
*.jks
|
||||
.venv
|
||||
__pycache__
|
||||
node_modules
|
||||
evidence
|
||||
.DS_Store
|
||||
.env
|
||||
|
||||
@@ -30,3 +30,9 @@ coverage/
|
||||
.vscode/
|
||||
# Keep small, sanitized evidence summaries in evidence/ under version control.
|
||||
# Inspect git diff --cached: ignore rules are not a secret scanner.
|
||||
.pytest_cache/
|
||||
.ruff_cache/
|
||||
|
||||
operator-private/
|
||||
secrets/
|
||||
.env
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
# ЛР7: объяснение перед защитой
|
||||
|
||||
В ЛР5 мы сделали надёжную фоновую обработку картинок мессенджера, в ЛР6 — наблюдаемость. В ЛР7 защищаем систему: кто к кому подключается, как доказывает свою роль, какие операции ему разрешены и что происходит при краже credentials. Пользователь по-прежнему создаёт чат, отправляет сообщение и загружает картинку.
|
||||
|
||||
Путь картинки: клиент по HTTPS → балансировщик → по mTLS API. API проверяет Bearer token и членство в чате, кладёт исходник в S3 staging, одной транзакцией БД записывает attachment/job/outbox и отвечает202. Dispatcher публикует ссылку на job в брокере. Worker читает задачу и исходник, делает варианты, пишет результаты в S3 attachments, публикует ready в БД. Через Collector передаются технические traces/metrics/logs, содержимое переписки туда не отправляется.
|
||||
|
||||
TLS шифрует канал и проверяет сервер по CA и hostname. mTLS дополнительно требует клиентский сертификат. Подпись CA говорит только «этот сертификат выдал наш центр». Поэтому gateway отдельно смотрит DNS SAN и разрешает нужную роль: API принимает только lb, брокер — worker/dispatcher, Collector — api/worker/dispatcher. Сертификат worker от того же CA не позволяет ему стать LB. Затем БД/S3/брокер отдельно проверяют разрешённые действия службы.
|
||||
|
||||
OpenBao хранит секреты и аутентифицирует службы. Оператор один раз делает init, получает root token и доли unseal вне контейнеров. Unseal с двумя долями из трёх позволяет Bao расшифровать сохранённые данные. Сервисы предъявляют свои leaf certificates, получают короткий token и читают только собственный KV path. TTL token30s, локальный кэш действует не более29s. Неуспешное обновление после expiry даёт503, без перехода на plaintext или вечный пароль из env.
|
||||
|
||||
Пароли пользователей хранятся как Argon2id hashes, это необратимое преобразование. Случайная salt входит в hash. Параметры64MiB/t2/p1 удорожают перебор, но позволяют атаковать сервер дорогими login requests. Поэтому разрешены два одновременных KDF на API, а общий лимит в PostgreSQL —10попыток на username за10s и30всего за10s для обеих реплик. При успешном входе старый слабый hash пересчитывается. Сессия — случайный Bearer token; в PG хранится его SHA256 digest, пользователь и expiry. На каждом запросе проверяем PG. Logout удаляет сессию, кэш не продлевает срок её действия.
|
||||
|
||||
Ротация — выдача нового секрета/сертификата, отзыв — прекращение действия старого. Замены файла недостаточно: старое DB-соединение может оставаться авторизованным, TLS-сессия — живой. В исследовании останавливаем worker, добавляем старый serial в denylist, меняем пароль БД и закрываем старые DB-сессии, выпускаем новый leaf, меняем pinned certificate/KV в Bao и запускаем worker с тем же imageID. Проверяем новые соединения со старым материалом и сохранность принятых задач.
|
||||
|
||||
На5 выбран трек «компрометация worker». В отдельных синтетических DB/queue/bucket сравниваем одинаковые операции под широкой и узкой ролью: разрешённые раньше операции после ограничения запрещены. В основном стенде разрешены только операции с задачами и нужными prefixes. Затем выполняются отзыв, ротация и восстановление трёх принятых attachments, сверяются SHA исходников и наличие вариантов. Worker всё равно может портить доступные ему результаты и состояние задач: least privilege уменьшает радиус поражения.
|
||||
|
||||
## Контрольные вопросы преподавателя
|
||||
|
||||
**Какая часть mTLS проверяет шифрование, какая идентичность и где разрешение на действие?** TLS handshake согласует ключи и шифрование, проверяет цепочку CA, сроки сертификатов и server hostname. Client certificate подтверждает клиента. Gateway проверяет точный SAN роли. Разрешение операции — отдельный контроль: PG GRANT, broker ACL, S3 bucket/prefix/method и Bao policy.
|
||||
|
||||
**Почему доверенный CA ещё не означает, что любой его клиент может быть LB?** CA выдаёт сертификаты нескольким службам. У worker может быть валидный сертификат, но роль worker не разрешена API gateway. Проверка одной только подписи CA дала бы лишние права.
|
||||
|
||||
**Где хранится первый секрет для OpenBao и кто имеет право unseal?** Первичный credential службы — её leaf private key, установленный оператором из локальной PKI. CA private key, root token и unseal shares находятся в operator-private на операторском хосте, в app/Bao не примонтированы. Оператор явно выполняет init/unseal. Приложение не получает root token или общий вечный пароль для получения секретов. В production доли следует разнести между операторами, CA защищать отдельно.
|
||||
|
||||
**Что происходит при истечении credentials, остановке OpenBao и рестарте API?** До истечения короткого кэша возможно использование ранее выданного секрета. Примерно через29s служба должна переаутентифицироваться: при sealed/down/expired leaf business operations дают503, liveness остаётся200. После восстановления Bao повторный refresh восстанавливает работу. API, стартующий при sealed Bao, не может получить первый секрет и завершается; после unseal его нужно перезапустить. Рестарт только API при готовом Bao не требует unseal.
|
||||
|
||||
## Частые дополнительные вопросы
|
||||
|
||||
**Почему недостаточно Docker-сети?** Скомпрометированная служба может подключиться к соседу. mTLS и ACL нужны и внутри сети.
|
||||
|
||||
**Зачем worker отдельный пользователь БД?** Ему не нужны passwords/messages/ownership/DDL, только задачи и attachments. Кража его credentials не должна давать права API или администратора.
|
||||
|
||||
**Почему внутри proxy есть HTTP?** Это loopback того же network namespace. Native port недоступен соседним контейнерам. Межконтейнерный канал шифрован. Открытый raw port на0.0.0.0 был бы обходом, поэтому audit проверяет отказ подключения.
|
||||
|
||||
**Почему scanner после исправлений показывает HIGH?** Для оставшихся OS findings в Debian нет готового исправления. Мы разбираем конкретные условия mount/nsenter/SQLite/TUI и других путей. Часть не используется приложением, но это остаточный риск. Известные runtime Python проблемы убраны обновлением Pillow/OTel, доступные OS patches установлены.
|
||||
|
||||
**Что остаётся источником истины при падении брокера/кэша?** PostgreSQL. Кэш можно сбросить, сессии не воскреснут. Брокер доставляет jobID, outbox и DB job state сохраняют задачу; worker может повторить обработку без двойной публикации готового результата.
|
||||
|
||||
**Это production HA?** Зависимости single-node, bootstrap выполняет оператор. Отдельная защита от внешнего DDoS, backup и автономный PKI controller не реализованы. Работа доказывает конкретные границы и конкретный эксперимент.
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
FROM python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b AS build
|
||||
COPY --from=ghcr.io/astral-sh/uv:0.11.7 /uv /usr/local/bin/uv
|
||||
WORKDIR /app
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN uv sync --locked --no-dev --no-install-project --python /usr/local/bin/python
|
||||
|
||||
FROM python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends libjpeg-turbo-progs && rm -rf /var/lib/apt/lists/*
|
||||
RUN python -m pip uninstall --yes pip
|
||||
ARG VCS_REF=uncommitted
|
||||
LABEL org.opencontainers.image.revision=$VCS_REF
|
||||
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=/app/src PATH=/app/.venv/bin:$PATH
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/.venv /app/.venv
|
||||
COPY src ./src
|
||||
COPY migrations ./migrations
|
||||
USER 10001:10001
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=3s --timeout=2s --start-period=5s --retries=5 CMD ["python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health/ready', timeout=1)"]
|
||||
CMD ["python", "-m", "messenger"]
|
||||
@@ -31,3 +31,28 @@ test-failover:
|
||||
|
||||
test-security:
|
||||
$(PYTHON) tests/security.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
# Student implementation; teacher acceptance targets remain unchanged.
|
||||
PUBLIC_PORT ?= 8447
|
||||
BASE_URL = https://localhost:$(PUBLIC_PORT)
|
||||
CA_FILE = $(CURDIR)/secrets/ca.pem
|
||||
bootstrap:
|
||||
python3 scripts/bootstrap.py
|
||||
build:
|
||||
VCS_REF=$$(git rev-parse HEAD) docker compose build
|
||||
init: bootstrap build
|
||||
docker compose up -d postgres openbao cache cache-tls broker broker-tls storage s3 storage-tls
|
||||
python3 scripts/bao_operator.py init
|
||||
up: init
|
||||
VCS_REF=$$(git rev-parse HEAD) docker compose up -d --wait
|
||||
unseal:
|
||||
python3 scripts/bao_operator.py unseal
|
||||
migrate:
|
||||
docker compose run --rm migrate
|
||||
down:
|
||||
docker compose down
|
||||
student-test:
|
||||
BASE_URL=$(BASE_URL) SSL_CERT_FILE=$(CA_FILE) uv run --locked pytest -q
|
||||
lint:
|
||||
uv run --locked ruff check src student-tests scripts
|
||||
.PHONY: bootstrap build init up unseal migrate down student-test lint
|
||||
|
||||
@@ -1,37 +1,104 @@
|
||||
# Отчёт — лабораторная 7
|
||||
# Лабораторная7: безопасность мессенджера
|
||||
|
||||
- Автор, группа: TODO
|
||||
- Целевая оценка; выбранный трек 5, если нужен: TODO
|
||||
- Commit/PR: TODO после публикации
|
||||
- Использованные источники, библиотеки и помощь ИИ: TODO
|
||||
Автор: Васильев Никита, БВТ2301. Целевая оценка5; трек1 — компрометация upload-worker. Работа выполнена локально, публикация и PR в этот результат не входят.
|
||||
|
||||
## Запуск из чистого clone
|
||||
Мессенджер продолжает собственные предыдущие работы: PostgreSQL хранит пользователей, сессии, членство, сообщения, attachment metadata, jobs/outbox/audit; S3 хранит приватные байты; Valkey cache ускоряет user lookups, Valkey Streams доставляет уведомления о задачах. Источником истины остаётся PostgreSQL. Dispatcher публикует transactional outbox, worker обрабатывает картинки вне API. Повторная доставка допустима, lease/fencing защищает публикацию результата.
|
||||
|
||||
TODO: версии runtime/образов, prerequisites, команды создания локальных secrets/.env, build, миграций, запуска, ожидания готовности, тестов и остановки. Указать необходимые действия оператора. Не вставлять секреты. Отдельно указать безопасную остановку и команду намеренного удаления учебных данных.
|
||||
В ЛР7 добавлены HTTPS, проверка CA и SAN, обязательное mTLS LB→API с разрешением именно роли lb, защищённые зависимости, разные DB/S3/queue роли, OpenBao cert auth, expiry/re-auth, общий login budget, отзыв/ротация и ограничения контейнеров. Бизнес-контракт преподавателя сохранён.
|
||||
|
||||
## Архитектура и решения
|
||||
[Запуск и оператор](RUNBOOK.md) · [Модель угроз](THREAT_MODEL.md) · [Матрица доверия](contracts/trust-matrix.md) · [Scan и применимость](SECURITY_SCAN.md) · [Объяснение для защиты](DEFENSE.md).
|
||||
|
||||
TODO: схема процессов/хранилищ, источник истины, транзакционные границы, ограничения. Что перенесено из lab6, что изменено в этой работе. Соответствие переменных из .env.example реальной конфигурации.
|
||||
## Чистый запуск и проверки
|
||||
|
||||
## Доказательства критериев
|
||||
Docker Composev2, Python3.12, uv; стенд проверен на Docker Desktop4CPU/7.7GiB RAM. Версии образов закреплены в compose.yaml, Python зависимости — uv.lock. Сервисы независимы от других лабораторных и используют собственные volumes проекта mtusi-vasilev-lab7. API — HTTPSlocalhost8447, Grafana13007, operator OpenBao18207; все опубликованы только на localhost.
|
||||
|
||||
| Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства |
|
||||
| --- | --- | --- | --- |
|
||||
| Публичный smoke | make test | TODO | TODO |
|
||||
| Остальные пункты уровня 3 | TODO | TODO | TODO |
|
||||
| Все пункты уровня 4, если заявлен | TODO | TODO | TODO |
|
||||
| Выбранный трек 5, если заявлен | TODO | TODO | TODO |
|
||||
```sh
|
||||
make up
|
||||
make test
|
||||
make test-security
|
||||
make student-test
|
||||
python3 scripts/security_checks.py transport
|
||||
python3 scripts/security_checks.py policies
|
||||
python3 scripts/security_checks.py baseline
|
||||
python3 scripts/security_checks.py kdf
|
||||
uv run --locked python research/auth_budget.py
|
||||
uv run --locked python research/sealed.py
|
||||
uv run --locked python research/compromise.py
|
||||
```
|
||||
|
||||
TODO: добавить отдельную строку для каждого заявленного критерия. PASS без команды и наблюдения не является доказательством. Проверка инфраструктурного hook требует подтверждения, какие реальные процессы/хранилища перезапущены.
|
||||
`make up` выполняет bootstrap/build, запускает зависимости, явно вызывает operator init/unseal/configure, затем поднимает весь стенд. Init не является dev mode: данные Bao persistent, доли и root token находятся только в закрытом operator-private, не монтируются в приложения/Bao. Обычный рестарт API не требует unseal. Подробности хранения, восстановления, безопасной остановки и намеренного удаления данных — в RUNBOOK.
|
||||
|
||||
## Эксперименты и отказы
|
||||
Проверки выполняются последовательно. Positive-login pytest ожидает реальный Retry-After при429; teacher client не изменён. Ошибки503 и явно ожидаемые429 не ретраятся. Исследование compromise автоматически запускает отрицательные проверки старого материала сразу после ротации, пока исходный30s token ещё должен быть действителен. Поздний повтор отдельно `security_checks.py revoked` не доказывает ранний отзыв: для этого следует повторить весь сценарий.
|
||||
|
||||
TODO: гипотеза, hardware/лимиты, версии, объём данных, профиль нагрузки, concurrency/arrival rate, длительность/прогрев, повторы, успешные RPS, ошибки, p50/p95/p99, CPU/RAM. Сохранить raw summary без tokens и объяснить ограничения измерения.
|
||||
## Проверенные результаты
|
||||
|
||||
| Воздействие | Что ожидаем | Что наблюдали | Время восстановления / потеря данных |
|
||||
| --- | --- | --- | --- |
|
||||
| TODO | TODO | TODO | TODO |
|
||||
| Критерий | Наблюдение | Доказательство |
|
||||
| --- | --- | --- |
|
||||
| Offline contract, syntax, lint | PASS; offline checker не подменяет прикладное тестирование | evidence/contract-check.txt, lint.txt |
|
||||
| Публичные HTTPS smoke/trust | PASS, queued→ready, original/thumbnail, ACL/logout; недоверенный CA отвергнут | evidence/smoke-final.txt, external-tls-final.txt |
|
||||
| Собственные регрессии |205PASS за131.66s;3ожидания Retry-After. Включены реальные TLS отрицательные тесты | evidence/student-tests-final.txt |
|
||||
| Readiness под параллельными пробами |64/64HTTP200, concurrency8, без retry | evidence/readiness-concurrency.json |
|
||||
| Вся TLS матрица |78/78: intended role, wrong trusted role, foreign CA, no certificate, wrong hostname, empty trust, закрытые raw ports | evidence/transport-matrix.json |
|
||||
| Scoped worker |24/24: own jobs/results разрешены, users/messages/DDL/ownership/queue admin/publish/staging write/чужой Bao path запрещены | evidence/worker-policy-final.json |
|
||||
| Независимые HTTP/TLS проверки |103/103HTTP и14/14TLS, включая64параллельные readiness пробы и прямые plaintext bypass попытки | evidence/independent-http.json, independent-tls.json |
|
||||
| Реальная наблюдаемость и приватность | Один trace из17SERVER/PRODUCER/CONSUMER/CLIENTspans; DB/S3, API/worker logs;1051metric series с корректными buckets/labels, секретные canaries отсутствуют | evidence/independent-observability.json |
|
||||
| Grafana end-to-end | Три datasource health/proxy работают, реальный POST/api/ds/query возвращает panel data;16панелей,3правила healthy/inactive | evidence/independent-observability.json, grafana-prom-health.json |
|
||||
| Shared rate, rehash, session expiry |10×401, затем2×429/Retry-After10 на обеих API; слабый hash обновлён; истёкшая synthetic session даёт401 на обеих репликах | evidence/auth-budget.json |
|
||||
| Sealed/expiry | Первая business503 через28.634s, liveness200; восстановление после unseal1.037s | evidence/sealed-expiry.json |
|
||||
| Ротация и принятые задачи |3accepted→3ready, original SHA совпадают;9вариантов проверены по metadata SHA/size; imageID неизменен | evidence/compromise-recovery.json |
|
||||
| Отзыв | Старый DB пароль, старый leaf для broker/S3/Bao, ранее выданный Bao token отвергнуты; token403 получен до его исходного expiry | evidence/revoked-identity.json |
|
||||
| Dependency/image scan | Runtime pip-audit0known; image0critical,47unfixed high/89medium/65low/5unknown OS, Python0; применимость разобрана | SECURITY_SCAN.md и rawJSON |
|
||||
| Реальный runtime и ресурсы |4API/worker/dispatcher payload hashes совпадают с деревом исходников; Tempo peak419790848 из805306368bytes, OOMKilledfalse | evidence/runtime-source.json, resources-full.txt |
|
||||
|
||||
## Ограничения и следующие шаги
|
||||
ImageID и результаты относятся к реальному build/runtime, не к mock. В manifest сохранены build/source reference и SHA256 файлов src/migrations; последующие изменения документации и operator research scripts не меняют business payload образа.
|
||||
|
||||
TODO: какие отказы выдерживаются и какие нет; что не реализовано; где учебное упрощение; какое улучшение подтверждено, а какое пока гипотеза.
|
||||
## Трек5: компрометация worker
|
||||
|
||||
Гипотеза: минимальные права уменьшают радиус поражения скомпрометированного worker; отзыв identity и ротация рабочего DB secret позволяют восстановить ранее принятые задачи без пересборки образа и потери байтов.
|
||||
|
||||
Контролируемый baseline создаёт отдельную синтетическую схему PostgreSQL с двумя NOLOGIN ролями (operator SET ROLE), отдельный loopback Valkey6378 без production data и отдельный bucket security-study. Широкая S3роль не имеет прав на messenger. Основной worker никогда не получает admin/broad credentials.
|
||||
|
||||
| Одинаковая операция | Широкие synthetic права | Ограниченные права |
|
||||
| --- | --- | --- |
|
||||
| Чтение password_hash и CREATE TABLE в synthetic schema | allowed | denied |
|
||||
| Чтение synthetic jobs | allowed | allowed |
|
||||
| Queue ACL LIST, XADD и запись другого ключа | allowed | denied |
|
||||
| S3 private prefix GET/PUT в synthetic bucket | allowed | denied |
|
||||
|
||||
Raw результаты: evidence/baseline-db.json, baseline-queue.json, baseline-s3.json. Отдельные actual-worker24пробы показывают действующие разрешённые/запрещённые операции основного стенда.
|
||||
|
||||
Далее остановлен worker, приняты три PNG attachments с202queued и сохранены исходные SHA/imageIDs. Оператор блокирует старую Bao cert-auth роль **до** перечисления/отзыва её token accessors, проверяет отказ входа старым leaf, отзывает tokens, меняет DB пароль и закрывает старые DB sessions. Затем выпускает новый leaf, обновляет pinned cert/KV, запускает worker с прежним образом. Serial denylist проверяется и на новых, и перед передачей данных по существующим TCP connections; TLS tickets отключены.
|
||||
|
||||
Итог повторного полного сценария:3/3ready,3original SHA совпали,9/9derived variants совпали с metadata SHA/size,6/6отрицательных проверок старого материала PASS, imageID до/после одинаков. Полный наблюдаемый цикл занял5.425s, включая operator actions, отрицательные проверки и проверку контента. При polling API503 не наблюдалось. Это не непрерывная нагрузка и не утверждение о нулевом глобальном error rate.
|
||||
|
||||
Worker по-прежнему может читать разрешённые staging/results, портить доступные ему attachments/jobs и задерживать доставку. Least privilege не делает компрометацию безвредной. Сохранность доказана для выбранных принятых задач; восстановление произвольно повреждённых ранее объектов не заявлено.
|
||||
|
||||
## Argon2 и бюджет login DoS
|
||||
|
||||
Argon2id:64MiB,t2,p1, два active KDF на API. Для двух реплик максимум активной Argon memory256MiB плюс память Python/SDK/pools. Общий fixed window в PostgreSQL допускает10попыток на username и30global за10s; concurrency ограничивается дополнительно. На границе окон возможен burst, это не sliding-window DDoS сервис. Регистрации имеют ограничение KDF concurrency, а не глобальную квоту. Старые login_windows удаляются после1h через индекс.
|
||||
|
||||
В отдельном API container с теми же0.5CPU/512MiB:7повторов hash+verify, median211.493ms, max263.612ms; peak RSS146248KiB. Два одновременных hash заняли205–293ms каждый. Реальные HTTP попытки с синтаксически допустимым неправильным паролем: median102.001ms, отклонённые после квоты429 —46.565/48.160ms. Слабый hash8MiB/t1 заменяется на64MiB/t2 при успешном входе. Это локальная оценка бюджета, не production capacity benchmark.
|
||||
|
||||
## Наблюдаемость
|
||||
|
||||
| Логический сигнал | Prometheus family / единица |
|
||||
| --- | --- |
|
||||
| HTTP requests / duration | messenger_http_requests_total; messenger_http_duration_seconds_bucket |
|
||||
| Jobs / processing duration | messenger_jobs_total; messenger_job_duration_seconds_bucket |
|
||||
| Time to ready | messenger_attachment_ready_duration_seconds_bucket |
|
||||
| Backlog / age | messenger_queue_depth; messenger_queue_oldest_age_seconds |
|
||||
| Pool / worker saturation | messenger_db_pool_used/waiting; messenger_worker_busy/capacity |
|
||||
| Process resources | messenger_process_cpu_percent; messenger_process_memory_bytes |
|
||||
| Export accounting | messenger_telemetry_export; Collector self metrics |
|
||||
|
||||
HTTP labels: method, route template, status_class; health исключён. Error ratio —5xx/all business HTTP. p95 вычисляется histogram_quantile по сумме buckets всех реплик, не средним p95. HTTP duration измеряет server handling до выдачи StreamingResponse; скачивание всего body клиентом туда не входит. Accepted timestamp записывается clock_timestamp при job INSERT после S3 upload, до commit; ready metric включает короткий pre-commit gap, а не идеально измеренную post-commit границу.
|
||||
|
||||
Collector принимает OTLPHTTP/mTLS, отправляет traces по OTLPHTTP/mTLS в Tempo и logs по HTTPS/mTLS в Loki. Prometheus scrape9464/8888 также mTLS. Grafana использует проверяемые HTTPS/mTLS datasources; Prom query methodGET соответствует read-only ACL. Метрики не содержат user/chat/message/attachment/request IDs или raw URLs; в traces/logs — ограниченные технические идентификаторы и route templates, без body/credentials.
|
||||
|
||||
## Ограничения и источники
|
||||
|
||||
Single-node PG/S3/Bao/broker, без HA и автоматического backup. Операторский host/Docker и CA доверены; доли unseal в production нужно разнести между операторами. KV credentials статические, локальная usable lease≤29s, при недоступности Bao после expiry —503 без fallback. Leaf renewal — явная operator команда, не автономный PKI controller. Revocation — gateway denylist, pinned Bao cert/token revoke и DB session termination, не универсальный OCSP.
|
||||
|
||||
HTTP gateways ограничены16соединениями и отдельно2body buffers (S3≤10MiB, datasource≤1MiB); ответы стримятся64KiB chunks. TCP connections≤32. При перегрузке допускается временный отказ. Память worker/image subprocess и CPU/time ограничены; это не защита от любого DoS законной ролью.
|
||||
|
||||
Источники: skeleton и контракт преподавателя, собственная реализация предыдущих работ; [PostgreSQL SSL](https://www.postgresql.org/docs/17/libpq-ssl.html), [OpenBao cert auth](https://openbao.org/docs/auth/cert/), [OpenBao seal](https://openbao.org/docs/concepts/seal/), [Valkey ACL](https://valkey.io/topics/acl/), [Python SSL](https://docs.python.org/3.12/library/ssl.html), [Argon2-cffi](https://argon2-cffi.readthedocs.io/en/stable/), [OTel](https://opentelemetry.io/docs/languages/python/), [S3 SigV4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html). Использована помощь ИИ при реализации, исследовании и документации; результаты подтверждены реальными проверками и указаны с ограничениями.
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
# Эксплуатация защищённого стенда
|
||||
|
||||
Docker Compose v2 и Python 3.12, `uv`; 4 CPU, Docker RAM 7.7 GiB. Команды выполняются из каталога этой работы. ЛР1–ЛР6 и их volumes не используются. Публичный API: `https://localhost:8447`; Grafana: `https://localhost:13007`; операторский OpenBao: `https://localhost:18207`.
|
||||
|
||||
```sh
|
||||
make bootstrap
|
||||
make build
|
||||
docker compose up -d postgres openbao cache cache-tls broker broker-tls storage s3 storage-tls
|
||||
python3 scripts/bao_operator.py init
|
||||
docker compose up -d --wait
|
||||
make test
|
||||
make test-security
|
||||
make student-test
|
||||
```
|
||||
|
||||
Первый `init` — явное действие оператора: non-dev OpenBao инициализируется 3 долями, порог 2, затем unseal и настройка KV/cert auth/policies/audit. Root token и доли записываются только в `operator-private/` (0700, файлы0600). Каталог не монтируется в приложения или OpenBao, не входит в образ/Git. Для настоящей эксплуатации доли следует разнести между независимыми операторами, CA держать офлайн; локальный каталог — доверенное рабочее место оператора, а не механизм защиты от его компрометации. Потеря всех долей делает данные Bao невосстановимыми. Защищённая резервная копия долей/CA/volumes — обязанность оператора.
|
||||
|
||||
`secrets/` также0700: каждая служба получает только свою leaf identity и публичный CA. Внутренние файлы сертификатов читаемы контейнерным UID, но недоступны другим пользователям хоста через закрытый родительский каталог. CA private key остаётся в `operator-private/`. Root DB/S3 credentials используются только одноразовым migrator/bootstrap и операторскими проверками.
|
||||
|
||||
`docker compose stop` сохраняет данные. Полный перезапуск: `scripts/restart.sh` останавливает также namespace-sharing gateways, запускает зависимости, выполняет **явный operator unseal**, затем приложения. Обычный рестарт API не требует долей. После отдельного рестарта Bao нужен `python3 scripts/bao_operator.py unseal`; если API запускался уже при sealed Bao и завершился на startup, его нужно `docker compose restart api`. Повторный `init` не переинициализирует существующее хранилище.
|
||||
|
||||
```sh
|
||||
# Ротация рабочей DB credentials + leaf и отзыв прежней worker identity:
|
||||
python3 scripts/rotate_identity.py
|
||||
# Явный выпуск leaf заново при необходимости:
|
||||
python3 scripts/bootstrap.py
|
||||
python3 scripts/bao_operator.py configure
|
||||
```
|
||||
|
||||
Bootstrap не меняет действующие credentials; перевыпускает leaf, если до expiry меньше часа. Leaf TTL2 суток, CA365 суток. Бао cert auth выдаёт token TTL30s/max60s; сервис повторно аутентифицируется примерно через29s и читает только собственный KV path. Root token не является bootstrap credential приложения. Старые подключения к gateways проверяют denylist при передаче данных, idle timeout30s, TLS tickets отключены. До отзыва выданных worker tokens оператор удаляет старую cert-auth роль и проверяет отказ нового входа со старым leaf; только затем отзывает token accessors, меняет пароль/KV и включает новую cert-auth роль. Это закрывает получение нового секрета по ранее выданному token. Ротация worker также закрывает его PostgreSQL сессии. Изменение пароля в KV само по себе не пересоздаёт существующие pools: штатная операция включает рестарт соответствующего сервиса.
|
||||
|
||||
Для моделирования sealed: `python3 scripts/bao_operator.py seal`, дождаться31s, проверить readiness/business503 без credentials в ответе, затем `unseal`. Liveness остаётся200; plaintext/static credential fallback отсутствует. До29s допустим ранее полученный KV lease; после его истечения доступ блокируется даже при живом DB/S3 pool. KV credentials статические, динамический DB secrets engine не заявлен.
|
||||
|
||||
TLS audit запускается операторским одноразовым контейнером с audit certificates; приложения не получают его доступ. Gateway raw upstream доступны только на loopback общего network namespace. PostgreSQL имеет native TLS и hostnossl reject. Health/scrape: см. trust matrix. Создание namespace-sharing контейнеров требует остановить старые sidecars до пересоздания backing service.
|
||||
|
||||
Контейнеры приложений — non-root/read_only/cap_dropALL/no-new-privileges, ограниченные tmpfs/CPU/RAM/PIDs. PostgreSQL стартует root wrapper только для копирования leaf key с mode0600 и сбрасывает UID штатным entrypoint. Одноразовый `state-init` имеет только CHOWN/DAC_OVERRIDE для владельцев собственных named volumes; после завершения не работает. Stateful сервисы имеют writable только data volume. Bao disable_mlock обусловлен учебным контейнером; swap host должен контролировать оператор.
|
||||
|
||||
Намеренное необратимое удаление **данных только этой работы**: `docker compose down -v`. Это не штатная остановка; без сохранённых Bao shares/CA секретные данные не восстановить.
|
||||
|
||||
HTTP gateways: максимум16соединений, отдельно два request-body буфера (S3до10MiB, datasourceдо1MiB). HEAD readiness не конкурирует с upload за большие буферы; GET response передаётся порциями64KiB. Бюджет данных —2×body limit плюс16×64KiB response chunks и Python/TLS overhead. TLS handshake≤2s, upstream connect≤2s, HTTP upstream I/O≤5s; saturating body slots дают временный отказ. Проба `python3 research/readiness.py` не ретраит ошибки:64запроса с concurrency8 должны дать64×200.
|
||||
|
||||
## api-errors
|
||||
|
||||
Сначала проверить HTTPS readiness, затем ошибки PostgreSQL/S3/Bao, состояние lease и trace по request ID.401/404 — клиентские ошибки, не numerator5xx. При sealed Bao выполнить operator unseal; не отключать TLS и не подставлять admin credentials в API. После restart при sealed Bao перезапустить API, если startup уже завершился ошибкой.
|
||||
|
||||
## queue-lag
|
||||
|
||||
Проверить worker, его Bao lease, broker TLS/ACL, PostgreSQL jobs/outbox и источник в S3. Не удалять queued jobs и не делать массовый ACK для сокрытия backlog. После восстановления worker должен обработать durable jobs; повторная доставка штатна, fencing решает право публикации результата.
|
||||
|
||||
## telemetry-unavailable
|
||||
|
||||
Проверить Collector receiver/exporter, срок/CA/SAN/service identity, Prometheus scrape targets, backend readiness и memory/OOM. Не отключать certificate verification. При ошибке protocol проверить ALPN: текущие native HTTP upstream требуют HTTP/1.1. Потери telemetry ограничены очередями SDK/Collector и не означают потерю принятых business jobs. Метрики и traces не являются источником истины для бизнес-данных.
|
||||
@@ -0,0 +1,32 @@
|
||||
# Проверка зависимостей и образа
|
||||
|
||||
Воспроизводимые команды (операторский хост; scanner не монтирует Docker socket в приложения):
|
||||
|
||||
```sh
|
||||
uv export --locked --no-dev --format requirements-txt --no-hashes --no-emit-project --output-file /tmp/lab7-runtime-requirements.txt
|
||||
uvx pip-audit -r /tmp/lab7-runtime-requirements.txt --no-deps --disable-pip --format json --output evidence/dependency-scan-patched.json
|
||||
docker image inspect mtusi-vasilev:lab7 --format '{{.Id}}'
|
||||
docker image save mtusi-vasilev:lab7 -o operator-private/app-image-final.tar
|
||||
operator-private/tools/trivy image --input operator-private/app-image-final.tar --scanners vuln --format json --output evidence/image-scan-final.json
|
||||
```
|
||||
|
||||
Trivy0.76.2 получен из официального GitHub release, архив сверён с официальным SHA256 checksums. Локальный binary/archive/checksums не входят в Git/image. `pip-audit --no-deps` получает **полный resolved runtime export**, а не список только прямых зависимостей; lock содержит integrity hashes, в scanner export они опущены. Результат относится к базе advisories на момент запуска и конкретному imageID из evidence/image-id.txt.
|
||||
|
||||
Первый pip-audit обнаружил44известных проблемы:42Pillow12.3.0 и2OTelAPI1.39.0. Они непосредственно применимы: worker декодирует недоверенные изображения, API принимает trace context. Обновлены Pillow13.0.0 и согласованные API/SDK/OTLP1.45.2. Исходный dependency-scan.json сохранён; повтор dependency-scan-patched.json — **0known runtime vulnerabilities**. Это не доказательство отсутствия неизвестных ошибок.
|
||||
|
||||
Первый image scan: Debian13.6 —376findings (3critical/104high), Python51. Установлены доступные security updates в runtime-stage `apt-get update && apt-get upgrade -y`; удалён неиспользуемый runtime pip (сборка зависимостей выполняется uv в отдельной stage). Отказались от старого pin libjpeg binary package; фактический Debian пакет определяется доступными обновлениями репозитория и зафиксирован scanner inventory. Базовый Python image закреплён digest, Python dependency graph — uv.lock; OS repositories могут меняться между сборками, поэтому полная побитовая воспроизводимость образа не заявлена.
|
||||
|
||||
Финальный scanner: Debian13.7 — **0critical,47high,89medium,65low,5unknown**; Python —0. Все оставшиеся OSfindings в использованной базе имеют пустой FixedVersion. Следовательно, они не объявляются исправленными и не скрываются ignore-файлом.
|
||||
|
||||
| Семейство оставшихся HIGH | Условия эксплуатации / применимость стенду | Решение |
|
||||
| --- | --- | --- |
|
||||
| util-linux CVE-2026-76642,78408,78409,78410; повторяются по binary packages | Привилегированные mount helpers/hooks, nsenter/cgroup или bind mount paths. Приложение их не вызывает; non-root, cap_dropALL, no-new-privileges, nohostmount/Docker socket. Даже state-init имеет толькоCHOWN/DAC_OVERRIDE, неSYS_ADMIN. | Недостижимы через текущий business API без дополнительной компрометации оператора/privileged execution; retained residual risk, следить за Debianfix. |
|
||||
| libacl CVE-2026-54369 | Privileged ACL operations с symlink traversal. В приложении нет ACLmanagement endpoint/вызововlibacl; uploadednamesнепередаютсявhostpaths. | Прямой путь не обнаружен; не считать библиотеку безопасной в произвольном другом приложении. |
|
||||
| ncurses CVE-2025-69720 | Обработка некорректных данных terminal/TUI. Приложение не запускает интерактивные ncurses программы и не использует пользовательские terminfo. | API path отсутствует; пакет унаследован от base, обновить послеvendorfix. |
|
||||
| SQLite CVE-2026-119373,119374,119379 | CraftedFTS5index/sessionchangesets. Приложение использует PostgreSQL; sqlite/FTS5/sessionchangesets не используются, upload не открывается как SQLite. | Нет текущего пути обработки; сохраняется риск при будущем добавлении sqlite. |
|
||||
| systemd CVE-2026-16742 | systemd-homedhome-recordsignature. В образе присутствует sharedlib, systemd-homed не является процессом/компонентом приложения. | Заявленный attackpath не запускается. |
|
||||
| perl CVE-2026-9538 | Archive::Tar hugeheader при распаковке. Runtime не принимает и не распаковывает tar, Perl не вызывается pipeline. | Недостижим через текущий upload path; будущаяarchivefeatureпотребуетпересмотра. |
|
||||
|
||||
Medium/low/unknown сохранены целиком в rawJSON; пакетная база и имена не доказывают runtime-достижимость. Общие ограничения — отсутствие Debianfix на момент проверки, доверенный root/Dockerhost вне модели; read_only не устраняет memory-safety CVE. Учитывая образ singlepurpose, следующим улучшением будет минимальный runtime без ненужныхmount/ncurses/sqlite/perl libs, с повторной проверкой ABI и image-processing pipeline. Такой эксперимент в работе не заявлен.
|
||||
|
||||
Официальные источники: [OTel advisory](https://github.com/open-telemetry/opentelemetry-python/security/advisories/GHSA-mf5v-w3w3-f6cg), [Pillow advisory](https://github.com/python-pillow/Pillow/security/advisories/GHSA-v9pv-5gc8-w2m6), [Debian security tracker](https://security-tracker.debian.org/tracker/), [Trivy severity selection](https://trivy.dev/docs/v0.76/guide/scanner/vulnerability/). Точные ссылки на каждое CVE находятся в raw scanner JSON.
|
||||
@@ -0,0 +1,25 @@
|
||||
# Модель угроз ЛР7
|
||||
|
||||
Активы: passwords/token digests, личные сообщения и членство, исходные вложения и результаты, durable jobs/outbox/audit, рабочие credentials, CA/unseal/root material, техническая telemetry. Недоверенные акторы: анонимный клиент, участник другого чата, владелец украденного Bearer token, скомпрометированный upload-worker, клиент с сертификатом другой роли, клиент с сертификатом чужого CA. Оператор Docker/хоста и CA доверен: доступ к Docker эквивалентен контролю стенда.
|
||||
|
||||
| Угроза / граница | Контроль | Проверка |
|
||||
| --- | --- | --- |
|
||||
| MITM клиента или подмена backend hostname | HTTPS, собственный CA, SAN/verify-full; никакого verify=False | public tests/security.py, transport_probe wrong_server_hostname/empty_trust |
|
||||
| Контейнер с доверенным CA обращается к API напрямую | обязательный client certificate и точный SAN allowlist `lb`; raw8080loopback | transport_probe wrong_trusted_identity/no_client_cert/foreign_ca_client, raw_api_8080_closed |
|
||||
| Компрометированный worker читает passwords/messages или меняет ownership | отдельная PG role, column-level UPDATE, noDDL/noPUBLICcreate | security_probe DB denies, baseline_db_probe: SET ROLE в отдельной синтетической схеме |
|
||||
| Worker переписывает staging, читает чужие prefixes, выполняет copy/list обход | SigV4 bucket grants + mTLS роль и строгая prefix/method gateway authorization; encoded/traversal/copy/query запрещены | security_probe S3, test_tls_boundary, baseline_s3_probe |
|
||||
| Worker публикует новые jobs, уничтожает consumer group или правит ACL | scoped stream ACL, запрещён XADD/XGROUPDESTROY/ACL; mTLSworker | security_probe queue checks; synthetic baseline_queue_probe |
|
||||
| Подмена пользователя X-User-Id/чужая attachment metadata/content | Bearer digest + membership/ownership в PG на каждый запрос | public smoke, inherited business regression suite |
|
||||
| Перебор password / дорогой Argon2 DoS между API replicas | Argon2id64MiB/t2/p1, dummy verification, shared PG window10/user/10s и30global/10s;2activeKDF/API | research/auth_budget.py, kdf_probe; ограничения ниже |
|
||||
| Утечка secret в telemetry или ошибках | technical-only attributes, noSQL/URLquery/body/password/token, generic errors; technical log allowlist | independent telemetry canary probe, scan evidence; исходники telemetry/storage/jobs |
|
||||
| Чужая служба читает Bao KV / крадёт root из app | cert auth pinnedleaf, own-path-only policy, TTL30s/max60s; root/unseal вне app mounts/image | security_probe Bao own/other/policy checks; rootfile absent |
|
||||
| Старый worker продолжает доступ после компрометации | leaf denylist onnew+activeTCP, ticketsdisabled, pinnedBaoleafзаменён, DBsecretrotated + sessionsclosed, workerrestart | research/compromise.py и revoked_probe; hashes accepted jobs |
|
||||
| Bao недоступен/sealed, приложение бессрочно пользуется кэшем | lease cache≤29s и operation gates, послеexpiry503, nofallback; livehealth независим | research/sealed.py |
|
||||
| Image decoder исчерпывает RAM/CPU или malformedinput вызывает native CVE | subprocesspipeline с deadline/resource limits, workerCPU/RAM/PIDs; exact10MiB limit; pinnedpatchedPillow | inherited image suite, pip-audit/Trivy triage |
|
||||
| Обход TLS через scrape/admin/health | loopbacknativeports втомженamespace, TLSroleproxies, localhostoperatorports, Grafana auth | transport_probe rawports + matrix; independentGrafana datasourcequeries |
|
||||
|
||||
Границы: сеть Compose сама по себе не является аутентификацией. Plaintext разрешён только внутри одного network namespace proxy+native daemon, с bind127.0.0.1; PostgreSQL nativeSSL. API/worker не имеют CAprivate/root/unseal/adminmaterial. Audit test containers — явное доверенное действие оператора, не runtime capability worker.
|
||||
|
||||
Least privilege ограничивает радиус поражения, но скомпрометированный worker всё ещё может читать разрешённые staging/results, портить доступные ему attachments/jobs, задерживать/удалять processing messages. Это не sandbox с защитой от всех действий законной роли. Он не имеет businessusers/messages/ownership/adminqueue/allbucketsправ. Сравнение широких прав выполняется только на синтетических DB/queue/bucket, не раскрывает реальные данные и не выдаёт admin основной worker role.
|
||||
|
||||
Ограничения: PostgreSQL/Bao/broker/S3 single-node; нет HA, encrypted-at-rest или внешнего backup/операторского HSM. TLS не защищает доверенный root/Dockerhost и уже легально полученные данные. Rate window ограничивает login, но не заменяет upstream DDoSзащиту; регистрации имеют ограниченную KDF concurrency, а не глобальную квоту. HTTP TLS gateways допускают16соединений и только2одновременныхбуфераrequestbody (S3до10MiB, datasourceдо1MiB), TCP32; перегрузка сбрасывает новые подключения и может дать503. Исследование grade5 проверяет конкретную угрозу worker, а не произвольный RCE в ядре контейнера.
|
||||
+755
@@ -0,0 +1,755 @@
|
||||
name: mtusi-vasilev-lab7
|
||||
x-hardening:
|
||||
cpus: 0.25
|
||||
mem_limit: 128m
|
||||
pids_limit: 96
|
||||
cap_drop: &id001
|
||||
- ALL
|
||||
security_opt: &id002
|
||||
- no-new-privileges:true
|
||||
read_only: true
|
||||
tmpfs: &id003
|
||||
- /tmp:size=16m,noexec,nosuid
|
||||
x-environment:
|
||||
BAO_ADDR: https://openbao:8200
|
||||
S3_ENDPOINT: https://storage:8443
|
||||
S3_BUCKET: messenger
|
||||
S3_CA_FILE: /run/tls/ca.pem
|
||||
SSL_CERT_FILE: /run/tls/ca.pem
|
||||
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
|
||||
JOB_LEASE_SECONDS: ${JOB_LEASE_SECONDS:-45}
|
||||
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: https://collector:4318
|
||||
OTEL_EXPORTER_OTLP_CERTIFICATE: /run/tls/ca.pem
|
||||
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /run/tls/identity/cert.pem
|
||||
OTEL_EXPORTER_OTLP_CLIENT_KEY: /run/tls/identity/key.pem
|
||||
OTEL_ENABLED: '1'
|
||||
OTEL_METRIC_INTERVAL_MS: '5000'
|
||||
x-application:
|
||||
cpus: 0.5
|
||||
mem_limit: 512m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: &id004
|
||||
context: .
|
||||
args:
|
||||
VCS_REF: ${VCS_REF:-uncommitted}
|
||||
stop_grace_period: 8s
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17.10-alpine
|
||||
entrypoint:
|
||||
- /etc/pg-entrypoint.sh
|
||||
environment:
|
||||
POSTGRES_USER: messenger
|
||||
POSTGRES_DB: messenger
|
||||
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
|
||||
secrets:
|
||||
- postgres_password
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./secrets/pki/postgres:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
- ./infra/pg-entrypoint.sh:/etc/pg-entrypoint.sh:ro
|
||||
- ./infra/pg_hba.conf:/etc/postgresql/pg_hba.conf:ro
|
||||
- ./secrets/db_roles.sql:/docker-entrypoint-initdb.d/01_roles.sql:ro
|
||||
cpus: 0.75
|
||||
mem_limit: 768m
|
||||
command:
|
||||
- postgres
|
||||
- -c
|
||||
- fsync=on
|
||||
- -c
|
||||
- ssl=on
|
||||
- -c
|
||||
- ssl_cert_file=/run/tls/identity/cert.pem
|
||||
- -c
|
||||
- ssl_key_file=/tmp/postgres-key.pem
|
||||
- -c
|
||||
- ssl_ca_file=/run/tls/ca.pem
|
||||
- -c
|
||||
- hba_file=/etc/postgresql/pg_hba.conf
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD-SHELL
|
||||
- pg_isready -U messenger -d messenger
|
||||
interval: 2s
|
||||
timeout: 2s
|
||||
retries: 20
|
||||
openbao:
|
||||
cpus: 0.25
|
||||
mem_limit: 192m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ghcr.io/openbao/openbao:2.5.2
|
||||
user: 100:1000
|
||||
command:
|
||||
- server
|
||||
- -config=/etc/openbao.hcl
|
||||
ports:
|
||||
- 127.0.0.1:18207:8200
|
||||
volumes:
|
||||
- bao_data:/bao/data
|
||||
- ./infra/openbao.hcl:/etc/openbao.hcl:ro
|
||||
- ./secrets/pki/openbao:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
depends_on:
|
||||
state-init:
|
||||
condition: service_completed_successfully
|
||||
cache:
|
||||
cpus: 0.25
|
||||
mem_limit: 128m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: valkey/valkey:8.1.3-alpine
|
||||
command:
|
||||
- /run/secrets/cache_config
|
||||
secrets:
|
||||
- cache_config
|
||||
user: 1000:1000
|
||||
entrypoint:
|
||||
- valkey-server
|
||||
cache-tls:
|
||||
cpus: 0.5
|
||||
mem_limit: 64m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
network_mode: service:cache
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.tls_gateway
|
||||
- --config
|
||||
- /run/tls/gateway.json
|
||||
volumes:
|
||||
- ./secrets/pki/cache:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
- ./secrets/revoked.json:/run/tls/revoked.json:ro
|
||||
- ./secrets/cache_gateway.json:/run/tls/gateway.json:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
broker:
|
||||
cpus: 0.25
|
||||
mem_limit: 192m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: valkey/valkey:8.1.3-alpine
|
||||
command:
|
||||
- /run/secrets/broker_config
|
||||
secrets:
|
||||
- broker_config
|
||||
volumes:
|
||||
- broker_data:/data
|
||||
depends_on:
|
||||
state-init:
|
||||
condition: service_completed_successfully
|
||||
user: 1000:1000
|
||||
entrypoint:
|
||||
- valkey-server
|
||||
broker-tls:
|
||||
cpus: 0.5
|
||||
mem_limit: 64m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
network_mode: service:broker
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.tls_gateway
|
||||
- --config
|
||||
- /run/tls/gateway.json
|
||||
volumes:
|
||||
- ./secrets/pki/broker:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
- ./secrets/revoked.json:/run/tls/revoked.json:ro
|
||||
- ./secrets/broker_gateway.json:/run/tls/gateway.json:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
storage:
|
||||
image: chrislusf/seaweedfs:4.15@sha256:1593bd2a98964f5d4df83fa7db2b3d4ee7b20190813cc5bf8c3200e0e70d346e
|
||||
command:
|
||||
- server
|
||||
- -dir=/data
|
||||
- -ip=127.0.0.1
|
||||
- -ip.bind=127.0.0.1
|
||||
- -filer
|
||||
- -volume.max=32
|
||||
- -volume.preStopSeconds=0
|
||||
- -master.volumeSizeLimitMB=64
|
||||
volumes:
|
||||
- s3_data:/data
|
||||
- ./infra/filer.toml:/etc/seaweedfs/filer.toml:ro
|
||||
cpus: 0.5
|
||||
mem_limit: 512m
|
||||
cap_drop:
|
||||
- ALL
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD-SHELL
|
||||
- wget -q -O /dev/null http://127.0.0.1:9333/dir/status
|
||||
interval: 2s
|
||||
timeout: 2s
|
||||
retries: 25
|
||||
depends_on:
|
||||
state-init:
|
||||
condition: service_completed_successfully
|
||||
user: 1000:1000
|
||||
entrypoint:
|
||||
- /usr/bin/weed
|
||||
s3:
|
||||
image: chrislusf/seaweedfs:4.15@sha256:1593bd2a98964f5d4df83fa7db2b3d4ee7b20190813cc5bf8c3200e0e70d346e
|
||||
network_mode: service:storage
|
||||
command:
|
||||
- s3
|
||||
- -filer=127.0.0.1:8888
|
||||
- -ip.bind=127.0.0.1
|
||||
- -config=/run/secrets/s3_config
|
||||
- -port=8333
|
||||
- -port.iceberg=0
|
||||
secrets:
|
||||
- s3_config
|
||||
depends_on:
|
||||
storage:
|
||||
condition: service_healthy
|
||||
cpus: 0.25
|
||||
mem_limit: 256m
|
||||
cap_drop:
|
||||
- ALL
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
user: 1000:1000
|
||||
entrypoint:
|
||||
- /usr/bin/weed
|
||||
storage-tls:
|
||||
cpus: 0.5
|
||||
mem_limit: 96m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
network_mode: service:storage
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.tls_gateway
|
||||
- --config
|
||||
- /run/tls/gateway.json
|
||||
volumes:
|
||||
- ./secrets/pki/storage:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
- ./secrets/revoked.json:/run/tls/revoked.json:ro
|
||||
- ./secrets/storage_gateway.json:/run/tls/gateway.json:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
migrate:
|
||||
cpus: 0.5
|
||||
mem_limit: 512m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.migrate
|
||||
environment:
|
||||
DATABASE_URL_FILE: /run/secrets/admin_database_url
|
||||
secrets:
|
||||
- admin_database_url
|
||||
volumes:
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
s3-bootstrap:
|
||||
cpus: 0.5
|
||||
mem_limit: 512m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.storage_bootstrap
|
||||
environment:
|
||||
S3_ENDPOINT: https://storage:8443
|
||||
S3_ADMIN_ACCESS_KEY_FILE: /run/secrets/admin_s3_access_key
|
||||
S3_ADMIN_SECRET_KEY_FILE: /run/secrets/admin_s3_secret_key
|
||||
secrets:
|
||||
- admin_s3_access_key
|
||||
- admin_s3_secret_key
|
||||
volumes:
|
||||
- ./secrets/pki/operator:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
depends_on:
|
||||
storage-tls:
|
||||
condition: service_started
|
||||
api:
|
||||
cpus: 0.5
|
||||
mem_limit: 512m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.secure_entry
|
||||
environment:
|
||||
BAO_ADDR: https://openbao:8200
|
||||
S3_ENDPOINT: https://storage:8443
|
||||
S3_BUCKET: messenger
|
||||
S3_CA_FILE: /run/tls/ca.pem
|
||||
SSL_CERT_FILE: /run/tls/ca.pem
|
||||
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
|
||||
JOB_LEASE_SECONDS: ${JOB_LEASE_SECONDS:-45}
|
||||
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: https://collector:4318
|
||||
OTEL_EXPORTER_OTLP_CERTIFICATE: /run/tls/ca.pem
|
||||
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /run/tls/identity/cert.pem
|
||||
OTEL_EXPORTER_OTLP_CLIENT_KEY: /run/tls/identity/key.pem
|
||||
BAO_ROLE: api
|
||||
TLS_GATEWAY_CONFIG: /run/tls/gateway.json
|
||||
OTEL_ENABLED: '1'
|
||||
OTEL_METRIC_INTERVAL_MS: '5000'
|
||||
volumes:
|
||||
- ./secrets/pki/api:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
- ./secrets/revoked.json:/run/tls/revoked.json:ro
|
||||
- ./secrets/api_gateway.json:/run/tls/gateway.json:ro
|
||||
deploy:
|
||||
replicas: ${API_REPLICAS:-2}
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
s3-bootstrap:
|
||||
condition: service_completed_successfully
|
||||
cache-tls:
|
||||
condition: service_started
|
||||
dispatcher:
|
||||
cpus: 0.5
|
||||
mem_limit: 192m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.worker
|
||||
- --dispatcher
|
||||
environment:
|
||||
BAO_ADDR: https://openbao:8200
|
||||
S3_ENDPOINT: https://storage:8443
|
||||
S3_BUCKET: messenger
|
||||
S3_CA_FILE: /run/tls/ca.pem
|
||||
SSL_CERT_FILE: /run/tls/ca.pem
|
||||
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
|
||||
JOB_LEASE_SECONDS: ${JOB_LEASE_SECONDS:-45}
|
||||
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: https://collector:4318
|
||||
OTEL_EXPORTER_OTLP_CERTIFICATE: /run/tls/ca.pem
|
||||
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /run/tls/identity/cert.pem
|
||||
OTEL_EXPORTER_OTLP_CLIENT_KEY: /run/tls/identity/key.pem
|
||||
BAO_ROLE: dispatcher
|
||||
OTEL_ENABLED: '1'
|
||||
OTEL_METRIC_INTERVAL_MS: '5000'
|
||||
volumes:
|
||||
- ./secrets/pki/dispatcher:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
broker-tls:
|
||||
condition: service_started
|
||||
worker:
|
||||
cpus: 0.75
|
||||
mem_limit: 896m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp:size=32m,noexec,nosuid
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 30s
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.worker
|
||||
environment:
|
||||
BAO_ADDR: https://openbao:8200
|
||||
S3_ENDPOINT: https://storage:8443
|
||||
S3_BUCKET: messenger
|
||||
S3_CA_FILE: /run/tls/ca.pem
|
||||
SSL_CERT_FILE: /run/tls/ca.pem
|
||||
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
|
||||
JOB_LEASE_SECONDS: ${JOB_LEASE_SECONDS:-45}
|
||||
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: https://collector:4318
|
||||
OTEL_EXPORTER_OTLP_CERTIFICATE: /run/tls/ca.pem
|
||||
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /run/tls/identity/cert.pem
|
||||
OTEL_EXPORTER_OTLP_CLIENT_KEY: /run/tls/identity/key.pem
|
||||
BAO_ROLE: worker
|
||||
OTEL_ENABLED: '1'
|
||||
OTEL_METRIC_INTERVAL_MS: '5000'
|
||||
volumes:
|
||||
- ./secrets/pki/worker:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
broker-tls:
|
||||
condition: service_started
|
||||
s3-bootstrap:
|
||||
condition: service_completed_successfully
|
||||
lb:
|
||||
cpus: 0.25
|
||||
mem_limit: 128m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: haproxy:3.2-alpine@sha256:96ec3c75a9264ba94e733eeacb44051ed6e7b79bb77a73c2c36f236b6423f1f0
|
||||
ports:
|
||||
- 127.0.0.1:${PUBLIC_PORT:-8447}:8443
|
||||
volumes:
|
||||
- ./infra/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
||||
- ./secrets/pki/lb:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD-SHELL
|
||||
- test -S /tmp/haproxy.sock
|
||||
interval: 2s
|
||||
timeout: 2s
|
||||
retries: 20
|
||||
collector:
|
||||
cpus: 0.25
|
||||
mem_limit: 256m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: otel/opentelemetry-collector-contrib:0.123.0
|
||||
command:
|
||||
- --config=/etc/otelcol/config.yaml
|
||||
volumes:
|
||||
- ./infra/observability/collector.yaml:/etc/otelcol/config.yaml:ro
|
||||
- ./secrets/pki/collector:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
prometheus:
|
||||
cpus: 0.25
|
||||
mem_limit: 256m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: prom/prometheus:v3.2.1
|
||||
command:
|
||||
- --config.file=/etc/prometheus/prometheus.yml
|
||||
- --storage.tsdb.path=/prometheus
|
||||
- --storage.tsdb.retention.time=24h
|
||||
- --web.listen-address=127.0.0.1:9090
|
||||
volumes:
|
||||
- ./infra/observability/prometheus.yaml:/etc/prometheus/prometheus.yml:ro
|
||||
- ./infra/observability/alerts.yaml:/etc/prometheus/alerts.yaml:ro
|
||||
- prometheus_data:/prometheus
|
||||
- ./secrets/pki/prometheus:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
ports:
|
||||
- 127.0.0.1:19097:9443
|
||||
depends_on:
|
||||
state-init:
|
||||
condition: service_completed_successfully
|
||||
loki:
|
||||
cpus: 0.25
|
||||
mem_limit: 384m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: grafana/loki:3.4.2
|
||||
command:
|
||||
- -config.file=/etc/loki/config.yaml
|
||||
volumes:
|
||||
- ./infra/observability/loki.yaml:/etc/loki/config.yaml:ro
|
||||
- loki_data:/loki
|
||||
depends_on:
|
||||
state-init:
|
||||
condition: service_completed_successfully
|
||||
tempo:
|
||||
cpus: 0.25
|
||||
mem_limit: 768m
|
||||
environment:
|
||||
GOMEMLIMIT: 512MiB
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: grafana/tempo:2.7.2
|
||||
command:
|
||||
- -config.file=/etc/tempo/config.yaml
|
||||
volumes:
|
||||
- ./infra/observability/tempo.yaml:/etc/tempo/config.yaml:ro
|
||||
- tempo_data:/var/tempo
|
||||
depends_on:
|
||||
state-init:
|
||||
condition: service_completed_successfully
|
||||
grafana:
|
||||
cpus: 0.25
|
||||
mem_limit: 256m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: grafana/grafana:11.6.0
|
||||
environment:
|
||||
GF_AUTH_ANONYMOUS_ENABLED: 'false'
|
||||
GF_AUTH_DISABLE_LOGIN_FORM: 'false'
|
||||
GF_USERS_ALLOW_SIGN_UP: 'false'
|
||||
GF_ANALYTICS_REPORTING_ENABLED: 'false'
|
||||
GF_ANALYTICS_CHECK_FOR_UPDATES: 'false'
|
||||
GF_SECURITY_ADMIN_PASSWORD__FILE: /run/secrets/grafana_password
|
||||
GF_SERVER_PROTOCOL: https
|
||||
GF_SERVER_CERT_FILE: /run/tls/identity/cert.pem
|
||||
GF_SERVER_CERT_KEY: /run/tls/identity/key.pem
|
||||
volumes:
|
||||
- ./secrets/grafana-provisioning/datasources:/etc/grafana/provisioning/datasources:ro
|
||||
- ./infra/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
|
||||
- ./infra/grafana/dashboards:/var/lib/grafana/dashboards:ro
|
||||
- grafana_data:/var/lib/grafana
|
||||
- ./secrets/pki/grafana:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
ports:
|
||||
- 127.0.0.1:13007:3000
|
||||
secrets:
|
||||
- grafana_password
|
||||
depends_on:
|
||||
state-init:
|
||||
condition: service_completed_successfully
|
||||
collector-tls:
|
||||
cpus: 0.5
|
||||
mem_limit: 64m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
network_mode: service:collector
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.tls_gateway
|
||||
- --config
|
||||
- /run/tls/gateway.json
|
||||
volumes:
|
||||
- ./secrets/pki/collector:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
- ./secrets/revoked.json:/run/tls/revoked.json:ro
|
||||
- ./secrets/collector_gateway.json:/run/tls/gateway.json:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
prometheus-tls:
|
||||
cpus: 0.5
|
||||
mem_limit: 64m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
network_mode: service:prometheus
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.tls_gateway
|
||||
- --config
|
||||
- /run/tls/gateway.json
|
||||
volumes:
|
||||
- ./secrets/pki/prometheus:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
- ./secrets/revoked.json:/run/tls/revoked.json:ro
|
||||
- ./secrets/prometheus_gateway.json:/run/tls/gateway.json:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
loki-tls:
|
||||
cpus: 0.5
|
||||
mem_limit: 64m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
network_mode: service:loki
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.tls_gateway
|
||||
- --config
|
||||
- /run/tls/gateway.json
|
||||
volumes:
|
||||
- ./secrets/pki/loki:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
- ./secrets/revoked.json:/run/tls/revoked.json:ro
|
||||
- ./secrets/loki_gateway.json:/run/tls/gateway.json:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
tempo-tls:
|
||||
cpus: 0.5
|
||||
mem_limit: 64m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
network_mode: service:tempo
|
||||
command:
|
||||
- python
|
||||
- -m
|
||||
- messenger.tls_gateway
|
||||
- --config
|
||||
- /run/tls/gateway.json
|
||||
volumes:
|
||||
- ./secrets/pki/tempo:/run/tls/identity:ro
|
||||
- ./secrets/ca.pem:/run/tls/ca.pem:ro
|
||||
- ./secrets/revoked.json:/run/tls/revoked.json:ro
|
||||
- ./secrets/tempo_gateway.json:/run/tls/gateway.json:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
state-init:
|
||||
cpus: 0.5
|
||||
mem_limit: 64m
|
||||
pids_limit: 96
|
||||
cap_drop: *id001
|
||||
security_opt: *id002
|
||||
read_only: true
|
||||
tmpfs: *id003
|
||||
image: ${API_IMAGE:-mtusi-vasilev:lab7}
|
||||
build: *id004
|
||||
stop_grace_period: 8s
|
||||
user: 0:0
|
||||
command:
|
||||
- python
|
||||
- -c
|
||||
- import os; pairs=[('/state/bao',100),('/state/broker',1000),('/state/storage',1000),('/state/prometheus',65534),('/state/loki',10001),('/state/tempo',10001),('/state/grafana',472)];
|
||||
[(os.chown(root,uid,uid),[os.chown(os.path.join(root,n),uid,uid) for n in dirs+files])
|
||||
for path,uid in pairs for root,dirs,files in os.walk(path)]
|
||||
cap_add:
|
||||
- CHOWN
|
||||
- DAC_OVERRIDE
|
||||
healthcheck:
|
||||
disable: true
|
||||
volumes:
|
||||
- bao_data:/state/bao
|
||||
- broker_data:/state/broker
|
||||
- s3_data:/state/storage
|
||||
- prometheus_data:/state/prometheus
|
||||
- loki_data:/state/loki
|
||||
- tempo_data:/state/tempo
|
||||
- grafana_data:/state/grafana
|
||||
volumes:
|
||||
postgres_data: null
|
||||
s3_data: null
|
||||
broker_data: null
|
||||
bao_data: null
|
||||
prometheus_data: {}
|
||||
loki_data: {}
|
||||
tempo_data: {}
|
||||
grafana_data: {}
|
||||
secrets:
|
||||
postgres_password:
|
||||
file: ./secrets/postgres_password
|
||||
cache_config:
|
||||
file: ./secrets/cache_config
|
||||
broker_config:
|
||||
file: ./secrets/broker_config
|
||||
s3_config:
|
||||
file: ./secrets/s3_config
|
||||
admin_database_url:
|
||||
file: ./secrets/admin_database_url
|
||||
admin_s3_access_key:
|
||||
file: ./secrets/admin_s3_access_key
|
||||
admin_s3_secret_key:
|
||||
file: ./secrets/admin_s3_secret_key
|
||||
grafana_password:
|
||||
file: ./secrets/grafana_password
|
||||
+19
-13
@@ -1,21 +1,21 @@
|
||||
# Матрица доверия — заполнить в решении lab7
|
||||
# Матрица доверия — реализация ЛР7
|
||||
|
||||
Это обязательная матрица покрытия. Для каждой строки укажите реальный порт, endpoint, CA, service identity, проверку SAN/ACL, срок жизни credentials и команду положительного/отрицательного теста. TLS шифрует и подтверждает сервер; mTLS также проверяет клиента. При доверенном CA всё равно нужно ограничивать разрешённую identity. Plaintext hop допустим только внутри закрытого локального transport/proxy boundary, без опубликованного обхода; границу и rationale нужно доказать.
|
||||
|
||||
| Связь | Минимум на 3 | Дополнительно на 4 | Доказательство / конфиг |
|
||||
| --- | --- | --- | --- |
|
||||
| Клиент → ingress/LB | TLS, CA + hostname, Bearer | Проверка expiry/revocation сессии и общего login rate limit | TODO |
|
||||
| LB → API (все реплики) | mTLS + allowlist LB identity | Ротация leaf без обхода проверки | TODO |
|
||||
| API/worker → PostgreSQL | TLS verify-full + раздельные ограниченные DB roles | Ротация credentials; mTLS — допустимое усиление | TODO |
|
||||
| API/worker → S3 | TLS + разные scoped credentials/prefix rights | Проверка denied prefix и ротация | TODO |
|
||||
| API/worker → broker | TLS + разные producer/consumer identities и ACL | mTLS + ограничение допустимых SAN/ролей | TODO |
|
||||
| API/worker → Collector | TLS; сеть/аутентификация запрещает произвольный ingest | mTLS с раздельными identities | TODO |
|
||||
| Collector → telemetry backends | TLS + scoped backend credentials или mTLS | Ротация и проверка least privilege | TODO |
|
||||
| Grafana → data sources | TLS с проверкой сервера, ограниченная identity | Отрицательные проверки доступа | TODO |
|
||||
| API/worker/agent → OpenBao | TLS + сервисный auth + scoped policy | Renewal/expiry/revocation | TODO |
|
||||
| Оператор → OpenBao/Grafana/S3 admin | TLS + authentication, доступ локальный/через защищённый канал | Разделение operator/application roles | TODO |
|
||||
| API → Redis/Valkey, если используется | TLS + ACL/пароль с минимальными правами | Ротация; mTLS по возможности | TODO |
|
||||
| Replication/кластерные каналы, если добавлены | TLS/mTLS либо подтверждённый шифрованный transport | Проверка заявленной модели отказа | TODO |
|
||||
| Клиент → ingress/LB | TLS, CA + hostname, Bearer | Проверка expiry/revocation сессии и общего login rate limit | 8447TLS; CA secrets/ca.pem, SANlocalhost; Bearer sessionTTL3600s, PGdigest+expiry/logout, sharedlogin10/user/10s30global/10s. `make test test-security`; research/auth_budget.py. |
|
||||
| LB → API (все реплики) | mTLS + allowlist LB identity | Ротация leaf без обхода проверки | api:9443 mTLS; sameCA, exactclientDNSlb, serverDNSapi. OnlyLB; certTTL2days, ticketsdisabled, denylistcheckednew+activeTCP. infra/haproxy.cfg, api_gateway.json; transport_probe + rotate_identity.py. |
|
||||
| API/worker → PostgreSQL | TLS verify-full + раздельные ограниченные DB roles | Ротация credentials; mTLS — допустимое усиление | postgres:5432 nativeTLSverify-full/serverDNSpostgres; api/worker/dispatcher separateSCRAMroles, noPUBLICDDL, workercolumnUPDATE. migration008_security.sql; security_probe/baseline_db_probe/revoked_probe. KVpasswordrotatedoperator, sessionsclosed. |
|
||||
| API/worker → S3 | TLS + разные scoped credentials/prefix rights | Проверка denied prefix и ротация | storage:8443 mTLSserverDNSstorage; distinctSigV4API/workercredentials, nativebucketgrants + prefix/methodgateway; leaf2days. loopbackS38333+filer8888+master9333sameclosednamespace. security_probe/baseline_s3_probe/test_tls_boundary; rotate/revoked_probe. |
|
||||
| API/worker → broker | TLS + разные producer/consumer identities и ACL | mTLS + ограничение допустимых SAN/ролей | broker:6380 mTLSserverDNSbroker; exactworker/dispatcher/operatorSAN. DispatcherXADDonly,workerconsume/ack/deleteownstreamonly; API has no broker use/credential. native6379loopback. security_probe/transport_probe/baseline_queue_probe/revoked_probe. |
|
||||
| API/worker → Collector | TLS; сеть/аутентификация запрещает произвольный ingest | mTLS с раздельными identities | collector:4318 mTLSserverDNScollector; api/worker/dispatcher separateSAN, operatorauditonly; nativeOTLPHTTP14318loopback, unusedOTLPgRPCdisabled. SDKCA+clientleaf. transport_probe wrongrole/nocert/foreignCA/hostname; actualtrace/log/metric evidence. |
|
||||
| Collector → telemetry backends | TLS + scoped backend credentials или mTLS | Ротация и проверка least privilege | collector→tempo:44318 OTLPHTTP/mTLScollectorSAN, nativeHTTP4318loopback; collector→loki:9443 mTLScollectorSAN + POST/otlp/v1/logsonly. TLSCA/serverSANalwaysverified. infra/observability configs; transport_probe and actualingest. LeafTTL2days, explicitbootstraprenewal. |
|
||||
| Grafana → data sources | TLS с проверкой сервера, ограниченная identity | Отрицательные проверки доступа | grafana→prometheus/loki/tempo:9443 mTLSgrafanaSAN + GETonly; serverSANbackendDNS; generateddatasourceCA/clientcertificate; nativeports9090/3100/3200loopback. transport_probe GrafanaPOSTdenied and authenticatedGrafanaqueries. |
|
||||
| API/worker/agent → OpenBao | TLS + сервисный auth + scoped policy | Renewal/expiry/revocation | openbao:8200 nativeTLSrequireclientCA, serverDNSopenbao; certauthpinnedcurrentleaf API/worker/dispatcher; ownKVreadonlypolicy. tokenTTL30s/max60s, refresh/re-auth≤29s, expiry503. security_probe/sealed.py/revoked_probe. Noapplicationroot/SecretID. |
|
||||
| Оператор → OpenBao/Grafana/S3 admin | TLS + authentication, доступ локальный/через защищённый канал | Разделение operator/application roles | localhost18207BaoTLSoperatorclientcert+rootoperatorfile; localhost13007GrafanaHTTPS+adminpassword; S3adminoneoffTLSoperatorcert+separateSigV4adminsecret. CA/unseal/roothostoperator-private0700notmountedtoapps. bao_operator.py; RUNBOOK.md. |
|
||||
| API → Redis/Valkey, если используется | TLS + ACL/пароль с минимальными правами | Ротация; mTLS по возможности | cache:6380 mTLSserverDNScache; API/worker/dispatcher/operatoridentitiesallowed, distinctACLusers. APIuser:v1:* GET/SETEX/PING, worker/dispatcherPINGonly; raw6379loopback. security_probe/transport_probe; noauthoritativesessionsincache. |
|
||||
| Replication/кластерные каналы, если добавлены | TLS/mTLS либо подтверждённый шифрованный transport | Проверка заявленной модели отказа | N/A: noDBreplication/cluster/S3distributednodeintroduced. Single-nodepersistenceonly; noglobalHAclaim. Allintercontainerlinksincludingobservabilitylistedabove. |
|
||||
|
||||
Нет выбранного компонента — отметьте N/A с причиной, а не оставляйте пустую строку. Внутренний публичный health listener, если нужен, минимален и изолирован; через него нельзя обращаться к бизнес-API без mTLS. Отдельно задокументируйте scrape/health/bootstrap каналы: они тоже не должны создавать обход.
|
||||
|
||||
@@ -35,3 +35,9 @@
|
||||
OpenBao не использует dev-mode. Выберите persistent storage и auth метод (например AppRole с короткоживущим SecretID/response wrapping, cert auth или иная обоснованная identity). Не подменяйте root token постоянной переменной BAO_TOKEN в приложении. Рабочие tokens имеют policy, TTL и renewal/re-auth сценарий. Статические KV secrets на 3 допустимы при реальном чтении через сервисную identity; динамические DB credentials — хорошее расширение, но не обязательное название технологии.
|
||||
|
||||
Разрешённый компромисс учебного стенда: ручной operator init/unseal, если он безопасно документирован и не нужен при каждом обычном рестарте API. Автоматическое хранение всех unseal shares рядом с OpenBao без защиты не считается решённым bootstrap.
|
||||
|
||||
## Реальные служебные каналы
|
||||
|
||||
Prometheus→Collector9464(appmetrics)/8888(selfmetrics): mTLSexactprometheusSAN/serverDNScollector; native19464/18888loopback. Collectorhealth13133loopback; APIhealth8080loopbackbehindmTLS9443; PostgreSQLpg_isreadyиспользуетлокальныйUnixsocket; LBreadonlylocalUnixstatsocketнеоткрываетAPI. GrafanaHTTPSnative3000authrequired, externalportlocalhost13007. Всеrawportsпроверяетtransport_probe. BootstrapoperatorDBпроводитмиграциичерезnativeTLSverify-full, S3bootstrapчерезmTLS+SigV4; state-initтольконазначаетUIDсобственныхvolumesиостанавливается.
|
||||
|
||||
Матрица выше заполняет исходный обязательный template; baseline строки и отрицательные требования сохранены. API→broker N/A: transactional outbox публикует dispatcher, workerconsumes. Plaintextтольковзакрытомloopbacknamespace. ЕдиныйTLSaudit: `python -m messenger.transport_probe` в операторском testcontainer с CA + отдельными audit client identities; никакойCAprivate/root/unseal. СценарииоператораописанывRUNBOOK.md.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"algorithm": "argon2id", "memory_kib": 65536, "time_cost": 2, "parallelism": 1, "runs_hash_plus_verify_ms": [162.1852719981689, 263.61245600128314, 211.49285799765494, 207.02896900183987, 208.90146199963056, 213.6208469964913, 259.45838099869434], "median_hash_plus_verify_ms": 211.49285799765494, "max_hash_plus_verify_ms": 263.61245600128314, "two_concurrent_hash_ms": [205.34997199865757, 209.5937009944464, 289.1015889981645, 292.67547099880176], "process_peak_rss_kib": 146248, "kdf_slots_per_api": 2, "api_replicas": 2, "maximum_active_kdf_memory_mib": 256}
|
||||
@@ -0,0 +1 @@
|
||||
{"weak_hash_upgraded": true, "expired_session_requests": [{"status": 401, "instance": "a6e6e813-765a-49cc-ad9a-946ceb115ab8"}, {"status": 401, "instance": "d2469510-c4c9-4b0d-8d0e-d2b8a04a0344"}, {"status": 401, "instance": "a6e6e813-765a-49cc-ad9a-946ceb115ab8"}, {"status": 401, "instance": "d2469510-c4c9-4b0d-8d0e-d2b8a04a0344"}], "expired_session_denied_both_replicas": true, "configured_memory_kib": 65536, "time_cost": 2, "parallelism": 1, "distinct_api_instances": 2, "passed": true}
|
||||
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"weak_hash_upgraded": true,
|
||||
"expired_session_requests": [
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "a6e6e813-765a-49cc-ad9a-946ceb115ab8"
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "d2469510-c4c9-4b0d-8d0e-d2b8a04a0344"
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "a6e6e813-765a-49cc-ad9a-946ceb115ab8"
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "d2469510-c4c9-4b0d-8d0e-d2b8a04a0344"
|
||||
}
|
||||
],
|
||||
"expired_session_denied_both_replicas": true,
|
||||
"configured_memory_kib": 65536,
|
||||
"time_cost": 2,
|
||||
"parallelism": 1,
|
||||
"requests": [
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "a6e6e813-765a-49cc-ad9a-946ceb115ab8",
|
||||
"retry_after": null,
|
||||
"milliseconds": 109.12
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "d2469510-c4c9-4b0d-8d0e-d2b8a04a0344",
|
||||
"retry_after": null,
|
||||
"milliseconds": 82.113
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "a6e6e813-765a-49cc-ad9a-946ceb115ab8",
|
||||
"retry_after": null,
|
||||
"milliseconds": 97.065
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "d2469510-c4c9-4b0d-8d0e-d2b8a04a0344",
|
||||
"retry_after": null,
|
||||
"milliseconds": 105.473
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "a6e6e813-765a-49cc-ad9a-946ceb115ab8",
|
||||
"retry_after": null,
|
||||
"milliseconds": 194.595
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "d2469510-c4c9-4b0d-8d0e-d2b8a04a0344",
|
||||
"retry_after": null,
|
||||
"milliseconds": 106.216
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "a6e6e813-765a-49cc-ad9a-946ceb115ab8",
|
||||
"retry_after": null,
|
||||
"milliseconds": 94.093
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "d2469510-c4c9-4b0d-8d0e-d2b8a04a0344",
|
||||
"retry_after": null,
|
||||
"milliseconds": 100.776
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "a6e6e813-765a-49cc-ad9a-946ceb115ab8",
|
||||
"retry_after": null,
|
||||
"milliseconds": 97.698
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"instance": "d2469510-c4c9-4b0d-8d0e-d2b8a04a0344",
|
||||
"retry_after": null,
|
||||
"milliseconds": 103.226
|
||||
},
|
||||
{
|
||||
"status": 429,
|
||||
"instance": "a6e6e813-765a-49cc-ad9a-946ceb115ab8",
|
||||
"retry_after": "10",
|
||||
"milliseconds": 46.565
|
||||
},
|
||||
{
|
||||
"status": 429,
|
||||
"instance": "d2469510-c4c9-4b0d-8d0e-d2b8a04a0344",
|
||||
"retry_after": "10",
|
||||
"milliseconds": 48.16
|
||||
}
|
||||
],
|
||||
"distinct_api_instances": 2,
|
||||
"passed": true
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
5012bf3092d8aadf293db7802c666a76829d79df33ad3b204ee6c20645266298
|
||||
{"probe": "baseline", "passed": true}
|
||||
@@ -0,0 +1 @@
|
||||
{"scope": "disposable synthetic schema; operator SET ROLE to NOLOGIN roles", "rows": [{"role": "wide", "operation": "read_password_hash", "allowed": true, "expected": true}, {"role": "wide", "operation": "create_table", "allowed": true, "expected": true}, {"role": "wide", "operation": "read_jobs", "allowed": true, "expected": true}, {"role": "limited", "operation": "read_password_hash", "allowed": false, "expected": false}, {"role": "limited", "operation": "create_table", "allowed": false, "expected": false}, {"role": "limited", "operation": "read_jobs", "allowed": true, "expected": true}], "passed": true}
|
||||
@@ -0,0 +1 @@
|
||||
{"isolated_port": 6378, "rows": [{"role": "wide", "operation": "queue_admin_acl_list", "allowed": true}, {"role": "wide", "operation": "queue_publish", "allowed": true}, {"role": "wide", "operation": "queue_other_key_write", "allowed": true}, {"role": "limited", "operation": "queue_admin_acl_list", "allowed": false}, {"role": "limited", "operation": "queue_publish", "allowed": false}, {"role": "limited", "operation": "queue_other_key_write", "allowed": false}], "passed": true}
|
||||
@@ -0,0 +1 @@
|
||||
{"scope": "disposable bucket security-study; broad role has no messenger rights", "rows": [{"role": "wide", "operation": "read_private", "allowed": true}, {"role": "wide", "operation": "write_private", "allowed": true}, {"role": "limited", "operation": "read_private", "allowed": false}, {"role": "limited", "operation": "write_private", "allowed": false}], "wide_role_denied_application_bucket": true, "passed": true}
|
||||
@@ -0,0 +1 @@
|
||||
Local PKI and scoped credential material ready; operator CA stays outside containers.
|
||||
@@ -0,0 +1,528 @@
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
#1 [internal] load local bake definitions
|
||||
#1 reading from stdin 7.71kB done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [storage-tls internal] load build definition from Dockerfile
|
||||
#2 transferring dockerfile: 1.08kB done
|
||||
#2 DONE 0.0s
|
||||
|
||||
#3 [dispatcher internal] load metadata for ghcr.io/astral-sh/uv:0.11.7
|
||||
#3 DONE 0.0s
|
||||
|
||||
#4 [s3-bootstrap internal] load metadata for docker.io/library/python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [collector-tls internal] load .dockerignore
|
||||
#5 transferring context: 140B done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [tempo-tls internal] load build context
|
||||
#6 transferring context: 3.44kB done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [s3-bootstrap] FROM ghcr.io/astral-sh/uv:0.11.7@sha256:240fb85ab0f263ef12f492d8476aa3a2e4e1e333f7d67fbdd923d00a506a516a
|
||||
#7 resolve ghcr.io/astral-sh/uv:0.11.7@sha256:240fb85ab0f263ef12f492d8476aa3a2e4e1e333f7d67fbdd923d00a506a516a 0.0s done
|
||||
#7 DONE 0.0s
|
||||
|
||||
#8 [worker build 1/5] FROM docker.io/library/python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b
|
||||
#8 resolve docker.io/library/python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b 0.0s done
|
||||
#8 CACHED
|
||||
|
||||
#9 [state-init build 2/5] COPY --from=ghcr.io/astral-sh/uv:0.11.7 /uv /usr/local/bin/uv
|
||||
#9 CACHED
|
||||
|
||||
#10 [state-init build 4/5] COPY pyproject.toml uv.lock ./
|
||||
#10 CACHED
|
||||
|
||||
#11 [state-init build 3/5] WORKDIR /app
|
||||
#11 CACHED
|
||||
|
||||
#12 [broker-tls build 5/5] RUN uv sync --locked --no-dev --no-install-project --python /usr/local/bin/python
|
||||
#12 CACHED
|
||||
|
||||
#13 [state-init stage-1 2/6] RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends libjpeg-turbo-progs && rm -rf /var/lib/apt/lists/*
|
||||
#13 0.356 Get:1 http://deb.debian.org/debian trixie InRelease [140 kB]
|
||||
#13 0.492 Get:2 http://deb.debian.org/debian trixie-updates InRelease [47.3 kB]
|
||||
#13 0.532 Get:3 http://deb.debian.org/debian-security trixie-security InRelease [43.4 kB]
|
||||
#13 0.587 Get:4 http://deb.debian.org/debian trixie/main arm64 Packages [9614 kB]
|
||||
#13 4.726 Get:5 http://deb.debian.org/debian trixie-updates/main arm64 Packages [1108 B]
|
||||
#13 4.761 Get:6 http://deb.debian.org/debian-security trixie-security/main arm64 Packages [306 kB]
|
||||
#13 5.256 Fetched 10.2 MB in 5s (1966 kB/s)
|
||||
#13 5.256 Reading package lists...
|
||||
#13 5.486 Reading package lists...
|
||||
#13 5.709 Building dependency tree...
|
||||
#13 5.769 Reading state information...
|
||||
#13 5.790 Calculating upgrade...
|
||||
#13 5.956 The following packages will be upgraded:
|
||||
#13 5.956 apt base-files bash bsdutils ca-certificates gzip libapt-pkg7.0
|
||||
#13 5.956 libaudit-common libaudit1 libblkid1 libc-bin libc6 libcap2 liblastlog2-2
|
||||
#13 5.956 liblzma5 libmount1 libpcre2-8-0 libsmartcols1 libsqlite3-0 libssl3t64
|
||||
#13 5.956 libuuid1 login mount openssl openssl-provider-legacy perl-base tzdata
|
||||
#13 5.956 util-linux zlib1g
|
||||
#13 6.071 29 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
|
||||
#13 6.071 Need to get 17.3 MB of archives.
|
||||
#13 6.071 After this operation, 179 kB of additional disk space will be used.
|
||||
#13 6.071 Get:1 http://deb.debian.org/debian trixie/main arm64 libc6 arm64 2.41-12+deb13u4 [2484 kB]
|
||||
#13 7.549 Get:2 http://deb.debian.org/debian trixie/main arm64 base-files arm64 13.8+deb13u7 [88.2 kB]
|
||||
#13 7.582 Get:3 http://deb.debian.org/debian trixie/main arm64 bash arm64 5.2.37-2+b10 [1456 kB]
|
||||
#13 9.056 Get:4 http://deb.debian.org/debian trixie/main arm64 bsdutils arm64 1:2.41.5-0+deb13u1 [109 kB]
|
||||
#13 10.30 Get:5 http://deb.debian.org/debian trixie/main arm64 gzip arm64 1.13-1+deb13u1 [135 kB]
|
||||
#13 10.33 Get:6 http://deb.debian.org/debian trixie/main arm64 perl-base arm64 5.40.1-6+deb13u1 [1529 kB]
|
||||
#13 10.93 Get:7 http://deb.debian.org/debian trixie/main arm64 liblastlog2-2 arm64 2.41.5-0+deb13u1 [28.6 kB]
|
||||
#13 10.94 Get:8 http://deb.debian.org/debian trixie/main arm64 libuuid1 arm64 2.41.5-0+deb13u1 [37.6 kB]
|
||||
#13 10.96 Get:9 http://deb.debian.org/debian trixie/main arm64 libblkid1 arm64 2.41.5-0+deb13u1 [166 kB]
|
||||
#13 11.03 Get:10 http://deb.debian.org/debian trixie/main arm64 libmount1 arm64 2.41.5-0+deb13u1 [201 kB]
|
||||
#13 11.13 Get:11 http://deb.debian.org/debian trixie/main arm64 libsmartcols1 arm64 2.41.5-0+deb13u1 [139 kB]
|
||||
#13 11.18 Get:12 http://deb.debian.org/debian trixie/main arm64 util-linux arm64 2.41.5-0+deb13u1 [1199 kB]
|
||||
#13 11.72 Get:13 http://deb.debian.org/debian trixie/main arm64 mount arm64 2.41.5-0+deb13u1 [161 kB]
|
||||
#13 11.77 Get:14 http://deb.debian.org/debian trixie/main arm64 libsqlite3-0 arm64 3.46.1-7+deb13u2 [854 kB]
|
||||
#13 12.19 Get:15 http://deb.debian.org/debian-security trixie-security/main arm64 liblzma5 arm64 5.8.1-1+deb13u2 [303 kB]
|
||||
#13 12.34 Get:16 http://deb.debian.org/debian-security trixie-security/main arm64 openssl-provider-legacy arm64 3.5.7-1~deb13u3 [314 kB]
|
||||
#13 12.49 Get:17 http://deb.debian.org/debian-security trixie-security/main arm64 zlib1g arm64 1:1.3.dfsg+really1.3.1-1+deb13u1 [85.0 kB]
|
||||
#13 12.52 Get:18 http://deb.debian.org/debian-security trixie-security/main arm64 libssl3t64 arm64 3.5.7-1~deb13u3 [2770 kB]
|
||||
#13 13.60 Get:19 http://deb.debian.org/debian-security trixie-security/main arm64 libapt-pkg7.0 arm64 3.0.4 [978 kB]
|
||||
#13 13.99 Get:20 http://deb.debian.org/debian-security trixie-security/main arm64 apt arm64 3.0.4 [1363 kB]
|
||||
#13 16.38 Get:21 http://deb.debian.org/debian trixie/main arm64 libc-bin arm64 2.41-12+deb13u4 [552 kB]
|
||||
#13 16.58 Get:22 http://deb.debian.org/debian trixie/main arm64 libaudit-common all 1:4.0.2-2+deb13u1 [12.8 kB]
|
||||
#13 16.58 Get:23 http://deb.debian.org/debian trixie/main arm64 libaudit1 arm64 1:4.0.2-2+deb13u1 [56.9 kB]
|
||||
#13 16.60 Get:24 http://deb.debian.org/debian trixie/main arm64 login arm64 1:4.16.0-2+really2.41.5-0+deb13u1 [116 kB]
|
||||
#13 16.64 Get:25 http://deb.debian.org/debian trixie/main arm64 libcap2 arm64 1:2.75-10+deb13u1+b3 [28.6 kB]
|
||||
#13 16.64 Get:26 http://deb.debian.org/debian-security trixie-security/main arm64 libpcre2-8-0 arm64 10.46-1~deb13u3 [263 kB]
|
||||
#13 16.73 Get:27 http://deb.debian.org/debian trixie-updates/main arm64 tzdata all 2026f-0+deb13u1 [268 kB]
|
||||
#13 16.82 Get:28 http://deb.debian.org/debian-security trixie-security/main arm64 openssl arm64 3.5.7-1~deb13u3 [1473 kB]
|
||||
#13 18.63 Get:29 http://deb.debian.org/debian-security trixie-security/main arm64 ca-certificates all 20250419+deb13u1 [161 kB]
|
||||
#13 18.83 debconf: unable to initialize frontend: Dialog
|
||||
#13 18.83 debconf: (TERM is not set, so the dialog frontend is not usable.)
|
||||
#13 18.83 debconf: falling back to frontend: Readline
|
||||
#13 18.83 debconf: unable to initialize frontend: Readline
|
||||
#13 18.83 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC entries checked: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 /usr/lib/aarch64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 8, <STDIN> line 29.)
|
||||
#13 18.83 debconf: falling back to frontend: Teletype
|
||||
#13 18.84 debconf: unable to initialize frontend: Teletype
|
||||
#13 18.84 debconf: (This frontend requires a controlling tty.)
|
||||
#13 18.84 debconf: falling back to frontend: Noninteractive
|
||||
#13 19.08 Preconfiguring packages ...
|
||||
#13 19.25 Fetched 17.3 MB in 13s (1330 kB/s)
|
||||
#13 19.27 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5642 files and directories currently installed.)
|
||||
#13 19.28 Preparing to unpack .../libc6_2.41-12+deb13u4_arm64.deb ...
|
||||
#13 19.31 debconf: unable to initialize frontend: Dialog
|
||||
#13 19.31 debconf: (TERM is not set, so the dialog frontend is not usable.)
|
||||
#13 19.31 debconf: falling back to frontend: Readline
|
||||
#13 19.31 debconf: unable to initialize frontend: Readline
|
||||
#13 19.31 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC entries checked: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 /usr/lib/aarch64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 8.)
|
||||
#13 19.31 debconf: falling back to frontend: Teletype
|
||||
#13 19.31 debconf: unable to initialize frontend: Teletype
|
||||
#13 19.31 debconf: (This frontend requires a controlling tty.)
|
||||
#13 19.31 debconf: falling back to frontend: Noninteractive
|
||||
#13 19.32 Unpacking libc6:arm64 (2.41-12+deb13u4) over (2.41-12+deb13u3) ...
|
||||
#13 19.62 Setting up libc6:arm64 (2.41-12+deb13u4) ...
|
||||
#13 19.64 debconf: unable to initialize frontend: Dialog
|
||||
#13 19.64 debconf: (TERM is not set, so the dialog frontend is not usable.)
|
||||
#13 19.64 debconf: falling back to frontend: Readline
|
||||
#13 19.64 debconf: unable to initialize frontend: Readline
|
||||
#13 19.64 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC entries checked: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 /usr/lib/aarch64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 8.)
|
||||
#13 19.64 debconf: falling back to frontend: Teletype
|
||||
#13 19.64 debconf: unable to initialize frontend: Teletype
|
||||
#13 19.64 debconf: (This frontend requires a controlling tty.)
|
||||
#13 19.64 debconf: falling back to frontend: Noninteractive
|
||||
#13 19.66 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5642 files and directories currently installed.)
|
||||
#13 19.66 Preparing to unpack .../base-files_13.8+deb13u7_arm64.deb ...
|
||||
#13 19.67 Unpacking base-files (13.8+deb13u7) over (13.8+deb13u6) ...
|
||||
#13 19.70 Setting up base-files (13.8+deb13u7) ...
|
||||
#13 19.70 Installing new version of config file /etc/debian_version ...
|
||||
#13 19.73 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5651 files and directories currently installed.)
|
||||
#13 19.73 Preparing to unpack .../bash_5.2.37-2+b10_arm64.deb ...
|
||||
#13 19.74 update-alternatives: warning: alternative /usr/share/man/man7/bash-builtins.7.gz (part of link group builtins.7.gz) doesn't exist; removing from list of alternatives
|
||||
#13 19.74 update-alternatives: warning: /etc/alternatives/builtins.7.gz is dangling; it will be updated with best choice
|
||||
#13 19.74 Unpacking bash (5.2.37-2+b10) over (5.2.37-2+b9) ...
|
||||
#13 19.81 Setting up bash (5.2.37-2+b10) ...
|
||||
#13 19.82 update-alternatives: error: alternative path /usr/share/man/man7/bash-builtins.7.gz doesn't exist
|
||||
#13 19.82 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5651 files and directories currently installed.)
|
||||
#13 19.82 Preparing to unpack .../bsdutils_1%3a2.41.5-0+deb13u1_arm64.deb ...
|
||||
#13 19.83 Unpacking bsdutils (1:2.41.5-0+deb13u1) over (1:2.41-5) ...
|
||||
#13 19.85 Setting up bsdutils (1:2.41.5-0+deb13u1) ...
|
||||
#13 19.87 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5651 files and directories currently installed.)
|
||||
#13 19.87 Preparing to unpack .../gzip_1.13-1+deb13u1_arm64.deb ...
|
||||
#13 19.87 Unpacking gzip (1.13-1+deb13u1) over (1.13-1) ...
|
||||
#13 19.89 Setting up gzip (1.13-1+deb13u1) ...
|
||||
#13 19.91 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5651 files and directories currently installed.)
|
||||
#13 19.91 Preparing to unpack .../perl-base_5.40.1-6+deb13u1_arm64.deb ...
|
||||
#13 19.91 Unpacking perl-base (5.40.1-6+deb13u1) over (5.40.1-6) ...
|
||||
#13 20.46 Setting up perl-base (5.40.1-6+deb13u1) ...
|
||||
#13 20.47 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5652 files and directories currently installed.)
|
||||
#13 20.47 Preparing to unpack .../liblastlog2-2_2.41.5-0+deb13u1_arm64.deb ...
|
||||
#13 20.48 Unpacking liblastlog2-2:arm64 (2.41.5-0+deb13u1) over (2.41-5) ...
|
||||
#13 20.49 Setting up liblastlog2-2:arm64 (2.41.5-0+deb13u1) ...
|
||||
#13 20.50 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5652 files and directories currently installed.)
|
||||
#13 20.50 Preparing to unpack .../libuuid1_2.41.5-0+deb13u1_arm64.deb ...
|
||||
#13 20.51 Unpacking libuuid1:arm64 (2.41.5-0+deb13u1) over (2.41-5) ...
|
||||
#13 20.52 Setting up libuuid1:arm64 (2.41.5-0+deb13u1) ...
|
||||
#13 20.53 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5652 files and directories currently installed.)
|
||||
#13 20.54 Preparing to unpack .../libblkid1_2.41.5-0+deb13u1_arm64.deb ...
|
||||
#13 20.54 Unpacking libblkid1:arm64 (2.41.5-0+deb13u1) over (2.41-5) ...
|
||||
#13 20.56 Setting up libblkid1:arm64 (2.41.5-0+deb13u1) ...
|
||||
#13 20.57 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5652 files and directories currently installed.)
|
||||
#13 20.57 Preparing to unpack .../libmount1_2.41.5-0+deb13u1_arm64.deb ...
|
||||
#13 20.57 Unpacking libmount1:arm64 (2.41.5-0+deb13u1) over (2.41-5) ...
|
||||
#13 20.60 Setting up libmount1:arm64 (2.41.5-0+deb13u1) ...
|
||||
#13 20.61 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5652 files and directories currently installed.)
|
||||
#13 20.61 Preparing to unpack .../libsmartcols1_2.41.5-0+deb13u1_arm64.deb ...
|
||||
#13 20.61 Unpacking libsmartcols1:arm64 (2.41.5-0+deb13u1) over (2.41-5) ...
|
||||
#13 20.63 Setting up libsmartcols1:arm64 (2.41.5-0+deb13u1) ...
|
||||
#13 20.64 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5652 files and directories currently installed.)
|
||||
#13 20.65 Preparing to unpack .../util-linux_2.41.5-0+deb13u1_arm64.deb ...
|
||||
#13 20.65 Unpacking util-linux (2.41.5-0+deb13u1) over (2.41-5) ...
|
||||
#13 20.79 Setting up util-linux (2.41.5-0+deb13u1) ...
|
||||
#13 20.79 update-alternatives: warning: forcing reinstallation of alternative /bin/more because link group pager is broken
|
||||
#13 20.79 update-alternatives: warning: skip creation of /usr/share/man/man1/pager.1.gz because associated file /usr/share/man/man1/more.1.gz (of link group pager) doesn't exist
|
||||
#13 20.84 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5657 files and directories currently installed.)
|
||||
#13 20.84 Preparing to unpack .../mount_2.41.5-0+deb13u1_arm64.deb ...
|
||||
#13 20.84 Unpacking mount (2.41.5-0+deb13u1) over (2.41-5) ...
|
||||
#13 20.87 Preparing to unpack .../libsqlite3-0_3.46.1-7+deb13u2_arm64.deb ...
|
||||
#13 20.87 Unpacking libsqlite3-0:arm64 (3.46.1-7+deb13u2) over (3.46.1-7+deb13u1) ...
|
||||
#13 20.91 Setting up libsqlite3-0:arm64 (3.46.1-7+deb13u2) ...
|
||||
#13 20.92 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5657 files and directories currently installed.)
|
||||
#13 20.92 Preparing to unpack .../liblzma5_5.8.1-1+deb13u2_arm64.deb ...
|
||||
#13 20.93 Unpacking liblzma5:arm64 (5.8.1-1+deb13u2) over (5.8.1-1+deb13u1) ...
|
||||
#13 20.95 Setting up liblzma5:arm64 (5.8.1-1+deb13u2) ...
|
||||
#13 20.96 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5657 files and directories currently installed.)
|
||||
#13 20.96 Preparing to unpack .../openssl-provider-legacy_3.5.7-1~deb13u3_arm64.deb ...
|
||||
#13 20.96 Unpacking openssl-provider-legacy (3.5.7-1~deb13u3) over (3.5.6-1~deb13u2) ...
|
||||
#13 20.98 Setting up openssl-provider-legacy (3.5.7-1~deb13u3) ...
|
||||
#13 20.99 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5657 files and directories currently installed.)
|
||||
#13 20.99 Preparing to unpack .../zlib1g_1%3a1.3.dfsg+really1.3.1-1+deb13u1_arm64.deb ...
|
||||
#13 20.99 Unpacking zlib1g:arm64 (1:1.3.dfsg+really1.3.1-1+deb13u1) over (1:1.3.dfsg+really1.3.1-1+b1) ...
|
||||
#13 21.01 Setting up zlib1g:arm64 (1:1.3.dfsg+really1.3.1-1+deb13u1) ...
|
||||
#13 21.02 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5656 files and directories currently installed.)
|
||||
#13 21.02 Preparing to unpack .../libssl3t64_3.5.7-1~deb13u3_arm64.deb ...
|
||||
#13 21.03 Unpacking libssl3t64:arm64 (3.5.7-1~deb13u3) over (3.5.6-1~deb13u2) ...
|
||||
#13 21.12 Setting up libssl3t64:arm64 (3.5.7-1~deb13u3) ...
|
||||
#13 21.13 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5656 files and directories currently installed.)
|
||||
#13 21.13 Preparing to unpack .../libapt-pkg7.0_3.0.4_arm64.deb ...
|
||||
#13 21.13 Unpacking libapt-pkg7.0:arm64 (3.0.4) over (3.0.3) ...
|
||||
#13 21.18 Setting up libapt-pkg7.0:arm64 (3.0.4) ...
|
||||
#13 21.20 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5656 files and directories currently installed.)
|
||||
#13 21.20 Preparing to unpack .../archives/apt_3.0.4_arm64.deb ...
|
||||
#13 21.21 Unpacking apt (3.0.4) over (3.0.3) ...
|
||||
#13 21.28 Setting up apt (3.0.4) ...
|
||||
#13 21.37 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5656 files and directories currently installed.)
|
||||
#13 21.37 Preparing to unpack .../libc-bin_2.41-12+deb13u4_arm64.deb ...
|
||||
#13 21.38 Unpacking libc-bin (2.41-12+deb13u4) over (2.41-12+deb13u3) ...
|
||||
#13 21.42 Setting up libc-bin (2.41-12+deb13u4) ...
|
||||
#13 21.45 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5656 files and directories currently installed.)
|
||||
#13 21.45 Preparing to unpack .../libaudit-common_1%3a4.0.2-2+deb13u1_all.deb ...
|
||||
#13 21.45 Unpacking libaudit-common (1:4.0.2-2+deb13u1) over (1:4.0.2-2) ...
|
||||
#13 21.47 Setting up libaudit-common (1:4.0.2-2+deb13u1) ...
|
||||
#13 21.48 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5656 files and directories currently installed.)
|
||||
#13 21.48 Preparing to unpack .../libaudit1_1%3a4.0.2-2+deb13u1_arm64.deb ...
|
||||
#13 21.48 Unpacking libaudit1:arm64 (1:4.0.2-2+deb13u1) over (1:4.0.2-2+b2) ...
|
||||
#13 21.50 Setting up libaudit1:arm64 (1:4.0.2-2+deb13u1) ...
|
||||
#13 21.51 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5655 files and directories currently installed.)
|
||||
#13 21.51 Preparing to unpack .../login_1%3a4.16.0-2+really2.41.5-0+deb13u1_arm64.deb ...
|
||||
#13 21.52 Unpacking login (1:4.16.0-2+really2.41.5-0+deb13u1) over (1:4.16.0-2+really2.41-5) ...
|
||||
#13 21.54 Preparing to unpack .../libcap2_1%3a2.75-10+deb13u1+b3_arm64.deb ...
|
||||
#13 21.55 Unpacking libcap2:arm64 (1:2.75-10+deb13u1+b3) over (1:2.75-10+deb13u1+b1) ...
|
||||
#13 21.56 Setting up libcap2:arm64 (1:2.75-10+deb13u1+b3) ...
|
||||
#13 21.57 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5657 files and directories currently installed.)
|
||||
#13 21.58 Preparing to unpack .../libpcre2-8-0_10.46-1~deb13u3_arm64.deb ...
|
||||
#13 21.58 Unpacking libpcre2-8-0:arm64 (10.46-1~deb13u3) over (10.46-1~deb13u1) ...
|
||||
#13 21.60 Setting up libpcre2-8-0:arm64 (10.46-1~deb13u3) ...
|
||||
#13 21.62 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5657 files and directories currently installed.)
|
||||
#13 21.62 Preparing to unpack .../tzdata_2026f-0+deb13u1_all.deb ...
|
||||
#13 21.62 Unpacking tzdata (2026f-0+deb13u1) over (2026b-0+deb13u1) ...
|
||||
#13 21.96 Preparing to unpack .../openssl_3.5.7-1~deb13u3_arm64.deb ...
|
||||
#13 21.97 Unpacking openssl (3.5.7-1~deb13u3) over (3.5.6-1~deb13u2) ...
|
||||
#13 22.03 Preparing to unpack .../ca-certificates_20250419+deb13u1_all.deb ...
|
||||
#13 22.03 Unpacking ca-certificates (20250419+deb13u1) over (20250419) ...
|
||||
#13 22.16 Setting up tzdata (2026f-0+deb13u1) ...
|
||||
#13 22.18 debconf: unable to initialize frontend: Dialog
|
||||
#13 22.18 debconf: (TERM is not set, so the dialog frontend is not usable.)
|
||||
#13 22.18 debconf: falling back to frontend: Readline
|
||||
#13 22.18 debconf: unable to initialize frontend: Readline
|
||||
#13 22.18 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC entries checked: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 /usr/lib/aarch64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 8.)
|
||||
#13 22.18 debconf: falling back to frontend: Teletype
|
||||
#13 22.18 debconf: unable to initialize frontend: Teletype
|
||||
#13 22.18 debconf: (This frontend requires a controlling tty.)
|
||||
#13 22.18 debconf: falling back to frontend: Noninteractive
|
||||
#13 22.19
|
||||
#13 22.19 Current default time zone: 'Etc/UTC'
|
||||
#13 22.19 Local time is now: Mon Nov 16 00:09:35 UTC 2026.
|
||||
#13 22.19 Universal Time is now: Mon Nov 16 00:09:35 UTC 2026.
|
||||
#13 22.19 Run 'dpkg-reconfigure tzdata' if you wish to change it.
|
||||
#13 22.19
|
||||
#13 22.20 Setting up mount (2.41.5-0+deb13u1) ...
|
||||
#13 22.20 Setting up openssl (3.5.7-1~deb13u3) ...
|
||||
#13 22.21 Setting up login (1:4.16.0-2+really2.41.5-0+deb13u1) ...
|
||||
#13 22.21 Setting up ca-certificates (20250419+deb13u1) ...
|
||||
#13 22.24 debconf: unable to initialize frontend: Dialog
|
||||
#13 22.24 debconf: (TERM is not set, so the dialog frontend is not usable.)
|
||||
#13 22.24 debconf: falling back to frontend: Readline
|
||||
#13 22.24 debconf: unable to initialize frontend: Readline
|
||||
#13 22.24 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC entries checked: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 /usr/lib/aarch64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 8.)
|
||||
#13 22.24 debconf: falling back to frontend: Teletype
|
||||
#13 22.24 debconf: unable to initialize frontend: Teletype
|
||||
#13 22.24 debconf: (This frontend requires a controlling tty.)
|
||||
#13 22.24 debconf: falling back to frontend: Noninteractive
|
||||
#13 22.69 Updating certificates in /etc/ssl/certs...
|
||||
#13 22.93 rehash: warning: skipping ca-certificates.crt, it does not contain exactly one certificate or CRL
|
||||
#13 22.94 0 added, 2 removed; done.
|
||||
#13 22.94 Processing triggers for libc-bin (2.41-12+deb13u4) ...
|
||||
#13 22.95 Processing triggers for debianutils (5.23.2) ...
|
||||
#13 22.96 Processing triggers for ca-certificates (20250419+deb13u1) ...
|
||||
#13 22.96 Updating certificates in /etc/ssl/certs...
|
||||
#13 23.12 0 added, 0 removed; done.
|
||||
#13 23.12 Running hooks in /etc/ca-certificates/update.d...
|
||||
#13 23.12 done.
|
||||
#13 23.13 Reading package lists...
|
||||
#13 23.37 Building dependency tree...
|
||||
#13 23.43 Reading state information...
|
||||
#13 23.52 The following additional packages will be installed:
|
||||
#13 23.52 libjpeg62-turbo libturbojpeg0
|
||||
#13 23.53 The following NEW packages will be installed:
|
||||
#13 23.54 libjpeg-turbo-progs libjpeg62-turbo libturbojpeg0
|
||||
#13 23.67 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
|
||||
#13 23.67 Need to get 523 kB of archives.
|
||||
#13 23.67 After this operation, 1650 kB of additional disk space will be used.
|
||||
#13 23.67 Get:1 http://deb.debian.org/debian trixie/main arm64 libjpeg62-turbo arm64 1:2.1.5-4 [173 kB]
|
||||
#13 23.98 Get:2 http://deb.debian.org/debian trixie/main arm64 libturbojpeg0 arm64 1:2.1.5-4 [211 kB]
|
||||
#13 24.07 Get:3 http://deb.debian.org/debian trixie/main arm64 libjpeg-turbo-progs arm64 1:2.1.5-4 [140 kB]
|
||||
#13 24.22 debconf: unable to initialize frontend: Dialog
|
||||
#13 24.22 debconf: (TERM is not set, so the dialog frontend is not usable.)
|
||||
#13 24.22 debconf: falling back to frontend: Readline
|
||||
#13 24.22 debconf: unable to initialize frontend: Readline
|
||||
#13 24.22 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC entries checked: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 /usr/lib/aarch64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 8, <STDIN> line 3.)
|
||||
#13 24.22 debconf: falling back to frontend: Teletype
|
||||
#13 24.23 debconf: unable to initialize frontend: Teletype
|
||||
#13 24.23 debconf: (This frontend requires a controlling tty.)
|
||||
#13 24.23 debconf: falling back to frontend: Noninteractive
|
||||
#13 24.46 Fetched 523 kB in 1s (872 kB/s)
|
||||
#13 24.47 Selecting previously unselected package libjpeg62-turbo:arm64.
|
||||
#13 24.47 (Reading database ... ␍(Reading database ... 5%␍(Reading database ... 10%␍(Reading database ... 15%␍(Reading database ... 20%␍(Reading database ... 25%␍(Reading database ... 30%␍(Reading database ... 35%␍(Reading database ... 40%␍(Reading database ... 45%␍(Reading database ... 50%␍(Reading database ... 55%␍(Reading database ... 60%␍(Reading database ... 65%␍(Reading database ... 70%␍(Reading database ... 75%␍(Reading database ... 80%␍(Reading database ... 85%␍(Reading database ... 90%␍(Reading database ... 95%␍(Reading database ... 100%␍(Reading database ... 5655 files and directories currently installed.)
|
||||
#13 24.48 Preparing to unpack .../libjpeg62-turbo_1%3a2.1.5-4_arm64.deb ...
|
||||
#13 24.48 Unpacking libjpeg62-turbo:arm64 (1:2.1.5-4) ...
|
||||
#13 24.50 Selecting previously unselected package libturbojpeg0:arm64.
|
||||
#13 24.50 Preparing to unpack .../libturbojpeg0_1%3a2.1.5-4_arm64.deb ...
|
||||
#13 24.50 Unpacking libturbojpeg0:arm64 (1:2.1.5-4) ...
|
||||
#13 24.52 Selecting previously unselected package libjpeg-turbo-progs.
|
||||
#13 24.52 Preparing to unpack .../libjpeg-turbo-progs_1%3a2.1.5-4_arm64.deb ...
|
||||
#13 24.52 Unpacking libjpeg-turbo-progs (1:2.1.5-4) ...
|
||||
#13 24.53 Setting up libturbojpeg0:arm64 (1:2.1.5-4) ...
|
||||
#13 24.54 Setting up libjpeg62-turbo:arm64 (1:2.1.5-4) ...
|
||||
#13 24.54 Setting up libjpeg-turbo-progs (1:2.1.5-4) ...
|
||||
#13 24.54 Processing triggers for libc-bin (2.41-12+deb13u4) ...
|
||||
#13 DONE 24.6s
|
||||
|
||||
#14 [cache-tls stage-1 3/6] WORKDIR /app
|
||||
#14 DONE 0.0s
|
||||
|
||||
#15 [storage-tls stage-1 4/6] COPY --from=build /app/.venv /app/.venv
|
||||
#15 DONE 0.2s
|
||||
|
||||
#16 [storage-tls stage-1 5/6] COPY src ./src
|
||||
#16 DONE 0.0s
|
||||
|
||||
#17 [api stage-1 6/6] COPY migrations ./migrations
|
||||
#17 DONE 0.0s
|
||||
|
||||
#18 [cache-tls] exporting to image
|
||||
#18 exporting layers
|
||||
#18 exporting layers 1.4s done
|
||||
#18 exporting manifest sha256:0c07e0460902961ec374589847a40b58a310b08dad8c0002bbd755989ce0264c 0.0s done
|
||||
#18 exporting config sha256:9a2b00fc3a900d70bce354f187bfbe9ea7a220982e653c87552098f189696312 0.0s done
|
||||
#18 exporting attestation manifest sha256:b609440d016fc3292675be67f3e3e0df365366619bea883b410f3ee09cb25355 0.1s done
|
||||
#18 exporting manifest list sha256:fae5b37097ef0ab7da2a6b7abfc452d33840e2753b7911d7048f61d7e4a3062b
|
||||
#18 exporting manifest list sha256:fae5b37097ef0ab7da2a6b7abfc452d33840e2753b7911d7048f61d7e4a3062b 0.0s done
|
||||
#18 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#18 unpacking to docker.io/library/mtusi-vasilev:lab7
|
||||
#18 ...
|
||||
|
||||
#19 [collector-tls] exporting to image
|
||||
#19 exporting layers 1.4s done
|
||||
#19 exporting manifest sha256:0958ee1e87a6f5efdc6455ed4055cecb8c707d219773b368cc6d49acfff64b59 0.0s done
|
||||
#19 exporting config sha256:3dda20cfab700ca586893972d9c24e57d736dc04130c29157a4ca1f03e9a59b6 0.0s done
|
||||
#19 exporting attestation manifest sha256:0ad7a5ffe021f2841b3bd2b756a84a4ada82e0d5d68a602d93acc65d21dc9f65 0.1s done
|
||||
#19 exporting manifest list sha256:21caf27842abecd6ad8596fda6796dcde8f76cd67ea93c88adf525e5074b0fbd 0.0s done
|
||||
#19 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#19 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#19 DONE 5.7s
|
||||
|
||||
#20 [loki-tls] exporting to image
|
||||
#20 exporting layers 1.4s done
|
||||
#20 exporting manifest sha256:69702c6141fdb9813da24956d7bfca031ae2f4d43f866ebea86361810cc740a5 0.0s done
|
||||
#20 exporting config sha256:b1a8d9cb6de6f4fca543a4589ce0913773a800ba7205d309fd03eab1d216456b 0.0s done
|
||||
#20 exporting attestation manifest sha256:b6a66bb103d211edc219dcd54fa4f26ac891dcd949039930e84914fcd873e042 0.1s done
|
||||
#20 exporting manifest list sha256:3b177a96ad9b5e92989ed13113f2a5c5a1cb6dbef2fd87511e779dd7f0453e22 0.0s done
|
||||
#20 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#20 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#20 DONE 5.7s
|
||||
|
||||
#21 [worker] exporting to image
|
||||
#21 exporting layers 1.4s done
|
||||
#21 exporting manifest sha256:69e84be6c08b88513067881b0d73c35c06ecc70b748ba3531ec9f70992c4cf16 0.0s done
|
||||
#21 exporting config sha256:91ec0604fd7a03e6dc1112fca20d50d473d030ef25c084868550f3f5b8678cf7 0.0s done
|
||||
#21 exporting attestation manifest sha256:d887532db99a75eb0ae8211d5d19b7fb99e519b66d99a197ed3989a0a57f674f 0.1s done
|
||||
#21 exporting manifest list sha256:acd49b5aa1f7254d5626331746278759df3ba6d599e4d3e47cefd6678f011bc2 0.0s done
|
||||
#21 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#21 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#21 DONE 5.7s
|
||||
|
||||
#22 [dispatcher] exporting to image
|
||||
#22 exporting layers 1.4s done
|
||||
#22 exporting manifest sha256:42946c493838738945b068722196ba09e02cbc96a26c289f0e18d90def4c1eab 0.0s done
|
||||
#22 exporting config sha256:fc1380a0bdb65b8e7721f72af470068e7328e7984ed62e1a9ca33fec85644f4b 0.0s done
|
||||
#22 exporting attestation manifest sha256:9cce63461b9e13f7f4db6555dad8371bbaf5e0277677971712bbea78626e90bd 0.1s done
|
||||
#22 exporting manifest list sha256:e751d3a98d6b3f5d9cc5921d5f76f4dfea01d705a66c16e30fb2d94b1bd1945a 0.0s done
|
||||
#22 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#22 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#22 DONE 5.7s
|
||||
|
||||
#23 [storage-tls] exporting to image
|
||||
#23 exporting layers 1.4s done
|
||||
#23 exporting manifest sha256:cc47ce19298fe9ac75c7d20339b23030b9b64491c931c32b91532e3d197b6f9d 0.0s done
|
||||
#23 exporting config sha256:1063b4a46a2c2bbaa063243a702802e1639d17fc1a90b687a72c69f98d4e53a3 0.0s done
|
||||
#23 exporting attestation manifest sha256:f47254a0fcdef132a5bd7faa35168cdbc5c5025fcc3099debdb5df9fac4f563b 0.1s done
|
||||
#23 exporting manifest list sha256:66d4f298f67efb84b3d0b8f50b27f42c91083de6917e1d4db8edaa40a0192882 0.0s done
|
||||
#23 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#23 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#23 DONE 5.7s
|
||||
|
||||
#24 [tempo-tls] exporting to image
|
||||
#24 exporting layers 1.4s done
|
||||
#24 exporting manifest sha256:846d1573e836dff6c31db4df46d9854abf48ae8c9b7884425d8590949124e5c7 0.0s done
|
||||
#24 exporting config sha256:a6343c1be3e14e80469e7b2e42bdaf0511ca89186badca2a001c1c804489cb45 0.0s done
|
||||
#24 exporting attestation manifest sha256:216b675cb41557ef50c11a2bef53073013769abd34a08e9adc90477d8f22fdae 0.1s done
|
||||
#24 exporting manifest list sha256:cbc0b749086fb6433fe250a21cf0f137a2fd513a34680e7e6303e5b5a4169d71 0.0s done
|
||||
#24 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#24 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#24 DONE 5.7s
|
||||
|
||||
#25 [api] exporting to image
|
||||
#25 exporting layers 1.4s done
|
||||
#25 exporting manifest sha256:48183dc8f97de969c685525f828699a3ff90267e3fc14391485b9219867101f0 0.0s done
|
||||
#25 exporting config sha256:921bd0b3fefd2c339eae0c5d25b5f7a21d3765642370289c45bfa5caf1a8554a 0.0s done
|
||||
#25 exporting attestation manifest sha256:cdc0b91debc5974051feda5787ab0f307030be650acecfec7d75fde5b40268cc 0.1s done
|
||||
#25 exporting manifest list sha256:1954b858894b07a5c6232f977edb7c50f0f51fca2017b7942aa99da323b3dcaa 0.0s done
|
||||
#25 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#25 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#25 DONE 5.7s
|
||||
|
||||
#26 [migrate] exporting to image
|
||||
#26 exporting layers 1.4s done
|
||||
#26 exporting manifest sha256:cfa2afd0b06150460c8a242090dccc8bd153f1d346ede2be24cdd03f65bb556c 0.0s done
|
||||
#26 exporting config sha256:c065387f46e4929e57d7154c3a74c884006ba3dd80511305a9a195c7374ec474 0.0s done
|
||||
#26 exporting attestation manifest sha256:5eb5936196f4d222c430bdee221f25c33a5c6c3ce677df458ebdfd9ee30169d7 0.1s done
|
||||
#26 exporting manifest list sha256:30edaa54fca3d143c494d2ec841513f1bff83d6bdca676138275368ecc741534 0.0s done
|
||||
#26 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#26 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#26 DONE 5.7s
|
||||
|
||||
#27 [state-init] exporting to image
|
||||
#27 exporting layers 1.4s done
|
||||
#27 exporting manifest sha256:6d62921ca1712eda0d0f90f47a17d7dc9f7c87164b1d9631d5ffa905ebea1a4f 0.0s done
|
||||
#27 exporting config sha256:f9936c70960f82bd19698dea042f6cf0d4e873531b8c1e5a0f87f3dbc696a059 0.0s done
|
||||
#27 exporting attestation manifest sha256:67add98ab28272a31455be09a8876b1f9ff142cad052228a499b86b0c3414882 0.1s done
|
||||
#27 exporting manifest list sha256:308a21834a6a5a652070f78bf3b53b95a4401da9cce132ecd32ce3c6dfaf9478 0.0s done
|
||||
#27 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#27 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#27 DONE 5.7s
|
||||
|
||||
#18 [cache-tls] exporting to image
|
||||
#18 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#18 ...
|
||||
|
||||
#28 [s3-bootstrap] exporting to image
|
||||
#28 exporting layers 1.4s done
|
||||
#28 exporting manifest sha256:d0b2eac3949f8af5a9cfec3707327bad7464b30281b1721b834a23100e6cc1da 0.0s done
|
||||
#28 exporting config sha256:5d7343a9b51167c220138347431443d174b970a941d0010d53d2c192f0d38848 0.0s done
|
||||
#28 exporting attestation manifest sha256:4d9d04ce7a92b21843ffc8400fddd5d18c0b5a3ed3f2cd9484f22ae6118960da 0.1s done
|
||||
#28 exporting manifest list sha256:eb1d75915ac80bbd3f25c68c1db93f70b007a2b9005ec5b3421f3569617a1e44 0.0s done
|
||||
#28 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#28 unpacking to docker.io/library/mtusi-vasilev:lab7 4.0s done
|
||||
#28 DONE 6.0s
|
||||
|
||||
#18 [cache-tls] exporting to image
|
||||
#18 DONE 6.0s
|
||||
|
||||
#29 [prometheus-tls] exporting to image
|
||||
#29 exporting layers 1.4s done
|
||||
#29 exporting manifest sha256:ff1ddb53dfe35553787cf5ec8d10e181b115f6033d747c7a5aca8e8651f818a7 0.0s done
|
||||
#29 exporting config sha256:a0f101182523788bb185fe6f0553f3758c686ce6af0d638d57bffc14721003a3 0.0s done
|
||||
#29 exporting attestation manifest sha256:c150132312b65de62c667ea018d7edd893d2dfb97ba124ee063f6d4e405b153b 0.1s done
|
||||
#29 exporting manifest list sha256:d2299f09f9a4d160ffee81f304d647c66492750ed01e693ec0c5cf2f3931ec81 0.0s done
|
||||
#29 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#29 unpacking to docker.io/library/mtusi-vasilev:lab7 4.1s done
|
||||
#29 DONE 6.0s
|
||||
|
||||
#30 [broker-tls] exporting to image
|
||||
#30 exporting layers 1.4s done
|
||||
#30 exporting manifest sha256:0d49ac46ec4d92c864e6c297e49a37437de1b0035fa6cd228b69ff331b55ea5d 0.0s done
|
||||
#30 exporting config sha256:e57580bbb9d35c342fd7f644ffc2e365012a31b73a9ab36e412f893d91ff53bd 0.0s done
|
||||
#30 exporting attestation manifest sha256:8782eddb29bf1d2ada4b88323aa46fd26e47bc7391ee089b122ff0a06e9a6b3c 0.1s done
|
||||
#30 exporting manifest list sha256:acb8efd331d2137610c70fa36df23dad6901b724d7f248dcb365ec1799503616 0.0s done
|
||||
#30 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#30 unpacking to docker.io/library/mtusi-vasilev:lab7 4.4s done
|
||||
#30 DONE 6.0s
|
||||
|
||||
#31 [tempo-tls] resolving provenance for metadata file
|
||||
#31 DONE 0.1s
|
||||
|
||||
#32 [collector-tls] resolving provenance for metadata file
|
||||
#32 DONE 0.1s
|
||||
|
||||
#33 [storage-tls] resolving provenance for metadata file
|
||||
#33 DONE 0.1s
|
||||
|
||||
#34 [dispatcher] resolving provenance for metadata file
|
||||
#34 DONE 0.1s
|
||||
|
||||
#35 [migrate] resolving provenance for metadata file
|
||||
#35 DONE 0.1s
|
||||
|
||||
#36 [s3-bootstrap] resolving provenance for metadata file
|
||||
#36 DONE 0.0s
|
||||
|
||||
#37 [cache-tls] resolving provenance for metadata file
|
||||
#37 DONE 0.0s
|
||||
|
||||
#38 [loki-tls] resolving provenance for metadata file
|
||||
#38 DONE 0.1s
|
||||
|
||||
#39 [prometheus-tls] resolving provenance for metadata file
|
||||
#39 DONE 0.0s
|
||||
|
||||
#40 [worker] resolving provenance for metadata file
|
||||
#40 DONE 0.1s
|
||||
|
||||
#41 [api] resolving provenance for metadata file
|
||||
#41 DONE 0.1s
|
||||
|
||||
#42 [state-init] resolving provenance for metadata file
|
||||
#42 DONE 0.1s
|
||||
|
||||
#43 [broker-tls] resolving provenance for metadata file
|
||||
#43 DONE 0.0s
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
@@ -0,0 +1,3 @@
|
||||
Container mtusi-vasilev-lab7-worker-1 Stopping
|
||||
Container mtusi-vasilev-lab7-worker-1 Stopped
|
||||
{"accepted_jobs": 3, "ready_jobs": 3, "recovery_seconds": 5.425, "observed_api_503": 0, "images_before": ["sha256:ce0212b316d05ddaade5864194fd158d2849a6368b1fc316b23017d20093b82d"], "images_after": ["sha256:ce0212b316d05ddaade5864194fd158d2849a6368b1fc316b23017d20093b82d"], "image_unchanged": true, "revoked_material_checks_passed": true, "variants_verified": 9, "passed": true}
|
||||
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"accepted_jobs": 3,
|
||||
"ready_jobs": 3,
|
||||
"recovery_seconds": 5.425,
|
||||
"observed_api_503": 0,
|
||||
"images_before": [
|
||||
"sha256:ce0212b316d05ddaade5864194fd158d2849a6368b1fc316b23017d20093b82d"
|
||||
],
|
||||
"images_after": [
|
||||
"sha256:ce0212b316d05ddaade5864194fd158d2849a6368b1fc316b23017d20093b82d"
|
||||
],
|
||||
"image_unchanged": true,
|
||||
"revoked_material_checks_passed": true,
|
||||
"variants_verified": 9,
|
||||
"rows": [
|
||||
{
|
||||
"attachment_id": "1f46d08f-c865-4af0-b9e5-63b204efdde9",
|
||||
"original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"download_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"thumbnail_sha256": "b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546",
|
||||
"thumbnail_nonempty": true,
|
||||
"variants": [
|
||||
{
|
||||
"name": "thumbnail",
|
||||
"sha256": "b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546",
|
||||
"advertised_sha256": "b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546",
|
||||
"size_matches": true,
|
||||
"passed": true
|
||||
},
|
||||
{
|
||||
"name": "crop",
|
||||
"sha256": "fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f",
|
||||
"advertised_sha256": "fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f",
|
||||
"size_matches": true,
|
||||
"passed": true
|
||||
},
|
||||
{
|
||||
"name": "optimized",
|
||||
"sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"advertised_sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"size_matches": true,
|
||||
"passed": true
|
||||
}
|
||||
],
|
||||
"accepted_original_sha_matches": true
|
||||
},
|
||||
{
|
||||
"attachment_id": "aa7b8544-0f3c-40cf-bb8a-fbbabc0223dd",
|
||||
"original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"download_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"thumbnail_sha256": "b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546",
|
||||
"thumbnail_nonempty": true,
|
||||
"variants": [
|
||||
{
|
||||
"name": "thumbnail",
|
||||
"sha256": "b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546",
|
||||
"advertised_sha256": "b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546",
|
||||
"size_matches": true,
|
||||
"passed": true
|
||||
},
|
||||
{
|
||||
"name": "crop",
|
||||
"sha256": "fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f",
|
||||
"advertised_sha256": "fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f",
|
||||
"size_matches": true,
|
||||
"passed": true
|
||||
},
|
||||
{
|
||||
"name": "optimized",
|
||||
"sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"advertised_sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"size_matches": true,
|
||||
"passed": true
|
||||
}
|
||||
],
|
||||
"accepted_original_sha_matches": true
|
||||
},
|
||||
{
|
||||
"attachment_id": "5a832544-2482-480e-9a2d-ea7351d56547",
|
||||
"original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"download_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75",
|
||||
"thumbnail_sha256": "b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546",
|
||||
"thumbnail_nonempty": true,
|
||||
"variants": [
|
||||
{
|
||||
"name": "thumbnail",
|
||||
"sha256": "b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546",
|
||||
"advertised_sha256": "b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546",
|
||||
"size_matches": true,
|
||||
"passed": true
|
||||
},
|
||||
{
|
||||
"name": "crop",
|
||||
"sha256": "fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f",
|
||||
"advertised_sha256": "fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f",
|
||||
"size_matches": true,
|
||||
"passed": true
|
||||
},
|
||||
{
|
||||
"name": "optimized",
|
||||
"sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"advertised_sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"size_matches": true,
|
||||
"passed": true
|
||||
}
|
||||
],
|
||||
"accepted_original_sha_matches": true
|
||||
}
|
||||
],
|
||||
"passed": true
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
@@ -0,0 +1,9 @@
|
||||
WARN Fixing invalid version specifier by removing star after comparison operator other than equal and not equal (before: `>=3.6.*`; after: `>=3.6`)
|
||||
WARN Fixing invalid version specifier by removing star after comparison operator other than equal and not equal (before: `>=3.6.*`; after: `>=3.6`)
|
||||
WARN Fixing invalid version specifier by removing star after comparison operator other than equal and not equal (before: `>=3.6.*`; after: `>=3.6`)
|
||||
Downloading pip (1.9MiB)
|
||||
Downloaded pip
|
||||
Installed 29 packages in 45ms
|
||||
WARNING:pip_audit._cli:--no-deps is supported, but users are encouraged to fully hash their pinned dependencies
|
||||
WARNING:pip_audit._cli:Consider using a tool like `pip-compile`: https://pip-tools.readthedocs.io/en/latest/#using-hashes
|
||||
Found 44 known vulnerabilities in 2 packages
|
||||
@@ -0,0 +1 @@
|
||||
{"dependencies": [{"name": "annotated-doc", "version": "0.0.5", "vulns": []}, {"name": "annotated-types", "version": "0.8.0", "vulns": []}, {"name": "anyio", "version": "4.15.1", "vulns": []}, {"name": "argon2-cffi", "version": "25.1.0", "vulns": []}, {"name": "argon2-cffi-bindings", "version": "26.1.0", "vulns": []}, {"name": "boto3", "version": "1.43.125", "vulns": []}, {"name": "botocore", "version": "1.43.125", "vulns": []}, {"name": "certifi", "version": "2026.10.23", "vulns": []}, {"name": "cffi", "version": "2.1.1", "vulns": []}, {"name": "charset-normalizer", "version": "3.5.2", "vulns": []}, {"name": "click", "version": "8.5.0", "vulns": []}, {"name": "fastapi", "version": "0.141.1", "vulns": []}, {"name": "googleapis-common-protos", "version": "1.76.0", "vulns": []}, {"name": "h11", "version": "0.16.0", "vulns": []}, {"name": "idna", "version": "3.20", "vulns": []}, {"name": "jmespath", "version": "1.1.0", "vulns": []}, {"name": "opentelemetry-api", "version": "1.45.2", "vulns": []}, {"name": "opentelemetry-exporter-http-transport", "version": "0.66b2", "vulns": []}, {"name": "opentelemetry-exporter-otlp-common", "version": "0.66b2", "vulns": []}, {"name": "opentelemetry-exporter-otlp-proto-common", "version": "1.45.2", "vulns": []}, {"name": "opentelemetry-exporter-otlp-proto-http", "version": "1.45.2", "vulns": []}, {"name": "opentelemetry-proto", "version": "1.45.2", "vulns": []}, {"name": "opentelemetry-sdk", "version": "1.45.2", "vulns": []}, {"name": "opentelemetry-semantic-conventions", "version": "0.66b2", "vulns": []}, {"name": "pillow", "version": "13.0.0", "vulns": []}, {"name": "protobuf", "version": "6.33.6", "vulns": []}, {"name": "psutil", "version": "7.2.2", "vulns": []}, {"name": "psycopg", "version": "3.3.6", "vulns": []}, {"name": "psycopg-binary", "version": "3.3.6", "vulns": []}, {"name": "psycopg-pool", "version": "3.3.3", "vulns": []}, {"name": "pycparser", "version": "3.12", "vulns": []}, {"name": "pydantic", "version": "2.14.2", "vulns": []}, {"name": "pydantic-core", "version": "2.50.2", "vulns": []}, {"name": "python-dateutil", "version": "2.9.0.post0", "vulns": []}, {"name": "redis", "version": "8.1.0", "vulns": []}, {"name": "requests", "version": "2.34.2", "vulns": []}, {"name": "s3transfer", "version": "0.19.3", "vulns": []}, {"name": "six", "version": "1.17.0", "vulns": []}, {"name": "starlette", "version": "1.10.0", "vulns": []}, {"name": "typing-extensions", "version": "4.16.0", "vulns": []}, {"name": "typing-inspection", "version": "0.4.4", "vulns": []}, {"name": "urllib3", "version": "2.8.0", "vulns": []}, {"name": "uvicorn", "version": "0.54.0", "vulns": []}], "fixes": []}
|
||||
@@ -0,0 +1,3 @@
|
||||
WARNING:pip_audit._cli:--no-deps is supported, but users are encouraged to fully hash their pinned dependencies
|
||||
WARNING:pip_audit._cli:Consider using a tool like `pip-compile`: https://pip-tools.readthedocs.io/en/latest/#using-hashes
|
||||
No known vulnerabilities found
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,12 @@
|
||||
Resolved 68 packages in 537ms
|
||||
Removed importlib-metadata v8.7.1
|
||||
Updated opentelemetry-api v1.39.0 -> v1.45.2
|
||||
Added opentelemetry-exporter-http-transport v0.66b2
|
||||
Added opentelemetry-exporter-otlp-common v0.66b2
|
||||
Updated opentelemetry-exporter-otlp-proto-common v1.39.0 -> v1.45.2
|
||||
Updated opentelemetry-exporter-otlp-proto-http v1.39.0 -> v1.45.2
|
||||
Updated opentelemetry-proto v1.39.0 -> v1.45.2
|
||||
Updated opentelemetry-sdk v1.39.0 -> v1.45.2
|
||||
Updated opentelemetry-semantic-conventions v0.60b0 -> v0.66b2
|
||||
Updated pillow v12.3.0 -> v13.0.0
|
||||
Removed zipp v4.1.2
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 tests/security.py --base-url "https://localhost:8447" --ca-file "/Users/nikitavasilev/Documents/Codex/2026-10-30/new-chat/outputs/lab7/secrets/ca.pem"
|
||||
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 tests/security.py --base-url "https://localhost:8447" --ca-file "/Users/nikitavasilev/Documents/Codex/2026-10-30/new-chat/outputs/lab7/secrets/ca.pem"
|
||||
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
|
||||
@@ -0,0 +1 @@
|
||||
{"status": 200, "body": {"details": {"application": "Prometheus", "features": {"rulerApiEnabled": false}}, "message": "Successfully queried the Prometheus API.", "status": "OK"}}
|
||||
@@ -0,0 +1 @@
|
||||
sha256:ce0212b316d05ddaade5864194fd158d2849a6368b1fc316b23017d20093b82d
|
||||
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 it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
2026-11-16T13:15:14+03:00 INFO [vuln] Vulnerability scanning is enabled
|
||||
2026-11-16T13:15:15+03:00 INFO Detected OS family="debian" version="13.7"
|
||||
2026-11-16T13:15:15+03:00 INFO [debian] Detecting vulnerabilities... os_version="13" pkg_num=90
|
||||
2026-11-16T13:15:15+03:00 INFO Number of language-specific files num=1
|
||||
2026-11-16T13:15:15+03:00 INFO [python-pkg] Detecting vulnerabilities...
|
||||
2026-11-16T13:15:15+03:00 WARN Using severities from other vendors for some vulnerabilities. Read https://trivy.dev/docs/v0.76/guide/scanner/vulnerability#severity-selection for details.
|
||||
@@ -0,0 +1,523 @@
|
||||
{
|
||||
"lab": 7,
|
||||
"base_url": "https://localhost:8447",
|
||||
"tests": [
|
||||
{
|
||||
"case": "message rejects wrong types/extra {'text': None}",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.1111
|
||||
},
|
||||
{
|
||||
"case": "message rejects wrong types/extra {'text': 123}",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0479
|
||||
},
|
||||
{
|
||||
"case": "message rejects wrong types/extra {'text': True}",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0943
|
||||
},
|
||||
{
|
||||
"case": "message rejects wrong types/extra {'text': []}",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0492
|
||||
},
|
||||
{
|
||||
"case": "message rejects wrong types/extra {'text': 'x', 'TEXT': 'y'}",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0478
|
||||
},
|
||||
{
|
||||
"case": "message rejects wrong types/extra {'Text': 'x'}",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0477
|
||||
},
|
||||
{
|
||||
"case": "message rejects wrong types/extra {'text': 'x', 'attachment_ids': None}",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0465
|
||||
},
|
||||
{
|
||||
"case": "message rejects wrong types/extra {'text': 'x', 'attachment_ids': {}}",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.048
|
||||
},
|
||||
{
|
||||
"case": "message rejects wrong types/extra {}",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0541
|
||||
},
|
||||
{
|
||||
"case": "invalid idempotency key ''",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0481
|
||||
},
|
||||
{
|
||||
"case": "invalid idempotency key 'contains space'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0484
|
||||
},
|
||||
{
|
||||
"case": "invalid idempotency key 'xxxxxxxxxxxxxxxxxxxx'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0472
|
||||
},
|
||||
{
|
||||
"case": "invalid idempotency key 'bad/key'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0468
|
||||
},
|
||||
{
|
||||
"case": "missing idempotency key",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.047
|
||||
},
|
||||
{
|
||||
"case": "malformed UTF8/JSON b'{bad'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0478
|
||||
},
|
||||
{
|
||||
"case": "malformed UTF8/JSON b'\\xff'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0465
|
||||
},
|
||||
{
|
||||
"case": "malformed UTF8/JSON b'{\"text\":\"x\"}{}'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0469
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats?limit=",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0471
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats?limit=0",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0494
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats?limit=101",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0471
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats?limit=abc",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0487
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats?limit=1&limit=2",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0493
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats?cursor=",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0479
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats?cursor=W10",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0491
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats?cursor=bnVsbA",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0494
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats/0ee44f9c-9387-44b0-a036-84dfe10cc824/messages?limit=",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0494
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats/0ee44f9c-9387-44b0-a036-84dfe10cc824/messages?limit=0",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0483
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats/0ee44f9c-9387-44b0-a036-84dfe10cc824/messages?limit=101",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0475
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats/0ee44f9c-9387-44b0-a036-84dfe10cc824/messages?limit=abc",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0488
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats/0ee44f9c-9387-44b0-a036-84dfe10cc824/messages?limit=1&limit=2",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0489
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats/0ee44f9c-9387-44b0-a036-84dfe10cc824/messages?cursor=",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0473
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats/0ee44f9c-9387-44b0-a036-84dfe10cc824/messages?cursor=W10",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0478
|
||||
},
|
||||
{
|
||||
"case": "pagination /api/v1/chats/0ee44f9c-9387-44b0-a036-84dfe10cc824/messages?cursor=bnVsbA",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0473
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (0, True)",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0488
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (0, 1.0)",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0477
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (2, None)",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0469
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (2, 1)",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0491
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (2, '2026-13-01T00:00:00Z')",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0501
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (2, '2026-W01-1T00:00:00Z')",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0554
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (2, '20260101T000000Z')",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.056
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (2, '2026-01-01X00:00:00Z')",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0482
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (2, '2026-01-01Z')",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0483
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (3, False)",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0486
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (3, [])",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.048
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (3, {})",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0477
|
||||
},
|
||||
{
|
||||
"case": "typed cursor (3, 'not-a-uuid')",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.048
|
||||
},
|
||||
{
|
||||
"case": "invalid UUID path",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.048
|
||||
},
|
||||
{
|
||||
"case": "member UUID []",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0466
|
||||
},
|
||||
{
|
||||
"case": "member UUID {}",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0469
|
||||
},
|
||||
{
|
||||
"case": "member UUID 123",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.046
|
||||
},
|
||||
{
|
||||
"case": "member UUID False",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0483
|
||||
},
|
||||
{
|
||||
"case": "unknown member400",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0457
|
||||
},
|
||||
{
|
||||
"case": "login rejects body b'{bad'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0459
|
||||
},
|
||||
{
|
||||
"case": "login rejects body b'{}'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0465
|
||||
},
|
||||
{
|
||||
"case": "login rejects body b'null'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0484
|
||||
},
|
||||
{
|
||||
"case": "login rejects body b' '",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0519
|
||||
},
|
||||
{
|
||||
"case": "surrogate rejected in user display_name \\ud800",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0505
|
||||
},
|
||||
{
|
||||
"case": "surrogate rejected in user password \\ud800",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0496
|
||||
},
|
||||
{
|
||||
"case": "surrogate rejected in chat \\ud800",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0574
|
||||
},
|
||||
{
|
||||
"case": "surrogate rejected in message \\ud800",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0525
|
||||
},
|
||||
{
|
||||
"case": "surrogate rejected in user display_name \\udfff",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0513
|
||||
},
|
||||
{
|
||||
"case": "surrogate rejected in user password \\udfff",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0507
|
||||
},
|
||||
{
|
||||
"case": "surrogate rejected in chat \\udfff",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0595
|
||||
},
|
||||
{
|
||||
"case": "surrogate rejected in message \\udfff",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0517
|
||||
},
|
||||
{
|
||||
"case": "valid surrogate pair accepted as emoji",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0564
|
||||
},
|
||||
{
|
||||
"case": "nonUTF8 JSON rejected utf-16",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0522
|
||||
},
|
||||
{
|
||||
"case": "nonUTF8 JSON rejected utf-16-le",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.059
|
||||
},
|
||||
{
|
||||
"case": "nonUTF8 JSON rejected utf-16-be",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0535
|
||||
},
|
||||
{
|
||||
"case": "nonUTF8 JSON rejected utf-32",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0497
|
||||
},
|
||||
{
|
||||
"case": "nonUTF8 JSON rejected utf-32-le",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0484
|
||||
},
|
||||
{
|
||||
"case": "nonUTF8 JSON rejected utf-32-be",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0476
|
||||
},
|
||||
{
|
||||
"case": "nonASCII Bearer401",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0499
|
||||
},
|
||||
{
|
||||
"case": "username trailing whitespace",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0513
|
||||
},
|
||||
{
|
||||
"case": "username trailing whitespace",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0478
|
||||
},
|
||||
{
|
||||
"case": "blank password400",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0494
|
||||
},
|
||||
{
|
||||
"case": "UTF8 colon128 password and NUL display name",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.2576
|
||||
},
|
||||
{
|
||||
"case": "omitted attachment_ids equals [] and conflict",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.1413
|
||||
},
|
||||
{
|
||||
"case": "32 concurrent same key all201 same message",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.1904
|
||||
},
|
||||
{
|
||||
"case": "key scope user and chat",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.189
|
||||
},
|
||||
{
|
||||
"case": "outsider cannot send",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0472
|
||||
},
|
||||
{
|
||||
"case": "NUL message exact post replay history",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.1141
|
||||
},
|
||||
{
|
||||
"case": "logout visible through all replicas",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.5028
|
||||
},
|
||||
{
|
||||
"case": "image rejects header only",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.3032
|
||||
},
|
||||
{
|
||||
"case": "image rejects bad IDAT",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.1219
|
||||
},
|
||||
{
|
||||
"case": "image rejects invalid filter",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0864
|
||||
},
|
||||
{
|
||||
"case": "image rejects empty JPEG scan",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.1055
|
||||
},
|
||||
{
|
||||
"case": "image rejects MIME mismatch",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0995
|
||||
},
|
||||
{
|
||||
"case": "valid real JPEG accepted",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.1733
|
||||
},
|
||||
{
|
||||
"case": "half JPEG entropy with EOI rejected",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.1279
|
||||
},
|
||||
{
|
||||
"case": "JPEG SOS unknown component rejected",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.1102
|
||||
},
|
||||
{
|
||||
"case": "PNG invalid palette257 rejected",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0862
|
||||
},
|
||||
{
|
||||
"case": "filename '../x.png'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0483
|
||||
},
|
||||
{
|
||||
"case": "filename 'a\\\\b.png'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0491
|
||||
},
|
||||
{
|
||||
"case": "filename 'a\\x00b.png'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.048
|
||||
},
|
||||
{
|
||||
"case": "filename 'a\\x7fb.png'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.048
|
||||
},
|
||||
{
|
||||
"case": "filename 'a\\x85b.png'",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0492
|
||||
},
|
||||
{
|
||||
"case": "filename ' '",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0476
|
||||
},
|
||||
{
|
||||
"case": "filename missing",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0469
|
||||
},
|
||||
{
|
||||
"case": "pixel bomb413",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.0763
|
||||
},
|
||||
{
|
||||
"case": "too many bytes413",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.484
|
||||
},
|
||||
{
|
||||
"case": "attachment order ACL original checksum",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.4476
|
||||
},
|
||||
{
|
||||
"case": "exact10MiB allowed through LB",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 1.2843
|
||||
},
|
||||
{
|
||||
"case": "64 readiness requests from 8 concurrent clients remain healthy",
|
||||
"status": "PASS",
|
||||
"elapsed_s": 0.4126
|
||||
}
|
||||
],
|
||||
"passed": 103,
|
||||
"failed": 0
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
{
|
||||
"checks": [
|
||||
{
|
||||
"case": "incoming context continues through producer consumer and dependencies",
|
||||
"passed": true,
|
||||
"detail": {
|
||||
"trace_id": "01995f39fa5640cca702e8dd0deccbbd",
|
||||
"span_count": 17,
|
||||
"kinds": [
|
||||
"SPAN_KIND_CLIENT",
|
||||
"SPAN_KIND_CONSUMER",
|
||||
"SPAN_KIND_PRODUCER",
|
||||
"SPAN_KIND_SERVER"
|
||||
],
|
||||
"names": [
|
||||
"POST /api/v1/chats/{chat_id}/attachments",
|
||||
"attachments consume",
|
||||
"attachments publish",
|
||||
"postgres.transaction",
|
||||
"s3.get",
|
||||
"s3.request"
|
||||
]
|
||||
},
|
||||
"elapsed_s": 1.111
|
||||
},
|
||||
{
|
||||
"case": "real metric families and bounded labels with fine histogram buckets",
|
||||
"passed": true,
|
||||
"detail": {
|
||||
"series": 1051,
|
||||
"metric_names": [
|
||||
"messenger_attachment_ready_duration_seconds_bucket",
|
||||
"messenger_attachment_ready_duration_seconds_count",
|
||||
"messenger_attachment_ready_duration_seconds_sum",
|
||||
"messenger_db_pool_used",
|
||||
"messenger_db_pool_waiting",
|
||||
"messenger_http_duration_seconds_bucket",
|
||||
"messenger_http_duration_seconds_count",
|
||||
"messenger_http_duration_seconds_sum",
|
||||
"messenger_http_requests_total",
|
||||
"messenger_http_trace_decisions_total",
|
||||
"messenger_job_duration_seconds_bucket",
|
||||
"messenger_job_duration_seconds_count",
|
||||
"messenger_job_duration_seconds_sum",
|
||||
"messenger_jobs_total",
|
||||
"messenger_process_cpu_percent",
|
||||
"messenger_process_memory_bytes",
|
||||
"messenger_queue_depth",
|
||||
"messenger_queue_oldest_age_seconds",
|
||||
"messenger_telemetry_export",
|
||||
"messenger_worker_busy",
|
||||
"messenger_worker_capacity"
|
||||
],
|
||||
"sub100ms_boundaries": [
|
||||
0.001,
|
||||
0.0025,
|
||||
0.005,
|
||||
0.01,
|
||||
0.025,
|
||||
0.05
|
||||
]
|
||||
},
|
||||
"elapsed_s": 0.017
|
||||
},
|
||||
{
|
||||
"case": "stored API and worker logs correlate to actual upload trace",
|
||||
"passed": true,
|
||||
"detail": {
|
||||
"services": [
|
||||
"messenger-api",
|
||||
"messenger-worker"
|
||||
],
|
||||
"streams": 2,
|
||||
"correlated_trace_id": "01995f39fa5640cca702e8dd0deccbbd"
|
||||
},
|
||||
"elapsed_s": 0.009
|
||||
},
|
||||
{
|
||||
"case": "provisioned dashboard datasources and healthy evaluated alerts",
|
||||
"passed": true,
|
||||
"detail": {
|
||||
"datasource_uids": [
|
||||
"loki",
|
||||
"prometheus",
|
||||
"tempo"
|
||||
],
|
||||
"datasource_health": {
|
||||
"prometheus": "OK",
|
||||
"loki": "OK",
|
||||
"tempo": "OK"
|
||||
},
|
||||
"grafana_proxy_metrics": true,
|
||||
"grafana_panel_query": true,
|
||||
"dashboards": 1,
|
||||
"panels": 16,
|
||||
"alerts": [
|
||||
{
|
||||
"name": "MessengerHighErrorRate",
|
||||
"health": "ok",
|
||||
"state": "inactive"
|
||||
},
|
||||
{
|
||||
"name": "MessengerQueueLag",
|
||||
"health": "ok",
|
||||
"state": "inactive"
|
||||
},
|
||||
{
|
||||
"name": "MessengerTelemetryUnavailable",
|
||||
"health": "ok",
|
||||
"state": "inactive"
|
||||
}
|
||||
]
|
||||
},
|
||||
"elapsed_s": 0.128
|
||||
}
|
||||
],
|
||||
"passed": true
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"checks": [
|
||||
{
|
||||
"case": "allowed LB identity reaches API",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "http",
|
||||
"status_line": "HTTP/1.1 200 OK"
|
||||
},
|
||||
"elapsed_s": 0.249
|
||||
},
|
||||
{
|
||||
"case": "no client certificate rejected",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "tls_rejected"
|
||||
},
|
||||
"elapsed_s": 0.188
|
||||
},
|
||||
{
|
||||
"case": "trusted CA but worker identity rejected",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "closed"
|
||||
},
|
||||
"elapsed_s": 0.196
|
||||
},
|
||||
{
|
||||
"case": "trusted CA but API identity rejected",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "closed"
|
||||
},
|
||||
"elapsed_s": 0.198
|
||||
},
|
||||
{
|
||||
"case": "foreign CA client certificate rejected",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "tls_rejected"
|
||||
},
|
||||
"elapsed_s": 0.192
|
||||
},
|
||||
{
|
||||
"case": "empty server trust store rejected",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "certificate_verification_failed"
|
||||
},
|
||||
"elapsed_s": 0.211
|
||||
},
|
||||
{
|
||||
"case": "wrong server hostname rejected",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "certificate_verification_failed"
|
||||
},
|
||||
"elapsed_s": 0.206
|
||||
},
|
||||
{
|
||||
"case": "no remote plaintext bypass api:8080",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "connection_refused"
|
||||
},
|
||||
"elapsed_s": 0.189
|
||||
},
|
||||
{
|
||||
"case": "no remote plaintext bypass storage:8333",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "connection_refused"
|
||||
},
|
||||
"elapsed_s": 0.19
|
||||
},
|
||||
{
|
||||
"case": "no remote plaintext bypass storage:8888",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "connection_refused"
|
||||
},
|
||||
"elapsed_s": 0.197
|
||||
},
|
||||
{
|
||||
"case": "no remote plaintext bypass storage:9333",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "connection_refused"
|
||||
},
|
||||
"elapsed_s": 0.206
|
||||
},
|
||||
{
|
||||
"case": "no remote plaintext bypass broker:6379",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "connection_refused"
|
||||
},
|
||||
"elapsed_s": 0.179
|
||||
},
|
||||
{
|
||||
"case": "no remote plaintext bypass cache:6379",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "connection_refused"
|
||||
},
|
||||
"elapsed_s": 0.198
|
||||
},
|
||||
{
|
||||
"case": "API remains healthy after negative probes",
|
||||
"passed": true,
|
||||
"result": {
|
||||
"result": "http",
|
||||
"status_line": "HTTP/1.1 200 OK"
|
||||
},
|
||||
"elapsed_s": 0.198
|
||||
}
|
||||
],
|
||||
"passed": true,
|
||||
"client_network": "mtusi-vasilev-lab7_default",
|
||||
"api_image": "mtusi-vasilev:lab7"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"probe": "kdf", "passed": true}
|
||||
@@ -0,0 +1 @@
|
||||
All checks passed!
|
||||
@@ -0,0 +1 @@
|
||||
{"probe": "policies", "passed": true}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"concurrency": 8,
|
||||
"requests": 64,
|
||||
"status_counts": {
|
||||
"200": 64
|
||||
},
|
||||
"passed": true
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
mtusi-vasilev-lab7-api-2 114.8MiB / 512MiB 25.29%
|
||||
mtusi-vasilev-lab7-api-1 107.8MiB / 512MiB 35.14%
|
||||
mtusi-vasilev-lab7-worker-1 68.66MiB / 896MiB 0.10%
|
||||
mtusi-vasilev-lab7-dispatcher-1 56.04MiB / 192MiB 0.35%
|
||||
mtusi-vasilev-lab7-loki-tls-1 12.98MiB / 64MiB 0.18%
|
||||
mtusi-vasilev-lab7-prometheus-tls-1 12.95MiB / 64MiB 0.02%
|
||||
mtusi-vasilev-lab7-tempo-tls-1 13.04MiB / 64MiB 0.03%
|
||||
mtusi-vasilev-lab7-collector-tls-1 15.74MiB / 64MiB 1.22%
|
||||
mtusi-vasilev-lab7-loki-1 35.47MiB / 384MiB 0.33%
|
||||
mtusi-vasilev-lab7-prometheus-1 19.04MiB / 256MiB 0.34%
|
||||
mtusi-vasilev-lab7-grafana-1 79.84MiB / 256MiB 0.09%
|
||||
mtusi-vasilev-lab7-collector-1 34.95MiB / 256MiB 0.42%
|
||||
mtusi-vasilev-lab7-tempo-1 18.37MiB / 768MiB 0.02%
|
||||
mtusi-vasilev-lab7-broker-tls-1 13.33MiB / 64MiB 0.20%
|
||||
mtusi-vasilev-lab7-cache-tls-1 13.32MiB / 64MiB 0.22%
|
||||
mtusi-vasilev-lab7-storage-tls-1 13.31MiB / 96MiB 0.75%
|
||||
mtusi-vasilev-lab7-lb-1 16.95MiB / 128MiB 3.07%
|
||||
mtusi-vasilev-lab7-s3-1 34.11MiB / 256MiB 0.22%
|
||||
mtusi-vasilev-lab7-openbao-1 22.01MiB / 192MiB 0.36%
|
||||
mtusi-vasilev-lab7-storage-1 113.8MiB / 512MiB 0.17%
|
||||
mtusi-vasilev-lab7-broker-1 3.293MiB / 192MiB 0.08%
|
||||
mtusi-vasilev-lab7-cache-1 3.141MiB / 128MiB 0.09%
|
||||
mtusi-vasilev-lab7-postgres-1 31.89MiB / 768MiB 0.83%
|
||||
@@ -0,0 +1 @@
|
||||
{"probe": "revoked", "passed": true}
|
||||
@@ -0,0 +1 @@
|
||||
{"checks": {"old_database_password_denied": true, "old_broker_client_certificate_denied": true, "old_s3_certificate_denied": true, "old_bao_certificate_auth_denied": true, "previously_issued_bao_token_denied": true, "old_bao_token_rejected_before_original_lease_expiry": true}, "passed": true}
|
||||
@@ -0,0 +1,118 @@
|
||||
{
|
||||
"source_commit": "5aad71bdf9e9d4b9b75f39414bc3b4bd3aad8a73",
|
||||
"runtime_payload_hashes": {
|
||||
"src/messenger/worker.py": "778a0f82e72c067b5bcbfe4e6fd03938fc9f24709e055f769f76cc8d70114da6",
|
||||
"src/messenger/config.py": "fcebd1610a9bb02cf9af6d47cf6bf5417ad0d796de7d3e25e5f96f078f7e431a",
|
||||
"src/messenger/baseline_queue_probe.py": "b3b591f932570851d3b28610d95d83e9e5308e1ca200f932c5b072de39b914f8",
|
||||
"src/messenger/models.py": "dd2c5360e4ed1908fc91e57bbee106dbc5ab5c50a003e6ba0087ed254550452d",
|
||||
"src/messenger/kdf_probe.py": "be942445552c3cf6d8e6fa6b77bd3427a592942bc567089c1d0cb66520099c24",
|
||||
"src/messenger/transport_probe.py": "b676334622df122ac46b8b89daaaea50a5307bd5e62260b7f706fdd0ccf33ddd",
|
||||
"src/messenger/domain.py": "7bf6f177ab5bdeea09b303dc886160335d348f64f47912b9bba45355db378bef",
|
||||
"src/messenger/storage_bootstrap.py": "b29a2a1f8864ec3425a7499b1752688f69d8f402f3881957e790ed4522d35589",
|
||||
"src/messenger/__init__.py": "9a72a49106367ca514cc6147d0e727e62c4d33fefd61572d209a5c9494551a2c",
|
||||
"src/messenger/telemetry.py": "e12a7f077d7f4d5c906f41a03f8a3519aec91b868dde80db53663f69a94a07b5",
|
||||
"src/messenger/attachments.py": "a10f28f9ce7355975c2509e6a360d1086f39d601a563706ad3bcb231da82228e",
|
||||
"src/messenger/jobs.py": "38e79baffc1ad324ec2fff904b240425ea920e4ef5f4a92d861182e6cf8d13b3",
|
||||
"src/messenger/baseline_db_probe.py": "38e7f420591b4095cf8579c296ef0ede9044cb845229dac3cd84825ea7728bdd",
|
||||
"src/messenger/tls_gateway.py": "9d3c43b25f5bc7675944ca91e4d1a519045b88df719ac6b808412146ba52f64b",
|
||||
"src/messenger/storage.py": "762c620f4e58642b3efbcf768575046388eea96d2dd2c31f85fdf3e19fb8f8d7",
|
||||
"src/messenger/postgres.py": "2a1dd15161ffab5d7621154be1c83210387a4ac5e163ed4e5c3d77b898e29f0e",
|
||||
"src/messenger/app.py": "c92010e6297a48fd861bc62985a9bd090413edf8905b22eed5fdb2d1f21304b6",
|
||||
"src/messenger/secure_entry.py": "5fecb0f2a970cdf78895d65a9221b5822b9edcce451cf33aec7bd2df8059a69e",
|
||||
"src/messenger/jobctl.py": "41098fe1088960f6e62a3e3b6bd63e8b7f048b4561d82a994cf64574b939215d",
|
||||
"src/messenger/baseline_s3_probe.py": "28f1cc02e7db390c1f6881d346bdee2273ecb59b49f629647258da2c52e10ef9",
|
||||
"src/messenger/security_probe.py": "e63980dcd6641173865c42458f5e416c035805e39a4d5626b4a963347ca23b7c",
|
||||
"src/messenger/image_validation.py": "d9aa8db65edaab88c9a76cf2e5459ad3028ba808579311aeb0d8c4f01f875720",
|
||||
"src/messenger/migrate.py": "eb5cad7ac6abe38dd40b2db307d298b297abe9543b3928c36bab8ef06283664e",
|
||||
"src/messenger/__main__.py": "ba9a59ad44ee8884cd65cf88d5ea15cbd7051b10f7c729043ddd44ca2f34defe",
|
||||
"src/messenger/secrets_provider.py": "e1110494f26c06af6e19415027eec5523a7bb6f087390e1998b271075cb49b12",
|
||||
"src/messenger/image_pipeline.py": "3dcca5590704f1f9e8eca71dc28097930eac62701cf479aa8b7e3c71ca9b3551",
|
||||
"src/messenger/revoked_probe.py": "d8163c0e2d007c786efd8f2b1f05d23ab9384f8bffa78532847d6eebb9c22d4b",
|
||||
"migrations/004_attachments.sql": "ed6b89075160294a2ac0d55da3be65c41be06aaee1fa5ef22b387d3f83841a06",
|
||||
"migrations/010_login_window_cleanup.sql": "fe217a652bdbe0fe90fbc8f0db3fed45c12fcf4bba37b869fa036db1df63c8d6",
|
||||
"migrations/007_observability.sql": "70e690806a8f15b9d876c71a63a826c589bb6020d5b425b11c88fdfbf3985f64",
|
||||
"migrations/002_idempotency.sql": "82b41be828ad55ec5c1d991775528e7fe6766c362fa58a2c4f46690459b2c00d",
|
||||
"migrations/003_unicode_storage.sql": "7282a55da4aa081f7d3d99692e11eeb7a49feab9c9f829a09d3d72dc74009643",
|
||||
"migrations/009_telemetry_acceptance.sql": "b2504c5edae6171fe2e9888dbab4e24ae0a917412ba98fef7e8b89aa31960f59",
|
||||
"migrations/006_jobs.sql": "dee847c794f0bbbdcf544a69c257979da9f29a4ce11921d7dfcfe3fc71447750",
|
||||
"migrations/001_initial.sql": "5d88cd12ef9fda008832dc0b886fa0cf5d886738fe9b77180cdc65adac50dfd9",
|
||||
"migrations/005_attachment_only_message.sql": "9c53e55be4306a3d6b3f38ee4ee8013571cd03d1dc49958fdbd15859564db080",
|
||||
"migrations/008_security.sql": "55f747ae2a4fcaede0070fca074ef4329e0d12dfa34f9f7af160c37a768c001e"
|
||||
},
|
||||
"containers": [
|
||||
{
|
||||
"service": "api",
|
||||
"container": "085f56b219342d8ee4c1c1b06d694b5d18180f655170a33770a00f422198b0e8",
|
||||
"image": "sha256:ce0212b316d05ddaade5864194fd158d2849a6368b1fc316b23017d20093b82d",
|
||||
"source_hashes_match": true,
|
||||
"memory_peak_bytes": 452087808,
|
||||
"memory_limit_bytes": 536870912,
|
||||
"oom_killed": false,
|
||||
"user": "10001:10001",
|
||||
"read_only": true,
|
||||
"cap_drop": [
|
||||
"ALL"
|
||||
],
|
||||
"security_opt": [
|
||||
"no-new-privileges:true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"service": "api",
|
||||
"container": "6c39493e1c39a1b823954011a4e1fb56bd4c39d2b3c4894ed5edae21d9966220",
|
||||
"image": "sha256:ce0212b316d05ddaade5864194fd158d2849a6368b1fc316b23017d20093b82d",
|
||||
"source_hashes_match": true,
|
||||
"memory_peak_bytes": 449802240,
|
||||
"memory_limit_bytes": 536870912,
|
||||
"oom_killed": false,
|
||||
"user": "10001:10001",
|
||||
"read_only": true,
|
||||
"cap_drop": [
|
||||
"ALL"
|
||||
],
|
||||
"security_opt": [
|
||||
"no-new-privileges:true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"service": "worker",
|
||||
"container": "cffe2873b5b87e773182a420305de39c4b538024cb1a8a2931844fb0d89571ea",
|
||||
"image": "sha256:ce0212b316d05ddaade5864194fd158d2849a6368b1fc316b23017d20093b82d",
|
||||
"source_hashes_match": true,
|
||||
"memory_peak_bytes": 130383872,
|
||||
"memory_limit_bytes": 939524096,
|
||||
"oom_killed": false,
|
||||
"user": "10001:10001",
|
||||
"read_only": true,
|
||||
"cap_drop": [
|
||||
"ALL"
|
||||
],
|
||||
"security_opt": [
|
||||
"no-new-privileges:true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"service": "dispatcher",
|
||||
"container": "098c532031e246979975f1351503945d7945967f964dcdc45f69720ebdfc8a86",
|
||||
"image": "sha256:ce0212b316d05ddaade5864194fd158d2849a6368b1fc316b23017d20093b82d",
|
||||
"source_hashes_match": true,
|
||||
"memory_peak_bytes": 118222848,
|
||||
"memory_limit_bytes": 201326592,
|
||||
"oom_killed": false,
|
||||
"user": "10001:10001",
|
||||
"read_only": true,
|
||||
"cap_drop": [
|
||||
"ALL"
|
||||
],
|
||||
"security_opt": [
|
||||
"no-new-privileges:true"
|
||||
]
|
||||
}
|
||||
],
|
||||
"tempo": {
|
||||
"peak_bytes": 419790848,
|
||||
"memory_limit_bytes": 805306368,
|
||||
"oom_killed": false
|
||||
},
|
||||
"passed": true
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
.... [100%]
|
||||
Login pacing: 0 retries honoring runtime Retry-After; teacher client unchanged.
|
||||
4 passed in 7.24s
|
||||
@@ -0,0 +1 @@
|
||||
{"lease_seconds": 30, "local_cache_max_seconds": 29, "first_business_503_seconds": 28.634, "recovery_seconds": 1.037, "passed": true}
|
||||
@@ -0,0 +1,159 @@
|
||||
{
|
||||
"lease_seconds": 30,
|
||||
"local_cache_max_seconds": 29,
|
||||
"rows": [
|
||||
{
|
||||
"seconds": 0.665,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 1.775,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 2.877,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 3.98,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 5.111,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 6.233,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 7.357,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 8.48,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 9.598,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 10.709,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 11.836,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 12.959,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 14.081,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 15.186,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 16.293,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 17.42,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 18.541,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 19.663,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 20.8,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 21.916,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 23.047,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 24.167,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 25.29,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 26.401,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 27.519,
|
||||
"live": 200,
|
||||
"business": 200
|
||||
},
|
||||
{
|
||||
"seconds": 28.634,
|
||||
"live": 200,
|
||||
"business": 503
|
||||
},
|
||||
{
|
||||
"seconds": 29.709,
|
||||
"live": 200,
|
||||
"business": 503
|
||||
},
|
||||
{
|
||||
"seconds": 30.767,
|
||||
"live": 200,
|
||||
"business": 503
|
||||
},
|
||||
{
|
||||
"seconds": 31.839,
|
||||
"live": 200,
|
||||
"business": 503
|
||||
},
|
||||
{
|
||||
"seconds": 32.913,
|
||||
"live": 200,
|
||||
"business": 503
|
||||
}
|
||||
],
|
||||
"first_business_503_seconds": 28.634,
|
||||
"recovery_seconds": 1.037,
|
||||
"passed": true
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 tests/smoke.py --base-url "https://localhost:8447" --ca-file "/Users/nikitavasilev/Documents/Codex/2026-10-30/new-chat/outputs/lab7/secrets/ca.pem"
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 tests/smoke.py --base-url "https://localhost:8447" --ca-file "/Users/nikitavasilev/Documents/Codex/2026-10-30/new-chat/outputs/lab7/secrets/ca.pem"
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,433 @@
|
||||
python3 scripts/bootstrap.py
|
||||
Local PKI and scoped credential material ready; operator CA stays outside containers.
|
||||
VCS_REF=$(git rev-parse HEAD) docker compose build
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
#1 [internal] load local bake definitions
|
||||
#1 reading from stdin 8.08kB done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [tempo-tls internal] load build definition from Dockerfile
|
||||
#2 transferring dockerfile: 1.12kB done
|
||||
#2 DONE 0.0s
|
||||
|
||||
#3 [migrate internal] load metadata for ghcr.io/astral-sh/uv:0.11.7
|
||||
#3 DONE 0.0s
|
||||
|
||||
#4 [state-init internal] load metadata for docker.io/library/python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [prometheus-tls internal] load .dockerignore
|
||||
#5 transferring context: 140B done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [cache-tls internal] load build context
|
||||
#6 transferring context: 17.51kB done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [cache-tls] FROM ghcr.io/astral-sh/uv:0.11.7@sha256:240fb85ab0f263ef12f492d8476aa3a2e4e1e333f7d67fbdd923d00a506a516a
|
||||
#7 resolve ghcr.io/astral-sh/uv:0.11.7@sha256:240fb85ab0f263ef12f492d8476aa3a2e4e1e333f7d67fbdd923d00a506a516a 0.0s done
|
||||
#7 DONE 0.0s
|
||||
|
||||
#8 [migrate build 1/5] FROM docker.io/library/python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b
|
||||
#8 resolve docker.io/library/python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b 0.0s done
|
||||
#8 DONE 0.0s
|
||||
|
||||
#9 [broker-tls build 2/5] COPY --from=ghcr.io/astral-sh/uv:0.11.7 /uv /usr/local/bin/uv
|
||||
#9 CACHED
|
||||
|
||||
#10 [broker-tls build 3/5] WORKDIR /app
|
||||
#10 CACHED
|
||||
|
||||
#11 [broker-tls stage-1 2/7] RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends libjpeg-turbo-progs && rm -rf /var/lib/apt/lists/*
|
||||
#11 CACHED
|
||||
|
||||
#12 [broker-tls build 5/5] RUN uv sync --locked --no-dev --no-install-project --python /usr/local/bin/python
|
||||
#12 CACHED
|
||||
|
||||
#13 [broker-tls build 4/5] COPY pyproject.toml uv.lock ./
|
||||
#13 CACHED
|
||||
|
||||
#14 [broker-tls stage-1 3/7] RUN python -m pip uninstall --yes pip
|
||||
#14 CACHED
|
||||
|
||||
#15 [broker-tls stage-1 4/7] WORKDIR /app
|
||||
#15 CACHED
|
||||
|
||||
#16 [tempo-tls stage-1 5/7] COPY --from=build /app/.venv /app/.venv
|
||||
#16 CACHED
|
||||
|
||||
#17 [tempo-tls stage-1 6/7] COPY src ./src
|
||||
#17 DONE 0.0s
|
||||
|
||||
#18 [migrate stage-1 7/7] COPY migrations ./migrations
|
||||
#18 DONE 0.0s
|
||||
|
||||
#19 [dispatcher] exporting to image
|
||||
#19 exporting layers 0.0s done
|
||||
#19 exporting manifest sha256:aceb26d8b18d7e9c55a17cfd74bf72362c9c2faf88e0e6890c3d2072847c0dbb 0.0s done
|
||||
#19 exporting config sha256:de423fe09241206411c6b0d013a5cf7a206889924d295c8d62d4eaeeb58f26b6 0.0s done
|
||||
#19 exporting attestation manifest sha256:92d3a52e2a33f794e7c5139a77027277516fd5ca366c0c17142df59f4bd7a64d 0.1s done
|
||||
#19 exporting manifest list sha256:0d01a05e9e3d007f1c3d0dfdabba663995aea09e4d444410e73803f4c1fe5af8
|
||||
#19 exporting manifest list sha256:0d01a05e9e3d007f1c3d0dfdabba663995aea09e4d444410e73803f4c1fe5af8 0.0s done
|
||||
#19 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#19 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#19 DONE 0.3s
|
||||
|
||||
#20 [state-init] exporting to image
|
||||
#20 exporting layers 0.0s done
|
||||
#20 exporting manifest sha256:7b0b0306bfebb5c938626c374100b9a8b72dbd9e5a4c6773e894a02e0c70a883 0.0s done
|
||||
#20 exporting config sha256:24cad1ecec51967813a201f0ee5df26e0a44bc2eba73812b83678690cbf4b9b2 0.0s done
|
||||
#20 exporting attestation manifest sha256:c986e6f078c9b6bb136249c7e2ababd121ec289054953b5c38d59d8f271e33a1 0.1s done
|
||||
#20 exporting manifest list sha256:c763ab9ce695a74a26e1f932a906a12d2fa8d4fe816d2f4522c3bd403a739a5a 0.0s done
|
||||
#20 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#20 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#20 DONE 0.3s
|
||||
|
||||
#21 [cache-tls] exporting to image
|
||||
#21 exporting layers 0.0s done
|
||||
#21 exporting manifest sha256:3acf16c29455e3ed0c0e21edd01320924433e42b01c8fab56dd9a1eba5e401cb 0.0s done
|
||||
#21 exporting config sha256:345cc4da8414f08142963691b3207cf60bc5f0d9e84dd2cd75e1a03f62a4e2bd 0.0s done
|
||||
#21 exporting attestation manifest sha256:b3f73416172e9a7d642cf9c6e74e5de0db32ed367a55ef9dae0ce5302a527945 0.1s done
|
||||
#21 exporting manifest list sha256:fa19d0c743e64192e06a1f9030a693087896b9c089346a701d5e74db93066cce 0.0s done
|
||||
#21 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#21 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#21 DONE 0.3s
|
||||
|
||||
#22 [storage-tls] exporting to image
|
||||
#22 exporting layers 0.0s done
|
||||
#22 exporting manifest sha256:a73a9f57a9d4942d919b2fc3c03fd3265631f126c96dcc91aea434bffd01fe4d 0.0s done
|
||||
#22 exporting config sha256:66b8810b17e473b802601098b420efc0af2e4142f7d440ce9b713c705568d038 0.0s done
|
||||
#22 exporting attestation manifest sha256:78c462248b3759686d6cb392142d387f3779cdd383fd973f00c27a60847cb934 0.1s done
|
||||
#22 exporting manifest list sha256:4f0696f01c6f7dc834a36bb168978108803c1c21f848fd1512d751ef3873aece 0.0s done
|
||||
#22 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#22 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#22 DONE 0.3s
|
||||
|
||||
#23 [api] exporting to image
|
||||
#23 exporting layers 0.0s done
|
||||
#23 exporting manifest sha256:68d4e62e443dce4504b9f8fddce957df214df6cabe46bc3eba05e9da8da5b61e 0.0s done
|
||||
#23 exporting config sha256:c946b97f0665e02d5ab4fb10e368c1cbded2b4c7c72ceb6a57699a78569015ef 0.0s done
|
||||
#23 exporting attestation manifest sha256:7195b5d95e3cae89968ba1bff6cb81d5b4cd2c60d6706a659f14b615cef5c616 0.1s done
|
||||
#23 exporting manifest list sha256:6f123bcb73b4d4178824e7a17cd5e74c1bb6c59c853824cb10356b97ba63caf7 0.0s done
|
||||
#23 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#23 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#23 DONE 0.3s
|
||||
|
||||
#24 [s3-bootstrap] exporting to image
|
||||
#24 exporting layers 0.0s done
|
||||
#24 exporting manifest sha256:1a5d951917a48b960b184507af5737f3be2f26a08a349a9f48070e2fad278e31 0.0s done
|
||||
#24 exporting config sha256:cf0accad1824f31342eef21e7f3ea5dd0cbff72cccecac50c72dca753ed70ddd 0.0s done
|
||||
#24 exporting attestation manifest sha256:e882e55b8f0cc9e309d8e4536ea60058a7012ec442155025edd40b8ba8c4cf73 0.1s done
|
||||
#24 exporting manifest list sha256:1282cbed3b80c8a79f225f16a05b8a4b92415588f052137bd138735efc3c7af5 0.0s done
|
||||
#24 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#24 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#24 DONE 0.3s
|
||||
|
||||
#25 [collector-tls] exporting to image
|
||||
#25 exporting layers 0.0s done
|
||||
#25 exporting manifest sha256:77b6c007d314aabc8abda2b2082e19cfb3f529f183ab69d664a285bcd3dae59a 0.0s done
|
||||
#25 exporting config sha256:494233400988c0b05b4a6d54543ed64fd4008d2cda1d48f14a258096f1d0ddd2 0.0s done
|
||||
#25 exporting attestation manifest sha256:3a50741be0b2913818ab2a8a2f9ad773dcdc777c6193317419b7a9fef9f1b0b3 0.1s done
|
||||
#25 exporting manifest list sha256:414b7d76671a144206c7354666fa07343b0273532c842ca278edb41dc1db6e41 0.0s done
|
||||
#25 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#25 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#25 DONE 0.4s
|
||||
|
||||
#26 [loki-tls] exporting to image
|
||||
#26 exporting layers 0.0s done
|
||||
#26 exporting manifest sha256:41e1febfb0409ddf5a2e997730628a9334a15dc97206a8235f5c950190e64ed3 0.0s done
|
||||
#26 exporting config sha256:41042b25e2080d0b7f8cc8f9519df390214e701d86145043afc452511e828d67 0.0s done
|
||||
#26 exporting attestation manifest sha256:e3c66a30d150c6921950727190f97db43b6196e166ff4eff915f95aaf83eaef0 0.1s done
|
||||
#26 exporting manifest list sha256:f33a362180a3505c6fb165ce9f926342685aa42a097f2c0ed520e5510267a17b 0.0s done
|
||||
#26 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#26 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#26 DONE 0.4s
|
||||
|
||||
#27 [worker] exporting to image
|
||||
#27 exporting layers 0.0s done
|
||||
#27 exporting manifest sha256:420234a24de777fed8fb92598efb37b38745bf3655ed6af3f47f2875c63e6164 0.0s done
|
||||
#27 exporting config sha256:caa631026050bd6e78643d4dda7cce144279b83fdc59cfe984a08bb1058ee168 0.0s done
|
||||
#27 exporting attestation manifest sha256:ff7fb394743b71fe35d43d70ebdf5711e007b1bd246c9d59e39af0d1220f8619 0.1s done
|
||||
#27 exporting manifest list sha256:032a5299d7c1b6bf53355dac05b13784a8799d512a69176fd5632660ad733f20 0.0s done
|
||||
#27 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#27 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#27 DONE 0.4s
|
||||
|
||||
#28 [broker-tls] exporting to image
|
||||
#28 exporting layers 0.0s done
|
||||
#28 exporting manifest sha256:207e9bf476e10828cf4c1122bb1942ecd2acca8fcbe17a137aff7c9a2478a3be 0.0s done
|
||||
#28 exporting config sha256:ca92659d3ee48a4ad877132c056c97b1aaf6b7c4652030b8996df110764ad398 0.0s done
|
||||
#28 exporting attestation manifest sha256:db8fd934421ccdd42b88c65a01deb84cc429c191deba773b95136688bf3333bb 0.1s done
|
||||
#28 exporting manifest list sha256:19fb0ed3eea8c2337190988bd23503f0ca6b5bd9f97e8aeb2798dfd6ee025d62 0.0s done
|
||||
#28 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#28 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#28 DONE 0.4s
|
||||
|
||||
#29 [migrate] exporting to image
|
||||
#29 exporting layers 0.0s done
|
||||
#29 exporting manifest sha256:ccaf38670cb624477328e8c404f17961f05079bbd480763caecd2b84e5999581 0.0s done
|
||||
#29 exporting config sha256:e5dcb018837c41a1b56c9773cbbe424eca045aa0ab19a1fee6a4490c80e16532 0.0s done
|
||||
#29 exporting attestation manifest sha256:5b7b42555fd1ffbb2ce96460fde31334aa73b95aa4b157ba58f2f2469ce5c472 0.1s done
|
||||
#29 exporting manifest list sha256:f156b8967a83aa92c968dd531a2ff5093644cd070ffb8a97fb09d0b037ef7a3c 0.0s done
|
||||
#29 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#29 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#29 DONE 0.4s
|
||||
|
||||
#30 [tempo-tls] exporting to image
|
||||
#30 exporting layers 0.0s done
|
||||
#30 exporting manifest sha256:620eac8e57adf2e69f1bb58c835b5a148b3cbdcfb2464fe106a4087beaa054f4 0.0s done
|
||||
#30 exporting config sha256:a54d9343543cf965a6d1281070fa3aa755cc254c50d147bd999d1c49ce6391c3 0.0s done
|
||||
#30 exporting attestation manifest sha256:957ac1a158de6b8afe6e78b01de6a8f1e5ed60e75b52dc05d25df4ecf87c1d01 0.1s done
|
||||
#30 exporting manifest list sha256:9ba1f5bf6f9469cfdac4d92894e419d99b9eaee20f4d3692dbd977ea825ca162 0.0s done
|
||||
#30 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#30 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#30 DONE 0.4s
|
||||
|
||||
#31 [prometheus-tls] exporting to image
|
||||
#31 exporting layers 0.1s done
|
||||
#31 exporting manifest sha256:37ee19b4a302f7b38d3e8a61abb40abc1a1c7435ebc4dc3f6bce37a3743ea282 0.0s done
|
||||
#31 exporting config sha256:f954c11f9d38b7aee325330ef4c4b81491b2d089a31a5780d469815877ca0baf 0.0s done
|
||||
#31 exporting attestation manifest sha256:a74cf6769cb025ae5dd58fe4259fa19fbb76103df225977e2265d1d31c608777 0.1s done
|
||||
#31 exporting manifest list sha256:ce0212b316d05ddaade5864194fd158d2849a6368b1fc316b23017d20093b82d 0.0s done
|
||||
#31 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#31 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#31 DONE 0.4s
|
||||
|
||||
#32 [cache-tls] resolving provenance for metadata file
|
||||
#32 DONE 0.0s
|
||||
|
||||
#33 [dispatcher] resolving provenance for metadata file
|
||||
#33 DONE 0.0s
|
||||
|
||||
#34 [storage-tls] resolving provenance for metadata file
|
||||
#34 DONE 0.0s
|
||||
|
||||
#35 [collector-tls] resolving provenance for metadata file
|
||||
#35 DONE 0.0s
|
||||
|
||||
#36 [loki-tls] resolving provenance for metadata file
|
||||
#36 DONE 0.0s
|
||||
|
||||
#37 [worker] resolving provenance for metadata file
|
||||
#37 DONE 0.0s
|
||||
|
||||
#38 [state-init] resolving provenance for metadata file
|
||||
#38 DONE 0.0s
|
||||
|
||||
#39 [tempo-tls] resolving provenance for metadata file
|
||||
#39 DONE 0.0s
|
||||
|
||||
#40 [prometheus-tls] resolving provenance for metadata file
|
||||
#40 DONE 0.0s
|
||||
|
||||
#41 [s3-bootstrap] resolving provenance for metadata file
|
||||
#41 DONE 0.0s
|
||||
|
||||
#42 [migrate] resolving provenance for metadata file
|
||||
#42 DONE 0.0s
|
||||
|
||||
#43 [api] resolving provenance for metadata file
|
||||
#43 DONE 0.0s
|
||||
|
||||
#44 [broker-tls] resolving provenance for metadata file
|
||||
#44 DONE 0.0s
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
docker compose up -d postgres openbao cache cache-tls broker broker-tls storage s3 storage-tls
|
||||
Container mtusi-vasilev-lab7-postgres-1 Running
|
||||
Container mtusi-vasilev-lab7-openbao-1 Running
|
||||
Container mtusi-vasilev-lab7-s3-1 Running
|
||||
Container mtusi-vasilev-lab7-cache-1 Running
|
||||
Container mtusi-vasilev-lab7-storage-1 Running
|
||||
Container mtusi-vasilev-lab7-broker-1 Running
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Recreate
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Recreate
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Recreate
|
||||
Container mtusi-vasilev-lab7-state-init-1 Recreate
|
||||
Container mtusi-vasilev-lab7-state-init-1 Recreated
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Recreated
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Recreated
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Recreated
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Starting
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-state-init-1 Started
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-storage-1 Waiting
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-storage-1 Healthy
|
||||
python3 scripts/bao_operator.py init
|
||||
OpenBao operator action complete; credential values were not printed.
|
||||
VCS_REF=$(git rev-parse HEAD) docker compose up -d --wait
|
||||
Container mtusi-vasilev-lab7-prometheus-1 Running
|
||||
Container mtusi-vasilev-lab7-cache-1 Running
|
||||
Container mtusi-vasilev-lab7-postgres-1 Running
|
||||
Container mtusi-vasilev-lab7-tempo-1 Running
|
||||
Container mtusi-vasilev-lab7-lb-1 Running
|
||||
Container mtusi-vasilev-lab7-storage-1 Running
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Running
|
||||
Container mtusi-vasilev-lab7-s3-1 Running
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Running
|
||||
Container mtusi-vasilev-lab7-broker-1 Running
|
||||
Container mtusi-vasilev-lab7-grafana-1 Running
|
||||
Container mtusi-vasilev-lab7-loki-1 Running
|
||||
Container mtusi-vasilev-lab7-collector-1 Running
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Running
|
||||
Container mtusi-vasilev-lab7-openbao-1 Running
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Recreate
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Recreate
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Recreate
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Recreate
|
||||
Container mtusi-vasilev-lab7-migrate-1 Recreate
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Recreate
|
||||
Container mtusi-vasilev-lab7-migrate-1 Recreated
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Recreate
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Recreated
|
||||
Container mtusi-vasilev-lab7-api-2 Recreate
|
||||
Container mtusi-vasilev-lab7-worker-1 Recreate
|
||||
Container mtusi-vasilev-lab7-api-1 Recreate
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Recreated
|
||||
Container mtusi-vasilev-lab7-api-1 Recreated
|
||||
Container mtusi-vasilev-lab7-api-2 Recreated
|
||||
Container mtusi-vasilev-lab7-worker-1 Recreated
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Recreated
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Recreated
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Recreated
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Recreated
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Starting
|
||||
Container mtusi-vasilev-lab7-postgres-1 Waiting
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-state-init-1 Started
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-postgres-1 Healthy
|
||||
Container mtusi-vasilev-lab7-migrate-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-storage-1 Waiting
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-migrate-1 Started
|
||||
Container mtusi-vasilev-lab7-migrate-1 Waiting
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Started
|
||||
Container mtusi-vasilev-lab7-migrate-1 Waiting
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Waiting
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Waiting
|
||||
Container mtusi-vasilev-lab7-migrate-1 Waiting
|
||||
Container mtusi-vasilev-lab7-storage-1 Healthy
|
||||
Container mtusi-vasilev-lab7-migrate-1 Exited
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Starting
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Started
|
||||
Container mtusi-vasilev-lab7-migrate-1 Exited
|
||||
Container mtusi-vasilev-lab7-migrate-1 Exited
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Exited
|
||||
Container mtusi-vasilev-lab7-api-1 Starting
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Exited
|
||||
Container mtusi-vasilev-lab7-worker-1 Starting
|
||||
Container mtusi-vasilev-lab7-api-1 Started
|
||||
Container mtusi-vasilev-lab7-api-2 Starting
|
||||
Container mtusi-vasilev-lab7-worker-1 Started
|
||||
Container mtusi-vasilev-lab7-api-2 Started
|
||||
Container mtusi-vasilev-lab7-api-1 Waiting
|
||||
Container mtusi-vasilev-lab7-api-2 Waiting
|
||||
Container mtusi-vasilev-lab7-api-1 Healthy
|
||||
Container mtusi-vasilev-lab7-api-2 Healthy
|
||||
Container mtusi-vasilev-lab7-migrate-1 Waiting
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-grafana-1 Waiting
|
||||
Container mtusi-vasilev-lab7-loki-1 Waiting
|
||||
Container mtusi-vasilev-lab7-collector-1 Waiting
|
||||
Container mtusi-vasilev-lab7-openbao-1 Waiting
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-worker-1 Waiting
|
||||
Container mtusi-vasilev-lab7-storage-1 Waiting
|
||||
Container mtusi-vasilev-lab7-api-1 Waiting
|
||||
Container mtusi-vasilev-lab7-api-2 Waiting
|
||||
Container mtusi-vasilev-lab7-prometheus-1 Waiting
|
||||
Container mtusi-vasilev-lab7-tempo-1 Waiting
|
||||
Container mtusi-vasilev-lab7-lb-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-s3-1 Waiting
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Waiting
|
||||
Container mtusi-vasilev-lab7-cache-1 Waiting
|
||||
Container mtusi-vasilev-lab7-postgres-1 Waiting
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Waiting
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-broker-1 Waiting
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-broker-1 Healthy
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-migrate-1 Exited
|
||||
Container mtusi-vasilev-lab7-s3-1 Healthy
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-postgres-1 Healthy
|
||||
Container mtusi-vasilev-lab7-openbao-1 Healthy
|
||||
Container mtusi-vasilev-lab7-tempo-1 Healthy
|
||||
Container mtusi-vasilev-lab7-cache-1 Healthy
|
||||
Container mtusi-vasilev-lab7-prometheus-1 Healthy
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Exited
|
||||
Container mtusi-vasilev-lab7-worker-1 Healthy
|
||||
Container mtusi-vasilev-lab7-collector-1 Healthy
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Healthy
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-storage-1 Healthy
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-loki-1 Healthy
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-lb-1 Healthy
|
||||
Container mtusi-vasilev-lab7-grafana-1 Healthy
|
||||
Container mtusi-vasilev-lab7-api-1 Healthy
|
||||
Container mtusi-vasilev-lab7-api-2 Healthy
|
||||
@@ -0,0 +1,456 @@
|
||||
python3 scripts/bootstrap.py
|
||||
Local PKI and scoped credential material ready; operator CA stays outside containers.
|
||||
VCS_REF=$(git rev-parse HEAD) docker compose build
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
Image mtusi-vasilev:lab7 Building
|
||||
#1 [internal] load local bake definitions
|
||||
#1 reading from stdin 8.08kB done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [collector-tls internal] load build definition from Dockerfile
|
||||
#2 transferring dockerfile: 1.12kB done
|
||||
#2 DONE 0.0s
|
||||
|
||||
#3 [storage-tls internal] load metadata for ghcr.io/astral-sh/uv:0.11.7
|
||||
#3 DONE 0.0s
|
||||
|
||||
#4 [state-init internal] load metadata for docker.io/library/python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [s3-bootstrap internal] load .dockerignore
|
||||
#5 transferring context: 140B done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [dispatcher internal] load build context
|
||||
#6 transferring context: 76.75kB 0.0s done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [migrate] FROM ghcr.io/astral-sh/uv:0.11.7@sha256:240fb85ab0f263ef12f492d8476aa3a2e4e1e333f7d67fbdd923d00a506a516a
|
||||
#7 resolve ghcr.io/astral-sh/uv:0.11.7@sha256:240fb85ab0f263ef12f492d8476aa3a2e4e1e333f7d67fbdd923d00a506a516a 0.0s done
|
||||
#7 DONE 0.0s
|
||||
|
||||
#8 [migrate build 1/5] FROM docker.io/library/python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b
|
||||
#8 resolve docker.io/library/python:3.12-slim@sha256:646fb0bca3dd3ea1bcc6feb72c17ed16eed6e10cffc732fcc1478bd3e7f02d7b 0.0s done
|
||||
#8 DONE 0.0s
|
||||
|
||||
#9 [prometheus-tls build 3/5] WORKDIR /app
|
||||
#9 CACHED
|
||||
|
||||
#10 [prometheus-tls build 5/5] RUN uv sync --locked --no-dev --no-install-project --python /usr/local/bin/python
|
||||
#10 CACHED
|
||||
|
||||
#11 [prometheus-tls build 4/5] COPY pyproject.toml uv.lock ./
|
||||
#11 CACHED
|
||||
|
||||
#12 [prometheus-tls stage-1 3/7] RUN python -m pip uninstall --yes pip
|
||||
#12 CACHED
|
||||
|
||||
#13 [prometheus-tls build 2/5] COPY --from=ghcr.io/astral-sh/uv:0.11.7 /uv /usr/local/bin/uv
|
||||
#13 CACHED
|
||||
|
||||
#14 [prometheus-tls stage-1 2/7] RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends libjpeg-turbo-progs && rm -rf /var/lib/apt/lists/*
|
||||
#14 CACHED
|
||||
|
||||
#15 [prometheus-tls stage-1 4/7] WORKDIR /app
|
||||
#15 CACHED
|
||||
|
||||
#16 [tempo-tls stage-1 5/7] COPY --from=build /app/.venv /app/.venv
|
||||
#16 CACHED
|
||||
|
||||
#17 [storage-tls stage-1 6/7] COPY src ./src
|
||||
#17 DONE 0.0s
|
||||
|
||||
#18 [tempo-tls stage-1 7/7] COPY migrations ./migrations
|
||||
#18 DONE 0.0s
|
||||
|
||||
#19 [broker-tls] exporting to image
|
||||
#19 exporting layers 0.0s done
|
||||
#19 exporting manifest sha256:2460b894373ef5062e1b57f2a627d44b556fdd96cafbcc1a1986e721fbeced0a 0.0s done
|
||||
#19 exporting config sha256:b0960f5b9e7d3d18560f04833280e85db25b5e22aeed5459a0d56f4fd3a7daa7
|
||||
#19 exporting config sha256:b0960f5b9e7d3d18560f04833280e85db25b5e22aeed5459a0d56f4fd3a7daa7 0.0s done
|
||||
#19 exporting attestation manifest sha256:af1850696e9fe2c9e94eede8013cfbf7119ca04e45eb3f589c9e171236c5c6d0
|
||||
#19 exporting attestation manifest sha256:af1850696e9fe2c9e94eede8013cfbf7119ca04e45eb3f589c9e171236c5c6d0 0.1s done
|
||||
#19 exporting manifest list sha256:e9992a1f923de5227fb9cd2c518b05fa5f9c1cee6fdbfe8a28f0ba8851783788 0.0s done
|
||||
#19 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#19 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#19 DONE 0.3s
|
||||
|
||||
#20 [cache-tls] exporting to image
|
||||
#20 exporting layers 0.0s done
|
||||
#20 exporting manifest sha256:ebc5b0b73b93edacac8a6cc62825eaf9b4c39ec51f7a46e8db8833c5d84484db 0.0s done
|
||||
#20 exporting config sha256:ae7012a0062f5cf4df0c315bcc49f5691bbb563bf4d0ff98849e9d160adcc3cf 0.0s done
|
||||
#20 exporting attestation manifest sha256:ffde24d1a28fb9a7daea0bdb62fdd6f6d999aa3eced6508e335ef34273a313ae 0.1s done
|
||||
#20 exporting manifest list sha256:d5f7e5def861c6c4dc494d5aa9dcd8cbe113e035299a871cc2949d385dff713b 0.0s done
|
||||
#20 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#20 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#20 DONE 0.3s
|
||||
|
||||
#21 [loki-tls] exporting to image
|
||||
#21 exporting layers 0.0s done
|
||||
#21 exporting manifest sha256:5d0f440b4a2051ef664b2b8ad443f1f72224beab6124f4bccc5160f72179ef46 0.0s done
|
||||
#21 exporting config sha256:06c08572644fe4fce8e89f4bd1bf4992dc009e3113731a24290319d108750eca 0.0s done
|
||||
#21 exporting attestation manifest sha256:b4432a5bb09edad6978397fc9adb89776dee28963cf04fb422d50cdd1c0ee720 0.1s done
|
||||
#21 exporting manifest list sha256:82ac479687eb1a2b006f8c1291befe241711da58e3f35e605627360497c34529 0.0s done
|
||||
#21 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#21 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#21 DONE 0.3s
|
||||
|
||||
#22 [state-init] exporting to image
|
||||
#22 exporting layers 0.0s done
|
||||
#22 exporting manifest sha256:46714136b886254c5fd9400b05c58647e29442ecfb70f05512e4f43fd4ae643c 0.0s done
|
||||
#22 exporting config sha256:6160889b4c0d1c9e4f7afdf6e87fb00c75d7a0a0149c48a6784a65ae4be94e60 0.0s done
|
||||
#22 exporting attestation manifest sha256:73975b04601ff917c914e58cb73c5f3a270ac171693fb6f3d2f88d58e2062b85 0.1s done
|
||||
#22 exporting manifest list sha256:7e4ba7c30be4b865220e72077a8aa731f136ee9673e9b4cd0b2a01800650d2b6 0.0s done
|
||||
#22 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#22 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#22 DONE 0.3s
|
||||
|
||||
#23 [dispatcher] exporting to image
|
||||
#23 exporting layers 0.0s done
|
||||
#23 exporting manifest sha256:5a6d8d2c23d9c5ebe9205f4d29c1b8c15ab702f15ad746197ea002fc8c2b3758 0.0s done
|
||||
#23 exporting config sha256:83ec22e71bcdd31be44ef7fa37574d658aee2090a9e878bad830b5b80c8d7364 0.0s done
|
||||
#23 exporting attestation manifest sha256:4ec04896a0ab3e94fe76e736e2e00313af6f61ba6f3c64703af3eeb4d3909dc6 0.1s done
|
||||
#23 exporting manifest list sha256:9e8680f2e01cc54b79aae03d19c0c4b1206305fba8b7cc2a133e9f5dc7b0c746 0.0s done
|
||||
#23 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#23 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#23 DONE 0.3s
|
||||
|
||||
#24 [collector-tls] exporting to image
|
||||
#24 exporting layers 0.0s done
|
||||
#24 exporting manifest sha256:32edc63d910c7bf80a0d496d44386769622cbe81e494c6f8dc4c58d8ddca9b8b 0.0s done
|
||||
#24 exporting config sha256:e5e32b0406d75957d5cbad3de94cd93fe1f7fef111d76e0721bca177a4241d25 0.0s done
|
||||
#24 exporting attestation manifest sha256:ec730fb27ceef80ed671fc7ccec4369c249d15708fb8d635e22c9a6be3f95105 0.1s done
|
||||
#24 exporting manifest list sha256:4e88437fca72bf1da16a8663e26931e38a53b30148832fa5ab9c168aa8f39655 0.0s done
|
||||
#24 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#24 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#24 DONE 0.3s
|
||||
|
||||
#25 [api] exporting to image
|
||||
#25 exporting layers 0.0s done
|
||||
#25 exporting manifest sha256:4fb38ceeaccf856cd631458884283c239b1ffb57931293b48284e5b05d5b5926 0.0s done
|
||||
#25 exporting config sha256:5251ac2a307403359877f1fe3423bfaa5e08924e9812745d212d298a14b7c7b1 0.0s done
|
||||
#25 exporting attestation manifest sha256:4a95c992705da222895603056aa56636e9d16e697d5482d7d7c858847f228c43 0.1s done
|
||||
#25 exporting manifest list sha256:5624451b970446b58bfb72c9c087ff207e993eae0365749615d8d1dbe59d2568 0.0s done
|
||||
#25 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#25 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#25 DONE 0.3s
|
||||
|
||||
#26 [tempo-tls] exporting to image
|
||||
#26 exporting layers 0.0s done
|
||||
#26 exporting manifest sha256:866f515dd24ba37d466ab70ebb2aa5572192daacc031c593eb71f446e899a963 0.0s done
|
||||
#26 exporting config sha256:84124776e7114241fb9fad264c4c464f23db28ea2140fdfe6dca262bc385e39c 0.0s done
|
||||
#26 exporting attestation manifest sha256:6f3ac7f677d870040782ba88af148012995f9b88f3819380e3334a9b84f712d8 0.1s done
|
||||
#26 exporting manifest list sha256:f5ac7ab9578eab9d187b110d1f7cddb54232270b9606ac8dbf0382ca34ac7a7b 0.0s done
|
||||
#26 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#26 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#26 DONE 0.3s
|
||||
|
||||
#27 [migrate] exporting to image
|
||||
#27 exporting layers 0.0s done
|
||||
#27 exporting manifest sha256:ff2a154c68d8e4dcee07c0b96def40a76362da002fc0d3fe31a338709f757a76 0.0s done
|
||||
#27 exporting config sha256:7cce95292d5e4c6382867ac086ebb4d78ff07aa2e5b2bfffa0199e3fbd5ccea9 0.0s done
|
||||
#27 exporting attestation manifest sha256:33e9d895fcd65a9c11556c99cf0a4d490e4781a4d89749a355e82cc39d894949 0.1s done
|
||||
#27 exporting manifest list sha256:9e431c5cc6a602993cda20be7599eb2b19c6535792bbd9c40421939559605b14 0.0s done
|
||||
#27 naming to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#27 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#27 DONE 0.3s
|
||||
|
||||
#28 [storage-tls] exporting to image
|
||||
#28 exporting layers 0.0s done
|
||||
#28 exporting manifest sha256:256571558ed994352ff7c6c8673fe6f8fa901bb4a6c1a8cb1cc00b167ac751bd 0.0s done
|
||||
#28 exporting config sha256:278e02e0f65f7d67d81f3f0b70824d2cbdc8aa62c1e106be2630323a1cf96f5b 0.0s done
|
||||
#28 exporting attestation manifest sha256:a03b6de79a3fc3ec7a71a2c545f86a798136e9d0c7b5ebe60f41ae66c76c718c 0.1s done
|
||||
#28 exporting manifest list sha256:540b8884bd4718b1370c28f7e9eb77956cda13b391c2710351f013bf2dda78f8 0.0s done
|
||||
#28 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#28 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#28 DONE 0.3s
|
||||
|
||||
#29 [s3-bootstrap] exporting to image
|
||||
#29 exporting layers 0.0s done
|
||||
#29 exporting manifest sha256:419c5d3711cb45b74bdb97dc9ae129dce8182e306a39babd9b77539f4183f687 0.0s done
|
||||
#29 exporting config sha256:bb395b1353791015a9d14b3f6b3f2b036410c7d11c2755ea7564a638bff21007 0.0s done
|
||||
#29 exporting attestation manifest sha256:9ec97d47975a02afacbb4b8e20b07f4439b8359e74e0c86306e6010703900595 0.1s done
|
||||
#29 exporting manifest list sha256:da4a3734ac232c0f04feb776c49872b978b60fd6be5f405f028c71f5dafe0799 0.0s done
|
||||
#29 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#29 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#29 DONE 0.3s
|
||||
|
||||
#30 [prometheus-tls] exporting to image
|
||||
#30 exporting layers 0.0s done
|
||||
#30 exporting manifest sha256:778a070a34d80726ef7828f6b43841b3f9302e7dd8e1e086e48b527eda1b6ede 0.0s done
|
||||
#30 exporting config sha256:578af17afc2766ca6d336114682298ae637be298890b5c54fa262c4500c87000 0.0s done
|
||||
#30 exporting attestation manifest sha256:074adc14694bca8037fbedbe16916bef76174c4b5954046e6feee1597b8e4331 0.1s done
|
||||
#30 exporting manifest list sha256:851c289505ec56ccaba24fec4571df539a9d9a18ad70f8b29cb5afe810da57c2 0.0s done
|
||||
#30 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#30 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#30 DONE 0.3s
|
||||
|
||||
#31 [worker] exporting to image
|
||||
#31 exporting layers 0.0s done
|
||||
#31 exporting manifest sha256:5de5b7ab1875d7e9547e81061d9c3e6f8b4fe4e132f7b6c261568c93bb022d10 0.0s done
|
||||
#31 exporting config sha256:8f6b27f55615f1fb73aaa21a61a3fe0bb8b70f950f090a1a21d64fe32db5ad2a 0.0s done
|
||||
#31 exporting attestation manifest sha256:c04dbcc8a7adaaffe4a28ee38fdd2872883c0e0245bdd244e10cb21902fcfa9c 0.1s done
|
||||
#31 exporting manifest list sha256:d146bd0059c818a5c8360bef91faea23ae4018562f2cea1cb06f7bbb29098827 0.0s done
|
||||
#31 naming to docker.io/library/mtusi-vasilev:lab7 done
|
||||
#31 unpacking to docker.io/library/mtusi-vasilev:lab7 0.0s done
|
||||
#31 DONE 0.3s
|
||||
|
||||
#32 [prometheus-tls] resolving provenance for metadata file
|
||||
#32 DONE 0.0s
|
||||
|
||||
#33 [collector-tls] resolving provenance for metadata file
|
||||
#33 DONE 0.0s
|
||||
|
||||
#34 [s3-bootstrap] resolving provenance for metadata file
|
||||
#34 DONE 0.0s
|
||||
|
||||
#35 [api] resolving provenance for metadata file
|
||||
#35 DONE 0.0s
|
||||
|
||||
#36 [loki-tls] resolving provenance for metadata file
|
||||
#36 DONE 0.0s
|
||||
|
||||
#37 [tempo-tls] resolving provenance for metadata file
|
||||
#37 DONE 0.0s
|
||||
|
||||
#38 [storage-tls] resolving provenance for metadata file
|
||||
#38 DONE 0.0s
|
||||
|
||||
#39 [worker] resolving provenance for metadata file
|
||||
#39 DONE 0.0s
|
||||
|
||||
#40 [migrate] resolving provenance for metadata file
|
||||
#40 DONE 0.0s
|
||||
|
||||
#41 [state-init] resolving provenance for metadata file
|
||||
#41 DONE 0.0s
|
||||
|
||||
#42 [broker-tls] resolving provenance for metadata file
|
||||
#42 DONE 0.0s
|
||||
|
||||
#43 [dispatcher] resolving provenance for metadata file
|
||||
#43 DONE 0.0s
|
||||
|
||||
#44 [cache-tls] resolving provenance for metadata file
|
||||
#44 DONE 0.0s
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
Image mtusi-vasilev:lab7 Built
|
||||
docker compose up -d postgres openbao cache cache-tls broker broker-tls storage s3 storage-tls
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Recreate
|
||||
Container mtusi-vasilev-lab7-state-init-1 Recreate
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Recreate
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Recreate
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Recreated
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Recreated
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Recreated
|
||||
Container mtusi-vasilev-lab7-state-init-1 Recreated
|
||||
Container mtusi-vasilev-lab7-postgres-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Starting
|
||||
Container mtusi-vasilev-lab7-cache-1 Starting
|
||||
Container mtusi-vasilev-lab7-cache-1 Started
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Started
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-postgres-1 Started
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-broker-1 Starting
|
||||
Container mtusi-vasilev-lab7-storage-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-openbao-1 Starting
|
||||
Container mtusi-vasilev-lab7-broker-1 Started
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-storage-1 Started
|
||||
Container mtusi-vasilev-lab7-storage-1 Waiting
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-openbao-1 Started
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-storage-1 Healthy
|
||||
Container mtusi-vasilev-lab7-s3-1 Starting
|
||||
Container mtusi-vasilev-lab7-s3-1 Started
|
||||
python3 scripts/bao_operator.py init
|
||||
OpenBao operator action complete; credential values were not printed.
|
||||
VCS_REF=$(git rev-parse HEAD) docker compose up -d --wait
|
||||
Container mtusi-vasilev-lab7-broker-1 Running
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Running
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Running
|
||||
Container mtusi-vasilev-lab7-postgres-1 Running
|
||||
Container mtusi-vasilev-lab7-cache-1 Running
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Running
|
||||
Container mtusi-vasilev-lab7-openbao-1 Running
|
||||
Container mtusi-vasilev-lab7-storage-1 Running
|
||||
Container mtusi-vasilev-lab7-s3-1 Running
|
||||
Container mtusi-vasilev-lab7-collector-1 Creating
|
||||
Container mtusi-vasilev-lab7-tempo-1 Creating
|
||||
Container mtusi-vasilev-lab7-grafana-1 Creating
|
||||
Container mtusi-vasilev-lab7-loki-1 Creating
|
||||
Container mtusi-vasilev-lab7-prometheus-1 Creating
|
||||
Container mtusi-vasilev-lab7-migrate-1 Recreate
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Recreate
|
||||
Container mtusi-vasilev-lab7-tempo-1 Created
|
||||
Container mtusi-vasilev-lab7-collector-1 Created
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Creating
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Creating
|
||||
Container mtusi-vasilev-lab7-grafana-1 Created
|
||||
Container mtusi-vasilev-lab7-prometheus-1 Created
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Creating
|
||||
Container mtusi-vasilev-lab7-loki-1 Created
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Creating
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Created
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Created
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Created
|
||||
Container mtusi-vasilev-lab7-migrate-1 Recreated
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Recreate
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Created
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Recreated
|
||||
Container mtusi-vasilev-lab7-api-1 Recreate
|
||||
Container mtusi-vasilev-lab7-worker-1 Recreate
|
||||
Container mtusi-vasilev-lab7-api-2 Recreate
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Recreated
|
||||
Container mtusi-vasilev-lab7-worker-1 Recreated
|
||||
Container mtusi-vasilev-lab7-api-2 Recreated
|
||||
Container mtusi-vasilev-lab7-api-1 Recreated
|
||||
Container mtusi-vasilev-lab7-postgres-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Starting
|
||||
Container mtusi-vasilev-lab7-collector-1 Starting
|
||||
Container mtusi-vasilev-lab7-collector-1 Started
|
||||
Container mtusi-vasilev-lab7-state-init-1 Started
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-postgres-1 Healthy
|
||||
Container mtusi-vasilev-lab7-migrate-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-tempo-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-prometheus-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-storage-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-grafana-1 Starting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-loki-1 Starting
|
||||
Container mtusi-vasilev-lab7-migrate-1 Started
|
||||
Container mtusi-vasilev-lab7-migrate-1 Waiting
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Started
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Waiting
|
||||
Container mtusi-vasilev-lab7-migrate-1 Waiting
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Waiting
|
||||
Container mtusi-vasilev-lab7-migrate-1 Waiting
|
||||
Container mtusi-vasilev-lab7-loki-1 Started
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-grafana-1 Started
|
||||
Container mtusi-vasilev-lab7-tempo-1 Started
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-prometheus-1 Started
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Starting
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Started
|
||||
Container mtusi-vasilev-lab7-storage-1 Healthy
|
||||
Container mtusi-vasilev-lab7-migrate-1 Exited
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Starting
|
||||
Container mtusi-vasilev-lab7-migrate-1 Exited
|
||||
Container mtusi-vasilev-lab7-migrate-1 Exited
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Started
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Exited
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Exited
|
||||
Container mtusi-vasilev-lab7-worker-1 Starting
|
||||
Container mtusi-vasilev-lab7-api-2 Starting
|
||||
Container mtusi-vasilev-lab7-worker-1 Started
|
||||
Container mtusi-vasilev-lab7-api-2 Started
|
||||
Container mtusi-vasilev-lab7-api-1 Starting
|
||||
Container mtusi-vasilev-lab7-api-1 Started
|
||||
Container mtusi-vasilev-lab7-api-2 Waiting
|
||||
Container mtusi-vasilev-lab7-api-1 Waiting
|
||||
Container mtusi-vasilev-lab7-api-2 Healthy
|
||||
Container mtusi-vasilev-lab7-api-1 Healthy
|
||||
Container mtusi-vasilev-lab7-lb-1 Starting
|
||||
Container mtusi-vasilev-lab7-lb-1 Started
|
||||
Container mtusi-vasilev-lab7-migrate-1 Waiting
|
||||
Container mtusi-vasilev-lab7-prometheus-1 Waiting
|
||||
Container mtusi-vasilev-lab7-broker-1 Waiting
|
||||
Container mtusi-vasilev-lab7-cache-1 Waiting
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-openbao-1 Waiting
|
||||
Container mtusi-vasilev-lab7-storage-1 Waiting
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-state-init-1 Waiting
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Waiting
|
||||
Container mtusi-vasilev-lab7-collector-1 Waiting
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Waiting
|
||||
Container mtusi-vasilev-lab7-grafana-1 Waiting
|
||||
Container mtusi-vasilev-lab7-s3-1 Waiting
|
||||
Container mtusi-vasilev-lab7-tempo-1 Waiting
|
||||
Container mtusi-vasilev-lab7-loki-1 Waiting
|
||||
Container mtusi-vasilev-lab7-postgres-1 Waiting
|
||||
Container mtusi-vasilev-lab7-worker-1 Waiting
|
||||
Container mtusi-vasilev-lab7-lb-1 Waiting
|
||||
Container mtusi-vasilev-lab7-api-2 Waiting
|
||||
Container mtusi-vasilev-lab7-api-1 Waiting
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Waiting
|
||||
Container mtusi-vasilev-lab7-prometheus-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-loki-1 Healthy
|
||||
Container mtusi-vasilev-lab7-postgres-1 Healthy
|
||||
Container mtusi-vasilev-lab7-storage-1 Healthy
|
||||
Container mtusi-vasilev-lab7-cache-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-dispatcher-1 Healthy
|
||||
Container mtusi-vasilev-lab7-storage-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-broker-1 Healthy
|
||||
Container mtusi-vasilev-lab7-tempo-1 Healthy
|
||||
Container mtusi-vasilev-lab7-openbao-1 Healthy
|
||||
Container mtusi-vasilev-lab7-broker-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-migrate-1 Exited
|
||||
Container mtusi-vasilev-lab7-s3-bootstrap-1 Exited
|
||||
Container mtusi-vasilev-lab7-cache-1 Healthy
|
||||
Container mtusi-vasilev-lab7-collector-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-prometheus-1 Healthy
|
||||
Container mtusi-vasilev-lab7-s3-1 Healthy
|
||||
Container mtusi-vasilev-lab7-loki-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-worker-1 Healthy
|
||||
Container mtusi-vasilev-lab7-state-init-1 Exited
|
||||
Container mtusi-vasilev-lab7-tempo-tls-1 Healthy
|
||||
Container mtusi-vasilev-lab7-grafana-1 Healthy
|
||||
Container mtusi-vasilev-lab7-collector-1 Healthy
|
||||
Container mtusi-vasilev-lab7-api-2 Healthy
|
||||
Container mtusi-vasilev-lab7-api-1 Healthy
|
||||
Container mtusi-vasilev-lab7-lb-1 Healthy
|
||||
@@ -0,0 +1,5 @@
|
||||
........................................................................ [ 35%]
|
||||
........................................................................ [ 70%]
|
||||
............................................................. [100%]
|
||||
Login pacing: 3 retries honoring runtime Retry-After; teacher client unchanged.
|
||||
205 passed in 131.66s (0:02:11)
|
||||
@@ -0,0 +1,3 @@
|
||||
...................... [100%]
|
||||
Login pacing: 0 retries honoring runtime Retry-After; teacher client unchanged.
|
||||
22 passed in 15.22s
|
||||
@@ -0,0 +1 @@
|
||||
{"probe": "transport", "passed": true}
|
||||
@@ -0,0 +1 @@
|
||||
{"checks": {"api_9443_allowed_identity": true, "api_9443_empty_trust_denied": true, "api_9443_foreign_ca_client_denied": true, "api_9443_no_client_cert_denied": true, "api_9443_wrong_server_hostname_denied": true, "api_9443_wrong_trusted_identity_denied": true, "broker_6380_allowed_identity": true, "broker_6380_empty_trust_denied": true, "broker_6380_foreign_ca_client_denied": true, "broker_6380_no_client_cert_denied": true, "broker_6380_wrong_server_hostname_denied": true, "broker_6380_wrong_trusted_identity_denied": true, "cache_6380_allowed_identity": true, "cache_6380_empty_trust_denied": true, "cache_6380_foreign_ca_client_denied": true, "cache_6380_no_client_cert_denied": true, "cache_6380_wrong_server_hostname_denied": true, "cache_6380_wrong_trusted_identity_denied": true, "collector_4318_allowed_identity": true, "collector_4318_empty_trust_denied": true, "collector_4318_foreign_ca_client_denied": true, "collector_4318_no_client_cert_denied": true, "collector_4318_wrong_server_hostname_denied": true, "collector_4318_wrong_trusted_identity_denied": true, "collector_8888_allowed_identity": true, "collector_8888_empty_trust_denied": true, "collector_8888_foreign_ca_client_denied": true, "collector_8888_no_client_cert_denied": true, "collector_8888_wrong_server_hostname_denied": true, "collector_8888_wrong_trusted_identity_denied": true, "collector_9464_allowed_identity": true, "collector_9464_empty_trust_denied": true, "collector_9464_foreign_ca_client_denied": true, "collector_9464_no_client_cert_denied": true, "collector_9464_wrong_server_hostname_denied": true, "collector_9464_wrong_trusted_identity_denied": true, "grafana_loki_write_denied": true, "loki_9443_allowed_identity": true, "loki_9443_empty_trust_denied": true, "loki_9443_foreign_ca_client_denied": true, "loki_9443_no_client_cert_denied": true, "loki_9443_wrong_server_hostname_denied": true, "loki_9443_wrong_trusted_identity_denied": true, "prometheus_9443_allowed_identity": true, "prometheus_9443_empty_trust_denied": true, "prometheus_9443_foreign_ca_client_denied": true, "prometheus_9443_no_client_cert_denied": true, "prometheus_9443_wrong_server_hostname_denied": true, "prometheus_9443_wrong_trusted_identity_denied": true, "raw_api_8080_closed": true, "raw_broker_6379_closed": true, "raw_cache_6379_closed": true, "raw_collector_13133_closed": true, "raw_collector_14318_closed": true, "raw_collector_18888_closed": true, "raw_collector_19464_closed": true, "raw_loki_3100_closed": true, "raw_prometheus_9090_closed": true, "raw_storage_8333_closed": true, "raw_storage_8888_closed": true, "raw_storage_9333_closed": true, "raw_tempo_3200_closed": true, "raw_tempo_4317_closed": true, "raw_tempo_4318_closed": true, "storage_8443_allowed_identity": true, "storage_8443_empty_trust_denied": true, "storage_8443_foreign_ca_client_denied": true, "storage_8443_no_client_cert_denied": true, "storage_8443_wrong_server_hostname_denied": true, "storage_8443_wrong_trusted_identity_denied": true, "tempo_9443_allowed_identity": true, "tempo_9443_empty_trust_denied": true, "tempo_9443_foreign_ca_client_denied": true, "tempo_9443_no_client_cert_denied": true, "tempo_9443_wrong_server_hostname_denied": true, "tempo_9443_wrong_trusted_identity_denied": true, "tempo_otlp_collector_allowed": true, "tempo_otlp_wrong_role_denied": true}, "passed": true}
|
||||
@@ -0,0 +1,2 @@
|
||||
......................................... [100%]
|
||||
41 passed in 0.22s
|
||||
@@ -0,0 +1,3 @@
|
||||
Container mtusi-vasilev-lab7-worker-run-21d5e47ed369 Creating
|
||||
Container mtusi-vasilev-lab7-worker-run-21d5e47ed369 Created
|
||||
{"checks": {"bao_other_path_denied": true, "bao_own_path_allowed": true, "bao_policy_write_denied": true, "broker_acl_admin_denied": true, "broker_group_destroy_denied": true, "broker_ping_allowed": true, "broker_publish_denied": true, "broker_wrong_stream_denied": true, "db_business_messages_denied": true, "db_business_users_denied": true, "db_create_denied": true, "db_identity_worker": true, "db_job_read_allowed": true, "db_owner_mutation_denied": true, "no_plaintext_bypass_api_8080": true, "no_plaintext_bypass_broker_6379": true, "no_plaintext_bypass_cache_6379": true, "no_plaintext_bypass_storage_8333": true, "no_plaintext_bypass_storage_8888": true, "no_plaintext_bypass_storage_9333": true, "s3_private_prefix_read_denied": true, "s3_results_prefix_write_allowed": true, "s3_staging_write_denied": true, "worker_image_has_no_root_token": true}, "passed": true}
|
||||
@@ -0,0 +1 @@
|
||||
{"checks": {"bao_other_path_denied": true, "bao_own_path_allowed": true, "bao_policy_write_denied": true, "broker_acl_admin_denied": true, "broker_group_destroy_denied": true, "broker_ping_allowed": true, "broker_publish_denied": true, "broker_wrong_stream_denied": true, "db_business_messages_denied": true, "db_business_users_denied": true, "db_create_denied": true, "db_identity_worker": true, "db_job_read_allowed": true, "db_owner_mutation_denied": true, "no_plaintext_bypass_api_8080": true, "no_plaintext_bypass_broker_6379": true, "no_plaintext_bypass_cache_6379": true, "no_plaintext_bypass_storage_8333": true, "no_plaintext_bypass_storage_8888": true, "no_plaintext_bypass_storage_9333": true, "s3_private_prefix_read_denied": true, "s3_results_prefix_write_allowed": true, "s3_staging_write_denied": true, "worker_image_has_no_root_token": true}, "passed": true}
|
||||
@@ -0,0 +1,3 @@
|
||||
[leveldb2]
|
||||
enabled = true
|
||||
dir = "/data/filerldb2"
|
||||
@@ -0,0 +1,450 @@
|
||||
{
|
||||
"uid": "messenger-overview",
|
||||
"title": "Messenger: API and image pipeline",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "5s",
|
||||
"time": {
|
||||
"from": "now-15m",
|
||||
"to": "now"
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"id": 1,
|
||||
"title": "Business RPS",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "sum(rate(messenger_http_requests_total[1m]))"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "reqps"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"title": "Business 5xx ratio",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "sum(rate(messenger_http_requests_total{status_class=\"5xx\"}[1m])) / clamp_min(sum(rate(messenger_http_requests_total[1m])),0.001)"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percentunit"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"title": "HTTP latency quantiles",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "histogram_quantile(0.5, sum by (le) (rate(messenger_http_duration_seconds_bucket[1m])))",
|
||||
"legendFormat": "p50"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_http_duration_seconds_bucket[1m])))",
|
||||
"legendFormat": "p95"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"expr": "histogram_quantile(0.99, sum by (le) (rate(messenger_http_duration_seconds_bucket[1m])))",
|
||||
"legendFormat": "p99"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 8
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"title": "Job outcomes",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "sum by (outcome) (rate(messenger_jobs_total[1m]))"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 8
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"title": "Job p95 processing",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_job_duration_seconds_bucket[1m])))"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 16
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"title": "End-to-end p95 to ready",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_attachment_ready_duration_seconds_bucket[1m])))"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 16
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"title": "Outstanding jobs",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "max(messenger_queue_depth)"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 24
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"title": "Oldest outstanding age",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "max(messenger_queue_oldest_age_seconds)"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 24
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"title": "DB pool used",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "messenger_db_pool_used"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 32
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"title": "DB pool waiting",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "messenger_db_pool_waiting"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 32
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"title": "Worker busy/capacity",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "messenger_worker_busy / messenger_worker_capacity"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 40
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percentunit"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"title": "Process resident memory",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "messenger_process_memory_bytes"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 40
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bytes"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"title": "Process CPU (100%=1 core)",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "messenger_process_cpu_percent"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 48
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"title": "Sampling decisions",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "sum by (decision) (rate(messenger_http_trace_decisions_total[1m]))"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 48
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"title": "Collector failed span sends",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "rate(otelcol_exporter_send_failed_spans_total[1m])"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 56
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 99,
|
||||
"title": "Structured application logs (trace_id and request_id)",
|
||||
"type": "logs",
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "loki"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"expr": "{service_name=~\"messenger-api|messenger-worker\"}"
|
||||
}
|
||||
],
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 64
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: 1
|
||||
providers:
|
||||
- name: messenger
|
||||
folder: Messenger
|
||||
type: file
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards
|
||||
@@ -0,0 +1,3 @@
|
||||
# Datasource provisioning
|
||||
|
||||
`scripts/bootstrap.py` generates the actual HTTPS/mTLS Grafana datasource file under `secrets/grafana-provisioning/datasources/`. Compose mounts that generated file, containing CA and the Grafana client identity. It is intentionally excluded from Git and the application image. Backend URLs are https://prometheus:9443, https://loki:9443 and https://tempo:9443; hostname/CA verification stays enabled.
|
||||
@@ -0,0 +1,49 @@
|
||||
global
|
||||
log stdout format raw local0
|
||||
maxconn 256
|
||||
stats socket /tmp/haproxy.sock mode 600 level user
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
|
||||
defaults
|
||||
mode http
|
||||
log global
|
||||
timeout connect 1s
|
||||
timeout client 20s
|
||||
timeout server 15s
|
||||
timeout check 2s
|
||||
timeout queue 2s
|
||||
retries 0
|
||||
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 1s
|
||||
hold obsolete 1s
|
||||
hold nx 1s
|
||||
|
||||
frontend public
|
||||
bind :8443 ssl crt /run/tls/identity/combined.pem
|
||||
http-request set-var(txn.lb_request_id) uuid()
|
||||
http-request return status 503 content-type application/json lf-string '{"error":{"code":"unavailable","message":"No ready API","request_id":"%[var(txn.lb_request_id)]"}}' hdr X-Request-Id '%[var(txn.lb_request_id)]' hdr X-Instance-Id ingress if { nbsrv(apis) eq 0 } !{ path /health/live }
|
||||
http-request return status 503 content-type application/json lf-string '{"error":{"code":"unavailable","message":"No live API","request_id":"%[var(txn.lb_request_id)]"}}' hdr X-Request-Id '%[var(txn.lb_request_id)]' hdr X-Instance-Id ingress if { path /health/live } { nbsrv(live_apis) eq 0 }
|
||||
use_backend live_apis if { path /health/live }
|
||||
default_backend apis
|
||||
|
||||
backend apis
|
||||
balance roundrobin
|
||||
option httpchk GET /health/ready
|
||||
http-check expect status 200
|
||||
default-server inter 1s fastinter 500ms downinter 1s fall 2 rise 2
|
||||
server-template api 1-8 api:9443 ssl verify required ca-file /run/tls/ca.pem crt /run/tls/identity/combined.pem verifyhost api sni str(api) check check-sni api resolvers docker resolve-prefer ipv4 init-addr libc,none
|
||||
|
||||
# Liveness remains observable when a dependency seals and readiness is false.
|
||||
# This backend exposes only the exact liveness path, still through LB mTLS.
|
||||
backend live_apis
|
||||
balance roundrobin
|
||||
option httpchk GET /health/live
|
||||
http-check expect status 200
|
||||
default-server inter 1s fastinter 500ms downinter 1s fall 2 rise 2
|
||||
server-template api 1-8 api:9443 ssl verify required ca-file /run/tls/ca.pem crt /run/tls/identity/combined.pem verifyhost api sni str(api) check check-sni api resolvers docker resolve-prefer ipv4 init-addr libc,none
|
||||
@@ -0,0 +1,24 @@
|
||||
groups:
|
||||
- name: messenger-slo
|
||||
rules:
|
||||
- alert: MessengerHighErrorRate
|
||||
expr: sum(rate(messenger_http_requests_total{status_class="5xx"}[1m])) / clamp_min(sum(rate(messenger_http_requests_total[1m])), 0.001) > 0.05
|
||||
for: 10s
|
||||
labels: {severity: warning}
|
||||
annotations:
|
||||
summary: Business HTTP 5xx ratio above 5% over 1 minute
|
||||
runbook_url: file:RUNBOOK.md#api-errors
|
||||
- alert: MessengerQueueLag
|
||||
expr: max(messenger_queue_oldest_age_seconds) > 15 and max(messenger_queue_depth) > 0
|
||||
for: 10s
|
||||
labels: {severity: warning}
|
||||
annotations:
|
||||
summary: Outstanding attachment job age above 15 seconds
|
||||
runbook_url: file:RUNBOOK.md#queue-lag
|
||||
- alert: MessengerTelemetryUnavailable
|
||||
expr: up{job="messenger"} == 0
|
||||
for: 10s
|
||||
labels: {severity: warning}
|
||||
annotations:
|
||||
summary: Collector metrics unavailable
|
||||
runbook_url: file:RUNBOOK.md#telemetry-unavailable
|
||||
@@ -0,0 +1,87 @@
|
||||
extensions:
|
||||
health_check:
|
||||
endpoint: 127.0.0.1:13133
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
http:
|
||||
endpoint: 127.0.0.1:14318
|
||||
processors:
|
||||
memory_limiter:
|
||||
check_interval: 1s
|
||||
limit_mib: 160
|
||||
spike_limit_mib: 32
|
||||
batch:
|
||||
timeout: 1s
|
||||
send_batch_size: 128
|
||||
send_batch_max_size: 256
|
||||
exporters:
|
||||
prometheus:
|
||||
endpoint: 127.0.0.1:19464
|
||||
metric_expiration: 15m
|
||||
resource_to_telemetry_conversion:
|
||||
enabled: true
|
||||
otlphttp/tempo:
|
||||
endpoint: https://tempo:44318
|
||||
tls:
|
||||
ca_file: /run/tls/ca.pem
|
||||
cert_file: /run/tls/identity/cert.pem
|
||||
key_file: /run/tls/identity/key.pem
|
||||
timeout: 2s
|
||||
sending_queue:
|
||||
queue_size: 128
|
||||
num_consumers: 1
|
||||
retry_on_failure:
|
||||
initial_interval: 1s
|
||||
max_interval: 2s
|
||||
max_elapsed_time: 5s
|
||||
otlphttp/loki:
|
||||
endpoint: https://loki:9443/otlp
|
||||
timeout: 2s
|
||||
sending_queue:
|
||||
queue_size: 128
|
||||
num_consumers: 1
|
||||
retry_on_failure:
|
||||
initial_interval: 1s
|
||||
max_interval: 2s
|
||||
max_elapsed_time: 5s
|
||||
tls:
|
||||
ca_file: /run/tls/ca.pem
|
||||
cert_file: /run/tls/identity/cert.pem
|
||||
key_file: /run/tls/identity/key.pem
|
||||
service:
|
||||
extensions:
|
||||
- health_check
|
||||
telemetry:
|
||||
metrics:
|
||||
readers:
|
||||
- pull:
|
||||
exporter:
|
||||
prometheus:
|
||||
host: 127.0.0.1
|
||||
port: 18888
|
||||
pipelines:
|
||||
traces:
|
||||
receivers:
|
||||
- otlp
|
||||
processors:
|
||||
- memory_limiter
|
||||
- batch
|
||||
exporters:
|
||||
- otlphttp/tempo
|
||||
metrics:
|
||||
receivers:
|
||||
- otlp
|
||||
processors:
|
||||
- memory_limiter
|
||||
- batch
|
||||
exporters:
|
||||
- prometheus
|
||||
logs:
|
||||
receivers:
|
||||
- otlp
|
||||
processors:
|
||||
- memory_limiter
|
||||
- batch
|
||||
exporters:
|
||||
- otlphttp/loki
|
||||
@@ -0,0 +1,34 @@
|
||||
auth_enabled: false
|
||||
server:
|
||||
http_listen_port: 3100
|
||||
http_listen_address: 127.0.0.1
|
||||
grpc_listen_address: 127.0.0.1
|
||||
common:
|
||||
instance_addr: 127.0.0.1
|
||||
path_prefix: /loki
|
||||
storage:
|
||||
filesystem:
|
||||
chunks_directory: /loki/chunks
|
||||
rules_directory: /loki/rules
|
||||
replication_factor: 1
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2024-01-01
|
||||
store: tsdb
|
||||
object_store: filesystem
|
||||
schema: v13
|
||||
index:
|
||||
prefix: index_
|
||||
period: 24h
|
||||
limits_config:
|
||||
allow_structured_metadata: true
|
||||
retention_period: 24h
|
||||
compactor:
|
||||
working_directory: /loki/compactor
|
||||
retention_enabled: true
|
||||
delete_request_store: filesystem
|
||||
analytics:
|
||||
reporting_enabled: false
|
||||
@@ -0,0 +1,26 @@
|
||||
global:
|
||||
scrape_interval: 5s
|
||||
evaluation_interval: 5s
|
||||
rule_files:
|
||||
- /etc/prometheus/alerts.yaml
|
||||
scrape_configs:
|
||||
- job_name: messenger
|
||||
static_configs:
|
||||
- targets:
|
||||
- collector:9464
|
||||
scheme: https
|
||||
tls_config:
|
||||
ca_file: /run/tls/ca.pem
|
||||
cert_file: /run/tls/identity/cert.pem
|
||||
key_file: /run/tls/identity/key.pem
|
||||
server_name: collector
|
||||
- job_name: collector
|
||||
static_configs:
|
||||
- targets:
|
||||
- collector:8888
|
||||
scheme: https
|
||||
tls_config:
|
||||
ca_file: /run/tls/ca.pem
|
||||
cert_file: /run/tls/identity/cert.pem
|
||||
key_file: /run/tls/identity/key.pem
|
||||
server_name: collector
|
||||
@@ -0,0 +1,24 @@
|
||||
server:
|
||||
http_listen_port: 3200
|
||||
http_listen_address: 127.0.0.1
|
||||
grpc_listen_address: 127.0.0.1
|
||||
distributor:
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
http:
|
||||
endpoint: 127.0.0.1:4318
|
||||
ingester:
|
||||
max_block_duration: 1m
|
||||
compactor:
|
||||
compaction:
|
||||
block_retention: 24h
|
||||
storage:
|
||||
trace:
|
||||
backend: local
|
||||
wal:
|
||||
path: /var/tempo/wal
|
||||
local:
|
||||
path: /var/tempo/blocks
|
||||
usage_report:
|
||||
reporting_enabled: false
|
||||
@@ -0,0 +1,12 @@
|
||||
ui = true
|
||||
disable_mlock = true
|
||||
storage "file" { path = "/bao/data" }
|
||||
listener "tcp" {
|
||||
address = "0.0.0.0:8200"
|
||||
tls_cert_file = "/run/tls/identity/cert.pem"
|
||||
tls_key_file = "/run/tls/identity/key.pem"
|
||||
tls_client_ca_file = "/run/tls/ca.pem"
|
||||
tls_require_and_verify_client_cert = true
|
||||
tls_min_version = "tls12"
|
||||
}
|
||||
api_addr = "https://openbao:8200"
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
cp /run/tls/identity/key.pem /tmp/postgres-key.pem
|
||||
chown postgres:postgres /tmp/postgres-key.pem
|
||||
chmod 600 /tmp/postgres-key.pem
|
||||
exec docker-entrypoint.sh "$@"
|
||||
@@ -0,0 +1,3 @@
|
||||
local all all trust
|
||||
hostnossl all all 0.0.0.0/0 reject
|
||||
hostssl messenger api,worker,dispatcher,messenger 0.0.0.0/0 scram-sha-256
|
||||
@@ -0,0 +1,35 @@
|
||||
CREATE TABLE users (
|
||||
id uuid PRIMARY KEY,
|
||||
username text NOT NULL UNIQUE CHECK (username ~ '^[a-z0-9_]{3,32}$'),
|
||||
display_name text NOT NULL CHECK (char_length(display_name) BETWEEN 1 AND 100),
|
||||
password_hash text NOT NULL,
|
||||
created_at timestamptz NOT NULL
|
||||
);
|
||||
CREATE TABLE chats (
|
||||
id uuid PRIMARY KEY,
|
||||
title text NOT NULL CHECK (char_length(title) BETWEEN 1 AND 100),
|
||||
created_at timestamptz NOT NULL
|
||||
);
|
||||
CREATE TABLE members (
|
||||
chat_id uuid NOT NULL REFERENCES chats(id),
|
||||
user_id uuid NOT NULL REFERENCES users(id),
|
||||
position integer NOT NULL CHECK (position >= 0),
|
||||
PRIMARY KEY(chat_id,user_id),
|
||||
UNIQUE(chat_id,position)
|
||||
);
|
||||
CREATE INDEX members_user_idx ON members(user_id,chat_id);
|
||||
CREATE TABLE messages (
|
||||
id uuid PRIMARY KEY,
|
||||
chat_id uuid NOT NULL,
|
||||
sender_id uuid NOT NULL,
|
||||
text text NOT NULL CHECK (char_length(text) BETWEEN 1 AND 4000),
|
||||
created_at timestamptz NOT NULL,
|
||||
FOREIGN KEY(chat_id,sender_id) REFERENCES members(chat_id,user_id)
|
||||
);
|
||||
CREATE INDEX messages_history_idx ON messages(chat_id,created_at,id);
|
||||
CREATE TABLE sessions (
|
||||
token_digest text PRIMARY KEY,
|
||||
user_id uuid NOT NULL REFERENCES users(id),
|
||||
expires_at timestamptz NOT NULL
|
||||
);
|
||||
CREATE INDEX sessions_expiry_idx ON sessions(expires_at);
|
||||
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE message_requests (
|
||||
actor_id uuid NOT NULL REFERENCES users(id),
|
||||
chat_id uuid NOT NULL REFERENCES chats(id),
|
||||
key text NOT NULL,
|
||||
body_digest text NOT NULL,
|
||||
response jsonb NOT NULL,
|
||||
expires_at timestamptz NOT NULL,
|
||||
PRIMARY KEY(actor_id,chat_id,key)
|
||||
);
|
||||
CREATE INDEX message_requests_expiry_idx ON message_requests(expires_at);
|
||||
@@ -0,0 +1,13 @@
|
||||
-- PostgreSQL text rejects U+0000, while the API accepts Unicode code points.
|
||||
-- Preserve UTF-8 losslessly. API validation enforces code point limits; the DB
|
||||
-- additionally bounds byte lengths, without stripping or replacing characters.
|
||||
ALTER TABLE users DROP CONSTRAINT users_display_name_check;
|
||||
ALTER TABLE users ALTER COLUMN display_name TYPE bytea USING convert_to(display_name,'UTF8');
|
||||
ALTER TABLE users ADD CHECK (octet_length(display_name) BETWEEN 1 AND 400);
|
||||
ALTER TABLE chats DROP CONSTRAINT chats_title_check;
|
||||
ALTER TABLE chats ALTER COLUMN title TYPE bytea USING convert_to(title,'UTF8');
|
||||
ALTER TABLE chats ADD CHECK (octet_length(title) BETWEEN 1 AND 400);
|
||||
ALTER TABLE messages DROP CONSTRAINT messages_text_check;
|
||||
ALTER TABLE messages ALTER COLUMN text TYPE bytea USING convert_to(text,'UTF8');
|
||||
ALTER TABLE messages ADD CHECK (octet_length(text) BETWEEN 1 AND 16000);
|
||||
ALTER TABLE message_requests ALTER COLUMN response TYPE bytea USING convert_to(response::text,'UTF8');
|
||||
@@ -0,0 +1,35 @@
|
||||
CREATE TABLE attachments (
|
||||
id uuid PRIMARY KEY,
|
||||
chat_id uuid NOT NULL REFERENCES chats(id),
|
||||
owner_id uuid NOT NULL REFERENCES users(id),
|
||||
filename text NOT NULL,
|
||||
content_type text NOT NULL CHECK (content_type IN ('image/png','image/jpeg')),
|
||||
size_bytes bigint NOT NULL CHECK (size_bytes BETWEEN 1 AND 10485760),
|
||||
sha256 text NOT NULL,
|
||||
status text NOT NULL CONSTRAINT attachments_status_check CHECK (status IN ('queued','processing','ready','failed')),
|
||||
error_code text,
|
||||
created_at timestamptz NOT NULL,
|
||||
updated_at timestamptz NOT NULL,
|
||||
object_key text NOT NULL UNIQUE,
|
||||
UNIQUE(id,chat_id)
|
||||
);
|
||||
CREATE TABLE message_attachments (
|
||||
message_id uuid NOT NULL REFERENCES messages(id),
|
||||
attachment_id uuid NOT NULL REFERENCES attachments(id),
|
||||
position integer NOT NULL CHECK (position BETWEEN 0 AND 9),
|
||||
PRIMARY KEY(message_id,attachment_id),
|
||||
UNIQUE(message_id,position)
|
||||
);
|
||||
CREATE INDEX message_attachments_attachment_idx ON message_attachments(attachment_id);
|
||||
CREATE TABLE upload_intents (
|
||||
id uuid PRIMARY KEY,
|
||||
object_key text NOT NULL UNIQUE,
|
||||
created_at timestamptz NOT NULL
|
||||
);
|
||||
CREATE INDEX upload_intents_created_idx ON upload_intents(created_at,id);
|
||||
CREATE TABLE attachment_reconcile_audit (
|
||||
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||
event text NOT NULL,
|
||||
object_key text NOT NULL,
|
||||
happened_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Empty text is valid only when the API supplies at least one attachment.
|
||||
ALTER TABLE messages DROP CONSTRAINT messages_text_check;
|
||||
ALTER TABLE messages ADD CONSTRAINT messages_text_check CHECK (octet_length(text) <= 16000);
|
||||
@@ -0,0 +1,49 @@
|
||||
ALTER TABLE attachments DROP CONSTRAINT IF EXISTS attachments_status_check;
|
||||
ALTER TABLE attachments ADD CONSTRAINT attachments_status_check
|
||||
CHECK (status IN ('queued','processing','ready','failed'));
|
||||
ALTER TABLE attachments ADD COLUMN pipeline_version integer NOT NULL DEFAULT 1 CHECK (pipeline_version > 0);
|
||||
ALTER TABLE attachments ADD COLUMN variants jsonb NOT NULL DEFAULT '[]';
|
||||
ALTER TABLE attachments ADD COLUMN stage_key text;
|
||||
|
||||
CREATE TABLE attachment_jobs (
|
||||
id uuid PRIMARY KEY,
|
||||
attachment_id uuid NOT NULL REFERENCES attachments(id),
|
||||
pipeline_version integer NOT NULL CHECK (pipeline_version > 0),
|
||||
source_key text,
|
||||
state text NOT NULL CHECK (state IN ('queued','processing','ready','failed','superseded')),
|
||||
attempt integer NOT NULL DEFAULT 0 CHECK (attempt >= 0),
|
||||
attempt_limit integer NOT NULL CHECK (attempt_limit > 0),
|
||||
lease_id uuid,
|
||||
lease_until timestamptz,
|
||||
available_at timestamptz NOT NULL DEFAULT now(),
|
||||
error_code text,
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_at timestamptz NOT NULL DEFAULT now(),
|
||||
UNIQUE(attachment_id,pipeline_version)
|
||||
);
|
||||
CREATE INDEX jobs_recovery_idx ON attachment_jobs(state,lease_until);
|
||||
CREATE TABLE job_outbox (
|
||||
job_id uuid PRIMARY KEY REFERENCES attachment_jobs(id),
|
||||
published_at timestamptz
|
||||
);
|
||||
CREATE TABLE job_audit (
|
||||
id bigserial PRIMARY KEY,
|
||||
job_id uuid NOT NULL REFERENCES attachment_jobs(id),
|
||||
event text NOT NULL,
|
||||
attempt integer NOT NULL,
|
||||
created_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
CREATE TABLE failed_jobs (
|
||||
job_id uuid PRIMARY KEY REFERENCES attachment_jobs(id),
|
||||
error_code text NOT NULL,
|
||||
failed_at timestamptz NOT NULL DEFAULT now(),
|
||||
replay_count integer NOT NULL DEFAULT 0
|
||||
);
|
||||
CREATE TABLE test_faults (
|
||||
id bigserial PRIMARY KEY,
|
||||
point text NOT NULL,
|
||||
attachment_id uuid,
|
||||
action text NOT NULL CHECK (action IN ('crash','pause','error')),
|
||||
reached_at timestamptz,
|
||||
released boolean NOT NULL DEFAULT false
|
||||
);
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE attachment_jobs ADD COLUMN traceparent text;
|
||||
ALTER TABLE attachment_jobs ADD COLUMN tracestate text;
|
||||
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE login_windows (
|
||||
bucket text PRIMARY KEY,
|
||||
window_start timestamptz NOT NULL,
|
||||
count integer NOT NULL CHECK (count > 0)
|
||||
);
|
||||
REVOKE CREATE ON SCHEMA public FROM PUBLIC;
|
||||
GRANT USAGE ON SCHEMA public TO api,worker,dispatcher;
|
||||
GRANT SELECT,INSERT,UPDATE,DELETE ON users,chats,members,messages,sessions,message_requests,attachments,message_attachments,upload_intents,attachment_reconcile_audit,attachment_jobs,job_outbox,job_audit,failed_jobs,login_windows TO api;
|
||||
GRANT SELECT ON attachments,attachment_jobs,job_outbox,failed_jobs TO worker,dispatcher;
|
||||
GRANT UPDATE(status,error_code,object_key,variants,updated_at,stage_key) ON attachments TO worker,dispatcher;
|
||||
GRANT UPDATE(state,attempt,lease_id,lease_until,available_at,error_code,updated_at) ON attachment_jobs TO worker,dispatcher;
|
||||
GRANT UPDATE(published_at) ON job_outbox TO worker,dispatcher;
|
||||
GRANT INSERT ON job_audit TO worker,dispatcher;
|
||||
GRANT INSERT,UPDATE ON failed_jobs TO worker,dispatcher;
|
||||
GRANT USAGE,SELECT ON SEQUENCE job_audit_id_seq TO api,worker,dispatcher;
|
||||
GRANT USAGE,SELECT ON SEQUENCE attachment_reconcile_audit_id_seq TO api;
|
||||
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE attachment_jobs ADD COLUMN accepted_at timestamptz;
|
||||
UPDATE attachment_jobs SET accepted_at=created_at;
|
||||
ALTER TABLE attachment_jobs ALTER COLUMN accepted_at SET NOT NULL;
|
||||
ALTER TABLE attachment_jobs ALTER COLUMN accepted_at SET DEFAULT clock_timestamp();
|
||||
@@ -0,0 +1 @@
|
||||
CREATE INDEX login_windows_expiry_idx ON login_windows(window_start);
|
||||
@@ -0,0 +1,32 @@
|
||||
[project]
|
||||
name = "mtusi-messenger"
|
||||
version = "1.0.0"
|
||||
requires-python = ">=3.12,<3.13"
|
||||
dependencies = [
|
||||
"fastapi",
|
||||
"uvicorn",
|
||||
"psycopg[binary,pool]",
|
||||
"redis",
|
||||
"argon2-cffi",
|
||||
"boto3>=1.43,<2",
|
||||
"pillow>=13.0.0,<14",
|
||||
"opentelemetry-sdk==1.45.2",
|
||||
"opentelemetry-exporter-otlp-proto-http==1.45.2",
|
||||
"psutil>=7,<8",
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
dev = ["pytest", "httpx", "ruff", "openapi-spec-validator", "jsonschema"]
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py312"
|
||||
line-length = 100
|
||||
include = ["src/**/*.py", "student-tests/**/*.py", "research/**/*.py"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["student-tests"]
|
||||
pythonpath = ["src", "tests"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E4", "E7", "E9", "F", "I", "UP", "B"]
|
||||
ignore = ["B008"] # FastAPI dependencies are declared in endpoint signatures.
|
||||
@@ -0,0 +1,117 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Shared-replica login window and real weak-hash rehash regression."""
|
||||
|
||||
import base64
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
from argon2 import PasswordHasher
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / "tests"))
|
||||
from client import Client, check # noqa: E402
|
||||
|
||||
|
||||
def sql(query):
|
||||
result = subprocess.run(
|
||||
[
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"postgres",
|
||||
"psql",
|
||||
"-U",
|
||||
"messenger",
|
||||
"-d",
|
||||
"messenger",
|
||||
"-At",
|
||||
"-v",
|
||||
"ON_ERROR_STOP=1",
|
||||
],
|
||||
cwd=ROOT,
|
||||
input=query,
|
||||
text=True,
|
||||
capture_output=True,
|
||||
check=True,
|
||||
)
|
||||
return result.stdout.strip()
|
||||
|
||||
|
||||
def main():
|
||||
c = Client("https://localhost:8447", str(ROOT / "secrets/ca.pem"))
|
||||
actor = c.user("rehash")
|
||||
password = actor["registration"]["password"]
|
||||
weak = PasswordHasher(time_cost=1, memory_cost=8192, parallelism=1).hash(password)
|
||||
sql("UPDATE users SET password_hash='" + weak + "' WHERE id='" + actor["id"] + "';")
|
||||
authorization = (
|
||||
"Basic "
|
||||
+ base64.b64encode((actor["registration"]["username"] + ":" + password).encode()).decode()
|
||||
)
|
||||
c.call(
|
||||
"POST",
|
||||
"/api/v1/auth/sessions",
|
||||
201,
|
||||
headers={"Authorization": authorization},
|
||||
schema="Session",
|
||||
)
|
||||
upgraded = sql("SELECT password_hash FROM users WHERE id='" + actor["id"] + "';")
|
||||
check(
|
||||
upgraded != weak and "$m=65536,t=2,p=1$" in upgraded,
|
||||
"successful login did not upgrade hash",
|
||||
)
|
||||
time.sleep(10.2)
|
||||
wrong = (
|
||||
"Basic "
|
||||
+ base64.b64encode(
|
||||
(actor["registration"]["username"] + ":incorrect-password-for-budget").encode()
|
||||
).decode()
|
||||
)
|
||||
rows = []
|
||||
for _ in range(12):
|
||||
response = c.call(
|
||||
"POST", "/api/v1/auth/sessions", expected=[401, 429], headers={"Authorization": wrong}
|
||||
)
|
||||
rows.append(
|
||||
{
|
||||
"status": response["status"],
|
||||
"instance": response["headers"]["X-Instance-Id"],
|
||||
"retry_after": response["headers"].get("Retry-After"),
|
||||
"milliseconds": round(response["elapsed"] * 1000, 3),
|
||||
}
|
||||
)
|
||||
sql(
|
||||
"UPDATE sessions SET expires_at=now()-interval '1 second' WHERE user_id='"
|
||||
+ actor["id"]
|
||||
+ "';"
|
||||
)
|
||||
expiry_rows = []
|
||||
for _ in range(4):
|
||||
expired = c.call("GET", "/api/v1/users/me", expected=401, actor=actor)
|
||||
expiry_rows.append(
|
||||
{"status": expired["status"], "instance": expired["headers"]["X-Instance-Id"]}
|
||||
)
|
||||
result = {
|
||||
"weak_hash_upgraded": True,
|
||||
"expired_session_requests": expiry_rows,
|
||||
"expired_session_denied_both_replicas": len({r["instance"] for r in expiry_rows}) >= 2,
|
||||
"configured_memory_kib": 65536,
|
||||
"time_cost": 2,
|
||||
"parallelism": 1,
|
||||
"requests": rows,
|
||||
"distinct_api_instances": len({r["instance"] for r in rows}),
|
||||
"passed": len({r["instance"] for r in expiry_rows}) >= 2
|
||||
and sum(r["status"] == 401 for r in rows) == 10
|
||||
and all(r["status"] == 429 and r["retry_after"] == "10" for r in rows[10:])
|
||||
and len({r["instance"] for r in rows}) >= 2,
|
||||
}
|
||||
(ROOT / "evidence/auth-budget.json").write_text(json.dumps(result, indent=2) + "\n")
|
||||
check(result["passed"], "shared login window failed")
|
||||
print(json.dumps({k: v for k, v in result.items() if k != "requests"}))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,141 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Accepted jobs survive worker identity revoke + working-secret rotation."""
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / "tests"))
|
||||
from client import Client, check # noqa: E402
|
||||
|
||||
|
||||
def docker(*args):
|
||||
return subprocess.check_output(["docker", "compose", *args], cwd=ROOT, text=True).strip()
|
||||
|
||||
|
||||
def images():
|
||||
ids = docker("ps", "-q", "api", "worker").split()
|
||||
return sorted(
|
||||
set(
|
||||
subprocess.check_output(
|
||||
["docker", "inspect", "--format", "{{.Image}}", *ids], text=True
|
||||
).split()
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
c = Client("https://localhost:8447", str(ROOT / "secrets/ca.pem"))
|
||||
alice, bob, _, chat = c.bootstrap()
|
||||
before = images()
|
||||
docker("stop", "worker")
|
||||
accepted = [c.attachment(alice, chat) for _ in range(3)]
|
||||
start = time.monotonic()
|
||||
rotate = subprocess.run(
|
||||
[sys.executable, "scripts/rotate_identity.py"], cwd=ROOT, text=True, capture_output=True
|
||||
)
|
||||
check(rotate.returncode == 0, "operator rotation failed; inspect private operator execution")
|
||||
revoked = subprocess.run(
|
||||
[sys.executable, "scripts/security_checks.py", "revoked"],
|
||||
cwd=ROOT,
|
||||
text=True,
|
||||
capture_output=True,
|
||||
)
|
||||
check(revoked.returncode == 0, "revoked material was not denied before original token expiry")
|
||||
errors = 0
|
||||
deadline = time.monotonic() + 90
|
||||
pending = {a[0]["id"] for a in accepted}
|
||||
while pending and time.monotonic() < deadline:
|
||||
for att, _ in accepted:
|
||||
if att["id"] not in pending:
|
||||
continue
|
||||
result = c.call(
|
||||
"GET",
|
||||
"/api/v1/attachments/" + att["id"],
|
||||
expected=[200, 503],
|
||||
actor=alice,
|
||||
schema=None,
|
||||
)
|
||||
if result["status"] == 503:
|
||||
errors += 1
|
||||
else:
|
||||
body = json.loads(result["bytes"])
|
||||
check(body["status"] != "failed", "accepted task became failed")
|
||||
if body["status"] == "ready":
|
||||
pending.remove(att["id"])
|
||||
time.sleep(0.2)
|
||||
check(not pending, "accepted jobs did not recover")
|
||||
rows = []
|
||||
for att, original in accepted:
|
||||
downloaded = c.call("GET", "/api/v1/attachments/" + att["id"] + "/content", actor=bob)[
|
||||
"bytes"
|
||||
]
|
||||
thumbnail = c.call(
|
||||
"GET", "/api/v1/attachments/" + att["id"] + "/content?variant=thumbnail", actor=bob
|
||||
)["bytes"]
|
||||
metadata = c.call(
|
||||
"GET", "/api/v1/attachments/" + att["id"], actor=alice, schema="Attachment"
|
||||
)["json"]
|
||||
variants = []
|
||||
for advertised in metadata["variants"]:
|
||||
content = c.call(
|
||||
"GET",
|
||||
"/api/v1/attachments/" + att["id"] + "/content?variant=" + advertised["name"],
|
||||
actor=bob,
|
||||
)["bytes"]
|
||||
actual = hashlib.sha256(content).hexdigest()
|
||||
variants.append(
|
||||
{
|
||||
"name": advertised["name"],
|
||||
"sha256": actual,
|
||||
"advertised_sha256": advertised["sha256"],
|
||||
"size_matches": len(content) == advertised["size_bytes"],
|
||||
"passed": actual == advertised["sha256"]
|
||||
and len(content) == advertised["size_bytes"],
|
||||
}
|
||||
)
|
||||
sha = hashlib.sha256(original).hexdigest()
|
||||
rows.append(
|
||||
{
|
||||
"attachment_id": att["id"],
|
||||
"original_sha256": sha,
|
||||
"download_sha256": hashlib.sha256(downloaded).hexdigest(),
|
||||
"thumbnail_sha256": hashlib.sha256(thumbnail).hexdigest(),
|
||||
"thumbnail_nonempty": bool(thumbnail),
|
||||
"variants": variants,
|
||||
"accepted_original_sha_matches": sha == att["sha256"],
|
||||
}
|
||||
)
|
||||
after = images()
|
||||
result = {
|
||||
"accepted_jobs": 3,
|
||||
"ready_jobs": len(rows),
|
||||
"recovery_seconds": round(time.monotonic() - start, 3),
|
||||
"observed_api_503": errors,
|
||||
"images_before": before,
|
||||
"images_after": after,
|
||||
"image_unchanged": before == after,
|
||||
"revoked_material_checks_passed": True,
|
||||
"variants_verified": sum(len(row["variants"]) for row in rows),
|
||||
"rows": rows,
|
||||
"passed": before == after
|
||||
and all(
|
||||
r["original_sha256"] == r["download_sha256"]
|
||||
and r["thumbnail_nonempty"]
|
||||
and r["accepted_original_sha_matches"]
|
||||
and len(r["variants"]) == 3
|
||||
and all(v["passed"] for v in r["variants"])
|
||||
for r in rows
|
||||
),
|
||||
}
|
||||
(ROOT / "evidence/compromise-recovery.json").write_text(json.dumps(result, indent=2) + "\n")
|
||||
check(result["passed"], "recovery invariant failed")
|
||||
print(json.dumps({k: v for k, v in result.items() if k != "rows"}))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Concurrent health probes detect starvation without retrying readiness failures."""
|
||||
|
||||
import collections
|
||||
import concurrent.futures
|
||||
import json
|
||||
import ssl
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def main():
|
||||
context = ssl.create_default_context(cafile=str(ROOT / "secrets/ca.pem"))
|
||||
|
||||
def one(_):
|
||||
try:
|
||||
with urllib.request.urlopen(
|
||||
"https://localhost:8447/health/ready", context=context, timeout=8
|
||||
) as response:
|
||||
return str(response.status)
|
||||
except urllib.error.HTTPError as exc:
|
||||
return str(exc.code)
|
||||
except OSError:
|
||||
return "connection_error"
|
||||
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=8) as pool:
|
||||
counts = dict(collections.Counter(pool.map(one, range(64))))
|
||||
result = {
|
||||
"concurrency": 8,
|
||||
"requests": 64,
|
||||
"status_counts": counts,
|
||||
"passed": counts == {"200": 64},
|
||||
}
|
||||
(ROOT / "evidence/readiness-concurrency.json").write_text(json.dumps(result, indent=2) + "\n")
|
||||
print(json.dumps(result))
|
||||
if not result["passed"]:
|
||||
raise SystemExit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Fail closed after the service-auth lease expires, then bounded recovery."""
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / "tests"))
|
||||
from client import Client, check # noqa: E402
|
||||
|
||||
|
||||
def operator(action):
|
||||
subprocess.run(
|
||||
[sys.executable, "scripts/bao_operator.py", action],
|
||||
cwd=ROOT,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
c = Client("https://localhost:8447", str(ROOT / "secrets/ca.pem"))
|
||||
actor = c.user("sealed")
|
||||
c.call("GET", "/api/v1/users/me", actor=actor, schema="User")
|
||||
start = time.monotonic()
|
||||
operator("seal")
|
||||
rows = []
|
||||
try:
|
||||
while time.monotonic() - start < 33:
|
||||
live = c.call("GET", "/health/live", schema="Health")
|
||||
response = c.call(
|
||||
"GET", "/api/v1/users/me", expected=[200, 503], actor=actor
|
||||
)
|
||||
rows.append(
|
||||
{
|
||||
"seconds": round(time.monotonic() - start, 3),
|
||||
"live": live["status"],
|
||||
"business": response["status"],
|
||||
}
|
||||
)
|
||||
time.sleep(1)
|
||||
check(rows[-1]["business"] == 503, "service used credentials beyond lease")
|
||||
finally:
|
||||
unseal_start = time.monotonic()
|
||||
operator("unseal")
|
||||
for _ in range(20):
|
||||
response = c.call("GET", "/health/ready", expected=[200, 503])
|
||||
if response["status"] == 200:
|
||||
break
|
||||
time.sleep(0.25)
|
||||
c.call("GET", "/api/v1/users/me", actor=actor, schema="User")
|
||||
result = {
|
||||
"lease_seconds": 30,
|
||||
"local_cache_max_seconds": 29,
|
||||
"rows": rows,
|
||||
"first_business_503_seconds": next(
|
||||
(r["seconds"] for r in rows if r["business"] == 503), None
|
||||
),
|
||||
"recovery_seconds": round(time.monotonic() - unseal_start, 3),
|
||||
"passed": rows[-1]["business"] == 503 and response["status"] == 200,
|
||||
}
|
||||
(ROOT / "evidence/sealed-expiry.json").write_text(json.dumps(result, indent=2) + "\n")
|
||||
check(result["passed"], "recovery failed")
|
||||
print(json.dumps({k: v for k, v in result.items() if k != "rows"}))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,147 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Explicit operator init/unseal/configuration. Never prints credential values."""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import ssl
|
||||
import time
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
PRIVATE = ROOT / "secrets"
|
||||
OPERATOR = ROOT / "operator-private"
|
||||
|
||||
|
||||
def call(path, data=None, *, method=None, token=True):
|
||||
ctx = ssl.create_default_context(cafile=str(PRIVATE / "ca.pem"))
|
||||
ctx.load_cert_chain(PRIVATE / "pki/operator/cert.pem", PRIVATE / "pki/operator/key.pem")
|
||||
headers = {"Content-Type": "application/json"}
|
||||
if token:
|
||||
headers["X-Vault-Token"] = (OPERATOR / "root-token").read_text().strip()
|
||||
req = urllib.request.Request(
|
||||
os.getenv("BAO_OPERATOR_ADDR", "https://localhost:18207") + "/v1/" + path,
|
||||
data=json.dumps(data).encode() if data is not None else None,
|
||||
headers=headers,
|
||||
method=method,
|
||||
)
|
||||
with urllib.request.urlopen(req, context=ctx, timeout=5) as response:
|
||||
raw = response.read()
|
||||
return json.loads(raw) if raw else {}
|
||||
|
||||
|
||||
def unseal():
|
||||
for share in json.loads((OPERATOR / "unseal-shares.json").read_text())[:2]:
|
||||
result = call("sys/unseal", {"key": share}, token=False)
|
||||
if result["sealed"]:
|
||||
raise RuntimeError("OpenBao remained sealed")
|
||||
|
||||
|
||||
def configure():
|
||||
try:
|
||||
call("sys/mounts/secret", {"type": "kv", "options": {"version": "2"}})
|
||||
except urllib.error.HTTPError as exc:
|
||||
if exc.code != 400:
|
||||
raise
|
||||
try:
|
||||
call("sys/auth/cert", {"type": "cert"})
|
||||
except urllib.error.HTTPError as exc:
|
||||
if exc.code != 400:
|
||||
raise
|
||||
seed = json.loads((PRIVATE / "bao_seed.json").read_text())
|
||||
for role, values in seed.items():
|
||||
policy = (
|
||||
'path "secret/data/services/'
|
||||
+ role
|
||||
+ '" { capabilities = ["read"] }\npath "auth/token/lookup-self" { capabilities = ["read"] }\npath "auth/token/renew-self" { capabilities = ["update"] }\n'
|
||||
)
|
||||
call("sys/policies/acl/" + role, {"policy": policy}, method="PUT")
|
||||
call(
|
||||
"auth/cert/certs/" + role,
|
||||
{
|
||||
"display_name": role,
|
||||
"certificate": (PRIVATE / "pki" / role / "cert.pem").read_text(),
|
||||
"allowed_common_names": role,
|
||||
"token_policies": [role],
|
||||
"token_no_default_policy": True,
|
||||
"token_ttl": "30s",
|
||||
"token_max_ttl": "60s",
|
||||
},
|
||||
)
|
||||
call("secret/data/services/" + role, {"data": values})
|
||||
try:
|
||||
call("sys/audit/file", {"type": "file", "options": {"file_path": "/bao/data/audit.jsonl"}})
|
||||
except urllib.error.HTTPError as exc:
|
||||
if exc.code != 400:
|
||||
raise
|
||||
|
||||
|
||||
def revoke_worker_tokens():
|
||||
# Replacing the pinned certificate prevents NEW auth, but already issued
|
||||
# tokens must also be revoked before publishing a new working secret.
|
||||
accessors = call("auth/token/accessors", method="LIST").get("data", {}).get("keys", [])
|
||||
count = 0
|
||||
for accessor in accessors:
|
||||
try:
|
||||
record = call("auth/token/lookup-accessor", {"accessor": accessor})["data"]
|
||||
except urllib.error.HTTPError as exc:
|
||||
if exc.code == 400:
|
||||
continue
|
||||
raise
|
||||
if "worker" in record.get("policies", []):
|
||||
call("auth/token/revoke-accessor", {"accessor": accessor})
|
||||
count += 1
|
||||
return count
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"action",
|
||||
choices=[
|
||||
"init",
|
||||
"unseal",
|
||||
"configure",
|
||||
"seal",
|
||||
"revoke-worker-tokens",
|
||||
"disable-worker-auth",
|
||||
],
|
||||
)
|
||||
args = parser.parse_args()
|
||||
os.umask(0o077)
|
||||
if args.action == "init":
|
||||
for _attempt in range(30):
|
||||
try:
|
||||
status = call("sys/init", token=False)
|
||||
break
|
||||
except (OSError, urllib.error.URLError):
|
||||
time.sleep(1)
|
||||
else:
|
||||
raise RuntimeError("OpenBao TLS endpoint unavailable")
|
||||
if not status["initialized"]:
|
||||
result = call(
|
||||
"sys/init", {"secret_shares": 3, "secret_threshold": 2}, method="PUT", token=False
|
||||
)
|
||||
(OPERATOR / "root-token").write_text(result["root_token"])
|
||||
(OPERATOR / "unseal-shares.json").write_text(json.dumps(result["keys_base64"]))
|
||||
(OPERATOR / "root-token").chmod(0o600)
|
||||
(OPERATOR / "unseal-shares.json").chmod(0o600)
|
||||
unseal()
|
||||
configure()
|
||||
elif args.action == "unseal":
|
||||
unseal()
|
||||
elif args.action == "configure":
|
||||
configure()
|
||||
elif args.action == "revoke-worker-tokens":
|
||||
revoke_worker_tokens()
|
||||
elif args.action == "disable-worker-auth":
|
||||
call("auth/cert/certs/worker", method="DELETE")
|
||||
else:
|
||||
call("sys/seal", {}, method="PUT")
|
||||
print("OpenBao operator action complete; credential values were not printed.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,350 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Idempotent local PKI/secrets bootstrap. Operator material never enters containers."""
|
||||
|
||||
import json
|
||||
import os
|
||||
import secrets
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
PRIVATE = ROOT / "secrets"
|
||||
OPERATOR = ROOT / "operator-private"
|
||||
ROLES = (
|
||||
"api",
|
||||
"worker",
|
||||
"dispatcher",
|
||||
"lb",
|
||||
"postgres",
|
||||
"storage",
|
||||
"broker",
|
||||
"cache",
|
||||
"collector",
|
||||
"prometheus",
|
||||
"loki",
|
||||
"tempo",
|
||||
"grafana",
|
||||
"openbao",
|
||||
"operator",
|
||||
)
|
||||
|
||||
|
||||
def write(path, text, mode=0o644):
|
||||
if not path.exists():
|
||||
path.write_text(text)
|
||||
path.chmod(mode)
|
||||
|
||||
|
||||
def run(*args):
|
||||
subprocess.run(
|
||||
["openssl", *args], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
|
||||
)
|
||||
|
||||
|
||||
def certificate(name, replace=False):
|
||||
dest = PRIVATE / "pki" / name
|
||||
dest.mkdir(parents=True, exist_ok=True)
|
||||
dest.chmod(0o755)
|
||||
if (dest / "cert.pem").exists() and not replace:
|
||||
valid = subprocess.run(
|
||||
["openssl", "x509", "-in", str(dest / "cert.pem"), "-checkend", "3600", "-noout"],
|
||||
capture_output=True,
|
||||
)
|
||||
if valid.returncode == 0:
|
||||
return
|
||||
key, csr = dest / "key.pem", OPERATOR / (name + ".csr")
|
||||
run("genpkey", "-algorithm", "EC", "-pkeyopt", "ec_paramgen_curve:P-256", "-out", str(key))
|
||||
run("req", "-new", "-key", str(key), "-subj", f"/CN={name}", "-out", str(csr))
|
||||
ext = OPERATOR / (name + ".ext")
|
||||
names = f"DNS:{name}"
|
||||
if name in {
|
||||
"lb",
|
||||
"api",
|
||||
"postgres",
|
||||
"broker",
|
||||
"cache",
|
||||
"collector",
|
||||
"prometheus",
|
||||
"loki",
|
||||
"tempo",
|
||||
"openbao",
|
||||
"grafana",
|
||||
"storage",
|
||||
}:
|
||||
names += ",DNS:localhost,IP:127.0.0.1"
|
||||
ext.write_text(
|
||||
f"subjectAltName={names}\nbasicConstraints=critical,CA:FALSE\nkeyUsage=critical,digitalSignature,keyEncipherment\nextendedKeyUsage=serverAuth,clientAuth\n"
|
||||
)
|
||||
run(
|
||||
"x509",
|
||||
"-req",
|
||||
"-in",
|
||||
str(csr),
|
||||
"-CA",
|
||||
str(OPERATOR / "ca.pem"),
|
||||
"-CAkey",
|
||||
str(OPERATOR / "ca-key.pem"),
|
||||
"-set_serial",
|
||||
str(secrets.randbits(127) or 1),
|
||||
"-days",
|
||||
"2",
|
||||
"-extfile",
|
||||
str(ext),
|
||||
"-out",
|
||||
str(dest / "cert.pem"),
|
||||
)
|
||||
key.chmod(0o644)
|
||||
(dest / "combined.pem").write_text((dest / "cert.pem").read_text() + key.read_text())
|
||||
(dest / "combined.pem").chmod(0o644)
|
||||
|
||||
|
||||
def write_roles():
|
||||
# Generated first-init SQL must follow rotated password files as well as a
|
||||
# fresh bootstrap. Existing DB roles are changed only by operator rotation.
|
||||
statements = [
|
||||
f"CREATE ROLE {role} LOGIN PASSWORD '{(PRIVATE / (role + '_db_password')).read_text().strip()}';"
|
||||
for role in ("api", "worker", "dispatcher")
|
||||
]
|
||||
(PRIVATE / "db_roles.sql").write_text("\n".join(statements))
|
||||
(PRIVATE / "db_roles.sql").chmod(0o644)
|
||||
|
||||
|
||||
def main():
|
||||
os.umask(0o077)
|
||||
for folder in (PRIVATE, OPERATOR):
|
||||
folder.mkdir(exist_ok=True)
|
||||
folder.chmod(0o700)
|
||||
if not (OPERATOR / "ca-key.pem").exists():
|
||||
run(
|
||||
"genpkey",
|
||||
"-algorithm",
|
||||
"EC",
|
||||
"-pkeyopt",
|
||||
"ec_paramgen_curve:P-256",
|
||||
"-out",
|
||||
str(OPERATOR / "ca-key.pem"),
|
||||
)
|
||||
run(
|
||||
"req",
|
||||
"-x509",
|
||||
"-new",
|
||||
"-key",
|
||||
str(OPERATOR / "ca-key.pem"),
|
||||
"-subj",
|
||||
"/CN=MTUSI Lab7 local CA",
|
||||
"-days",
|
||||
"365",
|
||||
"-addext",
|
||||
"basicConstraints=critical,CA:TRUE",
|
||||
"-addext",
|
||||
"keyUsage=critical,keyCertSign,cRLSign",
|
||||
"-out",
|
||||
str(OPERATOR / "ca.pem"),
|
||||
)
|
||||
(PRIVATE / "ca.pem").write_text((OPERATOR / "ca.pem").read_text())
|
||||
(PRIVATE / "ca.pem").chmod(0o644)
|
||||
(PRIVATE / "pki").mkdir(exist_ok=True)
|
||||
(PRIVATE / "pki").chmod(0o755)
|
||||
for name in ROLES:
|
||||
certificate(name)
|
||||
write(PRIVATE / "revoked.json", "[]")
|
||||
for name in (
|
||||
"postgres_password",
|
||||
"api_db_password",
|
||||
"worker_db_password",
|
||||
"dispatcher_db_password",
|
||||
"cache_password",
|
||||
"cache_worker_password",
|
||||
"cache_dispatcher_password",
|
||||
"broker_worker_password",
|
||||
"broker_dispatcher_password",
|
||||
"broker_admin_password",
|
||||
"grafana_password",
|
||||
):
|
||||
write(PRIVATE / name, secrets.token_urlsafe(32))
|
||||
for role in ("api", "worker", "admin", "study_wide"):
|
||||
write(PRIVATE / (role + "_s3_access"), role + "-" + secrets.token_hex(12))
|
||||
write(PRIVATE / (role + "_s3_secret"), secrets.token_urlsafe(32))
|
||||
|
||||
def value(name):
|
||||
return (PRIVATE / name).read_text().strip()
|
||||
|
||||
identities = []
|
||||
for role in ("api", "worker", "admin", "study_wide"):
|
||||
identities.append(
|
||||
{
|
||||
"name": role,
|
||||
"credentials": [
|
||||
{
|
||||
"accessKey": value(role + "_s3_access"),
|
||||
"secretKey": value(role + "_s3_secret"),
|
||||
}
|
||||
],
|
||||
"actions": ["Admin", "Read", "Write", "List"]
|
||||
if role == "admin"
|
||||
else (
|
||||
["Read:security-study", "Write:security-study", "List:security-study"]
|
||||
if role == "study_wide"
|
||||
else ["Read:messenger", "Write:messenger", "List:messenger"]
|
||||
),
|
||||
}
|
||||
)
|
||||
(PRIVATE / "s3_config").write_text(json.dumps({"identities": identities}))
|
||||
(PRIVATE / "s3_config").chmod(0o644)
|
||||
write(
|
||||
PRIVATE / "cache_config",
|
||||
'bind 127.0.0.1\nport 6379\nprotected-mode yes\nsave ""\nmaxmemory 64mb\nmaxmemory-policy allkeys-lru\nuser default off\nuser api on >'
|
||||
+ value("cache_password")
|
||||
+ " ~user:v1:* +get +setex +ping +hello +client|setinfo\nuser worker on >"
|
||||
+ value("cache_worker_password")
|
||||
+ " +ping +hello +client|setinfo\nuser dispatcher on >"
|
||||
+ value("cache_dispatcher_password")
|
||||
+ " +ping +hello +client|setinfo\n",
|
||||
)
|
||||
write(
|
||||
PRIVATE / "broker_config",
|
||||
'bind 127.0.0.1\nport 6379\nprotected-mode yes\nappendonly yes\nappendfsync always\nsave ""\ndir /data\nmaxmemory 128mb\nmaxmemory-policy noeviction\nuser default off\nuser operator on >'
|
||||
+ value("broker_admin_password")
|
||||
+ " ~* &* +@all\nuser dispatcher on >"
|
||||
+ value("broker_dispatcher_password")
|
||||
+ " ~attachment-jobs:v1 +xadd +ping +hello +client|setinfo\nuser worker on >"
|
||||
+ value("broker_worker_password")
|
||||
+ " ~attachment-jobs:v1 +xgroup|create +xreadgroup +xautoclaim +xack +xdel +ping +hello +client|setinfo\n",
|
||||
)
|
||||
pg = "postgresql://{role}:{password}@postgres:5432/messenger?sslmode=verify-full&sslrootcert=/run/tls/ca.pem"
|
||||
values = {}
|
||||
for role in ("api", "worker", "dispatcher"):
|
||||
values[role] = {
|
||||
"DATABASE_URL": pg.format(role=role, password=value(role + "_db_password")),
|
||||
"CACHE_URL": "rediss://"
|
||||
+ role
|
||||
+ ":"
|
||||
+ value("cache_password" if role == "api" else "cache_" + role + "_password")
|
||||
+ "@cache:6380/0?ssl_cert_reqs=required&ssl_check_hostname=True&ssl_ca_certs=/run/tls/ca.pem&ssl_certfile=/run/tls/identity/cert.pem&ssl_keyfile=/run/tls/identity/key.pem",
|
||||
}
|
||||
if role in {"worker", "dispatcher"}:
|
||||
values[role]["BROKER_URL"] = (
|
||||
"rediss://"
|
||||
+ role
|
||||
+ ":"
|
||||
+ value("broker_" + role + "_password")
|
||||
+ "@broker:6380/0?ssl_cert_reqs=required&ssl_check_hostname=True&ssl_ca_certs=/run/tls/ca.pem&ssl_certfile=/run/tls/identity/cert.pem&ssl_keyfile=/run/tls/identity/key.pem"
|
||||
)
|
||||
if role in {"api", "worker"}:
|
||||
values[role].update(
|
||||
S3_ACCESS_KEY=value(role + "_s3_access"), S3_SECRET_KEY=value(role + "_s3_secret")
|
||||
)
|
||||
write(PRIVATE / "bao_seed.json", json.dumps(values))
|
||||
write(
|
||||
PRIVATE / "admin_database_url",
|
||||
pg.format(role="messenger", password=value("postgres_password")),
|
||||
)
|
||||
write(PRIVATE / "admin_s3_access_key", value("admin_s3_access"))
|
||||
write(PRIVATE / "admin_s3_secret_key", value("admin_s3_secret"))
|
||||
write_roles()
|
||||
gateways = {
|
||||
"api": {"port": 9443, "upstream": 8080, "allowed": ["lb"]},
|
||||
"broker": {
|
||||
"port": 6380,
|
||||
"upstream": 6379,
|
||||
"allowed": ["worker", "dispatcher", "operator"],
|
||||
},
|
||||
"cache": {
|
||||
"port": 6380,
|
||||
"upstream": 6379,
|
||||
"allowed": ["api", "worker", "dispatcher", "operator"],
|
||||
},
|
||||
"storage": {
|
||||
"port": 8443,
|
||||
"upstream": 8333,
|
||||
"allowed": ["api", "worker", "operator"],
|
||||
"http": True,
|
||||
"s3": True,
|
||||
},
|
||||
"collector": [
|
||||
{
|
||||
"port": 4318,
|
||||
"upstream": 14318,
|
||||
"allowed": ["api", "worker", "dispatcher", "operator"],
|
||||
},
|
||||
{"port": 9464, "upstream": 19464, "allowed": ["prometheus", "operator"]},
|
||||
{"port": 8888, "upstream": 18888, "allowed": ["prometheus", "operator"]},
|
||||
],
|
||||
"prometheus": {
|
||||
"http": True,
|
||||
"backend": "prometheus",
|
||||
"port": 9443,
|
||||
"upstream": 9090,
|
||||
"allowed": ["grafana", "operator"],
|
||||
},
|
||||
"loki": {
|
||||
"http": True,
|
||||
"backend": "loki",
|
||||
"port": 9443,
|
||||
"upstream": 3100,
|
||||
"allowed": ["collector", "grafana", "operator"],
|
||||
},
|
||||
"tempo": [
|
||||
{
|
||||
"port": 9443,
|
||||
"upstream": 3200,
|
||||
"allowed": ["grafana", "operator"],
|
||||
"http": True,
|
||||
"backend": "tempo",
|
||||
},
|
||||
{"port": 44318, "upstream": 4318, "allowed": ["collector", "operator"]},
|
||||
],
|
||||
}
|
||||
for role, configs in gateways.items():
|
||||
for item in configs if isinstance(configs, list) else [configs]:
|
||||
item.update(
|
||||
cert="/run/tls/identity/cert.pem",
|
||||
key="/run/tls/identity/key.pem",
|
||||
ca="/run/tls/ca.pem",
|
||||
)
|
||||
(PRIVATE / (role + "_gateway.json")).write_text(json.dumps(configs))
|
||||
(PRIVATE / (role + "_gateway.json")).chmod(0o644)
|
||||
provisioning = PRIVATE / "grafana-provisioning" / "datasources"
|
||||
provisioning.mkdir(parents=True, exist_ok=True)
|
||||
provisioning.parent.chmod(0o755)
|
||||
provisioning.chmod(0o755)
|
||||
datasources = []
|
||||
for name in ("prometheus", "loki", "tempo"):
|
||||
item = {
|
||||
"name": name.title(),
|
||||
"uid": name,
|
||||
"type": name,
|
||||
"access": "proxy",
|
||||
"url": f"https://{name}:9443",
|
||||
"editable": False,
|
||||
"jsonData": {"tlsAuth": True, "tlsAuthWithCACert": True, "serverName": name},
|
||||
"secureJsonData": {
|
||||
"tlsCACert": (PRIVATE / "ca.pem").read_text(),
|
||||
"tlsClientCert": (PRIVATE / "pki/grafana/cert.pem").read_text(),
|
||||
"tlsClientKey": (PRIVATE / "pki/grafana/key.pem").read_text(),
|
||||
},
|
||||
}
|
||||
if name == "prometheus":
|
||||
item["isDefault"] = True
|
||||
item["jsonData"]["httpMethod"] = "GET"
|
||||
if name == "loki":
|
||||
item["jsonData"]["derivedFields"] = [
|
||||
{
|
||||
"datasourceUid": "tempo",
|
||||
"matcherRegex": '"trace_id": "([a-f0-9]{32})"',
|
||||
"name": "TraceID",
|
||||
"url": "$${__value.raw}",
|
||||
}
|
||||
]
|
||||
datasources.append(item)
|
||||
(provisioning / "datasources.yaml").write_text(
|
||||
json.dumps({"apiVersion": 1, "datasources": datasources})
|
||||
)
|
||||
(provisioning / "datasources.yaml").chmod(0o644)
|
||||
if not (ROOT / ".env").exists():
|
||||
(ROOT / ".env").write_text("PUBLIC_PORT=8447\nSESSION_TTL_SECONDS=3600\n")
|
||||
print("Local PKI and scoped credential material ready; operator CA stays outside containers.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
# Namespace-sharing gateways are stopped before their backing services restart.
|
||||
# Unseal is an explicit operator action; shares never enter application containers.
|
||||
docker compose stop
|
||||
docker compose up -d postgres openbao cache cache-tls broker broker-tls storage s3 storage-tls
|
||||
python3 scripts/bao_operator.py unseal
|
||||
docker compose up -d --wait
|
||||
@@ -0,0 +1,129 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Operator-driven worker revoke/cert renewal and DB credential rotation, no rebuild."""
|
||||
|
||||
import importlib.util
|
||||
import json
|
||||
import secrets
|
||||
import ssl
|
||||
import subprocess
|
||||
import time
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def main():
|
||||
spec = importlib.util.spec_from_file_location("bootstrap", ROOT / "scripts/bootstrap.py")
|
||||
bootstrap = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(bootstrap)
|
||||
old = ROOT / "secrets/pki/worker"
|
||||
cert = ssl._ssl._test_decode_cert(str(old / "cert.pem"))
|
||||
snapshot = ROOT / "operator-private/revoked-worker"
|
||||
snapshot.mkdir(exist_ok=True, mode=0o700)
|
||||
for name in ("cert.pem", "key.pem"):
|
||||
(snapshot / name).write_bytes((old / name).read_bytes())
|
||||
(snapshot / name).chmod(0o600)
|
||||
context = ssl.create_default_context(cafile=str(ROOT / "secrets/ca.pem"))
|
||||
context.load_cert_chain(snapshot / "cert.pem", snapshot / "key.pem")
|
||||
auth_request = urllib.request.Request(
|
||||
"https://localhost:18207/v1/auth/cert/login",
|
||||
data=b'{"name":"worker"}',
|
||||
headers={"Content-Type": "application/json"},
|
||||
)
|
||||
with urllib.request.urlopen(auth_request, context=context, timeout=5) as response:
|
||||
old_auth = json.load(response)["auth"]
|
||||
old_token = old_auth["client_token"]
|
||||
old_token_expiry = time.time() + old_auth["lease_duration"]
|
||||
seed_before = json.loads((ROOT / "secrets/bao_seed.json").read_text())
|
||||
material = seed_before["worker"]
|
||||
material["REVOKED_BAO_TOKEN"] = old_token
|
||||
material["REVOKED_BAO_TOKEN_EXPIRES_AT"] = old_token_expiry
|
||||
(snapshot / "material.json").write_text(json.dumps(material))
|
||||
(snapshot / "material.json").chmod(0o644)
|
||||
# The containing operator-private directory stays 0700 on the host. This
|
||||
# disposable old-material mount is used only by the explicit negative probe.
|
||||
for name in ("cert.pem", "key.pem"):
|
||||
(snapshot / name).chmod(0o644)
|
||||
snapshot.chmod(0o755)
|
||||
revoked = ROOT / "secrets/revoked.json"
|
||||
serials = json.loads(revoked.read_text())
|
||||
serials.append(cert["serialNumber"].lstrip("0").lower())
|
||||
revoked.write_text(json.dumps(sorted(set(serials))))
|
||||
subprocess.run(
|
||||
["docker", "compose", "stop", "worker"], cwd=ROOT, check=True, capture_output=True
|
||||
)
|
||||
# Close OLD certificate authentication before enumerating/revoking tokens;
|
||||
# otherwise an attacker could mint another token during the rotation gap.
|
||||
subprocess.run(
|
||||
["python3", "scripts/bao_operator.py", "disable-worker-auth"],
|
||||
cwd=ROOT,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
)
|
||||
try:
|
||||
with urllib.request.urlopen(auth_request, context=context, timeout=5):
|
||||
raise RuntimeError("Old worker certificate authentication remained enabled")
|
||||
except urllib.error.HTTPError as exc:
|
||||
if exc.code not in {400, 403}:
|
||||
raise
|
||||
subprocess.run(
|
||||
["python3", "scripts/bao_operator.py", "revoke-worker-tokens"],
|
||||
cwd=ROOT,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
)
|
||||
bootstrap.certificate("worker", replace=True)
|
||||
password = secrets.token_urlsafe(32)
|
||||
# psql receives SQL through stdin, never a process argument/output containing
|
||||
# credentials. The operator/admin role is confined to this explicit command.
|
||||
sql = f"ALTER ROLE worker PASSWORD '{password}'; SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE usename='worker' AND pid<>pg_backend_pid();"
|
||||
subprocess.run(
|
||||
[
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"postgres",
|
||||
"psql",
|
||||
"-U",
|
||||
"messenger",
|
||||
"-d",
|
||||
"messenger",
|
||||
"-v",
|
||||
"ON_ERROR_STOP=1",
|
||||
],
|
||||
cwd=ROOT,
|
||||
input=sql,
|
||||
text=True,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
)
|
||||
path = ROOT / "secrets/worker_db_password"
|
||||
path.write_text(password)
|
||||
bootstrap.write_roles()
|
||||
seed_path = ROOT / "secrets/bao_seed.json"
|
||||
seed = json.loads(seed_path.read_text())
|
||||
seed["worker"]["DATABASE_URL"] = (
|
||||
"postgresql://worker:"
|
||||
+ password
|
||||
+ "@postgres:5432/messenger?sslmode=verify-full&sslrootcert=/run/tls/ca.pem"
|
||||
)
|
||||
seed_path.write_text(json.dumps(seed))
|
||||
subprocess.run(
|
||||
["python3", "scripts/bao_operator.py", "configure"],
|
||||
cwd=ROOT,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
)
|
||||
subprocess.run(
|
||||
["docker", "compose", "start", "worker"], cwd=ROOT, check=True, capture_output=True
|
||||
)
|
||||
print(
|
||||
"Worker identity revoked and replaced; database credential rotated; worker resumed without image rebuild."
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,221 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Explicit operator probes; test identities never become application mounts."""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def run(args, *, output=None):
|
||||
result = subprocess.run(args, cwd=ROOT, check=True, capture_output=True, text=True)
|
||||
if output:
|
||||
(ROOT / "evidence" / output).write_text(result.stdout)
|
||||
if output.endswith(".json"):
|
||||
record = json.loads(result.stdout)
|
||||
if record.get("passed") is False:
|
||||
raise RuntimeError("Security probe reported a failed invariant: " + output)
|
||||
else:
|
||||
print(result.stdout, end="")
|
||||
return result.stdout
|
||||
|
||||
|
||||
def foreign_certificate():
|
||||
path = ROOT / "secrets/pki/foreign"
|
||||
path.mkdir(exist_ok=True, mode=0o755)
|
||||
run(
|
||||
[
|
||||
"openssl",
|
||||
"req",
|
||||
"-x509",
|
||||
"-newkey",
|
||||
"ec",
|
||||
"-pkeyopt",
|
||||
"ec_paramgen_curve:P-256",
|
||||
"-nodes",
|
||||
"-keyout",
|
||||
str(path / "key.pem"),
|
||||
"-out",
|
||||
str(path / "cert.pem"),
|
||||
"-days",
|
||||
"1",
|
||||
"-subj",
|
||||
"/CN=foreign",
|
||||
"-addext",
|
||||
"subjectAltName=DNS:lb,DNS:worker,DNS:api",
|
||||
]
|
||||
)
|
||||
for item in path.iterdir():
|
||||
item.chmod(0o644)
|
||||
|
||||
|
||||
def audit_container(module, *, material=False):
|
||||
command = [
|
||||
"docker",
|
||||
"compose",
|
||||
"run",
|
||||
"--rm",
|
||||
"--no-deps",
|
||||
"-e",
|
||||
"BAO_ROLE=",
|
||||
"-e",
|
||||
"OTEL_ENABLED=0",
|
||||
"-v",
|
||||
str(ROOT / "secrets/pki") + ":/run/audit-identities:ro",
|
||||
]
|
||||
if material:
|
||||
# Only selected synthetic/admin S3 credential files, never Bao root/shares.
|
||||
path = ROOT / "operator-private/s3-study-material"
|
||||
path.mkdir(exist_ok=True, mode=0o755)
|
||||
for name in (
|
||||
"admin_s3_access",
|
||||
"admin_s3_secret",
|
||||
"study_wide_s3_access",
|
||||
"study_wide_s3_secret",
|
||||
"worker_s3_access",
|
||||
"worker_s3_secret",
|
||||
):
|
||||
(path / name).write_bytes((ROOT / "secrets" / name).read_bytes())
|
||||
(path / name).chmod(0o644)
|
||||
command += ["-v", str(path) + ":/run/audit-material:ro"]
|
||||
command += ["api", "python", "-m", module]
|
||||
return command
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("probe", choices=["transport", "policies", "baseline", "revoked", "kdf"])
|
||||
args = parser.parse_args()
|
||||
os.umask(0o077)
|
||||
if args.probe == "transport":
|
||||
foreign_certificate()
|
||||
run(audit_container("messenger.transport_probe"), output="transport-matrix.json")
|
||||
elif args.probe == "policies":
|
||||
run(
|
||||
[
|
||||
"docker",
|
||||
"compose",
|
||||
"run",
|
||||
"--rm",
|
||||
"--no-deps",
|
||||
"worker",
|
||||
"python",
|
||||
"-m",
|
||||
"messenger.security_probe",
|
||||
],
|
||||
output="worker-policy-final.json",
|
||||
)
|
||||
elif args.probe == "baseline":
|
||||
run(
|
||||
[
|
||||
"docker",
|
||||
"compose",
|
||||
"run",
|
||||
"--rm",
|
||||
"--no-deps",
|
||||
"migrate",
|
||||
"python",
|
||||
"-m",
|
||||
"messenger.baseline_db_probe",
|
||||
],
|
||||
output="baseline-db.json",
|
||||
)
|
||||
run(
|
||||
[
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"broker",
|
||||
"valkey-server",
|
||||
"--port",
|
||||
"6378",
|
||||
"--bind",
|
||||
"127.0.0.1",
|
||||
"--save",
|
||||
"",
|
||||
"--appendonly",
|
||||
"no",
|
||||
"--daemonize",
|
||||
"yes",
|
||||
"--pidfile",
|
||||
"/tmp/security-study.pid",
|
||||
"--logfile",
|
||||
"/tmp/security-study.log",
|
||||
]
|
||||
)
|
||||
broker = run(["docker", "compose", "ps", "-q", "broker"]).strip()
|
||||
config = json.loads(
|
||||
subprocess.check_output(
|
||||
["docker", "compose", "config", "--format", "json"], cwd=ROOT, text=True
|
||||
)
|
||||
)
|
||||
app_image = config["services"]["api"]["image"]
|
||||
run(
|
||||
[
|
||||
"docker",
|
||||
"run",
|
||||
"--rm",
|
||||
"--network",
|
||||
"container:" + broker,
|
||||
"--read-only",
|
||||
"--cap-drop",
|
||||
"ALL",
|
||||
"--security-opt",
|
||||
"no-new-privileges",
|
||||
"--memory",
|
||||
"128m",
|
||||
"--cpus",
|
||||
"0.5",
|
||||
app_image,
|
||||
"python",
|
||||
"-m",
|
||||
"messenger.baseline_queue_probe",
|
||||
],
|
||||
output="baseline-queue.json",
|
||||
)
|
||||
run(
|
||||
audit_container("messenger.baseline_s3_probe", material=True), output="baseline-s3.json"
|
||||
)
|
||||
elif args.probe == "revoked":
|
||||
run(
|
||||
[
|
||||
"docker",
|
||||
"compose",
|
||||
"run",
|
||||
"--rm",
|
||||
"--no-deps",
|
||||
"-v",
|
||||
str(ROOT / "operator-private/revoked-worker") + ":/run/old-worker:ro",
|
||||
"worker",
|
||||
"python",
|
||||
"-m",
|
||||
"messenger.revoked_probe",
|
||||
],
|
||||
output="revoked-identity.json",
|
||||
)
|
||||
else:
|
||||
run(
|
||||
[
|
||||
"docker",
|
||||
"compose",
|
||||
"run",
|
||||
"--rm",
|
||||
"--no-deps",
|
||||
"-e",
|
||||
"OTEL_ENABLED=0",
|
||||
"api",
|
||||
"python",
|
||||
"-m",
|
||||
"messenger.kdf_probe",
|
||||
],
|
||||
output="argon2-budget.json",
|
||||
)
|
||||
print(json.dumps({"probe": args.probe, "passed": True}))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
python3 scripts/stop_one.py
|
||||
@@ -0,0 +1,22 @@
|
||||
"""Map a process alias to its real container, then leave exactly it stopped."""
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
wanted = os.environ["TARGET_INSTANCE_ID"]
|
||||
ids = subprocess.check_output(["docker", "compose", "ps", "-q", "api"], text=True).split()
|
||||
for cid in ids:
|
||||
result = subprocess.run(
|
||||
["docker", "exec", cid, "python", "-c",
|
||||
"import urllib.request; r=urllib.request.urlopen('http://127.0.0.1:8080/health/live'); print(r.headers['X-Instance-Id'])"],
|
||||
text=True, capture_output=True, check=False,
|
||||
)
|
||||
if result.returncode == 0 and result.stdout.strip() == wanted:
|
||||
subprocess.run(["docker", "stop", "--time", "8", cid], check=True, stdout=subprocess.DEVNULL)
|
||||
receipt = {"stopped_container": cid, "instance_id": wanted}
|
||||
Path("evidence/last-stopped.json").write_text(json.dumps(receipt))
|
||||
print(json.dumps(receipt))
|
||||
break
|
||||
else:
|
||||
raise SystemExit("Target instance not found among this project's API containers")
|
||||
@@ -1,19 +1,5 @@
|
||||
# Модель угроз — заполнить
|
||||
# Модель угроз
|
||||
|
||||
## Активы и акторы
|
||||
Каноническая заполненная модель находится в [THREAT_MODEL.md](../THREAT_MODEL.md): активы/акторы,13конкретных сценариев, контролей и отрицательных проверок, границы и остаточный риск. [Матрица доверия](../contracts/trust-matrix.md) покрывает действующие business/telemetry/scrape/health/bootstrap/adminlinks.
|
||||
|
||||
TODO: пользовательские credentials/сессии, сообщения/вложения, service identities, CA/secrets, telemetry. Акторы: участник чата, посторонний пользователь, внешний клиент, скомпрометированный сервис, оператор. Опишите доступ атакующего и границы учебного стенда.
|
||||
|
||||
## Границы доверия
|
||||
|
||||
TODO: схема и ссылка на заполненную contracts/trust-matrix.md; публичные/внутренние интерфейсы, процессы, секреты и их выдача.
|
||||
|
||||
| Угроза и конкретный путь | Нарушаемый инвариант | Контроль | Отрицательный тест | Остаточное ограничение |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| TODO | TODO | TODO | TODO | TODO |
|
||||
|
||||
На 4 минимум 6 конкретных угроз. Не заменяйте сценарии словами «SQL injection», «безопасный Docker», «mTLS включён» без пути и проверки.
|
||||
|
||||
## Lifecycle и инциденты
|
||||
|
||||
TODO: bootstrap, expiry/renewal, revoke/rotation, компрометация identity, sealed OpenBao и восстановление. Указать владельца CA/unseal и способ защиты bootstrap credentials. Сопоставить scan findings с реальной применимостью и исправлением/остаточным риском.
|
||||
Lifecycle и владельцы CA/unseal, explicitoperatorinit/unseal/re-auth/rotation описаны в [RUNBOOK.md](../RUNBOOK.md). Применимость scanner findings и доступные исправления разобраны в [SECURITY_SCAN.md](../SECURITY_SCAN.md). Эксперимент компрометации worker и измеренные доказательства — в [REPORT.md](../REPORT.md).
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
"""Учебный REST-мессенджер."""
|
||||
@@ -0,0 +1,12 @@
|
||||
import os
|
||||
|
||||
import uvicorn
|
||||
|
||||
uvicorn.run(
|
||||
"messenger.app:app",
|
||||
host=os.getenv("APP_HOST", "0.0.0.0"),
|
||||
port=int(os.getenv("APP_PORT", "8080")),
|
||||
workers=1,
|
||||
access_log=False,
|
||||
timeout_graceful_shutdown=5,
|
||||
)
|
||||
@@ -0,0 +1,384 @@
|
||||
import base64
|
||||
import binascii
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
from contextlib import asynccontextmanager
|
||||
from threading import BoundedSemaphore
|
||||
from uuid import uuid4
|
||||
|
||||
from fastapi import Depends, FastAPI, Request, Response
|
||||
from fastapi.exceptions import RequestValidationError
|
||||
from fastapi.responses import JSONResponse
|
||||
from opentelemetry import propagate
|
||||
from opentelemetry.trace import SpanKind, Status, StatusCode
|
||||
from starlette.concurrency import run_in_threadpool
|
||||
from starlette.exceptions import HTTPException
|
||||
|
||||
from . import telemetry
|
||||
from .attachments import AttachmentService
|
||||
from .domain import Failure, boundary, identifier, page
|
||||
from .models import CreateChat, CreateMessage, CreateUser
|
||||
from .postgres import PostgresStore
|
||||
from .secrets_provider import refresh
|
||||
from .storage import ObjectStorage
|
||||
|
||||
logger = logging.getLogger("messenger")
|
||||
logging.basicConfig(level=os.getenv("LOG_LEVEL", "INFO"), format="%(message)s")
|
||||
INSTANCE_ID = telemetry.INSTANCE_ID
|
||||
|
||||
CODES = {
|
||||
400: "invalid_request",
|
||||
401: "unauthorized",
|
||||
404: "not_found",
|
||||
409: "conflict",
|
||||
413: "payload_too_large",
|
||||
415: "unsupported_media_type",
|
||||
429: "rate_limited",
|
||||
503: "unavailable",
|
||||
500: "internal_error",
|
||||
}
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app):
|
||||
app.state.telemetry = telemetry.setup("messenger-api")
|
||||
app.state.store = PostgresStore()
|
||||
app.state.telemetry.start_background(app.state.store)
|
||||
app.state.storage = ObjectStorage()
|
||||
app.state.attachments = AttachmentService(app.state.store, app.state.storage)
|
||||
app.state.upload_slots = BoundedSemaphore(1)
|
||||
logger.info(json.dumps({"event": "started", "storage": "postgres"}))
|
||||
yield
|
||||
logger.info(json.dumps({"event": "stopped"}))
|
||||
app.state.telemetry.close()
|
||||
app.state.storage.close()
|
||||
app.state.store.close()
|
||||
|
||||
|
||||
app = FastAPI(lifespan=lifespan, docs_url=None, redoc_url=None, openapi_url=None)
|
||||
|
||||
|
||||
def error(request, status, message, headers=None):
|
||||
return JSONResponse(
|
||||
{
|
||||
"error": {
|
||||
"code": CODES.get(status, "invalid_request"),
|
||||
"message": message,
|
||||
"request_id": request.state.request_id,
|
||||
}
|
||||
},
|
||||
status_code=status,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
|
||||
async def invalid_json_encoding(request: Request):
|
||||
path = request.url.path
|
||||
if request.method != "POST" or not (
|
||||
path in {"/api/v1/users", "/api/v1/chats"}
|
||||
or re.fullmatch(r"/api/v1/chats/[^/]+/messages", path)
|
||||
):
|
||||
return False
|
||||
raw = await request.body()
|
||||
try:
|
||||
raw.decode("utf-8")
|
||||
except UnicodeDecodeError:
|
||||
return True
|
||||
# Literal NUL is invalid JSON; it also prevents json.loads(bytes) from
|
||||
# autodetecting BOM-less UTF-16/32. Escaped JSON \u0000 remains valid.
|
||||
return b"\x00" in raw
|
||||
|
||||
|
||||
@app.middleware("http")
|
||||
async def request_log(request: Request, call_next):
|
||||
request.state.request_id = str(uuid4())
|
||||
start = time.perf_counter()
|
||||
observed = not request.url.path.startswith("/health/")
|
||||
if not observed:
|
||||
try:
|
||||
if request.url.path != "/health/live":
|
||||
await run_in_threadpool(refresh)
|
||||
response = await call_next(request)
|
||||
except Failure as exc:
|
||||
response = error(request, exc.status, exc.message, exc.headers)
|
||||
response.headers["X-Request-Id"] = request.state.request_id
|
||||
response.headers["X-Instance-Id"] = INSTANCE_ID
|
||||
return response
|
||||
method = (
|
||||
request.method
|
||||
if request.method in {"GET", "POST", "DELETE", "PUT", "PATCH", "HEAD", "OPTIONS"}
|
||||
else "OTHER"
|
||||
)
|
||||
context = propagate.extract(dict(request.headers))
|
||||
with telemetry.operation("HTTP " + method, context=context, kind=SpanKind.SERVER) as span:
|
||||
try:
|
||||
await run_in_threadpool(refresh)
|
||||
if (
|
||||
request.method == "POST"
|
||||
and request.url.path == "/api/v1/auth/sessions"
|
||||
and await request.body()
|
||||
):
|
||||
response = error(request, 400, "Вход не принимает тело запроса")
|
||||
elif await invalid_json_encoding(request):
|
||||
response = error(request, 400, "JSON должен быть закодирован в UTF-8")
|
||||
else:
|
||||
response = await call_next(request)
|
||||
except Failure as exc:
|
||||
response = error(request, exc.status, exc.message, exc.headers)
|
||||
except Exception:
|
||||
logger.error(
|
||||
json.dumps({"event": "unexpected_error", "request_id": request.state.request_id})
|
||||
)
|
||||
response = error(request, 500, "Внутренняя ошибка")
|
||||
response.headers["X-Request-Id"] = request.state.request_id
|
||||
response.headers["X-Instance-Id"] = INSTANCE_ID
|
||||
response.headers["X-Trace-Id"] = format(span.get_span_context().trace_id, "032x")
|
||||
response.headers["X-Trace-Sampled"] = "true" if span.is_recording() else "false"
|
||||
route = getattr(request.scope.get("route"), "path", "unknown")
|
||||
elapsed = time.perf_counter() - start
|
||||
attrs = {
|
||||
"method": method,
|
||||
"route": route,
|
||||
"status_class": str(response.status_code // 100) + "xx",
|
||||
}
|
||||
span.update_name(method + " " + route)
|
||||
span.set_attributes(
|
||||
{
|
||||
"http.request.method": method,
|
||||
"http.route": route,
|
||||
"http.response.status_code": response.status_code,
|
||||
}
|
||||
)
|
||||
if response.status_code >= 500:
|
||||
span.set_status(Status(StatusCode.ERROR, "server_error"))
|
||||
t = telemetry.current()
|
||||
if observed and t:
|
||||
t.requests.add(1, attrs)
|
||||
t.http_duration.record(elapsed, attrs)
|
||||
t.sampling.add(1, {"decision": "sampled" if span.is_recording() else "not_sampled"})
|
||||
logger.info(
|
||||
json.dumps(
|
||||
{
|
||||
"event": "request",
|
||||
"request_id": request.state.request_id,
|
||||
**attrs,
|
||||
"status": response.status_code,
|
||||
"duration_ms": round(elapsed * 1000, 3),
|
||||
}
|
||||
)
|
||||
)
|
||||
return response
|
||||
|
||||
|
||||
@app.exception_handler(Failure)
|
||||
async def domain_error(request, exc):
|
||||
return error(request, exc.status, exc.message, exc.headers)
|
||||
|
||||
|
||||
@app.exception_handler(RequestValidationError)
|
||||
async def validation_error(request, exc):
|
||||
return error(request, 400, "Неверный JSON или поля запроса")
|
||||
|
||||
|
||||
@app.exception_handler(HTTPException)
|
||||
async def http_error(request, exc):
|
||||
return error(request, exc.status_code, "Неверный запрос", exc.headers)
|
||||
|
||||
|
||||
def bearer_failure():
|
||||
return Failure(
|
||||
401, "Требуется действующая сессия", {"WWW-Authenticate": 'Bearer realm="messenger"'}
|
||||
)
|
||||
|
||||
|
||||
def bearer(request):
|
||||
parts = request.headers.get("Authorization", "").split()
|
||||
if len(parts) != 2 or parts[0].lower() != "bearer":
|
||||
raise bearer_failure()
|
||||
return parts[1]
|
||||
|
||||
|
||||
def actor(request: Request):
|
||||
user = request.app.state.store.authenticate(bearer(request))
|
||||
if user is None:
|
||||
raise bearer_failure()
|
||||
return user
|
||||
|
||||
|
||||
@app.post("/api/v1/auth/sessions", status_code=201)
|
||||
def login(request: Request):
|
||||
headers = {"WWW-Authenticate": 'Basic realm="messenger", charset="UTF-8"'}
|
||||
parts = request.headers.get("Authorization", "").split()
|
||||
try:
|
||||
if len(parts) != 2 or parts[0].lower() != "basic" or len(parts[1]) > 2048:
|
||||
raise ValueError
|
||||
decoded = base64.b64decode(parts[1], validate=True).decode("utf-8")
|
||||
username, password = decoded.split(":", 1)
|
||||
if not re.fullmatch(r"[a-z0-9_]{3,32}", username) or not 12 <= len(password) <= 128:
|
||||
raise ValueError
|
||||
except (ValueError, UnicodeError, binascii.Error):
|
||||
raise Failure(401, "Неверные учётные данные", headers) from None
|
||||
session = request.app.state.store.login(username, password)
|
||||
if session is None:
|
||||
raise Failure(401, "Неверные учётные данные", headers)
|
||||
return session
|
||||
|
||||
|
||||
@app.delete("/api/v1/auth/sessions/current", status_code=204)
|
||||
def logout(request: Request, user=Depends(actor)):
|
||||
if not request.app.state.store.logout(bearer(request)):
|
||||
raise bearer_failure()
|
||||
return Response(status_code=204)
|
||||
|
||||
|
||||
def pagination(request, scope):
|
||||
allowed = {"limit", "cursor"}
|
||||
if any(k not in allowed for k in request.query_params):
|
||||
raise Failure(400, "Неизвестный параметр запроса")
|
||||
if any(len(request.query_params.getlist(k)) > 1 for k in allowed):
|
||||
raise Failure(400, "Повторный параметр запроса")
|
||||
value = request.query_params.get("limit", "50")
|
||||
if len(value) > 3 or not re.fullmatch(r"[0-9]+", value) or not 1 <= int(value) <= 100:
|
||||
raise Failure(400, "limit должен быть целым от 1 до 100")
|
||||
return int(value), boundary(scope, request.query_params.get("cursor"))
|
||||
|
||||
|
||||
@app.get("/health/live")
|
||||
def live():
|
||||
return {"status": "ok"}
|
||||
|
||||
|
||||
@app.get("/health/ready")
|
||||
def ready(request: Request):
|
||||
if not request.app.state.store.ready() or not request.app.state.storage.ready():
|
||||
raise Failure(503, "Хранилище недоступно")
|
||||
return {"status": "ok"}
|
||||
|
||||
|
||||
@app.post("/api/v1/users", status_code=201)
|
||||
def register(data: CreateUser, request: Request):
|
||||
return request.app.state.store.register(data.model_dump(mode="json"))
|
||||
|
||||
|
||||
@app.get("/api/v1/users/me")
|
||||
def me(user=Depends(actor)):
|
||||
return user
|
||||
|
||||
|
||||
@app.post("/api/v1/chats", status_code=201)
|
||||
def create_chat(data: CreateChat, request: Request, user=Depends(actor)):
|
||||
return request.app.state.store.create_chat(user["id"], data.model_dump(mode="json"))
|
||||
|
||||
|
||||
@app.get("/api/v1/chats")
|
||||
def chats(request: Request, user=Depends(actor)):
|
||||
scope = "chats:" + user["id"]
|
||||
limit, after = pagination(request, scope)
|
||||
return page(request.app.state.store.list_chats(user["id"], after, limit), limit, scope)
|
||||
|
||||
|
||||
@app.get("/api/v1/chats/{chat_id}")
|
||||
def chat(chat_id: str, request: Request, user=Depends(actor)):
|
||||
return request.app.state.store.chat(user["id"], identifier(chat_id))
|
||||
|
||||
|
||||
@app.post("/api/v1/chats/{chat_id}/messages", status_code=201)
|
||||
def send(chat_id: str, data: CreateMessage, request: Request, user=Depends(actor)):
|
||||
key = request.headers.get("Idempotency-Key", "")
|
||||
if not re.fullmatch(r"[A-Za-z0-9._:-]{1,128}", key):
|
||||
raise Failure(400, "Требуется корректный Idempotency-Key")
|
||||
return request.app.state.store.send(
|
||||
user["id"], identifier(chat_id), data.text, key, [str(a) for a in data.attachment_ids]
|
||||
)
|
||||
|
||||
|
||||
@app.get("/api/v1/chats/{chat_id}/messages")
|
||||
def history(chat_id: str, request: Request, user=Depends(actor)):
|
||||
cid = identifier(chat_id)
|
||||
scope = "messages:" + cid
|
||||
limit, after = pagination(request, scope)
|
||||
return page(request.app.state.store.history(user["id"], cid, after, limit), limit, scope)
|
||||
|
||||
|
||||
@app.post("/api/v1/chats/{chat_id}/attachments", status_code=202)
|
||||
async def upload_attachment(chat_id: str, request: Request, user=Depends(actor)):
|
||||
import asyncio
|
||||
import tempfile
|
||||
|
||||
from starlette.concurrency import run_in_threadpool
|
||||
|
||||
from .attachments import MAX_BYTES, filename_valid
|
||||
|
||||
if (
|
||||
set(request.query_params) != {"filename"}
|
||||
or len(request.query_params.getlist("filename")) != 1
|
||||
):
|
||||
raise Failure(400, "Требуется одно имя файла")
|
||||
filename = filename_valid(request.query_params["filename"])
|
||||
cid = identifier(chat_id)
|
||||
await run_in_threadpool(request.app.state.store.chat, user["id"], cid)
|
||||
content_type = request.headers.get("content-type", "").lower()
|
||||
if content_type not in {"image/png", "image/jpeg"}:
|
||||
raise Failure(415, "Ожидается PNG или JPEG")
|
||||
if not request.app.state.upload_slots.acquire(blocking=False):
|
||||
raise Failure(429, "Все места загрузки заняты", {"Retry-After": "1"})
|
||||
try:
|
||||
with tempfile.SpooledTemporaryFile(max_size=256 * 1024) as spool:
|
||||
size = 0
|
||||
try:
|
||||
async with asyncio.timeout(15):
|
||||
async for chunk in request.stream():
|
||||
size += len(chunk)
|
||||
if size > MAX_BYTES:
|
||||
raise Failure(413, "Файл больше 10 MiB")
|
||||
spool.write(chunk)
|
||||
except TimeoutError:
|
||||
raise Failure(400, "Истекло время загрузки") from None
|
||||
spool.seek(0)
|
||||
return await run_in_threadpool(
|
||||
request.app.state.attachments.upload,
|
||||
user["id"],
|
||||
cid,
|
||||
filename,
|
||||
content_type,
|
||||
spool,
|
||||
size,
|
||||
)
|
||||
finally:
|
||||
request.app.state.upload_slots.release()
|
||||
|
||||
|
||||
@app.get("/api/v1/attachments/{attachment_id}")
|
||||
def attachment_metadata(attachment_id: str, request: Request, user=Depends(actor)):
|
||||
return request.app.state.attachments.metadata(user["id"], identifier(attachment_id))
|
||||
|
||||
|
||||
@app.get("/api/v1/attachments/{attachment_id}/content")
|
||||
def attachment_content(attachment_id: str, request: Request, user=Depends(actor)):
|
||||
from fastapi.responses import StreamingResponse
|
||||
|
||||
if (
|
||||
any(k != "variant" for k in request.query_params)
|
||||
or len(request.query_params.getlist("variant")) > 1
|
||||
):
|
||||
raise Failure(400, "Неверный вариант")
|
||||
variant = request.query_params.get("variant", "original")
|
||||
if variant not in {"original", "thumbnail", "crop", "optimized"}:
|
||||
raise Failure(400, "Неверный вариант")
|
||||
obj = request.app.state.attachments.content(user["id"], identifier(attachment_id), variant)
|
||||
|
||||
def chunks():
|
||||
try:
|
||||
while data := obj["Body"].read(64 * 1024):
|
||||
yield data
|
||||
finally:
|
||||
obj["Body"].close()
|
||||
|
||||
return StreamingResponse(
|
||||
chunks(),
|
||||
media_type=obj["ContentType"],
|
||||
headers={"Content-Length": str(obj["ContentLength"])},
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user