lab7: исправления по независимому ревью

This commit is contained in:
Vladislav Kunetskiy
2026-11-10 14:22:47 +03:00
parent d1dc6d6b78
commit 30b6672058
18 changed files with 20572 additions and 20366 deletions
+1449 -1449
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
{"audit_events": {"update auth/cert/login": 1658, "update pki/issue/api": 18, "update pki/issue/worker": 34, "update pki/issue/relay": 12, "update pki/issue/lb": 14, "update pki/issue/postgres": 12, "update pki/issue/redis": 12, "update pki/issue/s3": 12, "update pki/issue/broker": 12, "update pki/issue/collector": 14, "update pki/issue/prometheus": 14, "update pki/issue/loki": 14, "update pki/issue/tempo": 14, "update pki/issue/grafana": 14, "update pki/issue/openbao": 14, "update pki/issue/operator": 14, "update auth/token/renew-self": 8746, "update pki/revoke": 10, "update pki/issue/rogue": 4}, "raw_credentials_exported": false}
+14
View File
@@ -0,0 +1,14 @@
2026-11-10, final image mtusi-messenger:lab7 (working tree -> lab7 branch)
go test ./... PASS
make lint PASS, 0 issues
make check PASS (offline structure/Python)
make validate PYTHON=.venv/bin/python PASS (OpenAPI 3.1 + JSON Schema)
make test PASS (public HTTPS smoke)
make test-security PASS (trusted HTTPS; untrusted CA rejected)
make test-lab7 14/14 security groups passed
make test-pki 3/3 repetitions passed
make auth-budget measured (hash_verify + api_auth)
make renew-once 15 roles + CRL sync passed
make test-persistence ACTION_SCRIPT=scripts/restart.sh PASS
make test-failover ACTION_SCRIPT=scripts/stop-one.sh PASS (93 writes, 0 failed, 1.36 s)
python3 scripts/check_evidence.py PASS (no obvious secrets/signed URLs/tokens)
+16 -16
View File
@@ -1,81 +1,81 @@
{
"timestamp": "2026-11-10T07:56:32.713259+00:00",
"timestamp": "2026-11-10T11:14:31.210330+00:00",
"ttl": "1h",
"roles": {
"api": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"api\", \"serial_number\": \"162d336ac64bf588cb605c18a7dfa5da2ba14770\", \"not_after\": \"Nov 10 08:56:32 2026 GMT\"}"
"output": "{\"role\": \"api\", \"serial_number\": \"1aa48f2c79560ee6255a712c07546a1e2674bd3b\", \"not_after\": \"Nov 10 12:14:31 2026 GMT\"}"
},
"worker": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"worker\", \"serial_number\": \"59ea998e72169b9ffd2ccf321b900bba95eee4a2\", \"not_after\": \"Nov 10 08:56:33 2026 GMT\"}"
"output": "{\"role\": \"worker\", \"serial_number\": \"26be7b87f0b59ce4afaaa7025e64f7a14f83ad64\", \"not_after\": \"Nov 10 12:14:31 2026 GMT\"}"
},
"relay": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"relay\", \"serial_number\": \"050c0d78612bc04f8deb11cbb6b94c803ec676ef\", \"not_after\": \"Nov 10 08:56:33 2026 GMT\"}"
"output": "{\"role\": \"relay\", \"serial_number\": \"56db38bc020935548ed33112df3e4872753fb5b1\", \"not_after\": \"Nov 10 12:14:32 2026 GMT\"}"
},
"lb": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"lb\", \"serial_number\": \"4cfeb215b9c8e2b0eef72160b7d4082814acc91a\", \"not_after\": \"Nov 10 08:56:33 2026 GMT\"}"
"output": "{\"role\": \"lb\", \"serial_number\": \"1f4dd141b7245ead56b2b76f30de0ae5c2f08b60\", \"not_after\": \"Nov 10 12:14:32 2026 GMT\"}"
},
"postgres": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"postgres\", \"serial_number\": \"204a420c319906ee249d192fbd773ccf1eef8525\", \"not_after\": \"Nov 10 08:56:34 2026 GMT\"}"
"output": "{\"role\": \"postgres\", \"serial_number\": \"2c22edc594ad37460d218aff16744a1e1eabab8a\", \"not_after\": \"Nov 10 12:14:33 2026 GMT\"}"
},
"redis": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"redis\", \"serial_number\": \"0c5b5d7282d991ffcc914249ff2b3234da8faca0\", \"not_after\": \"Nov 10 08:56:35 2026 GMT\"}"
"output": "{\"role\": \"redis\", \"serial_number\": \"1fe0f04dc1406f8504cc1e276bef84d75b9ba7d6\", \"not_after\": \"Nov 10 12:14:33 2026 GMT\"}"
},
"s3": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"s3\", \"serial_number\": \"219d03c95951446fe4e8bd2c17cf6c2b70db180d\", \"not_after\": \"Nov 10 08:56:35 2026 GMT\"}"
"output": "{\"role\": \"s3\", \"serial_number\": \"500905f19677e271be1123b81312e333c837df77\", \"not_after\": \"Nov 10 12:14:34 2026 GMT\"}"
},
"broker": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"broker\", \"serial_number\": \"0f5081d2cf86907ecbc441e10d2af1d8267fb7bd\", \"not_after\": \"Nov 10 08:57:01 2026 GMT\"}"
"output": "{\"role\": \"broker\", \"serial_number\": \"68673bd02eb82a061229fb567a81827a553b02de\", \"not_after\": \"Nov 10 12:14:45 2026 GMT\"}"
},
"collector": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"collector\", \"serial_number\": \"4607c993a50af826cde8a4315331c8624aef1702\", \"not_after\": \"Nov 10 08:57:13 2026 GMT\"}"
"output": "{\"role\": \"collector\", \"serial_number\": \"69bfc8ed94a3176a23706d6b04c535e52de70f07\", \"not_after\": \"Nov 10 12:14:57 2026 GMT\"}"
},
"prometheus": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"prometheus\", \"serial_number\": \"743c80e8de6cb6d51b8c1155b92d7f48be345ac7\", \"not_after\": \"Nov 10 08:57:13 2026 GMT\"}"
"output": "{\"role\": \"prometheus\", \"serial_number\": \"0ae5d6a037b34083d50e230753c1303d3a995042\", \"not_after\": \"Nov 10 12:15:28 2026 GMT\"}"
},
"loki": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"loki\", \"serial_number\": \"62f37ab0ac4eca0d85a8db5eb844209a7cba6340\", \"not_after\": \"Nov 10 08:57:14 2026 GMT\"}"
"output": "{\"role\": \"loki\", \"serial_number\": \"02ccff65b5564f63b1f079bdc113bdc3e09d0a5f\", \"not_after\": \"Nov 10 12:15:28 2026 GMT\"}"
},
"tempo": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"tempo\", \"serial_number\": \"5f446da237e9e07c67db3ba7887886ad6ed99747\", \"not_after\": \"Nov 10 08:57:16 2026 GMT\"}"
"output": "{\"role\": \"tempo\", \"serial_number\": \"2f934d2031a9168bd54e5d27194f5f9b97d10516\", \"not_after\": \"Nov 10 12:15:30 2026 GMT\"}"
},
"grafana": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"grafana\", \"serial_number\": \"601cb9ceacbde1d34e4d2ec959c769d1db506f16\", \"not_after\": \"Nov 10 08:57:19 2026 GMT\"}"
"output": "{\"role\": \"grafana\", \"serial_number\": \"2bd436cc066dbd03ec24d900e36a5aa8cd0857e8\", \"not_after\": \"Nov 10 12:15:33 2026 GMT\"}"
},
"openbao": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"openbao\", \"serial_number\": \"3ca03157e464ca40bed9321b187805e9df970e29\", \"not_after\": \"Nov 10 08:57:20 2026 GMT\"}"
"output": "{\"role\": \"openbao\", \"serial_number\": \"18bf225b8d809f02b344f0b1f0e53bfb6f5e50f5\", \"not_after\": \"Nov 10 12:15:34 2026 GMT\"}"
},
"operator": {
"ok": true,
"mode": "renew",
"output": "{\"role\": \"operator\", \"serial_number\": \"346438665915e9c02da93b59918763d6c042440d\", \"not_after\": \"Nov 10 08:57:24 2026 GMT\"}"
"output": "{\"role\": \"operator\", \"serial_number\": \"1466d3f2b333fe21138e4886d4e57ccc845d07f0\", \"not_after\": \"Nov 10 12:15:38 2026 GMT\"}"
}
},
"crls": {
+1 -1
View File
@@ -3,5 +3,5 @@ make test-persistence ACTION_SCRIPT=scripts/restart.sh
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
make test-failover ACTION_SCRIPT=scripts/stop-one.sh
{"observed_instances_before": 2, "successful_writes": 93, "failed_attempts": 0, "first_recovery_seconds": 1.36}
{"observed_instances_before": 2, "successful_writes": 84, "failed_attempts": 0, "first_recovery_seconds": 1.365}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
+53 -53
View File
@@ -15,7 +15,7 @@
},
"name": "public_ca_hostname",
"passed": true,
"seconds": 0.051
"seconds": 0.027
},
{
"classification": "passed",
@@ -37,12 +37,12 @@
},
"collector_api": {
"classification": "http_response",
"serial": "490E552FB82974E56757F142888CFDA7AAD6C312",
"serial": "69BFC8ED94A3176A23706D6B04C535E52DE70F07",
"status": 200
},
"collector_lb": {
"classification": "http_response",
"serial": "490E552FB82974E56757F142888CFDA7AAD6C312",
"serial": "69BFC8ED94A3176A23706D6B04C535E52DE70F07",
"status": 403
},
"collector_wrong_ca_client": {
@@ -51,32 +51,32 @@
},
"lb": {
"classification": "http_response",
"serial": "0155EAEEF71E5999CA92C032A92DDA01529D5EEB",
"serial": "1AA48F2C79560EE6255A712C07546A1E2674BD3B",
"status": 200
},
"loki_collector_route": {
"classification": "http_response",
"serial": "7F2B3167B45A2D4B63832E8E0C44E392E18A6DDF",
"serial": "02CCFF65B5564F63B1F079BDC113BDC3E09D0A5F",
"status": 403
},
"loki_grafana_route": {
"classification": "http_response",
"serial": "7F2B3167B45A2D4B63832E8E0C44E392E18A6DDF",
"serial": "02CCFF65B5564F63B1F079BDC113BDC3E09D0A5F",
"status": 403
},
"otel-collector_api_route": {
"classification": "http_response",
"serial": "490E552FB82974E56757F142888CFDA7AAD6C312",
"serial": "69BFC8ED94A3176A23706D6B04C535E52DE70F07",
"status": 403
},
"prometheus_grafana_route": {
"classification": "http_response",
"serial": "6029AFC83F7F9D0A57FF8B90F5A0C2750DDD8C64",
"serial": "0AE5D6A037B34083D50E230753C1303D3A995042",
"status": 403
},
"tempo_prometheus_route": {
"classification": "http_response",
"serial": "32371E0C6D4C3A2E5F2D47ECA5CEC729B3AC37F5",
"serial": "2F934D2031A9168BD54E5D27194F5F9B97D10516",
"status": 403
},
"wrong_uri": {
@@ -86,7 +86,7 @@
},
"name": "mtls_and_telemetry_acl",
"passed": true,
"seconds": 5.617
"seconds": 5.619
},
{
"classification": "passed",
@@ -135,7 +135,7 @@
},
"name": "broker_external_acl",
"passed": true,
"seconds": 3.922
"seconds": 3.914
},
{
"classification": "passed",
@@ -150,7 +150,7 @@
},
"name": "bao_api_policy",
"passed": true,
"seconds": 0.422
"seconds": 0.437
},
{
"classification": "passed",
@@ -179,7 +179,7 @@
},
"name": "seaweed_auxiliary_mtls",
"passed": true,
"seconds": 1.962
"seconds": 1.945
},
{
"classification": "passed",
@@ -191,7 +191,7 @@
},
"name": "redis_tls_cache_acl",
"passed": true,
"seconds": 0.369
"seconds": 0.412
},
{
"classification": "passed",
@@ -235,7 +235,7 @@
},
"name": "database_privileges",
"passed": true,
"seconds": 2.322
"seconds": 2.329
},
{
"classification": "passed",
@@ -304,7 +304,7 @@
},
"name": "s3_prefix_acl",
"passed": true,
"seconds": 0.704
"seconds": 0.733
},
{
"classification": "passed",
@@ -333,7 +333,7 @@
},
"name": "plaintext_refusal",
"passed": true,
"seconds": 1.948
"seconds": 1.92
},
{
"classification": "passed",
@@ -348,25 +348,25 @@
},
"name": "http_acl_logout_expiry_bounds",
"passed": true,
"seconds": 0.212
"seconds": 0.214
},
{
"classification": "passed",
"details": {
"attachment_id": "01a1c475-3caf-79fb-9773-48f42dac83a1",
"message_id": "01a1c475-3f41-70c2-ae58-5cdd189b49a8",
"attachment_id": "01a1c531-83ba-7adc-96f9-631390aaf0db",
"message_id": "01a1c531-8789-7a2b-ab28-2cdcd2e49aa9",
"status": "ready"
},
"name": "real_async_pipeline",
"passed": true,
"seconds": 0.664
"seconds": 0.992
},
{
"classification": "passed",
"details": {
"instances": [
"5ac7c7f4b4c1",
"c7f052699205"
"b5de44cc1680",
"c534d1225a79"
],
"retry_after": [
59,
@@ -392,35 +392,35 @@
},
"name": "shared_rate_limit",
"passed": true,
"seconds": 0.186
"seconds": 0.196
},
{
"classification": "passed",
"details": {
"containers_scanned": [
"44090eb99929",
"2af89a00f783",
"c12c8d58df88",
"1e262ec4cb1b",
"a79377c4bbbc",
"069ea30589fa",
"777189bb5cd5",
"5e3ba57943d6",
"0b631f460215",
"5b0de6ed0103",
"15dd9970ddd4",
"cd7d6970581b",
"11798cd9ae8c",
"b5de44cc1680",
"11f3801cb11f",
"274ce8478fdd",
"c534d1225a79",
"a0c8dd6b20a3",
"7984632bd709",
"158d63b7ac3c",
"f0227fea8781",
"62a070cbf1c7",
"21bab268e79a",
"01c1b15ae56e",
"1da94197b83d",
"c10b6dd1a9cb",
"9bc2d57bbc8a",
"41065fa7a807",
"92a23aef5975",
"3cda591b3fca",
"c29aa8ecccfb",
"85695e9822f0",
"eacebab2aafd",
"6ef95f7e9f28",
"085529fc6b9f",
"f652bb3c38e6",
"f4948c9a7a7e",
"c7f052699205",
"5ac7c7f4b4c1",
"946bc77e25af",
"cf186c1ce356",
"1df4bf079b3c",
"9770e79a39ef",
"8c8145d0204a"
"1df4bf079b3c"
],
"limitations": [
"Scans retained container logs and Loki streams with service_name; Tempo attributes and historic deleted logs are not text-scanned."
@@ -430,7 +430,7 @@
},
"name": "credential_log_sentinels",
"passed": true,
"seconds": 0.825
"seconds": 0.929
},
{
"classification": "passed",
@@ -438,26 +438,26 @@
"applications": {
"api": [
{
"id": "c7f052699205",
"id": "b5de44cc1680",
"readonly": true,
"running_uid_nonzero": true
},
{
"id": "5ac7c7f4b4c1",
"id": "c534d1225a79",
"readonly": true,
"running_uid_nonzero": true
}
],
"relay": [
{
"id": "f652bb3c38e6",
"id": "274ce8478fdd",
"readonly": true,
"running_uid_nonzero": true
}
],
"worker": [
{
"id": "f4948c9a7a7e",
"id": "11f3801cb11f",
"readonly": true,
"running_uid_nonzero": true
}
@@ -505,9 +505,9 @@
},
"name": "runtime_container_network_isolation",
"passed": true,
"seconds": 2.044
"seconds": 2.188
}
],
"study": "lab7-security",
"timestamp": "2026-11-10T07:56:23.609085+00:00"
"timestamp": "2026-11-10T11:22:03.202717+00:00"
}
+18893 -18779
View File
File diff suppressed because it is too large Load Diff