Commit Graph
40 Commits
Author SHA1 Message Date
ricoromaandClaude Opus 5.5 990cd9fd00 docs: archive vulnerability-scan and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 14:27:47 +03:00
ricoromaandClaude Opus 5.5 b45a913a07 fix: address vulnerability-scan re-verify findings
Hand pip-audit a marker-free requirements file built from the uv.lock
export so every lock entry is audited regardless of the operator
platform, and fail when a lock entry is missing from the pip-audit
output; fetch PyPI digests on daemon threads so an interrupted scan
exits at once; reshoot the vulnerable-lock control and name the fix
versions in the remaining triage records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 14:19:21 +03:00
ricoromaandClaude Opus 5.5 fe30334ee7 fix: address vulnerability-scan verify findings
Verify every uv.lock export hash against the PyPI file digests of its
release (pip-audit only requires hashes), fail on skipped dependencies
and on a root operator UID, export the dev group with all extras, state
the script and make exit codes like the other checks, bound Python
updates by pyproject.toml in the spec, name the fix versions in triage
records, cover the GSSENC path with a keytab control, and record the
RabbitMQ CLI listener false FAIL of hardening_check in KNOWN_ISSUES.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 13:40:06 +03:00
ricoromaandClaude Opus 5.5 b6eed88e95 feat: scan images and uv.lock for vulnerabilities with a triage file and patch-line updates
make scan runs pinned Trivy (by digest, no Docker socket, images as
docker save archives, network none, read-only) over every compose image
and the app image (also secrets in layers) and pinned pip-audit over the
uv.lock groups; every CRITICAL/HIGH image finding, secret and pip-audit
finding needs a triage record (verdict, reason, control, review date)
in infra/scan/triage.toml, otherwise a non-zero exit. Fixable findings
are updated within the patch line after a 7-day quarantine: PostgreSQL
and RabbitMQ rebuilds, Valkey 9.1.4, HAProxy 3.4.7, Loki 3.7.10, Python
3.12.15, certifi, dnspython, black, filelock, virtualenv.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 12:48:07 +03:00
ricoromaandClaude Opus 5.5 6a042f5327 docs: archive container-hardening and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 09:04:29 +03:00
ricoromaandClaude Opus 5.5 bcfad0c4f3 fix: address container-hardening re-verify findings
Recheck processes with a privilege sign in hardening-check and fail only
when the same process (PID and start time) keeps the sign in every scan,
so the transient runc process of any docker exec no longer gives a false
FAIL; run the root-write probe after the process probes. Name the second
Loki retention error form, fix the exit-code wording in the threat model
and record the live Loki retention probe in the evidence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 08:57:05 +03:00
ricoromaandClaude Opus 5.5 273d7ce1d8 fix: address container-hardening verify findings
Loki gets a /tmp tmpfs for its retention marks (the compactor failed on
the read-only root), hardening_check reads each container's log since
start for write errors, the fast test covers override mounts and the
driver and bench overrides, s3-bootstrap /data is narrowed to its user,
spec wording and docs are corrected, Tempo's exit 137 on stop is recorded
as a known issue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 06:30:11 +03:00
ricoromaandClaude Opus 5.5 157b878289 feat: drop capabilities, run read-only and non-root in every container, mTLS for the S3 gRPC gateway
Every service of the stand gets the x-hardening anchor (cap_drop ALL,
no-new-privileges, read-only root) with an empty exception table, tmpfs
with size limits, pids limits by measurement and non-root users for
PostgreSQL, Valkey, RabbitMQ and SeaweedFS. The S3 gateway gRPC accepts
only mTLS with the stand CA. make hardening_check checks inspect data,
processes and listeners against the compose model; a fast test keeps the
override files from removing restrictions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 05:23:13 +03:00
ricoromaandClaude Opus 5.5 3ef21c26d6 docs: archive openbao-tooling and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 00:22:46 +03:00
ricoromaandClaude Opus 5.5 6353889349 feat: run a per-run OpenBao for failure checks, bench, CI and driver stands
Every stand with its own storages now brings up its own OpenBao and acts
as its operator: materials live in the run's temporary directory and are
removed on any outcome; the working stand's OpenBao is never touched.

- make failure_checks: own OpenBao, 20 s / 60 s token roles, six new
  OpenBao fault checks, hook actions and the secrets log summary
- bao.py rewrite and waiting for the active node after unseal
- bench/: OpenBao in every fresh stand, "before" variants get secrets
  via ${...} references, passport stand.secrets and limits.openbao
- CI job: BAO_ADDRESS, run OpenBao operator, override with openbao,
  cleaner and migrate pairs, test_ci_override.py
- driver: shared temporary stand for freeze-lb and reconcile-signal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 18:21:57 +03:00
ricoromaandClaude Opus 5.5 f3f92dd581 docs: archive openbao-secrets and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 15:24:03 +03:00
ricoromaandClaude Opus 5.5 4dd73299cf fix: address openbao-secrets verify findings
bao_check now compares cert auth roles and policies in OpenBao with
the repository and tries every foreign identity against every role
and without a role name; API and migrations exit with code 2 on
invalid settings; stop-at-start runs its attempts next to the stand's
OpenBao again; openbao-outage checks the exit code, the record and
the restart; run_docker restarts only services started before seed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 15:17:57 +03:00
ricoromaandClaude Opus 5.5 64210dace0 feat: load process secrets from OpenBao via cert auth
OpenBao 2.7.3 (raft, TLS 1.3 with client certificates) holds the
PostgreSQL role passwords, the Valkey password and the S3 keys; each
process logs in with its own mTLS identity, reads only its paths and
renews its token in the background. Operator init, unseal, configure
and seed go through infra/openbao/bao.py and make bao_*; checks are
make bao_check and driver.py openbao-outage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:55:09 +03:00
ricoromaandClaude Opus 5.5 34fac19c27 docs: archive telemetry-backends-tls and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:37:33 +03:00
ricoromaandClaude Opus 5.5 eaa5bca796 fix: address telemetry-backends-tls verify findings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:34:03 +03:00
ricoromaandClaude Opus 5.5 1722fb0c35 feat: put telemetry backends, LB metrics and Grafana behind mTLS gateways
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 10:20:27 +03:00
ricoromaandClaude Opus 5.5 6e2c8df5fc docs: archive telemetry-mtls and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:51:54 +03:00
ricoromaandClaude Opus 5.5 97b6dc25f0 fix: address telemetry-mtls verify findings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:45:12 +03:00
ricoromaandClaude Opus 5.5 0a4f95eca7 feat: accept OTLP only through an mTLS gateway with an identity allowlist
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:49:58 +03:00
ricoromaandClaude Opus 5.5 9c998597f5 docs: archive messaging-telemetry-mtls and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:44:30 +03:00
ricoromaandClaude Opus 5.5 8236027e92 feat: require mTLS with certificate login for RabbitMQ and split relay and worker rights
Broker accepts only TLS 1.3 with a client certificate checked against the
stand CRL; login is EXTERNAL by certificate DNS SAN, broker passwords are
gone. Relay may declare its queue and publish, worker may only consume.
Definitions and TLS material checks come from infra/rabbitmq/start.sh;
temporary stands, CI, bench and the fault hook use the same mTLS identities.
Adds make broker_mtls_check [REPORT=1] and drops the rollback broker compose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:34:47 +03:00
ricoromaandClaude Opus 5.5 d1f4f39bba docs: archive storage-roles and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 16:25:44 +03:00
ricoromaandClaude Opus 5.5 c26a24d2ae fix: address storage-roles verify findings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 16:21:34 +03:00
ricoromaandClaude Opus 5.5 d5eaeb3183 feat: separate PostgreSQL roles and Valkey ACL per service
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 14:10:09 +03:00
ricoromaandClaude Opus 5.5 6b5df3ef2d docs: archive storage-tls and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 01:00:26 +03:00
ricoromaandClaude Opus 5.5 a1bfb8dde2 fix: address storage-tls verify findings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 00:55:33 +03:00
ricoromaandClaude Opus 5.5 8bca5543fd feat: require TLS to PostgreSQL, Valkey and S3
Storage servers accept only TLS 1.3 (pg_hba hostssl / hostnossl reject,
Valkey port 0, S3 gateway HTTPS only) with stand identities postgres,
valkey and s3. Clients trust only the stand CA from [client_tls] ca_file
and check the host name; no switch to disable verification. Processes
exit with code 2 without a CA or with an IP storage address. Temporary
stands, CI and bench/ run on TLS storages; make storage_tls_check adds
negative checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 21:17:49 +03:00
ricoromaandClaude Opus 5.5 c8ff10b949 docs: archive auth-hardening and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:54:52 +03:00
ricoromaandClaude Opus 5.5 3f4771c9d9 fix: address auth-hardening verify findings
Drop the body-limit rule from HAProxy (user decision 2026-11-18): the
replica middleware answers 400 with X-Instance-Id, tests require the
header again. Widen the failure_checks selection in the trust matrix,
name 13fdd18 in the evidence header, document Valkey LRU eviction of
login counters and the allowlist as trusted X-Forwarded-For senders,
check waited_ms of KDF budget rejections in the queue scenario.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:31:57 +03:00
ricoromaandClaude Opus 5.5 3a98a0e702 fix: record replica death and OOM in the login bench profile
The first baseline attempt on 13fdd18 lost CPU and peak memory of the
"before" variant: its replicas died inside the window and the profile
did not notice. Poll memory.peak during the window, inspect replicas
after it (OOMKilled, exit code, time of death), add oom / replica_died
marks and base H4 on them. The attempt is kept out of git and recorded
in QUESTIONS.md; the label is retaken as baseline2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:29:14 +03:00
ricoromaandClaude Opus 5.5 13fdd187c6 feat: harden authentication (Argon2id by measurement, login limits, body limit)
Apply auth-hardening up to the bench_login label: Argon2id parameters
from [auth] chosen by driver.py argon2-params (m=64 MiB, t=2, p=1),
rehash on login, per-process KDF budget with 429, shared login failure
limit in Valkey with a local fallback, X-Forwarded-For from HAProxy,
64 KiB body limit (400) in LB and middleware, bench login profile,
tests, threat model and trust matrix rows. Hypotheses H1-H4 are
committed here before the baseline label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:52:48 +03:00
ricoromaandClaude Opus 5.5 56ccb79451 docs: archive https-tooling and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:14:10 +03:00
ricoromaandClaude Opus 5.5 74e8e8fec2 fix: address https-tooling verify findings
Disable TLS 1.3 session tickets on the API so an aborted upload body
frees its slot at once; k6 trusts only the run CA.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:40:25 +03:00
ricoromaandClaude Opus 5.5 b2ca2ae5d9 feat: run isolated tests, fault stand, CI and bench over HTTPS and mTLS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:08:47 +03:00
ricoromaandClaude Opus 5.5 899ff889e2 docs: archive pki-ingress-mtls and sync its specs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 04:57:16 +03:00
ricoromaandClaude Opus 5.5 99b8d1b8d4 fix: address verify remarks for pki-ingress-mtls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 04:49:45 +03:00
ricoromaandClaude Opus 5.5 2649eb24b4 wip: fix verify remarks for pki-ingress-mtls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 11:58:12 +03:00
ricoromaandClaude Opus 5.5 50cb54f0a1 feat: implement pki-ingress-mtls
Local CA script, HTTPS ingress on :8443, mandatory mTLS LB -> API
with an identity allowlist, separate health listener, random
X-Instance-Id alias; tests, hooks and driver over HTTPS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 11:38:32 +03:00
ricoromaandClaude Opus 5.5 f8f66ddd0b chore: plan lab 7 and point bench before-commits at the lab 7 port
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 04:13:37 +03:00
ricoromaandClaude Opus 5.5 089d78609d chore: port lab 6 solution into the lab 7 skeleton
Source: mtusi2026lab6-safronov, solution/bvt2301-safronov, 6c6a065.
Files follow AGENTS.md, "Переход в следующую лабу". Contracts, public
tests, README, REPORT and evidence of lab 6 are not carried over; infra
and scripts of the lab 7 skeleton stay as they are.
Makefile is the lab 6 one with the lab 7 skeleton part restored
(HTTPS BASE_URL on 8443, test-security); .gitignore and .dockerignore
are taken from lab 6 because both skeletons have the same files;
.env.example is the lab 6 one without changes.
The compose project, image and CI prefix are renamed to lab7, and
references to the previous lab now name lab6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 03:59:04 +03:00