feat(telemetry): lab7 secure log and trace transport
This commit is contained in:
@@ -15,7 +15,7 @@ datasources:
|
||||
uid: opensearch
|
||||
type: grafana-opensearch-datasource
|
||||
access: proxy
|
||||
url: http://opensearch:9200
|
||||
url: http://127.0.0.1:9200
|
||||
editable: false
|
||||
jsonData:
|
||||
flavor: opensearch
|
||||
@@ -29,5 +29,5 @@ datasources:
|
||||
uid: jaeger
|
||||
type: jaeger
|
||||
access: proxy
|
||||
url: http://jaeger:16686
|
||||
url: http://127.0.0.1:16686
|
||||
editable: false
|
||||
|
||||
@@ -22,7 +22,11 @@ exporters:
|
||||
enabled: true
|
||||
opensearch:
|
||||
http:
|
||||
endpoint: http://opensearch:9200
|
||||
endpoint: https://opensearch:9200
|
||||
tls:
|
||||
ca_file: /tls/ca.crt
|
||||
cert_file: /tls/client.crt
|
||||
key_file: /tls/client.key
|
||||
logs_index: messenger-logs
|
||||
sending_queue:
|
||||
enabled: true
|
||||
@@ -31,7 +35,9 @@ exporters:
|
||||
otlp/jaeger:
|
||||
endpoint: jaeger:4317
|
||||
tls:
|
||||
insecure: true
|
||||
ca_file: /tls/ca.crt
|
||||
cert_file: /tls/client.crt
|
||||
key_file: /tls/client.key
|
||||
sending_queue:
|
||||
enabled: true
|
||||
queue_size: 64
|
||||
|
||||
@@ -18,4 +18,30 @@ http {
|
||||
proxy_pass https://$target;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 127.0.0.1:9200;
|
||||
location / {
|
||||
set $target "opensearch:9200";
|
||||
proxy_ssl_verify on;
|
||||
proxy_ssl_server_name on;
|
||||
proxy_ssl_name opensearch;
|
||||
proxy_ssl_trusted_certificate /tls/ca.crt;
|
||||
proxy_ssl_certificate /tls/client.crt;
|
||||
proxy_ssl_certificate_key /tls/client.key;
|
||||
proxy_pass https://$target;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 127.0.0.1:16686;
|
||||
location / {
|
||||
set $target "jaeger:16686";
|
||||
proxy_ssl_verify on;
|
||||
proxy_ssl_server_name on;
|
||||
proxy_ssl_name jaeger;
|
||||
proxy_ssl_trusted_certificate /tls/ca.crt;
|
||||
proxy_ssl_certificate /tls/client.crt;
|
||||
proxy_ssl_certificate_key /tls/client.key;
|
||||
proxy_pass https://$target;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
worker_processes 1;
|
||||
events { worker_connections 512; }
|
||||
http {
|
||||
access_log off;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
client_max_body_size 16m;
|
||||
server {
|
||||
listen 4317 ssl;
|
||||
http2 on;
|
||||
ssl_certificate /tls/server.crt;
|
||||
ssl_certificate_key /tls/server.key;
|
||||
ssl_client_certificate /tls/ca.crt;
|
||||
ssl_verify_client on;
|
||||
if ($ssl_client_s_dn !~ "^CN=lab7-telemetry-(collector)$") { return 403; }
|
||||
location = /opentelemetry.proto.collector.trace.v1.TraceService/Export {
|
||||
limit_except POST { deny all; }
|
||||
grpc_pass grpc://127.0.0.1:14317;
|
||||
}
|
||||
location / { return 403; }
|
||||
}
|
||||
server {
|
||||
listen 16686 ssl;
|
||||
ssl_certificate /tls/server.crt;
|
||||
ssl_certificate_key /tls/server.key;
|
||||
ssl_client_certificate /tls/ca.crt;
|
||||
ssl_verify_client on;
|
||||
if ($ssl_client_s_dn !~ "^CN=lab7-telemetry-(grafana)$") { return 403; }
|
||||
location /api/ {
|
||||
limit_except GET { deny all; }
|
||||
proxy_pass http://127.0.0.1:16687;
|
||||
}
|
||||
location / { return 403; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user