This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"stopped": [
|
||||
"api-a"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "python3 tests/resilience.py --mode failover --action-script \"scripts/stop-one.sh\" --base-url \"https://localhost:18443\" --ca-file \"/Users/garfieldmk/Desktop/study/highLoad/mtusi2026lab7/secrets/ca.crt\"\nExecuting explicit failover hook; hook output suppressed to avoid leaking secrets.\n{\"observed_instances_before\": 2, \"successful_writes\": 90, \"failed_attempts\": 2, \"first_recovery_seconds\": 2.58}\nPASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.\n"
|
||||
},
|
||||
{
|
||||
"stopped": [
|
||||
"api-b"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "python3 tests/resilience.py --mode failover --action-script \"scripts/stop-one.sh\" --base-url \"https://localhost:18443\" --ca-file \"/Users/garfieldmk/Desktop/study/highLoad/mtusi2026lab7/secrets/ca.crt\"\nExecuting explicit failover hook; hook output suppressed to avoid leaking secrets.\n{\"observed_instances_before\": 2, \"successful_writes\": 108, \"failed_attempts\": 1, \"first_recovery_seconds\": 2.573}\nPASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.\n"
|
||||
}
|
||||
],
|
||||
"both_replicas_tested": true
|
||||
}
|
||||
@@ -3,40 +3,40 @@
|
||||
"command": "make test-persistence ACTION_SCRIPT=scripts/restart.sh",
|
||||
"services": {
|
||||
"postgres": {
|
||||
"before": "2026-11-07T11:21:11.514449215Z",
|
||||
"after": "2026-11-07T11:31:51.644584012Z"
|
||||
"before": "2026-11-07T18:37:40.342662055Z",
|
||||
"after": "2026-11-07T18:40:29.165485675Z"
|
||||
},
|
||||
"s3": {
|
||||
"before": "2026-11-07T11:21:14.448491467Z",
|
||||
"after": "2026-11-07T11:31:54.493811096Z"
|
||||
"before": "2026-11-07T18:37:40.258400055Z",
|
||||
"after": "2026-11-07T18:40:32.078899093Z"
|
||||
},
|
||||
"broker": {
|
||||
"before": "2026-11-07T11:21:12.477210382Z",
|
||||
"after": "2026-11-07T11:31:52.565561429Z"
|
||||
"before": "2026-11-07T18:37:40.181643097Z",
|
||||
"after": "2026-11-07T18:40:30.133283175Z"
|
||||
},
|
||||
"openbao": {
|
||||
"before": "2026-11-07T11:21:11.728365965Z",
|
||||
"after": "2026-11-07T11:31:51.983157637Z"
|
||||
"before": "2026-11-07T18:37:25.793975132Z",
|
||||
"after": "2026-11-07T18:40:29.375343008Z"
|
||||
},
|
||||
"prometheus": {
|
||||
"before": "2026-11-07T11:21:11.498290965Z",
|
||||
"after": "2026-11-07T11:31:51.625424303Z"
|
||||
"before": "2026-11-07T18:37:40.556532722Z",
|
||||
"after": "2026-11-07T18:40:29.121133508Z"
|
||||
},
|
||||
"loki": {
|
||||
"before": "2026-11-07T11:21:14.486210217Z",
|
||||
"after": "2026-11-07T11:31:53.332075471Z"
|
||||
"before": "2026-11-07T18:37:40.63945868Z",
|
||||
"after": "2026-11-07T18:40:30.996157426Z"
|
||||
},
|
||||
"tempo": {
|
||||
"before": "2026-11-07T11:21:13.305379716Z",
|
||||
"after": "2026-11-07T11:31:52.261244679Z"
|
||||
"before": "2026-11-07T18:37:40.724841472Z",
|
||||
"after": "2026-11-07T18:40:30.060878259Z"
|
||||
},
|
||||
"api-a": {
|
||||
"before": "2026-11-07T11:21:36.434313963Z",
|
||||
"after": "2026-11-07T11:32:15.545949676Z"
|
||||
"before": "2026-11-07T18:39:11.623110833Z",
|
||||
"after": "2026-11-07T18:40:53.924133089Z"
|
||||
},
|
||||
"api-b": {
|
||||
"before": "2026-11-07T11:21:36.45464788Z",
|
||||
"after": "2026-11-07T11:32:15.598332884Z"
|
||||
"before": "2026-11-07T18:39:11.708902667Z",
|
||||
"after": "2026-11-07T18:40:53.958697422Z"
|
||||
}
|
||||
},
|
||||
"test_output": "python3 tests/resilience.py --mode persistence --action-script \"scripts/restart.sh\" --base-url \"https://localhost:18443\" --ca-file \"/Users/garfieldmk/Desktop/study/highLoad/mtusi2026lab7/secrets/ca.crt\"\nExecuting explicit persistence hook; hook output suppressed to avoid leaking secrets.\nPASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence."
|
||||
|
||||
@@ -0,0 +1,232 @@
|
||||
{
|
||||
"time": "2026-11-07T18:39:57.470382+00:00",
|
||||
"results": [
|
||||
{
|
||||
"test": "structure",
|
||||
"command": [
|
||||
"make",
|
||||
"check"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "python3 scripts/check_contract.py\nPASS: offline skeleton structure, local refs and Python syntax; application NOT tested.\n"
|
||||
},
|
||||
{
|
||||
"test": "smoke",
|
||||
"command": [
|
||||
"make",
|
||||
"test"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "python3 tests/smoke.py --base-url \"https://localhost:18443\" --ca-file \"/Users/garfieldmk/Desktop/study/highLoad/mtusi2026lab7/secrets/ca.crt\"\nPASS: lab7 public API scenario; infrastructure and grading evidence remain separate.\n"
|
||||
},
|
||||
{
|
||||
"test": "external TLS",
|
||||
"command": [
|
||||
"make",
|
||||
"test-security"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "python3 tests/security.py --base-url \"https://localhost:18443\" --ca-file \"/Users/garfieldmk/Desktop/study/highLoad/mtusi2026lab7/secrets/ca.crt\"\nPASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.\n"
|
||||
},
|
||||
{
|
||||
"test": "mTLS",
|
||||
"command": [
|
||||
"sh",
|
||||
"scripts/test-internal-mtls.sh"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS api-a: valid identity accepted; no cert, foreign CA and wrong role rejected; direct API closed\nPASS api-b: valid identity accepted; no cert, foreign CA and wrong role rejected; direct API closed\n"
|
||||
},
|
||||
{
|
||||
"test": "access log redaction",
|
||||
"command": [
|
||||
"python3",
|
||||
"student-tests/ingress_redaction.py"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS: ingress/API access records present; query, path and header markers absent\n"
|
||||
},
|
||||
{
|
||||
"test": "ACL expiry hostname",
|
||||
"command": [
|
||||
"python3",
|
||||
"student-tests/lab7_security.py",
|
||||
"--base-url",
|
||||
"https://localhost:18443",
|
||||
"--ca-file",
|
||||
"/Users/garfieldmk/Desktop/study/highLoad/mtusi2026lab7/secrets/ca.crt"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS: wrong hostname rejected; cross-chat attachment denied; expired session rejected\n"
|
||||
},
|
||||
{
|
||||
"test": "api-a openbao_policy",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"api-a",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS api: own path allowed; other path and policy write denied\n"
|
||||
},
|
||||
{
|
||||
"test": "api-a service_permissions",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"api-a",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS api: DB identity and denied privilege; broker denied unauthorized operation\n"
|
||||
},
|
||||
{
|
||||
"test": "api-a s3_prefix_permissions",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"api-a",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS api: allowed staging write; forbidden prefix denied\nPASS api: duplicate Authorization denied\n"
|
||||
},
|
||||
{
|
||||
"test": "worker openbao_policy",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"worker",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS worker: own path allowed; other path and policy write denied\n"
|
||||
},
|
||||
{
|
||||
"test": "worker service_permissions",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"worker",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS worker: DB identity and denied privilege; broker denied unauthorized operation\n"
|
||||
},
|
||||
{
|
||||
"test": "worker s3_prefix_permissions",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"worker",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS worker: allowed staging write; forbidden prefix denied\nPASS worker: duplicate Authorization denied\n"
|
||||
},
|
||||
{
|
||||
"test": "postgres_tls",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"api-a",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS: PostgreSQL TLS verified, plaintext and untrusted CA rejected\n"
|
||||
},
|
||||
{
|
||||
"test": "dependency_tls",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"api-a",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS s3: verified TLS; untrusted CA rejected\nPASS broker: verified TLS; untrusted CA rejected\nPASS openbao: verified TLS; untrusted CA rejected\nPASS: S3 internal and broker plaintext ports are closed\nPASS: S3 proxy blocks POST\n"
|
||||
},
|
||||
{
|
||||
"test": "telemetry_tls",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"api-a",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS: Collector publisher accepted; no cert and wrong role rejected; local listener closed\n"
|
||||
},
|
||||
{
|
||||
"test": "lab7_limits",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"api-a",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "{\"timestamp\": \"2026-11-07T18:39:56.443007+00:00\", \"severity\": \"INFO\", \"service.name\": \"messenger-api\", \"event\": \"http.request\", \"trace_id\": \"ed16f2869c1055cfa8eba8a2c8ddcc26\", \"span_id\": \"3322ff50bd52d312\", \"request_id\": \"791140e4-e019-4902-8943-715409df0a3a\", \"method\": \"POST\", \"route\": \"unmatched\", \"status\": 413}\n.{\"timestamp\": \"2026-11-07T18:39:56.447785+00:00\", \"severity\": \"INFO\", \"service.name\": \"messenger-api\", \"event\": \"http.request\", \"trace_id\": \"8ee51e4ac84311da20f7e9bf76cd8dbc\", \"span_id\": \"5d24a10e81cf49e1\", \"request_id\": \"b009f765-9103-4510-b4a8-452388d746c1\", \"method\": \"POST\", \"route\": \"/api/v1/auth/sessions\", \"status\": 401}\n{\"timestamp\": \"2026-11-07T18:39:56.448485+00:00\", \"severity\": \"INFO\", \"service.name\": \"messenger-api\", \"event\": \"http.request\", \"trace_id\": \"7cf78e312d771b81e3296f8d0f396c72\", \"span_id\": \"76966e6c01b4dedf\", \"request_id\": \"1f2dc31e-17be-433b-b6eb-12a3d548b7cf\", \"method\": \"POST\", \"route\": \"/api/v1/auth/sessions\", \"status\": 429}\n.{\"timestamp\": \"2026-11-07T18:39:56.449173+00:00\", \"severity\": \"INFO\", \"service.name\": \"messenger-api\", \"event\": \"http.request\", \"trace_id\": \"efbb722e22211c38bd5772aab61a12a4\", \"span_id\": \"4d9aa2c1437a6693\", \"request_id\": \"c4a1c350-7dc3-456e-8415-5d0df3644b33\", \"method\": \"POST\", \"route\": \"/api/v1/auth/sessions\", \"status\": 401}\n..\n----------------------------------------------------------------------\nRan 4 tests in 0.026s\n\nOK\n"
|
||||
},
|
||||
{
|
||||
"test": "telemetry_unit",
|
||||
"command": [
|
||||
"docker",
|
||||
"compose",
|
||||
"exec",
|
||||
"-T",
|
||||
"api-a",
|
||||
"/app/.venv/bin/python",
|
||||
"-"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "......\n----------------------------------------------------------------------\nRan 6 tests in 0.091s\n\nOK\n"
|
||||
},
|
||||
{
|
||||
"test": "observability",
|
||||
"command": [
|
||||
"python3",
|
||||
"student-tests/observability_tls.py"
|
||||
],
|
||||
"status": "PASS",
|
||||
"output": "PASS: Grafana connected to prometheus; data present\nPASS: Grafana connected to loki; data present\nPASS: Grafana connected to tempo; data present\n"
|
||||
}
|
||||
],
|
||||
"additional_checks": {
|
||||
"linux_synthetic_DAC": "PASS: student-tests/secret_file_permissions.py, disposable Linux container; not a full native Linux deployment",
|
||||
"runtime_hardening": "PASS: student-tests/runtime_hardening.py",
|
||||
"validate": "PASS: make validate",
|
||||
"credential_scan": "PASS: current tracked files compared to local generated credentials and private-key markers; Git history and image layers not scanned"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user