forked from mtusi2026/mtusi2026lab7
feat: complete lab 7 grade 3 security controls
This commit is contained in:
@@ -16,12 +16,13 @@ COMPOSE = docker compose --project-name highload-lab7 --env-file .env -f compose
|
||||
.PHONY: app-init app-build app-up app-start app-stop app-down app-restart app-logs app-status
|
||||
.PHONY: app-migrate app-s3-bootstrap worker-start worker-stop queue-status attachments-cleanup
|
||||
.PHONY: jobs-failed jobs-replay jobs-upgrade jobs-cleanup-staging
|
||||
.PHONY: test-backend test-pipeline
|
||||
.PHONY: test-backend test-pipeline app-provision
|
||||
|
||||
.PHONY: help check validate test load test-persistence test-failover test-security
|
||||
|
||||
help:
|
||||
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
|
||||
@echo "app-provision: prepare dependencies and OpenBao before first startup"
|
||||
@echo "app-up: build and start the stand; app-status: inspect it; app-down: stop it"
|
||||
|
||||
check:
|
||||
@@ -51,15 +52,19 @@ app-init:
|
||||
$(PYTHON) scripts/init_env.py
|
||||
./scripts/bootstrap_tls.sh
|
||||
|
||||
app-provision: app-build
|
||||
$(COMPOSE) up -d openbao
|
||||
./scripts/provision_dependencies.sh
|
||||
|
||||
app-build: app-init
|
||||
$(COMPOSE) build
|
||||
|
||||
app-up: app-init
|
||||
$(COMPOSE) up -d --build --wait
|
||||
$(COMPOSE) up -d --build --wait --wait-timeout 120
|
||||
./scripts/wait_ingress.sh
|
||||
|
||||
app-start: app-init
|
||||
$(COMPOSE) up -d --no-build --wait
|
||||
$(COMPOSE) up -d --no-build --wait --wait-timeout 120
|
||||
./scripts/wait_ingress.sh
|
||||
|
||||
app-stop:
|
||||
@@ -96,19 +101,19 @@ attachments-cleanup:
|
||||
$(COMPOSE) run --rm --no-deps upload-cleanup ./messenger attachments-cleanup $(CLEANUP_ARGS)
|
||||
|
||||
jobs-failed:
|
||||
$(COMPOSE) exec -T dispatcher ./messenger jobs list-failed
|
||||
$(COMPOSE) run --rm -T job-admin ./messenger jobs list-failed
|
||||
|
||||
jobs-replay:
|
||||
@test -n "$$JOB_ID" && test -n "$$REASON" || { echo "Set JOB_ID=... REASON='...'"; exit 2; }
|
||||
$(COMPOSE) exec -T dispatcher ./messenger jobs replay "$$JOB_ID" "$$REASON"
|
||||
$(COMPOSE) run --rm -T job-admin ./messenger jobs replay "$$JOB_ID" "$$REASON"
|
||||
|
||||
jobs-upgrade:
|
||||
@test -n "$$ATTACHMENT_ID" && test -n "$$REASON" || { echo "Set ATTACHMENT_ID=... REASON='...'"; exit 2; }
|
||||
$(COMPOSE) exec -T dispatcher ./messenger jobs upgrade "$$ATTACHMENT_ID" 2 "$$REASON"
|
||||
$(COMPOSE) run --rm -T job-admin ./messenger jobs upgrade "$$ATTACHMENT_ID" 2 "$$REASON"
|
||||
|
||||
jobs-cleanup-staging:
|
||||
@test -n "$$JOB_ID" || { echo "Set JOB_ID=..."; exit 2; }
|
||||
$(COMPOSE) exec -T dispatcher ./messenger jobs cleanup-staging "$$JOB_ID"
|
||||
$(COMPOSE) run --rm -T job-admin ./messenger jobs cleanup-staging "$$JOB_ID"
|
||||
|
||||
test-backend: app-init
|
||||
$(COMPOSE) --profile test run --rm --build backend-tests
|
||||
|
||||
Reference in New Issue
Block a user