mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
[codex][otel] support mtls configuration (#6228)
fix for https://github.com/openai/codex/issues/6153 supports mTLS configuration and includes TLS features in the library build to enable secure HTTPS connections with custom root certificates. grpc: https://docs.rs/tonic/0.13.1/src/tonic/transport/channel/endpoint.rs.html#63 https: https://docs.rs/reqwest/0.12.23/src/reqwest/async_impl/client.rs.html#516
This commit is contained in:
committed by
GitHub
Unverified
parent
8ddae8cde3
commit
f7a921039c
@@ -651,6 +651,23 @@ Set `otel.exporter` to control where events go:
|
||||
}}
|
||||
```
|
||||
|
||||
Both OTLP exporters accept an optional `tls` block so you can trust a custom CA
|
||||
or enable mutual TLS. Relative paths are resolved against `~/.codex/`:
|
||||
|
||||
```toml
|
||||
[otel]
|
||||
exporter = { otlp-http = {
|
||||
endpoint = "https://otel.example.com/v1/logs",
|
||||
protocol = "binary",
|
||||
headers = { "x-otlp-api-key" = "${OTLP_TOKEN}" },
|
||||
tls = {
|
||||
ca-certificate = "certs/otel-ca.pem",
|
||||
client-certificate = "/etc/codex/certs/client.pem",
|
||||
client-private-key = "/etc/codex/certs/client-key.pem",
|
||||
}
|
||||
}}
|
||||
```
|
||||
|
||||
If the exporter is `none` nothing is written anywhere; otherwise you must run or point to your
|
||||
own collector. All exporters run on a background batch worker that is flushed on
|
||||
shutdown.
|
||||
|
||||
@@ -369,4 +369,17 @@ exporter = "none"
|
||||
# endpoint = "https://otel.example.com:4317",
|
||||
# headers = { "x-otlp-meta" = "abc123" }
|
||||
# }}
|
||||
|
||||
# Example OTLP exporter with mutual TLS
|
||||
# [otel]
|
||||
# exporter = { otlp-http = {
|
||||
# endpoint = "https://otel.example.com/v1/logs",
|
||||
# protocol = "binary",
|
||||
# headers = { "x-otlp-api-key" = "${OTLP_TOKEN}" },
|
||||
# tls = {
|
||||
# ca-certificate = "certs/otel-ca.pem",
|
||||
# client-certificate = "/etc/codex/certs/client.pem",
|
||||
# client-private-key = "/etc/codex/certs/client-key.pem",
|
||||
# }
|
||||
# }}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user