Commit Graph
28 Commits
Author SHA1 Message Date
ricoromaandClaude Opus 5.5 f35a888ae6 docs: record the clean clone check and close the lab 7 plan
Skeleton contracts / contracts (push) Failing after 31s
Application / application (push) Successful in 13m42s
Record the clean clone check of 274ccbd in evidence/tests/clean-clone.md:
own compose project on shifted ports and its own operator PKI, make
run_docker created the CA, initialized and unsealed OpenBao by itself,
then check, test, test-security, student_test (235 passed),
test-persistence, test-failover and validate all exited 0, with no
secret values in the logs. Fill the remaining report cells from it.

Remove PLAN.md now that every change and the last step are closed, as
its header says; point AGENTS.md, the reference and the bench rule to
git show 274ccbd:PLAN.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 08:53:36 +03:00
ricoromaandClaude Opus 5.5 274ccbd85a docs: fill the lab 7 report and record the full failure_checks run
Fill every template section of REPORT.md: header, clean clone startup with
operator steps, architecture, one criteria row per rubric item, label and
fault experiments, limitations and AI usage. The clean clone results are
still marked and follow in the next commit.

Record the full make failure_checks on c305d4a (166 passed, fault 0,
postgres 0, secrets 0) in the track1 evidence, and the unexplained TLS
handshake drop of test_pool_keeps_connections in KNOWN_ISSUES.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 08:36:46 +03:00
ricoromaandClaude Opus 5.5 c305d4a4ed test: make the staging outage check independent of earlier mismatched rows
Skeleton contracts / contracts (push) Failing after 27s
Application / application (push) Successful in 13m33s
test_staging_cleanup_survives_outage relied on an empty cleaner queue,
which the storage-consistency delta of track1-worker-compromise
(decision 7) no longer provides: ready rows whose original does not
match stay staging candidates on every pass, candidates go by
(updated_at, id), and an S3 outage stops the pass at the first one.
Age the test row by a day so it is the oldest candidate and drop the
drain step; the scenario checks are unchanged.

Record the red and green runs and the full failure_checks run in the
track1 evidence, the per-pass re-read of mismatched originals in
KNOWN_ISSUES and the report, and the decision in QUESTIONS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 07:11:03 +03:00
ricoromaandClaude Opus 5.5 5799d9af33 docs: record clean uploads label baseline2 as the main uploads evidence
Skeleton contracts / contracts (push) Failing after 38s
Application / application (push) Successful in 14m16s
- bench_uploads baseline2 on 0ca9e31 (code 0d84af0), dirty: false, 72/72
- H1-H4 verdicts match baseline (H1 no, H2 no, H3 yes, H4 yes); baseline stays as a dirty repeat

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 06:07:56 +03:00
ricoromaandClaude Opus 5.5 0ca9e31534 docs: record final login, uploads and queue labels and the track1 drill on updated images
Skeleton contracts / contracts (push) Failing after 31s
Application / application (push) Successful in 14m15s
- bench_login baseline2, bench_uploads baseline, bench_queue baseline4 on 0d84af0
- worker_compromise and three controls on HAProxy 3.4.8, PostgreSQL 18.7, Python 3.12.16
- full failure_checks: test_staging_cleanup_survives_outage failed, cause under analysis

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 05:15:57 +03:00
ricoromaandClaude Opus 5.5 7233d9af95 chore: update HAProxy 3.4.8, PostgreSQL 18.7 and Python 3.12.16 pins before soak end
Skeleton contracts / contracts (push) Failing after 29s
Application / application (push) Failing after 15m45s
- user decision 2026-12-02: no waiting for the 7-day soak, one-time exception
- drop triage entries the updates fixed (zlib, apt, krb5)
- record the CRL decision for storage clients and the fresh-image risk

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 21:22:41 +03:00
ricoromaandClaude Opus 5.5 bb20855f34 docs: review vulnerability triage on 2026-12-02 and defer pin updates to soak end
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:27:36 +03:00
ricoromaandClaude Opus 5.5 5a9721876e fix: address track1-worker-compromise verify findings
- restore a verified row by fact: three variants give ready, otherwise
  failed with a known code instead of ready without content
- check trigger functions are not SECURITY DEFINER and pin search_path
- record the working stand comparison, the permanent drill lock file and
  the remaining SeaweedFS details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:50:36 +03:00
ricoromaandClaude Opus 5.5 55959e3805 docs: record the track1-worker-compromise drill in evidence and the report
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 04:20:53 +03:00
ricoromaandClaude Opus 5.5 452c5953b8 fix: address rotation-revocation narrow verify findings
Name restarting both the LB and the replicas when the LB has no ready
replica, state the measured 25 s bound of the LB metrics port, narrow the
missing files of a held identity to its certificate, and cover refusals
and signals during CRL issue with fast tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:45:36 +03:00
ricoromaandClaude Opus 5.5 10973231a0 fix: address rotation-revocation control verify findings
Keep the hold mark of an identity whose revocation has started whatever
signal ends pki.sh, refuse every rotation command while the files of a
held identity are missing, bound the handshake of the LB metrics port,
name sessions of another password until verify ends, and run Makefile
prerequisites in order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:19:42 +03:00
ricoromaandClaude Opus 5.5 d4a882ddd6 fix: address rotation-revocation re-verify findings
Name only the repeat of rotate_secret while sessions of the previous
PostgreSQL password may stay open, compare KV version time with the
container start when the load record is gone, refuse run_docker and
rolling_update next to a running rotation, defer SIGQUIT, and name the
remaining windows and cases in the trust matrix and threat model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 12:40:25 +03:00
ricoromaandClaude Opus 5.5 6b637109de fix: address rotation-revocation verify findings
Close handshakes and logins that started before a revocation or a
password change, converge after a failure in any phase, survive a closed
terminal, lock parallel commands and make the drill detect a dead load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:11:17 +03:00
ricoromaandClaude Opus 5.5 c40fbef36a feat: rotate and revoke credentials on the running stand
Add operator commands for leaf and secret rotation, identity revocation
and CRL renewal without rebuilding images, and a drill under load.
A rejected PostgreSQL role password is now 503 instead of 500.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 06:46:55 +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 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 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 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 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 fa5ba51d6a fix: delete login counters that drop to zero
A reserve returned after a KDF budget rejection or 503 left a zero key
in Valkey until the end of the window, so a flood with new usernames
created keys past the address limit and could evict real counters.
SETTLE_SCRIPT and LocalLoginLimiter now delete a counter at zero.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:42:25 +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 c0971cffe6 docs: move the full bench_login label to the last step of the lab
User decision 2026-11-17: the 35-minute baseline2 label and its H1-H4
verdicts are taken with the other long measurements on a quiet host.
Apply auth-hardening closes without them; tasks 9.4 and 11.3 keep the
moved part as a note, PLAN.md lists it in the last step (decision 10).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:38:52 +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
Mikhail Verkovykh 20afc2c790 Подготовить skeleton лабораторной 7 по мессенджеру 2026-09-10 18:01:36 +03:00