lab7: PKI, mTLS infra, OpenBao non-dev, hardening, lifecycle scripts
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
PYTHON ?= python3
|
||||
BASE_URL ?= https://localhost:8443
|
||||
CA_FILE ?=
|
||||
CA_FILE ?= $(if $(wildcard $(CURDIR)/secrets/pki/ca.crt),$(CURDIR)/secrets/pki/ca.crt,)
|
||||
ACTION_SCRIPT ?=
|
||||
PROMETHEUS_URL ?= http://localhost:9090
|
||||
GRAFANA_URL ?= http://localhost:3000
|
||||
PROMETHEUS_URL ?= https://localhost:9090
|
||||
GRAFANA_URL ?= https://localhost:3000
|
||||
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
|
||||
CURL_TLS_ARGS = $(if $(CA_FILE),--cacert "$(CA_FILE)",)
|
||||
LAB6_ARGS = --base-url "$(BASE_URL)" --prometheus-url "$(PROMETHEUS_URL)" --grafana-url "$(GRAFANA_URL)" $(TLS_ARGS)
|
||||
|
||||
.PHONY: help check validate test load test-persistence test-failover test-security test-dependencies stand-up stand-down stand-status wait-ready init-env test-e2e s3-security consistency bench lab5-demo lab5-faults lab5-track2 jobs lab6-ready lab6-signals lab6-correlate lab6-redaction lab6-history lab6-incident-worker lab6-incident-db lab6-incident-telemetry lab6-track1
|
||||
.PHONY: help check validate test load test-persistence test-failover test-security test-dependencies \
|
||||
bootstrap unseal stand-up stand-down stand-status wait-ready init-env test-e2e s3-security consistency bench \
|
||||
lab5-demo lab5-faults lab5-track2 jobs \
|
||||
lab6-ready lab6-signals lab6-correlate lab6-redaction lab6-history lab6-incident-worker lab6-incident-db lab6-incident-telemetry lab6-track1 \
|
||||
lab7-tls-audit lab7-app-security lab7-openbao lab7-hardening lab7-track1
|
||||
|
||||
help:
|
||||
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes; test-security: external TLS check; init-env: .env + secrets; test-e2e: app e2e"
|
||||
@echo "check: offline structure; validate: OpenAPI; bootstrap: PKI + OpenBao + stand-up; unseal: operator OpenBao unseal; test: smoke; test-security: external TLS; lab7-*: Lab 7 security & Track 1 suites"
|
||||
|
||||
check:
|
||||
$(PYTHON) scripts/check_contract.py
|
||||
@@ -42,6 +46,17 @@ COMPOSE = docker compose --env-file $(COMPOSE_ENV_FILE)
|
||||
test-dependencies:
|
||||
cd app && E2E_COMPOSE_DIR="$(CURDIR)" E2E_COMPOSE_ENV_FILE="$(COMPOSE_ENV_FILE)" npm run test:dependencies
|
||||
|
||||
bootstrap:
|
||||
./scripts/init-env.sh
|
||||
./scripts/pki-bootstrap.sh
|
||||
$(COMPOSE) up -d volumes-init openbao postgres redis s3 broker
|
||||
$(COMPOSE) up -d --no-recreate --wait postgres redis s3 broker
|
||||
./scripts/openbao-bootstrap.sh
|
||||
$(COMPOSE) up -d --build --wait
|
||||
|
||||
unseal:
|
||||
./scripts/openbao-unseal.sh
|
||||
|
||||
stand-up:
|
||||
$(COMPOSE) up -d --build --wait
|
||||
|
||||
@@ -113,3 +128,18 @@ lab6-incident-telemetry:
|
||||
|
||||
lab6-track1:
|
||||
$(PYTHON) scripts/lab6/track1.py $(LAB6_ARGS)
|
||||
|
||||
lab7-tls-audit:
|
||||
$(PYTHON) scripts/lab7/tls_audit.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
lab7-app-security:
|
||||
$(PYTHON) scripts/lab7/app_security.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
lab7-openbao:
|
||||
$(PYTHON) scripts/lab7/openbao_lifecycle.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
lab7-hardening:
|
||||
$(PYTHON) scripts/lab7/hardening_audit.py
|
||||
|
||||
lab7-track1:
|
||||
$(PYTHON) scripts/lab7/track1_worker_compromise.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
Reference in New Issue
Block a user