You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## This PR
The OpenTelemetry collectors in my production environment are configured
to use TLS for uploading metrics / traces so this PR aims to
- add the ability to use mTLS + self-signed certificates when exporting
to the opentelemetry collector
This is the 'quick and dirty' approach so wanted to make an initial PR
to make sure the high level implementation is the approach you're
looking for.
### Follow-up Tasks
- [ ] update the documentation when this approach is approved
### How to test
I am struggling to figure out how to test this with self signed
certificates to give a specific set of commands you can run because the
TLS connection is never successful (assuming this is because of my
commands)
```bash
openssl req -x509 -newkey rsa:4096 -keyout ca.key.pem -out ca.cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=localhost"
openssl req -x509 -newkey rsa:4096 -keyout client.key.pem -out client.cert.pem -CA ca.cert.pem -CAkey ca.key.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=localhost" -addext "subjectAltName = IP:127.0.0.1"
openssl req -x509 -newkey rsa:4096 -keyout server.key.pem -out server.cert.pem -CA ca.cert.pem -CAkey ca.key.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=localhost" -addext "subjectAltName = IP:127.0.0.1"
```
; however, when I pull certificates from my production environment to
test this works
---------
Signed-off-by: Kevin Schoonover <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Co-authored-by: Todd Baert <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
Copy file name to clipboardexpand all lines: docs/reference/flagd-cli/flagd_start.md
+18-14
Original file line number
Diff line number
Diff line change
@@ -11,20 +11,24 @@ flagd start [flags]
11
11
### Options
12
12
13
13
```
14
-
-C, --cors-origin strings CORS allowed origins, * will allow all origins
15
-
-h, --help help for start
16
-
-z, --log-format string Set the logging format, e.g. console or json (default "console")
17
-
-m, --management-port int32 Port for management operations (default 8014)
18
-
-t, --metrics-exporter string Set the metrics exporter. Default(if unset) is Prometheus. Can be override to otel - OpenTelemetry metric exporter. Overriding to otel require otelCollectorURI to be present
19
-
-r, --ofrep-port int32 ofrep service port (default 8016)
20
-
-o, --otel-collector-uri string Set the grpc URI of the OpenTelemetry collector for flagd runtime. If unset, the collector setup will be ignored and traces will not be exported.
21
-
-p, --port int32 Port to listen on (default 8013)
22
-
-c, --server-cert-path string Server side tls certificate path
23
-
-k, --server-key-path string Server side tls key path
24
-
-d, --socket-path string Flagd socket path. With grpc the service will become available on this address. With http(s) the grpc-gateway proxy will use this address internally.
25
-
-s, --sources string JSON representation of an array of SourceConfig objects. This object contains 2 required fields, uri (string) and provider (string). Documentation for this object: https://flagd.dev/reference/sync-configuration/#source-configuration
26
-
-g, --sync-port int32 gRPC Sync port (default 8015)
27
-
-f, --uri .yaml/.yml/.json Set a sync provider uri to read data from, this can be a filepath, URL (HTTP and gRPC) or FeatureFlag custom resource. When flag keys are duplicated across multiple providers the merge priority follows the index of the flag arguments, as such flags from the uri at index 0 take the lowest precedence, with duplicated keys being overwritten by those from the uri at index 1. Please note that if you are using filepath, flagd only supports files with .yaml/.yml/.json extension.
14
+
-C, --cors-origin strings CORS allowed origins, * will allow all origins
15
+
-h, --help help for start
16
+
-z, --log-format string Set the logging format, e.g. console or json (default "console")
17
+
-m, --management-port int32 Port for management operations (default 8014)
18
+
-t, --metrics-exporter string Set the metrics exporter. Default(if unset) is Prometheus. Can be override to otel - OpenTelemetry metric exporter. Overriding to otel require otelCollectorURI to be present
19
+
-r, --ofrep-port int32 ofrep service port (default 8016)
20
+
-A, --otel-ca-path string tls certificate authority path to use with OpenTelemetry collector
21
+
-D, --otel-cert-path string tls certificate path to use with OpenTelemetry collector
22
+
-o, --otel-collector-uri string Set the grpc URI of the OpenTelemetry collector for flagd runtime. If unset, the collector setup will be ignored and traces will not be exported.
23
+
-K, --otel-key-path string tls key path to use with OpenTelemetry collector
24
+
-I, --otel-reload-interval duration how long between reloading the otel tls certificate from disk (default 1h0m0s)
25
+
-p, --port int32 Port to listen on (default 8013)
26
+
-c, --server-cert-path string Server side tls certificate path
27
+
-k, --server-key-path string Server side tls key path
28
+
-d, --socket-path string Flagd socket path. With grpc the service will become available on this address. With http(s) the grpc-gateway proxy will use this address internally.
29
+
-s, --sources string JSON representation of an array of SourceConfig objects. This object contains 2 required fields, uri (string) and provider (string). Documentation for this object: https://flagd.dev/reference/sync-configuration/#source-configuration
30
+
-g, --sync-port int32 gRPC Sync port (default 8015)
31
+
-f, --uri .yaml/.yml/.json Set a sync provider uri to read data from, this can be a filepath, URL (HTTP and gRPC) or FeatureFlag custom resource. When flag keys are duplicated across multiple providers the merge priority follows the index of the flag arguments, as such flags from the uri at index 0 take the lowest precedence, with duplicated keys being overwritten by those from the uri at index 1. Please note that if you are using filepath, flagd only supports files with .yaml/.yml/.json extension.
0 commit comments