33This document describes how to configure the endpoints of Feldera components (API server, compiler,
44runner, pipelines) to serve HTTPS in the Enterprise edition.
55
6- - The same certificate (and thus private key) are used by all components
7- - Authentication (e.g., mTLS) is currently not yet supported (besides for the
8- [ existing authentication methods of the API server] ( authentication/index.mdx ) )
6+ For Feldera to support HTTPS with single-host pipelines, the
7+ administrator must configure Feldera with a [ wildcard
8+ certificate] ( #wildcard-certificate-generation ) and a private key for
9+ its main DNS domain, e.g. for ` *.feldera.svc.cluster.local ` . The
10+ Feldera API server, compiler runner, pipeline runner, pipeline
11+ stateful sets, and other top-level components share this certificate
12+ and key.
13+
14+ For Feldera to also support HTTPS with multihost pipelines, the
15+ administrator must additionally configure Feldera with a [ private CA
16+ certificate chain] ( #private-ca-certificate-chain-generation ) and
17+ private key. This allows the Feldera pipeline runner to generate keys
18+ for multihost pipeline pods in their nested DNS domains,
19+ e.g. ` <pipeline>-<ordinal>.<pipeline>.feldera.svc.cluster.local ` ,
20+ which a single wildcard certificate cannot cover. The generated
21+ certificates are only used for connections between Feldera components,
22+ such as between the pipeline pods and the pipeline manager, not
23+ external software.
24+
25+ ::: note
26+
27+ Feldera does not support mTLS authentication. The API server supports
28+ [ API authentication] ( authentication/index.mdx ) .
29+
30+ :::
931
1032This document does not apply to the connection to the Postgres database used by the control plane,
1133which can be [ configured separately] ( helm-guide.md ) .
@@ -19,23 +41,28 @@ as it expects HTTPS. The pipelines will need to be recompiled.
1941
2042:::
2143
22- ## Certificate
44+ ## Wildcard Certificate Generation
2345
24- A certificate and associated private key need to be generated for the relevant hostnames.
46+ To support HTTPS, the administrator must generate and install a
47+ wildcard certificate for ` *.<namespace>.svc.cluster.local ` , where
48+ ` <namespace> ` is the Kubernetes namespace in use, such as ` feldera ` .
2549
26- ### Certificate structure
50+ ::: info
2751
28- - The Feldera components communicate with each other in Kubernetes using the
29- ` SERVICE.NAMESPACE.svc.cluster.local ` hostnames.
30- - As such, a single certificate should be generated for the wildcard hostname
31- ` *.NAMESPACE.svc.cluster.local `
32- - (Optional) When using ` kubectl ` port forwarding, it is also useful to add
33- hostname ` localhost ` and/or ` 127.0.0.1 ` to the certificate
52+ When using ` kubectl ` port forwarding, it is also useful to add
53+ hostname ` localhost ` and/or ` 127.0.0.1 ` to the certificate.
54+
55+ :::
3456
35- ### Example (self-signed)
57+ Any method for generating a signed certificate is acceptable. We
58+ assume later that the certificate file is named ` tls.crt ` and the
59+ private key file ` tls.key ` . The following sections describe two ways
60+ to generate these files.
3661
37- For example, suppose that we install Feldera in namespace ` feldera ` and will
38- be using ` kubectl ` port forwarding.
62+ ### Generating a self-signed certificate with OpenSSL
63+
64+ Suppose that we install Feldera in namespace ` feldera ` and will be
65+ using ` kubectl ` port forwarding.
3966
40671 . Create ` x509_v3.ext ` to specify the SANs (Subject Alternative Names):
4168 ```
@@ -57,25 +84,105 @@ be using `kubectl` port forwarding.
5784
58853 . This will create the ` tls.key ` and ` tls.crt ` files.
5986
60- ### Not self- signed
87+ ### Using a certificate signed by an external CA
6188
6289If the certificate is not self-signed, but instead is signed by a root CA or an intermediate CA,
6390the ` tls.crt ` should contain the complete bundle of the entire chain up until the root certificate
6491authority. As such, it should contain multiple ` -----BEGIN CERTIFICATE----- (...) -----END CERTIFICATE----- `
6592sections, starting with the leaf certificate and ending with the root certificate. The ` tls.key `
6693should only contain the single private key of the leaf certificate.
6794
95+ ## Private CA Certificate Chain Generation
96+
97+ To support HTTPS for multihost pipelines, the administrator must
98+ additionally configure Feldera with a private CA certificate chain and
99+ private key. This allows the Feldera pipeline runner to generate keys
100+ for multihost pipeline pods in their nested DNS domains,
101+ e.g. ` <pipeline>-<ordinal>.<pipeline>.feldera.svc.cluster.local ` ,
102+ which a single wildcard certificate cannot cover.
103+
104+ The private CA certificate chain can be and should be separate from
105+ any other PKI, because it is used only for connections between Feldera
106+ components, such as between the pipeline pods and the pipeline
107+ manager, not external software.
108+
109+ Any method for generating a private CA certificate chain is
110+ acceptable. We assume later that the CA certificate chain file is
111+ named ` private_ca.crt ` and the private key file ` private_ca.key ` . The
112+ section below describes one way to generate these files.
113+
114+ ### Generating a private CA with OpenSSL
115+
116+ 1 . Create ` root_x509_v3.ext ` to specify options for the root private CA:
117+
118+ ```
119+ [x509_v3]
120+ basicConstraints = CA:TRUE,pathlen:1
121+ ```
122+
123+ 2 . Create ` intermediate_x509_v3.ext ` to specify options for the
124+ intermediate private CA:
125+
126+ ```
127+ [x509_v3]
128+ basicConstraints = CA:TRUE,pathlen:0
129+ ```
130+
131+ 3 . Generate the root CA with ` openssl ` :
132+
133+ ```
134+ openssl req -x509 -newkey rsa:4096 -nodes \
135+ -keyout private_root_tls.key -out private_root_tls.crt -days 365 \
136+ -subj '/CN=FelderaTest Private Root CA' \
137+ -config root_x509_v3.ext -extensions x509_v3
138+ ```
139+
140+ 4 . Generate and sign the intermediate CA with ` openssl ` :
141+
142+ ```
143+ openssl req -new -newkey rsa:4096 -nodes \
144+ -keyout private_intermediate_tls.key -out private_intermediate_tls.csr \
145+ -subj '/CN=FelderaTest Intermediate CA'
146+ openssl x509 -req \
147+ -in private_intermediate_tls.csr -CA private_root_tls.crt -CAkey private_root_tls.key \
148+ -CAcreateserial -out private_intermediate_tls.crt \
149+ -days 360 -sha256 \
150+ -extfile intermediate_x509_v3.ext -extensions x509_v3
151+ ```
152+
153+ 5 . Produce the secret to install into Kubernetes:
154+
155+ ```
156+ cat private_intermediate_tls.crt private_root_tls.crt > private_ca.crt
157+ cat private_intermediate_tls.key > private_ca.key
158+ ```
159+
68160## Configure Kubernetes
69161
70- 1 . Create the Kubernetes TLS Secret (e.g., in namespace ` feldera ` , and named ` feldera-https-config ` )
71- with the local ` tls.key ` and ` tls.crt ` files:
162+ 1 . Create the Kubernetes TLS secret for ` tls.key ` and ` tls.crt ` files
163+ from [ wildcard certificate
164+ generation] ( #wildcard-certificate-generation ) :
165+
72166 ```
73- kubectl create -n feldera secret tls feldera-https-config --key tls.key --cert tls.crt
167+ kubectl create -n <namespace> secret tls feldera-https-config --key tls.key --cert tls.crt
74168 ```
169+
75170 The secret (i.e., certificate and key) will be mounted as a directory with corresponding files
76171 by each of the Feldera component (API server, compiler, runner, pipelines) pods.
77172
78- 2 . Provide in the Helm installation the reference for the ` httpsSecretRef ` value.
173+ 2 . To additionally support multihost pipelines, create a Kubernetes
174+ TLS secret for ` private_ca.key ` and ` private_ca.crt ` from [ private
175+ CA certificate chain
176+ generation] ( #private-ca-certificate-chain-generation ) :
177+
178+ ```
179+ kubectl create -n <namespace> secret tls feldera-ca-config --key private_ca.key --cert private_ca.crt
180+ ```
181+
182+ 3 . Provide in the Helm installation the reference for the
183+ ` httpsSecretRef ` and, for multihost support, ` caSecretRef ` , value.
184+
185+ If you did not create the private CA for multihost pipeline support:
79186
80187 - ** Via file ` values.yaml ` :**
81188 ```
@@ -89,7 +196,24 @@ should only contain the single private key of the leaf certificate.
89196 --set httpsSecretRef="feldera-https-config"
90197 ```
91198
92- 3. (Optional) Port forward:
199+ If you did create the private CA for multihost pipeline support:
200+
201+
202+ - **Via file `values.yaml`:**
203+ ```
204+ httpsSecretRef: "feldera-https-config"
205+ caSecretRef: "feldera-ca-config"
206+ ```
207+
208+ - **In the command:**
209+ ```
210+ helm upgrade --install feldera \
211+ ... \
212+ --set httpsSecretRef="feldera-https-config" \
213+ --set caSecretRef="feldera-ca-config"
214+ ```
215+
216+ 4. (Optional) Port forward:
93217 ```
94218 kubectl port-forward -n feldera svc/feldera-api-server 8080:8080
95219 ```
0 commit comments