?? 7 - mTLS, OpenBao ? lifecycle ???????????? #28

Open
Mirariel wants to merge 3 commits from Mirariel/mtusi2026lab7:solution/bpi2303-martines into main
First-time contributor

????? - ???????????? 7

  • ?????: ???????? ?????????, ???2303
  • ??????? ??????: 4
  • ???????: ??????? TLS, ???????????? HAProxy?API mTLS, persistent OpenBao ? ??????????? policies, PKI bootstrap/rotation, observability, S3 ? durable worker.

??????

python scripts/bootstrap.py
docker compose up -d --build --wait
python tests/smoke.py --base-url https://127.0.0.1:8443 --ca-file certs/ca.crt
python student-tests/security.py

????????? ??? ???????? ??????? ??????: docker compose down. ??? ??????????? ???????? ??????: docker compose down -v.

??????????? ? ????????????

HAProxy ????????? ?????????? HTTPS ?? 8443 ? API-???? ??????? TLS client certificate. HAProxy ??????????? ????????? lb-client ??????????, ? API certificate verification ?????????? ????? CA. ?????? API-????? ?? ??????????? ?? host. PostgreSQL, Redis ? MinIO ?? ????????? data-????? ?? host. ??????????? ???????????? scripts/bootstrap.py ? SAN ? ???????? leaf TTL; ????????? ????? ???????????? Git. ??????? ??????? ????????? ? contracts/trust-matrix.md.

OpenBao ??????????? server mode ? file-backed persistent volume, ??? dev-mode, ? ????? ????????? API/worker policies. ????????????? ? unseal ??????????? ?????????? ?? scripts/openbao-bootstrap.md; root token ? unseal keys ?? ???????? ? ?????????? ??? Git.

??????????????

???????? ??????? ?????????
???????????? docker compose config --quiet PASS
????????? Python python -m compileall -q src scripts student-tests PASS
Public API python tests/smoke.py --base-url https://127.0.0.1:8443 --ca-file certs/ca.crt PASS: lab7 public API scenario
TLS trust boundary python student-tests/security.py trusted cert accepted; untrusted cert rejected
Internal mTLS python student-tests/mtls.py no client certificate rejected; LB identity accepted
Infrastructure docker compose up -d --build --wait db, redis, minio, 2 API, HAProxy, worker, Prometheus, Grafana healthy

???????????

OpenBao init/unseal ? ?????? AppRole ???????? ???????????? ??????????, ?????? ??? root token ? unseal keys ?????? ???????????????? ? ???????????. ??? production ????? ???????? TLS listener OpenBao, ???????? ????????? CA ?? ??????????? PKI ? ?????????? API/worker ? AppRole ????? short-lived wrapped credentials. ??? ??????? ???? ???????, ? ?? ?????? ?? ??????? smoke-??????.

# ????? - ???????????? 7 - ?????: ???????? ?????????, ???2303 - ??????? ??????: 4 - ???????: ??????? TLS, ???????????? HAProxy?API mTLS, persistent OpenBao ? ??????????? policies, PKI bootstrap/rotation, observability, S3 ? durable worker. ## ?????? ```text python scripts/bootstrap.py docker compose up -d --build --wait python tests/smoke.py --base-url https://127.0.0.1:8443 --ca-file certs/ca.crt python student-tests/security.py ``` ????????? ??? ???????? ??????? ??????: `docker compose down`. ??? ??????????? ???????? ??????: `docker compose down -v`. ## ??????????? ? ???????????? HAProxy ????????? ?????????? HTTPS ?? `8443` ? API-???? ??????? TLS client certificate. HAProxy ??????????? ????????? `lb-client` ??????????, ? API certificate verification ?????????? ????? CA. ?????? API-????? ?? ??????????? ?? host. PostgreSQL, Redis ? MinIO ?? ????????? data-????? ?? host. ??????????? ???????????? `scripts/bootstrap.py` ? SAN ? ???????? leaf TTL; ????????? ????? ???????????? Git. ??????? ??????? ????????? ? `contracts/trust-matrix.md`. OpenBao ??????????? server mode ? file-backed persistent volume, ??? dev-mode, ? ????? ????????? API/worker policies. ????????????? ? unseal ??????????? ?????????? ?? `scripts/openbao-bootstrap.md`; root token ? unseal keys ?? ???????? ? ?????????? ??? Git. ## ?????????????? | ???????? | ??????? | ????????? | |---|---|---| | ???????????? | `docker compose config --quiet` | PASS | | ????????? Python | `python -m compileall -q src scripts student-tests` | PASS | | Public API | `python tests/smoke.py --base-url https://127.0.0.1:8443 --ca-file certs/ca.crt` | `PASS: lab7 public API scenario` | | TLS trust boundary | `python student-tests/security.py` | trusted cert accepted; untrusted cert rejected | | Internal mTLS | `python student-tests/mtls.py` | no client certificate rejected; LB identity accepted | | Infrastructure | `docker compose up -d --build --wait` | db, redis, minio, 2 API, HAProxy, worker, Prometheus, Grafana healthy | ## ??????????? OpenBao init/unseal ? ?????? AppRole ???????? ???????????? ??????????, ?????? ??? root token ? unseal keys ?????? ???????????????? ? ???????????. ??? production ????? ???????? TLS listener OpenBao, ???????? ????????? CA ?? ??????????? PKI ? ?????????? API/worker ? AppRole ????? short-lived wrapped credentials. ??? ??????? ???? ???????, ? ?? ?????? ?? ??????? smoke-??????.
Mirariel added 2 commits 2026-11-20 20:39:32 +03:00
Implement lab 7 TLS trust boundary
Skeleton contracts / contracts (pull_request) Blocked by required conditions
1416ea25e2
Implement lab 7 mTLS OpenBao and certificate rotation
Skeleton contracts / contracts (pull_request) Blocked by required conditions
1b10180092
Mirariel added 1 commit 2026-11-20 20:59:18 +03:00
Wire API and worker secrets through OpenBao AppRole
Skeleton contracts / contracts (pull_request) Blocked by required conditions
10aa0bf55a
Some checks are pending
1 workflow awaiting approval

The workflow will only run after approval from the repository maintainer.

Skeleton contracts / contracts (pull_request) Blocked by required conditions
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u https://gitea.privcloud.tech/Mirariel/mtusi2026lab7 solution/bpi2303-martines:Mirariel-solution/bpi2303-martines
git checkout Mirariel-solution/bpi2303-martines
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mtusi2026/mtusi2026lab7#28