Complete lab 7 TLS and secret management
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Бахрам
2026-12-01 22:44:28 +03:00
parent 20afc2c790
commit 1df2202403
51 changed files with 3396 additions and 138 deletions
+27 -7
View File
@@ -1,13 +1,23 @@
PYTHON ?= python3
BASE_URL ?= https://localhost:8443
CA_FILE ?=
CA_FILE ?= .local/pki/external-ca.crt
ACTION_SCRIPT ?=
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
.PHONY: help check validate test load test-persistence test-failover test-security
.PHONY: help check validate bootstrap up down test test-security test-observability load test-persistence test-failover worker-flow verify
help:
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
@echo "bootstrap: create local PKI/secrets, initialize OpenBao and start the grade-3 stack"
@echo "check: offline contract checks; test: running API over verified HTTPS"
@echo "verify: full public and local negative checks; load: synthetic writes"
bootstrap:
$(PYTHON) scripts/bootstrap.py
up: bootstrap
down:
docker compose down
check:
$(PYTHON) scripts/check_contract.py
@@ -18,16 +28,26 @@ validate:
test:
$(PYTHON) tests/smoke.py --base-url "$(BASE_URL)" $(TLS_ARGS)
test-security:
$(PYTHON) tests/security.py --base-url "$(BASE_URL)" $(TLS_ARGS)
$(PYTHON) tests/security_runtime.py --base-url "$(BASE_URL)" --ca-file "$(CA_FILE)"
test-observability:
$(PYTHON) tests/observability.py
load:
$(PYTHON) tests/load.py --base-url "$(BASE_URL)" $(TLS_ARGS)
test-persistence:
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable restart hook"; exit 2)
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to scripts/restart.sh"; exit 2)
$(PYTHON) tests/resilience.py --mode persistence --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS)
test-failover:
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2)
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to scripts/stop-one.sh"; exit 2)
$(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS)
test-security:
$(PYTHON) tests/security.py --base-url "$(BASE_URL)" $(TLS_ARGS)
worker-flow:
$(PYTHON) tests/worker_flow.py --base-url "$(BASE_URL)" $(TLS_ARGS)
verify:
$(PYTHON) scripts/verify.py