Implement Lab 7 service security
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"dashboard": "lab-messenger",
|
||||
"metrics": {
|
||||
"sum(messenger_http_requests_total)": 1268.0,
|
||||
"sum(messenger_http_requests_total{http_status_class=\"5xx\"})": 5.0,
|
||||
"sum(messenger_http_duration_seconds_count)": 1285.0,
|
||||
"sum(messenger_job_deliveries_total{job_outcome=\"ready\"})": 2.0,
|
||||
"sum(messenger_job_deliveries_total{job_outcome=\"failed\"})": 1.0,
|
||||
"sum(messenger_job_duration_seconds_count)": 7.0
|
||||
},
|
||||
"api_correlation": {
|
||||
"log": {
|
||||
"event": "http.request",
|
||||
"service": "messenger-api",
|
||||
"request_id": "0cc21942-1a53-4deb-bc85-6b8f0accf9aa",
|
||||
"method": "POST",
|
||||
"route": "/api/v1/chats/{chat_id}/messages",
|
||||
"status": 201,
|
||||
"duration_ms": 8.988,
|
||||
"trace_id": "6110ef0448fe6b85b2c1fb94f6e1fd14",
|
||||
"span_id": "08dc9f8ed4d18860"
|
||||
},
|
||||
"trace": {
|
||||
"name": "POST /api/v1/chats/{chat_id}/messages",
|
||||
"kind": "SPAN_KIND_SERVER",
|
||||
"attributes": {
|
||||
"http.request.method": "POST",
|
||||
"http.route": "/api/v1/chats/{chat_id}/messages",
|
||||
"http.response.status_code": "201",
|
||||
"request.id": "0cc21942-1a53-4deb-bc85-6b8f0accf9aa"
|
||||
},
|
||||
"events": []
|
||||
}
|
||||
},
|
||||
"worker_correlation": {
|
||||
"log": {
|
||||
"event": "job.process",
|
||||
"service": "messenger-worker",
|
||||
"job_type": "attachment.process.v1",
|
||||
"job_id": "cec20280-bdda-4536-96ef-003d969bb9fd",
|
||||
"attachment_id": "8ee954a0-1678-42cd-a8a7-ce0716f1d60d",
|
||||
"attempt": 1,
|
||||
"outcome": "ready",
|
||||
"reason": "completed",
|
||||
"duration_ms": 51.818,
|
||||
"trace_id": "87eea4a91c4673322b80830cac4c5711",
|
||||
"span_id": "aaf2cb7771b640e2"
|
||||
},
|
||||
"trace": {
|
||||
"name": "attachment.process.v1 process",
|
||||
"kind": "SPAN_KIND_CONSUMER",
|
||||
"attributes": {
|
||||
"messaging.system": "rabbitmq",
|
||||
"messaging.destination.name": "attachment.process.v1",
|
||||
"messaging.operation.type": "process",
|
||||
"messaging.message.id": "cec20280-bdda-4536-96ef-003d969bb9fd",
|
||||
"attachment.id": "8ee954a0-1678-42cd-a8a7-ce0716f1d60d",
|
||||
"job.attempt": "1",
|
||||
"job.outcome": "ready",
|
||||
"job.reason": "completed"
|
||||
},
|
||||
"events": []
|
||||
}
|
||||
},
|
||||
"postgresql_incident": {
|
||||
"log": {
|
||||
"event": "http.request",
|
||||
"service": "messenger-api",
|
||||
"request_id": "466cb0f2-c511-436c-8b9d-fd99e9add9fb",
|
||||
"method": "GET",
|
||||
"route": "/health/ready",
|
||||
"status": 503,
|
||||
"duration_ms": 3001.953,
|
||||
"trace_id": "a46361969771600c916b28e5d508bca3",
|
||||
"span_id": "377f8554ebdd353f"
|
||||
},
|
||||
"trace": {
|
||||
"name": "GET /health/ready",
|
||||
"kind": "SPAN_KIND_SERVER",
|
||||
"attributes": {
|
||||
"http.request.method": "GET",
|
||||
"http.route": "/health/ready",
|
||||
"http.response.status_code": "503",
|
||||
"request.id": "466cb0f2-c511-436c-8b9d-fd99e9add9fb"
|
||||
},
|
||||
"events": [
|
||||
"postgresql.unavailable"
|
||||
]
|
||||
}
|
||||
},
|
||||
"staging_incident": {
|
||||
"log": {
|
||||
"event": "job.process",
|
||||
"service": "messenger-worker",
|
||||
"job_type": "attachment.process.v1",
|
||||
"job_id": "4ffc61df-64a3-47a0-8ecb-1c03c5895f75",
|
||||
"attachment_id": "33658de2-021e-449b-ac59-8556ce2d4398",
|
||||
"attempt": 5,
|
||||
"outcome": "failed",
|
||||
"reason": "staging_unavailable",
|
||||
"duration_ms": 10.432,
|
||||
"trace_id": "c81d42e3a46b59a208501ada36fd6bad",
|
||||
"span_id": "bb9bc849fb1519f9"
|
||||
},
|
||||
"trace": {
|
||||
"name": "attachment.process.v1 process",
|
||||
"kind": "SPAN_KIND_CONSUMER",
|
||||
"attributes": {
|
||||
"messaging.system": "rabbitmq",
|
||||
"messaging.destination.name": "attachment.process.v1",
|
||||
"messaging.operation.type": "process",
|
||||
"messaging.message.id": "4ffc61df-64a3-47a0-8ecb-1c03c5895f75",
|
||||
"attachment.id": "33658de2-021e-449b-ac59-8556ce2d4398",
|
||||
"job.attempt": "5",
|
||||
"job.outcome": "failed",
|
||||
"job.reason": "staging_unavailable"
|
||||
},
|
||||
"events": []
|
||||
}
|
||||
},
|
||||
"staging_attempts": 5,
|
||||
"message_status_with_tempo_stopped": 201,
|
||||
"message_marker_absent": true
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"attachment_id": "3d49f5dc-08f2-4edd-a63a-0a86a13214c5",
|
||||
"message_id": "4e6d31db-7360-4eee-96f1-6c928cc0e70c",
|
||||
"upload_status": 202,
|
||||
"content_while_queued": 409,
|
||||
"queued_jobs_after_broker_restart_with_dispatcher_stopped": 1,
|
||||
"api_instance_ids_before": [
|
||||
"858cbfe89c094307a9febf9849ad5715",
|
||||
"f14fe9a6401c4989a2ea570dd74c0138"
|
||||
],
|
||||
"api_instance_ids_after": [
|
||||
"e1997bc255064e32b48b068428ed5bdf",
|
||||
"f82b717282324fff82d27dcb3274b906"
|
||||
],
|
||||
"message_preserved_after_restart": true,
|
||||
"final_status": "ready",
|
||||
"original_bytes_match": true,
|
||||
"thumbnail": {
|
||||
"name": "thumbnail",
|
||||
"width": 256,
|
||||
"height": 160,
|
||||
"sha256": "b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546",
|
||||
"size_bytes": 5813,
|
||||
"content_type": "image/jpeg"
|
||||
},
|
||||
"duplicate_acknowledged": true,
|
||||
"duplicate_preserved_metadata_and_bytes": true,
|
||||
"retry_limit": {
|
||||
"attachment_id": "dc0df370-c934-43c5-bc57-870e7c69ea38",
|
||||
"attempts": 5,
|
||||
"status": "failed",
|
||||
"error_code": "retry_exhausted"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"hostname": "hostname mismatch rejected",
|
||||
"replica_mtls": {
|
||||
"api1": {
|
||||
"allowed": {
|
||||
"status": 200,
|
||||
"instance": "9046d4e3a03a45619a3907f11f5287ef"
|
||||
},
|
||||
"absent": {
|
||||
"rejected": "ConnectionResetError"
|
||||
},
|
||||
"foreign-role": {
|
||||
"rejected": "ConnectionResetError"
|
||||
},
|
||||
"other-role": {
|
||||
"rejected": "RemoteDisconnected"
|
||||
}
|
||||
},
|
||||
"api2": {
|
||||
"allowed": {
|
||||
"status": 200,
|
||||
"instance": "de4fd09048a7475cba50875f797d16e3"
|
||||
},
|
||||
"absent": {
|
||||
"rejected": "ConnectionResetError"
|
||||
},
|
||||
"foreign-role": {
|
||||
"rejected": "ConnectionResetError"
|
||||
},
|
||||
"other-role": {
|
||||
"rejected": "RemoteDisconnected"
|
||||
}
|
||||
}
|
||||
},
|
||||
"openbao_restart": {
|
||||
"after_restart": {
|
||||
"initialized": true,
|
||||
"sealed": true
|
||||
},
|
||||
"after_operator_unseal": {
|
||||
"initialized": true,
|
||||
"sealed": false
|
||||
}
|
||||
},
|
||||
"scoped_access": {
|
||||
"api": {
|
||||
"allowed_keys": [
|
||||
"CURSOR_SECRET_FILE",
|
||||
"DATABASE_URL_FILE",
|
||||
"OTEL_INGEST_TOKEN",
|
||||
"S3_ACCESS_KEY_ID_FILE",
|
||||
"S3_SECRET_ACCESS_KEY_FILE"
|
||||
],
|
||||
"ttl_seconds": 300,
|
||||
"other_role": 403,
|
||||
"policy_write": 403,
|
||||
"after_revocation": 403,
|
||||
"s3_write_other_prefix": 403
|
||||
},
|
||||
"worker": {
|
||||
"allowed_keys": [
|
||||
"BROKER_URL_FILE",
|
||||
"DATABASE_URL_FILE",
|
||||
"OTEL_INGEST_TOKEN",
|
||||
"S3_ACCESS_KEY_ID_FILE",
|
||||
"S3_SECRET_ACCESS_KEY_FILE"
|
||||
],
|
||||
"ttl_seconds": 300,
|
||||
"other_role": 403,
|
||||
"policy_write": 403,
|
||||
"after_revocation": 403,
|
||||
"postgres_tls": true,
|
||||
"users_table": "denied",
|
||||
"broker_publish": 403,
|
||||
"s3_write_other_prefix": 403
|
||||
}
|
||||
},
|
||||
"telemetry_without_credentials": {
|
||||
"collector_ingest": 401,
|
||||
"prometheus_query": 403,
|
||||
"loki_query": 403,
|
||||
"tempo_query": 403,
|
||||
"loki_ingest": 403,
|
||||
"tempo_ingest": 403
|
||||
},
|
||||
"argon2id": {
|
||||
"memory_kib": 19456,
|
||||
"time_cost": 2,
|
||||
"parallelism": 1,
|
||||
"hash_p50_ms": 16.39,
|
||||
"hash_max_ms": 28.37,
|
||||
"samples": 10
|
||||
},
|
||||
"https_api": {
|
||||
"outsider_meta_content_attach": 404,
|
||||
"revoked_session": 401,
|
||||
"oversize_json": 413,
|
||||
"surviving_instances": {
|
||||
"api1": "de4fd09048a7475cba50875f797d16e3",
|
||||
"api2": "6d7527065cbb468892af76810ec02166"
|
||||
},
|
||||
"message_and_original_after_restart": true
|
||||
},
|
||||
"expired_session": 401,
|
||||
"rate_limit": {
|
||||
"status": 429,
|
||||
"request_number": 13,
|
||||
"retry_after_seconds": 10
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user