{ "captured_at": "2026-11-26T15:55:26Z", "checks": [ { "actual": "status=200 tls=TLSv1.3", "category": "external_tls", "description": "External HTTPS with valid CA and hostname succeeds", "evidence": { "peer_cert": { "serial": "1002", "sha256": "AEED97CDAA5A83C9CD32AE69EA1887B8BB3B18AA1CB1C79F769B8D1C03094FB0", "version": "TLSv1.3" } }, "expected": "HTTP 200 over TLSv1.2+", "id": "EXT-1-HTTPS-OK", "passed": true }, { "actual": "SSLCertVerificationError (unable to get local issuer certificate)", "category": "external_tls", "description": "External HTTPS rejects empty CA trust store", "expected": "SSLCertVerificationError", "id": "EXT-2-EMPTY-CA", "passed": true }, { "actual": "SSLCertVerificationError (unable to get local issuer certificate)", "category": "external_tls", "description": "External HTTPS rejects foreign untrusted CA", "expected": "SSLCertVerificationError", "id": "EXT-3-FOREIGN-CA", "passed": true }, { "actual": "SSLCertVerificationError (IP address mismatch, certificate is not valid for '127.0.0.1'.)", "category": "external_tls", "description": "External HTTPS rejects wrong hostname (127.0.0.1 not in SAN)", "expected": "SSLCertVerificationError", "id": "EXT-4-HOSTNAME-MISMATCH", "passed": true }, { "actual": "status=404", "category": "external_tls", "description": "/internal/metrics blocked with 404 on external :8443", "expected": "HTTP 404", "id": "EXT-5-INTERNAL-BLOCKED", "passed": true }, { "actual": "closed", "category": "external_tls", "description": "Plaintext HTTP port 8080 is closed on host", "expected": "TCP connection refused", "id": "EXT-6-PLAINTEXT-8080-CLOSED", "passed": true }, { "actual": "health=200, api=404, internal=404", "category": "health_isolation", "description": "API loopback 127.0.0.1:8081 serves /health/ready only and returns 404 on /api/* & /internal/*", "expected": "health=200, api=404, internal=404", "id": "EXT-7-HEALTH-ISOLATION", "passed": true }, { "actual": "replicas=2, published=[]", "category": "lb_to_api_mtls", "description": "API replicas publish zero host ports", "expected": ">=2 replicas, 0 published ports", "id": "MTLS-API-0-NO-HOST-PORTS", "passed": true }, { "actual": "status=None error=ERR_SSL_TLSV13_ALERT_CERTIFICATE_REQUIRED", "category": "lb_to_api_mtls", "description": "LB->API rejects connection without client certificate", "expected": "TLS handshake error", "id": "MTLS-API-1-NO-CERT", "passed": true }, { "actual": "status=None error=ECONNRESET", "category": "lb_to_api_mtls", "description": "LB->API rejects client certificate signed by foreign CA", "expected": "TLS handshake error", "id": "MTLS-API-2-FOREIGN-CA", "passed": true }, { "actual": "status=403 error=None", "category": "lb_to_api_mtls", "description": "LB->API rejects trusted-CA rogue-client identity (not CA-only)", "expected": "HTTP 403 (or TLS reject)", "id": "MTLS-API-3-ROGUE-CLIENT", "passed": true }, { "actual": "status=403 error=None", "category": "lb_to_api_mtls", "description": "LB->API rejects trusted-CA messenger-worker identity", "expected": "HTTP 403 (or TLS reject)", "id": "MTLS-API-4-WORKER-DENIED", "passed": true }, { "actual": "status=200 error=None", "category": "lb_to_api_mtls", "description": "LB->API accepts valid haproxy-lb client identity", "expected": "HTTP 200", "id": "MTLS-API-5-HAPROXY-OK", "passed": true }, { "actual": "connected=False code=ECONNREFUSED", "category": "broker_mtls", "description": "RabbitMQ plaintext port 5672 is closed", "expected": "ECONNREFUSED", "id": "MTLS-BROKER-0-PLAIN-CLOSED", "passed": true }, { "actual": "allowed=False error=ERR_SSL_TLSV13_ALERT_CERTIFICATE_REQUIRED", "category": "broker_mtls", "description": "RabbitMQ AMQPS 5671 rejects connection without client cert", "expected": "TLS reject", "id": "MTLS-BROKER-1-NO-CERT", "passed": true }, { "actual": "allowed=False error=ERR_SSL_TLSV1_ALERT_UNKNOWN_CA", "category": "broker_mtls", "description": "RabbitMQ AMQPS 5671 rejects foreign-CA client cert", "expected": "TLS reject", "id": "MTLS-BROKER-2-FOREIGN-CA", "passed": true }, { "actual": "allowed=False error=Handshake terminated by server: 403 (ACCESS-REFUSED) with message \"ACCESS_REFUSED - Login was refused using authentication mechanism EXTERNAL. For details see the broker logfile.\"", "category": "broker_mtls", "description": "RabbitMQ AMQPS 5671 rejects trusted-CA rogue-client identity", "expected": "ACCESS_REFUSED", "id": "MTLS-BROKER-3-ROGUE-CLIENT", "passed": true }, { "actual": "allowed=False error=Handshake terminated by server: 403 (ACCESS-REFUSED) with message \"ACCESS_REFUSED - Login was refused using authentication mechanism EXTERNAL. For details see the broker logfile.\"", "category": "broker_mtls", "description": "RabbitMQ AMQPS 5671 rejects trusted-CA haproxy-lb identity", "expected": "ACCESS_REFUSED", "id": "MTLS-BROKER-4-LB-DENIED", "passed": true }, { "actual": "allowed=False error=channel closed", "category": "broker_mtls", "description": "RabbitMQ denies messenger-worker publish to attachments.jobs", "expected": "ACCESS_REFUSED", "id": "MTLS-BROKER-5-WORKER-PUBLISH-DENIED", "passed": true }, { "actual": "allowed=True error=None", "category": "broker_mtls", "description": "RabbitMQ allows messenger-worker read on attachments.process", "expected": "allowed=True", "id": "MTLS-BROKER-6-WORKER-CONSUME-OK", "passed": true }, { "actual": "allowed=True error=None", "category": "broker_mtls", "description": "RabbitMQ allows messenger-api access to attachments.jobs", "expected": "allowed=True", "id": "MTLS-BROKER-7-API-PRODUCER-OK", "passed": true }, { "actual": "connected=False code=ECONNREFUSED", "category": "otel_mtls", "description": "OTel Collector loopback port 14318 unreachable outside shared netns", "expected": "ECONNREFUSED", "id": "MTLS-OTEL-0-LOOPBACK-CLOSED", "passed": true }, { "actual": "status=None error=ERR_SSL_TLSV13_ALERT_CERTIFICATE_REQUIRED", "category": "otel_mtls", "description": "OTel Gateway 4318 rejects OTLP push without client cert", "expected": "TLS handshake error", "id": "MTLS-OTEL-1-NO-CERT", "passed": true }, { "actual": "status=None error=ERR_SSL_TLSV1_ALERT_UNKNOWN_CA", "category": "otel_mtls", "description": "OTel Gateway 4318 rejects foreign-CA client cert", "expected": "TLS handshake error", "id": "MTLS-OTEL-2-FOREIGN-CA", "passed": true }, { "actual": "status=403 error=None", "category": "otel_mtls", "description": "OTel Gateway 4318 rejects trusted-CA rogue-client (SAN/CN allowlist)", "expected": "HTTP 403 (or TLS reject)", "id": "MTLS-OTEL-3-ROGUE-CLIENT", "passed": true }, { "actual": "status=403 error=None", "category": "otel_mtls", "description": "OTel Gateway 4318 rejects trusted-CA haproxy-lb identity", "expected": "HTTP 403 (or TLS reject)", "id": "MTLS-OTEL-4-LB-DENIED", "passed": true }, { "actual": "status=200 error=None", "category": "otel_mtls", "description": "OTel Gateway 4318 accepts valid messenger-api identity", "expected": "HTTP 200", "id": "MTLS-OTEL-5-API-OK", "passed": true }, { "actual": "status=200 error=None", "category": "otel_mtls", "description": "OTel Gateway 4318 accepts valid messenger-worker identity", "expected": "HTTP 200", "id": "MTLS-OTEL-6-WORKER-OK", "passed": true }, { "actual": "closed", "category": "postgres_tls", "description": "PostgreSQL port 5432 is not published on host", "expected": "TCP refused", "id": "TLS-PG-0-HOST-CLOSED", "passed": true }, { "actual": "connected=False error=pg_hba.conf rejects connection for host \"192.168.32.11\", user \"messenger_api\", database \"messenger\", no encryption", "category": "postgres_tls", "description": "PostgreSQL rejects plaintext TCP connection (hostnossl reject)", "expected": "connection rejected", "id": "TLS-PG-1-NOSSL-REJECTED", "passed": true }, { "actual": "connected=False error=Hostname/IP does not match certificate's altnames: Host: wrong-pg.local. is not in the cert's altnames: DNS:postgres, DNS:localhost", "category": "postgres_tls", "description": "PostgreSQL verify-full rejects hostname mismatch", "expected": "TLS hostname error", "id": "TLS-PG-2-WRONG-HOST", "passed": true }, { "actual": "connected=True row={'ssl': True, 'version': 'TLSv1.3'} error=None", "category": "postgres_tls", "description": "PostgreSQL verify-full TLS connection succeeds with pg_stat_ssl.ssl=true", "expected": "connected=True, ssl=True", "id": "TLS-PG-3-VERIFY-FULL-OK", "passed": true }, { "actual": "closed", "category": "redis_tls", "description": "Redis port 6379 is not published on host", "expected": "TCP refused", "id": "TLS-REDIS-0-HOST-CLOSED", "passed": true }, { "actual": "ok=False error=ECONNRESET", "category": "redis_tls", "description": "Redis plaintext TCP connection is rejected (--port 0)", "expected": "rejected", "id": "TLS-REDIS-1-PLAIN-REJECTED", "passed": true }, { "actual": "ok=False error=ERR_SSL_TLSV13_ALERT_CERTIFICATE_REQUIRED", "category": "redis_tls", "description": "Redis TLS rejects connection without client certificate (mTLS)", "expected": "TLS reject", "id": "TLS-REDIS-2-NOCERT-REJECTED", "passed": true }, { "actual": "ok=True reply=PONG error=None", "category": "redis_tls", "description": "Redis mTLS + messenger_api ACL succeeds on PING", "expected": "PONG", "id": "TLS-REDIS-3-MTLS-ACL-OK", "passed": true }, { "actual": "ok=False error=NOPERM User messenger_api has no permissions to run the 'config|get' command", "category": "redis_tls", "description": "Redis ACL denies CONFIG GET to messenger_api (NOPERM)", "expected": "NOPERM", "id": "TLS-REDIS-4-ACL-CONFIG-DENIED", "passed": true }, { "actual": "status=200", "category": "s3_tls", "description": "MinIO S3 serves HTTPS verified with local CA", "expected": "HTTP 200", "id": "TLS-S3-1-HTTPS-OK", "passed": true }, { "actual": "status=403", "category": "s3_tls", "description": "MinIO S3 rejects anonymous bucket access", "expected": "HTTP 403", "id": "TLS-S3-2-ANON-DENIED", "passed": true }, { "actual": "status=400", "category": "s3_tls", "description": "MinIO S3 rejects plaintext HTTP", "expected": "HTTP 400 / protocol error", "id": "TLS-S3-3-PLAIN-REJECTED", "passed": true }, { "actual": "status=200", "category": "openbao_tls", "description": "OpenBao serves HTTPS verified with local CA (initialized & unsealed)", "expected": "HTTP 200", "id": "TLS-BAO-1-HTTPS-OK", "passed": true }, { "actual": "SSLError", "category": "observability_tls", "description": "Prometheus rejects HTTPS client without mTLS certificate", "expected": "TLS handshake error", "id": "TLS-PROM-1-NOCERT-REJECTED", "passed": true }, { "actual": "status=401", "category": "observability_tls", "description": "Prometheus requires Basic Auth even with valid mTLS cert", "expected": "HTTP 401", "id": "TLS-PROM-2-NOAUTH-401", "passed": true }, { "actual": "status=200 up={'loki': '1', 'tempo': '1', 'rabbitmq': '1', 'haproxy': '1', 'prometheus': '1', 'otel-collector': '1'}", "category": "observability_tls", "description": "Prometheus mTLS + operator auth succeeds and all 6 mTLS scrape targets are up=1", "expected": "HTTP 200 and all 6 jobs up=1", "id": "TLS-PROM-3-MTLS-SCRAPES-UP", "passed": true }, { "actual": "status=401", "category": "observability_tls", "description": "Grafana HTTPS rejects unauthenticated datasource API access", "expected": "HTTP 401/403", "id": "TLS-GRAFANA-1-UNAUTH-401", "passed": true }, { "actual": "{\"loki\": {\"url\": \"https://loki:3100\", \"tlsSkipVerify\": false, \"tlsAuth\": true}, \"prometheus\": {\"url\": \"https://prometheus:9090\", \"tlsSkipVerify\": false, \"tlsAuth\": true}, \"tempo\": {\"url\": \"https://tempo:3200\", \"tlsSkipVerify\": false, \"tlsAuth\": true}}", "category": "observability_tls", "description": "Grafana datasources use HTTPS with tlsSkipVerify=false", "expected": "all datasources https:// & tlsSkipVerify=false", "id": "TLS-GRAFANA-2-DS-TLS-VERIFY", "passed": true }, { "actual": "status=None error=ERR_SSL_TLSV13_ALERT_CERTIFICATE_REQUIRED", "category": "observability_tls", "description": "loki:3100 rejects HTTPS without client certificate", "expected": "TLS handshake error", "id": "TLS-LOKI-1-NOCERT-REJECTED", "passed": true }, { "actual": "status=200 error=None", "category": "observability_tls", "description": "loki:3100 accepts valid mTLS client certificate", "expected": "HTTP 200", "id": "TLS-LOKI-2-MTLS-OK", "passed": true }, { "actual": "status=None error=ERR_SSL_TLSV13_ALERT_CERTIFICATE_REQUIRED", "category": "observability_tls", "description": "tempo:3200 rejects HTTPS without client certificate", "expected": "TLS handshake error", "id": "TLS-TEMPO-1-NOCERT-REJECTED", "passed": true }, { "actual": "status=200 error=None", "category": "observability_tls", "description": "tempo:3200 accepts valid mTLS client certificate", "expected": "HTTP 200", "id": "TLS-TEMPO-2-MTLS-OK", "passed": true }, { "actual": "rogue=403, prometheus=200", "category": "observability_tls", "description": "OTel Gateway :8888 allows prometheus cert and denies rogue-client", "expected": "rogue=403/TLS-err, prometheus=200", "id": "TLS-OTEL-METRICS-MTLS", "passed": true }, { "actual": "status=401", "category": "observability_tls", "description": "HAProxy HTTPS :8404/stats rejects unauthenticated request", "expected": "HTTP 401/403", "id": "TLS-HAPROXY-STATS-AUTH", "passed": true } ], "failed_count": 0, "failed_ids": [], "passed": true, "passed_count": 52, "started_at": "2026-11-26T15:55:01Z", "suite": "lab7-tls-audit", "summary": { "base_url": "https://localhost:8443", "ca_file": "/home/tomato/Projects/VP/mtusi2026lab7/secrets/pki/haproxy/ca.crt" }, "total": 52 }